Challenge

Project 2 - Rankine cycle Simulator

The Rankine cycle is an thermodynamic cycle on which heat engines work, steam turbines allow mechanical work to be extracted out from a fluid(water) as it moves between a heat source and condenser.

thus comparable with OTTO cycle, this cycle also follows four processes and thus have four state points. hhere, state points are not calculated via formulas but taken from steam table when pressure orntemp is given at that state. entropy, enthalpy, are function of prressure and temp. we have been provided XSteam library in order to calculate h and s at four points'

steps or processes involved in rankine cycle:

1-2 : isentropic expansion in turbine

2-3: isochoric heat rejection

3-4: iscentropic compression in pump

4-1: isochoric heat addition in boiler.

%inputs

temp and pressure at state 1 and pressure at state 2(p2);
t1 =400; p1= 30; p2 = 0.05;

using XSteam library and using notations given we will calculate h1 and s1 as following;

h1 = XSteam('h_pT',30,400);
s1 = XSteam('s_pT',30,400);

after getting h,s values at state1 a, we wil be calculating at state 2;

% at state 2:
s2 =s1; since process (1- 2 )is isentropic expansion in turbine , thus entropy remains same

%TEMP AT 2; (t2/t1) = (p2/p1)^(1-(1/g));
g = 1.4;
t2 = t1 * (p2/p1)^(1-(1/g));

by using above equations we will get temperature at state 2(t2);

h2 = XSteam('h_pT',0.05,t2); enthalpy at state 2;

% at state 3:

p3 = p2; for 2-3, it is an isochoric process, thus pressure remains constant.
t3 = t2; for 2-3, temperature also remains constant.
h3 = XSteam('hL_T',t3);
s3 = XSteam('sL_T',t3);

% at state 4:
s4 = s3; entropy remains constant, because of iscentropic process
p4 = p1;
t4 = XSteam('T_ps',p4,s4);
h4 = XSteam('h_pT',p4,t4);
h41 = XSteam('hL_p',p4);
s41 = XSteam('sL_p',p4);
h42 = XSteam('hV_p',p4);
s42 = XSteam('sV_p',p4);
t41 = XSteam('T_hs',h41,s41);
t42 = XSteam('T_hs',h42,s42);

points h41,s41, are in liquid phase thus accordingly data is extracted out from XSteam library.

points h42,s42 are in vapour phase thus accordingly data is extracted out from XSteam library.

% enthalpy and entropy at saturation curve
temp = linspace(0,500,580);
for i = 1: length(temp);
sv(i) = XSteam ('sV_T', temp(i));
sl(i) = XSteam('sL_T', temp(i));

hv(i) = XSteam('hV_T', temp(i));
hl(i) = XSteam('hL_T',temp(i));
end

above for loop was made in order to evaluate all the points on saturation curve w.r.t temp. we cannnot simply connect the points or states in plot, because it will be wrong if we make a line for saturation curve thus loop is constructed and executed.

now ,after knowing all state points as well as points of saturation curve, we will be plotting plot for t-s;

% plot for entropy and temperature;


figure(1)
plot([s1 s2],[t1 t2],[s2 s3],[t2 t3],[s3 s4],[t3 t4],[s4 s41],[t4 t41],[s41 s42],[t41 t42],[s42 s1],[t42 t1],'marker','*','Color','r');
hold on
plot(sv,temp)
plot(sl,temp)
xlabel('Entropy')
ylabel('temperature')

similarly plotting graph for h-s:

% plot for entropy and enthalpy
figure(1)
plot([s1 s2],[h1 h2],[s2 s3],[h2 h3],[s3 s4],[h3 h4],[s4 s1],[h4 h1],'marker','*','Color','b');
hold on
plot(sv,hv)
plot(sl,hl)
xlabel('Entropy')
ylabel('enthalpy')

after plotting graphs , we will be calculating thermal efficiency and net work output by cycle:

% net work output
wt = h1 -h2;
wp = h4 - h3;
w_net = wt - wp;

% thermal efficiency
Qin = h1 -h4;
eff_thermal = (w_net/Qin)*100;

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.