Challenge

Project 2 - Rankine cycle Simulator

The Rankine cycle is an idealized thermodynamic cycle describing the process by which certain heat engines, such as steam turbines or reciprocating steam engines, allow mechanical work to be extracted from a fluid as it moves between a heat source and heat sink. The Rankine cycle is named after William John Macquorn Rankine, a Scottish polymath professor at Glasgow University.

Heat energy is supplied to the system via a boiler where the working fluid (typically water) is converted to a high pressure gaseous state (steam) in order to turn a turbine. After passing over the turbine the fluid is allowed to condense back into a liquid state as waste heat energy is rejected before being returned to boiler, completing the cycle. Friction losses throughout the system are often neglected for the purpose of simplifying calculations as such losses are usually much less significant than thermodynamic losses, especially in larger systems.

PROCESS 1-2:

Water from the condenser at low pressure is pumped into the boiler at high pressure, this is a reversible adiabatic process

PROCESS 2-3:

Water is converted into steam at constant pressure by addition of heat in the boiler

PROCESS 3-4:

Reversible adiabatic expansion of steam in the steam turbine

PROCESS 4-1:

Constant pressure heat rejection in the condenser to condensate vapour into water

we can solve the Rankine cycle with one simple conservation equation

∂(Q)−∂(W)=d(h)+cd(c)+gd(z)−−−(1)∂(Q)-∂(W)=d(h)+cd(c)+gd(z)---(1)

here

Q=heat added or rejected

W=work done

d(h)=change in enthalpy

d(z)=change in potential energy

d(c)=change in kinetic energy

in

In the Turbine

Here the

input is high pressure ,high temperature steam

output is low pressure ,high temperature steam

so this process can be considered isentropic process so d(Q)=0d(Q)=0

there no change in the potential end kinetic energy sod(z)=0,d(c)=0d(z)=0,d(c)=0

now lets look at equation (1)

0−∂(w)=d(h)+0+00-∂(w)=d(h)+0+0

=>wt=h1−h2wt=h1-h2

work output from the turbine =difference in the enthalpy

In the Nozzele

It is used to increase the velocity of the steam before entering into tubine.It is apassage with variable cross section

here

There is no heat transfered so d(Q)=0d(Q)=0

There is no work done so d(W)=0d(W)=0

There is no change in the potential energy sod(z)=0d(z)=0

so the equation (1) becomes

=>d(h)=−cd(c)d(h)=-cd(c)

=>h2−h1=−c22−c212h2-h1=-c22-c122

=>h1−h2=c22−c212h1-h2=c22-c122

but here c1c1is very small and negligble as outlet velocity is very high than the inlet velocity so c21=0c12=0

=>h2−h1=c222h2-h1=c222

=>c2=√2(h2−h1)c2=2(h2-h1)

In the Pump

It is used to feed water into to boiler from the conderser

the work done here is adiabatic and isentropic so d(Q)=0d(Q)=0

and there is no change in the kinetic and potential enerhy sod(c)=0,d(z)=0d(c)=0,d(z)=0

so the equation (1) becomes

d(h)=−d(w)d(h)=-d(w)

but the work done here is negative so

Wp=h4−h3Wp=h4-h3

now

Net work done =Workdone by Turbine +Workdone by Pump

wn=wt−wpwn=wt-wp

Efficiency=ratio of Net workdone to Workdone by Turbine

efficiency=wr=(WnWt)=(h1−h2)−(h4−h3)h1−h6

% Programme
clear all
close all
clc
%taking the inputs
tip=input('please enter turbine input pressure : ');
tit=input('please enter turbine input temperature : ');
cop=input('please enter condenser operating pressure : ');
st=XSteam('Tsat_p',tip);
if tit>st
disp(' The given input conditions lie in super heated state');
else
disp(' The given input conditions lie in saturated state');
end
h1=XSteam('h_pT',tip,tit);
s1=XSteam('s_pT',tip,tit);
s2=s1;
sv=XSteam('sV_p',cop);
sl=XSteam('sL_p',cop);
x=(s2-sl)/(sv-sl);
hl=XSteam('hL_p',cop);
hv=XSteam('hV_p',cop);
h2=hl+x*(hv-hl);
h3=hl;
v3=XSteam('vL_p',cop);
h4=v3*(tip-cop)*100+h3;
p1=tip;
p5=tip;
p2=cop;
p3=cop;
t1=tit;
t5=XSteam('Tsat_p',tip);
t3=XSteam('Tsat_p',cop);
t2=t3;
s3=sl;
s4=sl;
p4=tip;
cp=XSteam('Cp_ps',p4,s4);
cv=XSteam('Cv_ps',p4,s4);
gamma=cp/cv;
t4=t3*((p4/p3)^((gamma-1)/(gamma)));
s5=XSteam('sL_p',tip);
s=linspace(s4,s1,500);
for i=1:length(s)
t(i)=XSteam('T_ps',tip,s(i));
end
% in this part of the code we are calculating and asigning various values
%
% Enthalpy at turbine input is calculated as function of Input pressure,temperature
h1=XSteam('h_pT',tip,tit);
% tip=turbine input pressure
%
% tit=turbine input temperature
%
% similarly
s1=XSteam('s_pT',tip,tit);
% as process 1-2 is isentropic
s1=s2
% now to calculate enthalpy value at the end of turbine process we need to find out the dryness factor
sv=XSteam('sV_p',cop);
sl=XSteam('sL_p',cop);
x=(s2-sl)/(sv-sl);
% here
%
% sv=saturate vapor entropy
%
% sl=saturate liquid entropy
%
% cop=condenser operating pressure
hl=XSteam('hL_p',cop);
hv=XSteam('hV_p',cop);
h2=hl+x*(hv-hl);
% here
%
% hv=saturate vapor enthalpy
%
% hl=saturate liquid enthalpy
%
% as the change in volume of the liquid while being pumped we are going to take the volume as a function pressure so
v3=XSteam('vL_p',cop);
% vL_p =volume of liquid at pressure p
s=linspace(s4,s1,500);
for i=1:length(s)
t(i)=XSteam('T_ps',tip,s(i));
end
work_of_turbine=h1-h2;
ssc=3600/work_of_turbine;
heat_rejected_in_condenser=h2-h3;
heat_added_in_boiler=h1-h4;
pump_work=v3*(tip-cop)*100;
net_work=work_of_turbine-pump_work;
thermal_efficiency=(1-((h2-h3)/(h1-h4)))*100;
% this part of code calculates all the final values
tsat=linspace(0,t1,500);
for i=1:length(tsat)
ssat(i)=XSteam('sV_t',tsat(i));
Ssat(i)=XSteam('sL_t',tsat(i));
hsat(i)=XSteam('hV_t',tsat(i));
Hsat(i)=XSteam('hL_t',tsat(i));
end
% this for loop is used to ca
%
% lcuate h, s coordinates for hs saturation curve
%
% Step 3 : Plotingher
figure(1)
plot([s1 s2 s3 s4 s5 s],[t1 t2 t3 t4 t5 t])
hold on
%plot(s,t);
plot([ssat,Ssat],[tsat,tsat]);
%plot(Ssat,tsat);
xlabel('Entropy S');
ylabel('Temperature T');
legend('T vs S plot','Saturation plot');
figure(2)
plot([s1,s2,s3,s4 s1],[h1,h2,h3,h4,h1])
hold on
plot([ssat,Ssat],[hsat,Hsat]);
xlabel('Entropy S');
ylabel('Enthalpy H');
legend('H vs S plot','Saturation plot');
disp('AT state point 1:')
fprintf('P1=%f bar\n',p1)
fprintf('T1=%f deg celcius\n',t1)
fprintf('H1=%f kj/kg\n',h1)
fprintf('S1=%f kj/kgk\n',s1)
disp('AT state point 2:')
fprintf('P2=%f bar\n',p2)
fprintf('T2=%f deg celcius\n',t2)
fprintf('H2=%f kj/kg\n',h2)
fprintf('S2=%f kj/kgk\n',s2)
fprintf('X=%f\n',x)
disp('AT state point 3:')
fprintf('P3=%f bar\n',p3)
fprintf('T3=%f deg celcius\n',t3)
fprintf('H3=%f kj/kg\n',h3)
fprintf('S3=%f kj/kgk\n',s3)
disp('AT state point 4:')
fprintf('P4=%f bar\n',p4)
fprintf('T4=%f deg celcius\n',t4)
fprintf('H4=%f kj/kg\n',h4)
fprintf('S4=%f kj/kgk\n',s4)
fprintf('work done by the turbine=%f kj/kg\n',work_of_turbine)
fprintf('pump work=%f kj/kg\n',pump_work)
fprintf('net work=%f kj/kg\n',net_work)
fprintf('therma efficiency =%f\n ',thermal_efficiency)
fprintf('specifc steam cunsumption =%fkg/kwh\n ',ssc)
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.