Project 2 - Rankine cycle Simulator
OBJECT: TO SIMULATE RANKINE CYCLE USING MATLAB
THEORY:
RANKINE CYCLE
The Rankine cycle is a model used to predict the performance of steam turbine systems. It was also used to study the performance of reciprocating steam engines. The Rankine cycle is an idealized thermodynamic cycle of a heat engine that converts heat into mechanical work while undergoing phase change.
The efficiency of the Rankine cycle is limited by the high heat of vaporization of the working fluid.
Carnot efficiency for the steam turbine alone of about 63.8% compared with an actual overall thermal efficiency of up to 42% for a modern coal-fired power station
There are four processes in the Rankine cycle. The states are identified by numbers (in brown) in the T–s diagram.
Process 1–2: The working fluid is pumped from low to high pressure. As the fluid is a liquid at this stage, the pump requires little input energy.
In other words Process 1-2 is [Isentropic compression]
Process 2–3: The high-pressure liquid enters a boiler, where it is heated at constant pressure by an external heat source to become a dry saturated vapour. The input energy required can be easily calculated graphically, using an enthalpy–entropy chart (h–s chart, or Mollier diagram), or numerically, using steam tables.
In other words Process 2-3 is [Constant pressure heat addition in boiler]
Process 3–4: The dry saturated vapour expands through a turbine, generating power. This decreases the temperature and pressure of the vapour, and some condensation may occur. The output in this process can be easily calculated using the chart or tables noted above.
In other words Process 3-4 is [Isentropic expansion]
Process 4–1: The wet vapour then enters a condenser, where it is condensed at a constant pressure to become a saturated liquid.
In other words Process 4-1 is [Constant pressure heat rejection in condenser]
Variable of rankine cycle.
Work done on pump, per kg of water, WP= h2-h1
Energy added in steam generator, q1= h3-h2
Work delivered by turbine, WT= h3-h4
Energy rejected in the condenser, q2= h4-h1
The thermal efficiency of the Rankine cycle is given by,
RANKINE CYCLE ARRANGEMENT:
TS DIAGRAM OF RANKINE CYCLE:
Required Inputs:
Turbine Inlet temperature = 400° C
Turbine Inlet Pressure = 30 bars
Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure
OBJECTIVE:To Calculate the followings,
1.Net work output
2.Back work ratio
MAIN MATLAB PROGRAM :
%program to calculate the net work outout and back work ratio
%to take user input
T3=input('enter inlet temperture in turbine(celcius)\n');
p3=input('enter inlet pressure of turbine in (bar)\n');
p4=input('enter outlet pressure of turbine in (bar)\n');
%processes are
%1-2 isentropic comperession
%2-3 isobaric heat adission
%3-4 isentropic expansion
%4-1 isobsric heat rejection
%to calculate enthalpy for point 3
h3=XSteam('h_pT',p3,T3);
%to calculate enthalpy for point 1
hf1=XSteam('hL_p',p4);
%to calculate entropy for point 3
s3=XSteam('s_pT',p3,T3);
%as line 3-4 is isentropic
s4=s3;
%calculate entropy at point1
sf1=XSteam('sL_p',p4);
%calculating entropy diff at 0.005 bar
sfg4=XSteam('sV_p',p4)-XSteam('sL_p',p4);
%to calculate quality of steam for point 4
X=(s4-sf1)/sfg4;
%enthalpy diff at 0.005 bar
hfg4=XSteam('hV_p',p4)-XSteam('hL_p',p4);
%enthalpy at point 4
h4=hf1+(X*hfg4);
%work out at turbine
Wt=h3-h4;
%specific volume at point1
vf=XSteam('vL_p',p4);
%work consumed by pump
Wp=vf*(p3-p4);
%total work outout
Wnet=Wt-Wp;
% enthalpy at saturation liquid of pt 2
hf2=Wp+hf1;
%heat input of boiler
Qh=h3-hf2;
%efficiency of cycle
eff=(Wnet/Qh)*100;
%back work ratio
bac=Wp/Wt;
%properties at point1
T1=XSteam('Tsat_p',p4);
p1=p4;
h1=hf1;
s1=sf1;
%properties at point2
T2=XSteam('T_ps',p3,s1);
p2=p3;
h2=XSteam('h_ps',p3,s1);
s2=s1;
%properties at point3
T3;
p3;
h3;
s3;
%properties at point4
T4=XSteam('T_ph',p4,h4);
p4;
h4;
s4;
%properties at intermediate pts
T5=XSteam('Tsat_p',p3);
p5=p3;
h5=XSteam('hL_p',p3);
s5=XSteam('sL_p',p3);
T6=XSteam('Tsat_p',p3);
p6=p3;
h6=XSteam('hV_p',p3);
s6=XSteam('sV_p',p3);
%%outputs
fprintf('process 1-2 isentropic comperession \n');
fprintf('properties at point 1: \n');
fprintf('T1=%f Celcius \n',T1);
fprintf('P1=%f bar \n' ,p1);
fprintf('h1=%f Kj/Kg \n',h1);
fprintf('s1=%f Kj/kg Cn \n',s1);
disp(' ');
fprintf('process 2-3 isobaric heat adission \n');
fprintf('properties at point 2: \n');
fprintf('T2=%f Celcius \n',T2);
fprintf('P2=%f bar \n' ,p2);
fprintf('h2=%f Kj/Kg \n',h2);
fprintf('s2=%f Kj/kg Cn \n',s2);
disp(' ');
fprintf('process 3-4 isentropic expansion \n');
fprintf('properties at point 3: \n');
fprintf('T3=%f Celcius \n',T3);
fprintf('P3=%f bar \n' ,p3);
fprintf('h3=%f Kj/Kg \n',h3);
fprintf('s3=%f Kj/kg C \n',s3);
disp(' ');
fprintf('process 4-1 isobsric heat rejection \n');
fprintf('properties at point 1: \n');
fprintf('T4=%f Celcius \n',T4);
fprintf('P4=%f bar \n' ,p4);
fprintf('h4=%f Kj/Kg \n',h4);
fprintf('s4=%f Kj/kg C \n',s4);
disp(' ');
fprintf('-----------results----------- \n');
disp(' ');
fprintf('net work output is %f Kj \n',Wnet);
fprintf('efficiency of cycle is%f %%\n',eff);
fprintf('back work ratio is %f \n',bac);
%%plotting t-s and h-s plot
%ploting saturation line
T=(1:2000);
for i=1:1:2000
sL(1,i)=XSteam('sL_T',i);
sV(1,i)=XSteam('sV_T',i);
hL(1,i)=XSteam('hL_T',i);
hV(1,i)=XSteam('hV_T',i);
end
figure(1)
plot(sL,T,'b','linewidth',3);
hold on;
plot(sV,T,'b','linewidth',3);
xlabel('entropy(Kj/Kg C)');
ylabel('temperature')
grid on
title('temperature v/s entropy plot');
figure(1)
plot([s1,s2,s5,s6,s3,s4,s1],[T1,T2,T5,T6,T3,T4,T1],'K','linewidth',2);
hold off
figure(2)
plot(sL,hL,'r','linewidth',3);
hold on;
plot(sV,hV,'r','linewidth',3);
xlabel('entropy(Kj/Kg C)');
ylabel('enthalpy(Kj/Kg)');
grid on
title('enthalpy v/s entropy plot');
%ploting the rankine cycle
figure(2)
plot([s1,s2,s5,s6,s3,s4,s1],[h1,h2,h5,h6,h3,h4,h1],'k','linewidth',2);
hold off
OUTPUT OF THE SCREEN:
OUTPUT CURVE:
TS PLOT:
HS PLOT:
EXPLANATION:
ABOUT XSTEAM library of matlab:
First the wanted property then a _ then the wanted input properties.
T Temperature (deg C)
p Pressure (bar)
h Enthalpy (kJ/kg)
v Specific volume (m3/kg)
u Specific internal energy
Cp Specific isobaric heat capacity
Cv Specific isochoric heat capacity
Valid Steam table functions.
Temperature
Tsat_p Saturation temperature
T_ph Temperture as a function of pressure and enthalpy
T_ps Temperture as a function of pressure and entropy
T_hs Temperture as a function of enthalpy and entropy
Pressure
psat_T Saturation pressure
p_hs Pressure as a function of h and s.
Enthalpy
hV_p Saturated vapour enthalpy
hL_p Saturated liquid enthalpy
hV_T Saturated vapour enthalpy
hL_T Saturated liquid enthalpy
h_pT Entalpy as a function of pressure and temperature.
h_ps Entalpy as a function of pressure and entropy.
Specific volume
vV_p Saturated vapour volume
vL_p Saturated liquid volume
vV_T Saturated vapour volume
vL_T Saturated liquid volume
v_pT Specific volume as a function of pressure and temperature.
v_ph Specific volume as a function of pressure and enthalpy
v_ps Specific volume as a function of pressure and entropy
Specific entropy
sV_p Saturated vapour entropy
sL_p Saturated liquid entropy
sV_T Saturated vapour entropy
sL_T Saturated liquid entropy
s_pT Specific entropy as a function of pressure and temperature (Returns saturated vapour entalpy if mixture.)
s_ph Specific entropy
- Marissa FHi how to do adjust this program for a reheat Rankine Cycle?