Facebook
From Innocent Porcupine, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 90
  1. function [Tt2,pt2,m2] = turbina(Tt1,pt1,m1,Pt,et,mch,Tch)
  2.  
  3. %et[et,etR]
  4. Cp1=1200;
  5. R=287;
  6. k1=1/(1-R/Cp1);
  7. Cp2=1100;
  8. k2=1/(1-R/Cp2);
  9. if exist('et','var')==0
  10.     et=[1,0];
  11.     mch=0;
  12.     Tch=0;
  13. end
  14. if exist('mch','var')==0
  15.     mch=0;
  16.     Tch=0;
  17. end
  18. if exist('Tch','var')==0
  19.     Tch=mch;
  20.     mch=et;
  21.     et=[1,0];
  22. end
  23. Tt2=(m1*Cp1*Tt1-Pt+mch*Cp2*Tch)./(m1*Cp1+mch*Cp2);
  24. m2=m1+mch;
  25. if et(2)==0
  26.     Pit=(et(1)./(et(1)+Tt2./Tt1-1)).^(k1./(k1-1));
  27. elseif et(2)==1
  28.     Pit=(Tt1./Tt2)^(k1/(k1-1)/et(1));
  29. end
  30. pt2=pt1./Pit;
  31.  
  32. end
  33.  
  34.