Project 2 - Rankine cycle Simulator
%simple ranking cycle
% the pressure in the condenser
p1=30; bar
p4=0.05; bar
%the maximal temperature
t1=400;
%the pressure in the boiler
p3=20;
p2=p3;
%computation of the work of the pump
v1=xsteam('vl_p',p1);
wp=-100*v1*(p2-p1)
% computation of qin
h1=xsteam('hl_p',p1);
h2=h1-wp;
h3=xsteam('h_pt',p3,t3);
qin=h3-h2
%computational of the turbine
s3=xsteam('s_pt',20,400)
s4=s3;
h4=xsteam('h_ps',p4,s4)
wt=h3-h4