Project 2 - Rankine cycle Simulator
AIM:- To create a Rankine cycle Simulator using MATLAB program.
THEORY:-
For each process in the vapour power cycle, it is possible to assume a hypothetical or ideal process which represents the basic intended operation and involves no extraneous effects. For the steam boiler, this would be a reversible constant pressure heating process of water to form steam, for the turbine the ideal process would be a reversible adiabatic expansion of steam, for condenser it would be a reversible constant pressure heat rejection as the steam condenses till it become saturated liquid, and for the pump, the ideal process would be reversible adiabatic compression of this liquid ending at the initial pressure. When all these four processes are ideal, the cycle is an ideal cycle, called Rankine cycle. This is a reversible cycle. The Rankine cycle is also called as the fundamental operating cycle of all power plants.
The figure shown below represents each component of vapour power cycle or Rankine cycle:
The figure shown below represents the p-v, T-s, and h-s diagram of Rankine cycle:-
The Rankine cycle operates in the following steps:
- 1-2 Isentropic Expansion. The vapor is expanded in the turbine, thus producing work which may be converted to electricity. In practice, the expansion is limited by the temperature of the cooling medium and by the erosion of the turbine blades by liquid entrainment in the vapour stream as the process moves further into the two-phase region. Exit vapour qualities should be greater than 90%.
- 2-3 Isobaric Heat Rejection. The vapor-liquid mixture leaving the turbine is condensed at low pressure, usually in a surface condenser using cooling water. In well designed and maintained condensers, the pressure of the vapor is well below atmospheric pressure, approaching the saturation pressure of the operating fluid at the cooling water temperature.
- 3-4 Isentropic Compression. The pressure of the condensate is raised in the feed pump. Because of the low specific volume of liquids, the pump work is relatively small and often neglected in thermodynamic calculations.
- 4-1 Isobaric Heat Transfer. High pressure liquid enters the boiler from the feed pump and is heated to the saturation temperature. Further addition of energy causes evaporation of the liquid until it is fully converted to saturated steam.
GOVERNING EQUATION:-
The SFEE for the boiler (control volume) gives
`h_4+Q_1=h_1`
`∴ Q_1 =Q_S=h_1-h_4`
The SFEE for turbine as control volume gives
`h_1=W_T+h_2`
`∴ W_T=h_1-h_2`
Similarly, the SFEE for the condenser is
`h_2=Q_2+h_3`
`∴ Q_2=Q_R=h_2-h_3`
And the SFEE for the pump gives
`h_3+W_P=h_4`
`∴ W_P=h_4-h_3`
Net Work Output(Wn)
`W_n=W_T-W_P`
The efficiency of the Rankine cycle is the given by
`η=(W_T-W_P)/Q_1 =W_n/Q_1 =((h_1-h_2 )-(h_4-h_3))/(h_1-h_4 )`
Steam consumption rate in (kJ/kWh)
`S.S.C=3600/(W_T-W_P )`
Heat rate=
Back work ratio (rb)
`r_b=W_P/W_T`
Where,
SFEE=Steady flow energy equation
h1=Enthalpy at state point 1
h2=Enthalpy at state point 2
h3=Enthalpy at state point 3
h4=Enthalpy at state point 4
QS=Heat supplied
QR=Heat rejected
WT=Turbine work
WP=Pump work
OBJECTIVES:-
- Creating a Rankine Cycle Simulator using MATLAB.
- Calculating the state points of the Rankine Cycle (any type of choice) based on user inputs.
- Then, plotting the corresponding T-s and h-s plots for the given set of inputs.
The link for the standard Xsteam library to get the steam table data for water, is given below. It must be used to calculate the points in between the state variables.
PROGRAM:
clear all
close all
clc
% To show the different process involved in the Rankine cycle
disp('1-2 : Isentropic Expansion in the Turbine')
disp('2-3 : Isobaric Heat rejection by the Condenser')
disp('3-4 : Isentropic compression in the Pump')
disp('4-1 : Isobaric Heat Addition by the Boiler')
disp(' ')
% To take the input value from the user
P1=input('Enter the Pressure at Turbine inlet (in bar): ');
T1=input('Enter the temperature at Turbine inlet (in degree celsius): ');
P2=input('Enter the Pressure at condenser inlet (in bar): ');
fprintf('\n')
% To get the state point
T_sat1=XSteam('Tsat_p',P1);
% Setting the condition to take input temperature
if T1>=T_sat1
%State point 1
h1=XSteam('h_pT',P1,T1);
s1=XSteam('s_pT',P1,T1);
h_f1=XSteam('hL_p',P1);
h_g1=XSteam('hV_p',P1);
s_f1=XSteam('sL_p',P1);
s_g1=XSteam('sV_p',P1);
% State point 2
s2=s1;
s_f2=XSteam('sL_p',P2);
s_g2=XSteam('sV_p',P2);
x=(s2-s_f2)/(s_g2-s_f2);
h_f2=XSteam('hL_p',P2);
h_g2=XSteam('hV_p',P2);
h2=h_f2+x*(h_g2-h_f2);
T_sat2=XSteam('Tsat_p',P2);
% State point 3
s3=s_f2;
h3=h_f2;
P3=P2;
T3=XSteam('Tsat_p',P3);
T2=T3;
%state point 4
s4=s3;
P4=P1;
h4=XSteam('h_ps',P4,s4);
Cp4=XSteam('Cp_ps',P4,s4);
Cv4=XSteam('Cv_ps',P4,s4);
gama=Cp4/Cv4;
O=(gama-1)/gama;
T4=T3*((P4/P3)^O);
T5=XSteam('Tsat_p',P1);
s5=XSteam('sL_p',P1);
s6=XSteam('sV_p',P1);
% To plot T-s and H-s diagram
figure(1)
% Plotting T-S DIAGRAM
subplot(1,2,1)
t=linspace(0,400,200);
% Plotting Saturation curve
for i=1:length(t)
plot(XSteam('sL_T',t(i)),t(i),'r.')
plot(XSteam('sV_T',t(i)),t(i),'r.')
hold on
end
% Plotting T-s curve
plot([s1 s2 s3 s4 s5 s6 s1],[T1 T2 T3 T4 T5 T5 T1],'linewidth',2,'color','b')
axis([0 10 0 800])
grid on
text(s1,T1,'1','FontSize',15)
text(s1,T2,'2','FontSize',15)
text(s3,T3,'3','FontSize',15,'HorizontalAlignment','left','VerticalAlignment','top')
text(s4,T4,'4','FontSize',15,'HorizontalAlignment','Right','VerticalAlignment','bottom')
xlabel('Entropy(kJ/kg-K) ')
ylabel('Temperature(Deg. celcius)')
title('T-s diagram')
% Plotting h-s digram
subplot(1,2,2)
% Plotting Saturation curve
for i=1:length(t)
plot(XSteam('sL_T',t(i)),XSteam('hL_T',t(i)),'r.')
plot(XSteam('sV_T',t(i)),XSteam('hV_T',t(i)),'r.')
hold on
end
% Plotting h-s curve
plot([s1 s2 s3 s4 s1],[h1 h2 h3 h4 h1],'linewidth',2,'color','b')
axis([0 10 0 4500])
grid on
text(s1,h1,'1','FontSize',15)
text(s1,h2,'2','FontSize',15)
text(s3,h3,'3','FontSize',15,'HorizontalAlignment','left','VerticalAlignment','top')
text(s4,h4,'4','FontSize',15,'HorizontalAlignment','right','VerticalAlignment','bottom')
xlabel('Entropy(kJ/kg-K)')
ylabel('Enthalpy(kJ/kg)')
title('h-s diagram')
% Performance parameter
W_T=h1-h2; % Turbine work
W_P=h4-h3; % Pump bWork
W_net=W_T-W_P; % Net work output
Q_s=h1-h4; % Heat supplied
Q_r=h2-h3; % Heat rejected
n_c=W_net/Q_s; % Cycle efficiency
n_per=n_c*100; % Efficiency in percentage
St_rt=3600/W_net; % Steam rate
Ht_rt=3600/n_c; % Heat rate
r_bw=W_P/W_T; % Back work ratio
% To print the results on command window
fprintf('\t \t\t\t\t\t ---RESULTS--- \n\n')
% To print the state point
fprintf('At state point 1:\t\t\t\t\t At state point 2:\n')
fprintf(' P1 is : %f Bar\t\t\t\t\t\tP2 is : %f Bar\n',P1,P2)
fprintf(' T1 is : %f Deg. celcius\t\t\tT2 is : %f Deg. celcius \n',T1,T2)
fprintf(' H1 is : %f kJ/kg\t\t\t\t\tH2 is : %f kJ/kg\n',h1,h2)
fprintf(' S1 is : %f kJ/kgK\t\t\t\t\tS2 is : %f kJ/kgK \n',s1,s2)
fprintf('\t\t\t\t\t\t\t\t\t\t\tX2 is : %f\n\n',x)
fprintf('At state point 3:\t\t\t\t\t At state point 4:\n')
fprintf(' P3 is: %f Bar\t\t\t\t\t\tP4 is: %f Bar\n',P3,P4)
fprintf(' T3 is: %f Deg. celcius\t\t\t\tT4 is: %f Deg. celcius\n',T3,T4)
fprintf(' H3 is: %f kJ/kg \t\t\t\t\tH4 is: %f kJ/kg\n',h3,h4)
fprintf(' S3 is: %f kJ/kgK\t\t\t\t\t\tS4 is: %f kJ/kgK \n\n',s3,s4)
%To print the Performance parameter on command window
fprintf('Turbine Work is : %f kJ/kg\n',W_T)
fprintf('Pump Work is : %f kJ/kg\n',W_P)
fprintf('Work Net is : %f kJ/kg\n',W_net)
fprintf('Cycle Efficiency percentage is : %f Percent\n',n_per)
fprintf('Specific Steam Consumption is : %f kg/kWh\n',St_rt)
fprintf('Back Work Ratio is : %f\n',r_bw)
else
fprintf('Enter Turbine inlet temperature greater than or equal to saturation temperature\n')
end
PROGRAM EXPLANATION:
- We have used disp command to show the different process involved in the Rankine cycle.
- Then by using input command we take the input value from the user.
- Now by calling XSteam function we get the state point value.
- We have set the condition to take input temperature by using if-else.
- Now we have evaluated state point 1, state point 2, state point 3 and state point 4 by using XSteam library.
- Then by using Xsteam library and also using hold on command inside for loop we have plotted saturation curve for T-s diagram and after that by using state point value we have plotted T-s diagram on the same plot.
- Similarly we have plotted h-s diagram.
- Now we have calculated Performance parameter.
- Then we have used fprintf command to print the results like state point and performance parameter on command window.
- And at last if the condition written inside if statement is not satisfied then else statement is executed.
- And then end the if-else statement by end command.
OUTPUT:
When we have used P1=30 bar, T1=400 Degree Celcius, and P2=0.05 bar :-
When we have used P1=44 bar, T1=538 Degree Celcius, and P2=5.83 bar :-
When we have used T1 below saturation temperature at pressure P1:-
PLOTS:
When we have used P1=30 bar, T1=400 Degree Celcius, and P2=0.05 bar :-
When we have used P1=44 bar, T1=538 Degree Celcius, and P2=5.83 bar :-
CONCLUSION:
The Rankine cycle simulator has been created which takes input from the user and calculated the state points and performance parameter based on inputs. The T-s and h-s diagram for Rankine cycle based on user input has been also plotted.
REFRENCES:
- Engineering Thermodynamics by P.K. NAG
- http://www.thermopedia.com/content/1072/
- https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRrCoFQETGjPsVZY-A0oM2WxlnPeISwo3W_KQ&usqp=CAU
- https://www.researchgate.net/profile/Abhishek_Gaikwad/publication/263773573/figure/fig1/AS:296415990435841@1447682487447/P-V-diagram-of-rankine-cycle.png
- https://www.researchgate.net/profile/Daniel_Dragomir-Stanciu/publication/316701362/figure/fig1/AS:491041787781120@1494084893203/The-h-s-diagram-of-the-organic-Rankine-cycle-R-134a-R22.png