Rankine cycle Simulator
The Rankine cycle is an important system which is used in trucks,electricity genrators.etc.Here in this project we have modelled a rankine cycle with the given input arguments and to get its respective enthalpy,entropy,temprature & pressure values with the help of a steam table.We have consideredthe turbine as '1' and proceede further calculations to get the efficiency, net work output,work ratio of a ideal rankine cycle.We have also attached the code and the plotted graph.
%IDEAL RANKINE CYCLE CALCULATED WITH STEAM TABLE
%THE INPUT ARGUMENTS ARE ALREADY GIVEN
t1=400 %celcius
p1=30 %bar
p2=0.05 %bar
%MAKE SURE THE XSteam is in same directory
h1=XSteam('h_pT',p1,t1) %enthalpy
sg=XSteam('sV_p',p2)
s1=XSteam('s_pT',p1,t1) %entropy
%checked via a steam table book by R.S.Khurmi
Tsat=233.8
s2=s1
hf=137.8
hfg=2423.8
sf=0.476
s3=sf
sfg=7.92
s4=sfg
%formulae are referred in thermodyanamics book
x=(s2-sf)/sfg
h2=hf+(x*hfg)
v=XSteam('vL_p',p2)
Wp=v*(p1-p2)
h3=hf
p3=p2
p4=p1
h4=Wp+h3
%calculates the efficiency,net work output,back work ratio
effeciency=((h1-h2)-(h3-h4))/(h1-h4)
%turbine work-pump work
Wnet=(h1-h2)-(h3-h4)
%Wnet w.r.t condenser isentropic heat rejection work input
work_ratio=((h1-h2)-(h3-h4))/(h1-h2)
Q1=h1-h4
Q2=h2-h3
cv=4.186
t2=32.90
t3=XSteam('Tsat_p',p3)
s3=XSteam('sL_p',p3)
s4=s3
cp=XSteam('Cp_ps',p4,s4)
cv=XSteam('Cv_ps',p4,s4)
g=cp/cv
o=(g-1)/g
t4=t3*((p4/p3)^o)
%the points are connected by LINE command
line([s1 s2],[t1 t2],'color','r')
hold on
line([s2 s3],[t2 t3],'color','b')
hold on
line([s3 s4],[t3 t4],'color','b')
hold on
line([s4 s1],[t4 t1],'color','c')
xlabel('ENTROPY(kJ/(kg K)')
ylabel('TEMPRATURE(^\circC)')
THE FOLLOWING OUTPUTS ARE