Project 2 - Rankine cycle Simulator
from the given question inlet values are taken into considerration
and the given file xstream from the specified link
rankin cycle is consists of the mainly temperatures ,enthalpy and entropy,pressures and specific volume and dry temperature
later the water is passed from the pump to the bolier abd to the trubine and to the condenser
the temperature before entering the trubine is taken as t1
in the same way pressure is taken as the p1
and the pressure at the condenser is taken as the p2
for finding the enthlapy we ues the xstream file and with the specific command we find out the enthlapy as with the reference with the temperature and pressure as h1
entropy is also similar to the enthlapy
while doing the process we find the specif volume with reference to the volume at the liquid as starturated liquid temperature
as given
v1=XSteam('VL_P',p1)
v2=XSteam('VL_P',p2) this is athe condenser
abd work done by the pump is caluclated with the specifevolume as
wp=-(100*v1*(p2-p1))
s1=XSteam('s_pt',p1,t1) entropy is find out by using the pressure and temperature
enthalpy of the trubine pressure is found by using the xstream file as given command this help us to find the enthalpy with enthalpy in liquid at pressure at trubine
h1=XSteam('HL_P',p1)
enthlapy at condenser is caluclated by using the work of pump and the enthlapy at trubin
h2=h1-wp
enthlapy at pump is consider by taking the det or wetness factor or by thhe pressure and temperature at enthlapy at liquid with refernce to pressure
h3=XSteam('HL_P',p3,t3)
entlapy at entering into the pressure is caluclated with the pump work and the enthalpy at h3
h4=wp+h3
low temperature can be found by the xstream file by using the command with refernecr to the pressure and enthaply
t2=XSteam('T_ph',p2,h2)
t3=t2
heat input in the rankin cycle is taken into condseration by the enthaply at entry and exit of the bolier
qin=h2-h3
work done by the trubine is calculated by the h3-h4
%%work done in the trubine
s3=XSteam('SL_T',p2,t2)
s4=s3
h4=s4
wt=h3-h4
the net work can be calculated based on the workinput difference work out put wnet=wt-wp
ration of the work is calculated based on the woutput to the input
ratio=wt/wp
efficeny of the rankine cycle is calculated by the worknet to the heatinput
efficeny=100*(wt-abs(wp))/qin
this for loop are used to identify the plotting point on the graph for each point but i
for i=1:length(t)
T=t(i)
for j=1:length(h)
H=h(j)
for k=1:length(s)
S=s(k)
end
end
end
figure(2)
plot(H,T)
legend('temp','entropy')
title('graph between the temp vs entropy')
xlabel('ENTROPY')
ylabel('TEMPERATURE')
grid on
figure(1)
plot(H,S)
hold onlegend('entropy','enthlapy')
title('graph between the temp vs enthlapy')
xlabel('Enthaply')
ylabel('tmeperature')
grid on
ERROR
while doing the polting for the second figure(2) unable to use the title and legend
unable to plot the graph for the t and s and the h vs s please