Simulation of a basic REHEAT Cycle using Matlab(FINAL INDEPENDENT PROJECT)
Aim:
To Create a REHEAT Cycle Simulator using MATLAB to obtain the various parameters at each state points in the cycle and to plot the corresponding T-s and h-s plots for the given set of inputs.
Objective:
- The main objective to develop a basic program that calculates the state point physical parameters.
- Then to add the thermodynamic relation to get the points in-between the state variables.
- Then to calculate parameters such as Work Net, Turbine Work, Pump Work, Efficiency and so on based on the state point parameter values.
- Finally To plot Rankine cycle on T-s and H-s curve.
Introduction:
Physical system/Process chosen:
The Reheat cycle also known as the Reheat Rankine cycle is the physical system or process which I have taken to analyze using the MATLAB computer program.
Basic Idea/Plan for this Project:
Through this Matlab program for the Reheat cycle I planned on calculating the various physical parameters (Temperature ,pressure ,Enthalpy ,Entropy , etc.) at each of the 6 state points in the entire cycle and also to calculate parameters such as Work Net, Turbine Work, Pump Work, Efficiency and so on. Then finally plotting the h-s and T-s curves for the respective calculated values.
Engineering significance of this project:
The engineering significance of this project is to eliminate the cumbersome, repetitive and time consuming process of manual calculations for obtaining the physical parameters of the Reheat cycle results.
This program would certainly eliminates the manual errors that could possibly occur during the manual calculations and provides fester results with ease.
The Reheat Cycle:
Reheat Cycle also known as Reheat Rankine Cycle is essentially a modification of simple rankine cycle in order to obtain an increase in efficiency of the cycle. In reheat rankine cycle, the following improvements are made to increase the efficiency of rankine cycle.
- Lowering the condenser pressure
- Increasing the of steam while entering the turbine
- Large variation in pressure between boiler and condenser
- Implementation of reheat and regenerative system in the cycle
In simple rankine cycle, after the isentropic expansion in turbine, steam is directly fed into condenser for condensation process. But in reheat system, two turbines (high turbine and low pressure turbine) are employed for improving efficiency. Steam, after expansion from high pressure turbine, is sent again to boiler and heated till it reaches superheated condition. It is then left to expand in low pressure turbine to attain condenser pressure.
Processes in Reheat Rankine Cycle:
Six processes take place in reheat Rankine cycle. They are as follows,
Process: 1-2 (Isentropic expansion in high pressure turbine)
Here, dry saturated steam from the boiler is allowed to expand in a turbine isentropically i.e., Entropy remains constant.
Let h1 be the enthalpy of steam entering the high pressure turbine
Let h2 be the enthalpy of steam leaving the high pressure turbine
Finally, the workdone by the high pressure turbine is given by
WT = h1 − h2
where h2 can be found by,
Process: 2-3 (Constant pressure heat addition in Reheat boiler)
The expanded steam is made to attain the required temperature i.e., reheated in low pressure boiler at constant pressure level.
Heat supplied is given by
QS2 = h3− h2
Process: 3-4 (Isentropic expansion in Low pressure Turbine)
After attaining required temperature, steam is passed into low pressure turbine to carry out the remaining expansion.
Process: 4-5 (Constant pressure heat rejection in the condenser)
After expansion in turbine, steam is passed into condenser to preform condensation process. Here the remaining heat in the steam is rejected into atmosphere.
Let h4 be the enthalpy of steam entering the condenser.
Let h5 be the enthalpy of water leaving the condenser.
Heat rejected from condenser is given by
QR = h4 − h5 or QR = h2 − hf4
hf4 = h4 (Since, the output from condenser is a fluid and graphically, the enthalpy at point 4 and point 5 are same.)
Process: 5-6 (Isentropic compression in the Pump)
Water from the condenser is pumped into the boiler using an external pump. During this process, pressure increases from P5 to P6 isentropically (The enthalpy and temperature of water also increase due to pump work).
Let P5 ,h5 be the pressure and enthalpy at stage 5 respectively.
Let P6 ,h6 be the pressure and enthalpy at stage 6 respectively.
The work done by pump is given by
Wp = h6 – h5 = Vf5 (P6 – P4) × 100
Process: 6-1 (Constant pressure heat addition in the boiler)
Here the saturated water from the pump is heated by using a constant heat source (such as furnace). The input saturated water is heated till it reaches super-heated condition. Temperature and enthalpy of saturated water raise to a great extent, but its pressure remains constant. The change of phase from liquid to vapor occurs in boiler.
Let h6 be the enthalpy of saturated water entering the boiler.
Let h1 be the enthalpy of super-heated steam coming out of boiler.
Heat supplied is given by
QS1 = h1− h6
h6 can be calculated by means of pump workdone formula.
h6 = h5 + Wp
Overall heat supplied to the system:
Overall Qs =Heat supplied by boiler +Heat supplied by Reheater
Overall Qs =QS1+ QS2
= (h1− h6)+ (h3− h2)
Efficiency of Reheat Rankine Cycle:
The Efficiency is the ratio between output and input. Here, the output is workdone and input is heat energy.
Net workdone = workdone in turbine (both H.P. turbine and L.P. turbine) + workdone in pump .
Net heat transfer = heat supplied in boiler + heat rejected in condenser.
Efficiency of reheat Rankine cycle is given by:
`eta reheat` =((h1−h2)+(h3−h4)−WPh1) `/`(h5+Wp)+(h3−h2)
It is 30 to 40% greater than simple Rankine cycle.
H-S diagram,
Where,
- h1,h2,h3,h4,h5 and h6 are the enthalpy at the states 1,2,3,4,5 and 6 respectively.
- s1,s2,s3,s4,s5 and s6 are the entropy at the states 1,2,3,4,5 and 6 respectively.
- T1,T2,T3,T4,T5 and T6are the temperature at the states 1,2,3,4,5 and 6 respectively.
- P1,P2,P3,P4,P5 and P6 are the pressure at the states 1,2,3,4,5 and 6 respectively.
- sf and hf are the entropy and enthalpy of the saturated liquid state respectively.
- sg and hg are the entropy and enthalpy of the saturated gas state respectively.
- X is the dryness fraction.
Here the Input Values for the cycle are given as,
High pressure Turbine Inlet temperature, T1 = 450° C
High pressure Turbine Inlet Pressure, p1 = 85 bars
Low pressure Turbine Inlet Pressure, p3 = 10 bars
Condenser Inlet Pressure, p4 = 0.08 bars
Software used:
MATLAB R2020(online)
PROGRAM CODE:
%simulation of a basic REHEAT cycle.
%Basic commands
clear all
close all
clc
%isplaying the Basic prcoesses involved in REHEAT cycle
disp('REHEAT CYCLE SIMULATOR');
disp('1-2 - Isentropic Expansion in the high pressure turbine');
disp('2-3 - constant Pressure heat addition by the reheat boiler');
disp('3-4 - Isentropic Expansion in the Low pressure turbine');
disp('4-5 - constant Pressure heat rejection in the condensor');
disp('5-6 - Isentropic Compression in the pump')
disp('6-1 - constant Pressure heat Addition by the Boiler')
disp('Enter the following input values to proceed to the results ');
%Getting inputs from the user
p1=input('Enter the Inlet pressure of High pressure Turbine(in bar):');
p3=input('Enter the Inlet pressure of Low pressure Turbine(in bar):');
p4=input('Enter the Condenser inlet pressure(in bar):')
t1=input('Enter the Inlet temperature of High pressure Turbine (in degree Celsius):');
%State 1
% conditions at the inlet of the High pressure Turbine
tsat=XSteam('Tsat_p',p1); %saturation temperature
%Extracting the Entropy values from XStream file
sf1=XSteam('sL_p',p1);
sg1=XSteam('sV_p',p1);
if t1>tsat %using if-elseif to check the correctness of the temperature
tsup=t1
h1=XSteam('h_pT',p1,tsup);
s1=XSteam('s_pT',p1,tsup);
elseif t1==tsat
h1=XSteam('hL_p',p1);
s1=XSteam('sL_p',p1);
else
disp('Temperature entered must be greater than or equal to saturation temperature')
end
%State 2
%conditions at the reheater inlet or High pressure Turbine outlet
p2=p3;
t2=XSteam('Tsat_p',p2);
%Extracting the Enthalpy values from XStream file
hf2=XSteam('hL_p',p2);
hg2=XSteam('hV_p',p2);
s2=s1;
%Extracting the Entropy values from XStream file
sg2=XSteam('sV_p',p2);
sf2=XSteam('sL_p',p2);
x2=(s2-sf2)/(sg2-sf2); %Dryness fraction at state 2
h2=hf2+(x2*(hg2-hf2)); %calculating the enthalpy at state 2
%State 3
%conditions at the Reheater outlet or Low pressure turbine inlet
p2=p3; %constant pressure process
t3=t1; %for ideal Reheat cycle
h3=XSteam('h_pT',p3,t3); %Extracting enthalpy value
s3=XSteam('S_pT',p3,t3); %Extracting entropic value
%State 4
%conditions at the Low pressure turbine outlet or condensor inlet
s4=s3; %since it is an isentropic prcoess
%Extracting the Enthalpy values from XStream file for state 4
hf4=XSteam('hL_p',p4);
hg4=XSteam('hV_p',p4);
%Extracting the Entropy values from XStream file
sg4=XSteam('sV_p',p4);
sf4=XSteam('sL_p',p4);
x4=(s4-sf4)/(sg4-sf4); %Dryness fraction at state 4
h4=hf4+(x4*(hg4-hf4)); %calculating the enthalpy at state 4
t4=XSteam('Tsat_p',p4);
%State 5
%conditions at the Condensor outlet or pump inlet
p5=p4;
t5=t4;
hf5=XSteam('hL_p',p5);
sf5=XSteam('sL_p',p5);
s5=sf5; %present in saturated liquid line
h5=hf5;
%State 6
%Conditions at the Boiler inlet or pump outlet
s6=s5; %since it is an isentropic prcoess in the pump
p6=p1;
cp6=XSteam('Cp_ps',p6,s6);
cv6=XSteam('Cv_ps',p6,s6);
gamma=cp6/cv6;
t6=t5*(p6/p5)^((gamma-1)/gamma); %temp at inlet of boiler
vf5=XSteam('vL_p',p5);
%input power to pump
pump_work= vf5*(p1-p5)*100;
h6 = pump_work+h5;
% work output from High pressure turbine
HPT_work = h1-h2;
% work output from Low pressure turbine
LPT_work = h3-h4;
%Total turbine work
Turbine_work = HPT_work + LPT_work;
%heat supplied from boiler
Q_in1 = h1-h6;
%heat supplied from Reheater
Q_in2 = h3-h2;
%Total heat supplied to the system
Q_in = Q_in1 + Q_in2;
%heat Rejected from the system
Q_out = h4-h5;
%net work
work_net=Turbine_work - pump_work;
% thermalefficiency
Thermal_eff=(work_net/Q_in)*100;
%Back work ratio
Back_work_ratio = (pump_work/Turbine_work);
%steam flow rate
steam_rate = (3600/Turbine_work);
%plotting the T-S and H-S diagram
%T-S diagram
figure(1)
hold on
%plotting saturation lines
temp = linspace(1, 750, 550);
for i = 1 : length(temp)
hl(i) = XSteam('hL_T', temp(i));
hv(i) = XSteam('hV_T', temp(i));
sl(i) = XSteam('sL_T', temp(i));
sv(i) = XSteam('sV_T', temp(i));
end
plot(sl, temp, 'k', 'linestyle','-','linewidth', 2,"Color",'g')
plot(sv, temp, 'k', 'linestyle','-','linewidth', 2,"Color",'g')
xlabel('Specific Entropy (kJ/kgK)')
ylabel('Temprature (degree C)')
grid on
title('T-S Diagram','fontweight','bold','fontsize',14);
plot([s1 s2 s3 s4 sf5 s6 sf1 sg1],[t1 t2 t3 t4 t5 t6 tsat tsat],'color','b','linewidth', 1.5)
text(s1,t1,'1')
text(s2,t2,'2')
text(s3,t3-10,'3')
text(s4,t4+10,'4')
text(s5,t5-20,'5')
text(s6,t6+25,'6')
t=linspace(tsat,tsup,1000);
for j =1:length(t)
sinst(j) = XSteam('s_pT',p1,t(j));
end
plot(sinst,t,'color','b','linewidth', 2);
%H-S diagram
figure(2)
hold on
grid on
title('H-S diagram','fontweight','bold','fontsize',14,'color','b');
plot(sl, hl, 'k','linestyle','-', 'linewidth', 2,"Color",'g')
plot(sv, hv, 'k','linestyle','-', 'linewidth', 2,"Color",'g')
plot([s1 s2 s3 s4 s5 s6 s1], [h1 h2 h3 h4 h5 h6 h1], 'color', 'r','linewidth', 2);
text(s1,h1,'1')
text(s2,h2,'2')
text(s3,h3-100,'3')
text(s4,h4+100,'4')
text(s5,h5-100,'5')
text(s6,h6+100,'6')
%labelling the axis
ylabel('Specific Enthalpy (kJ/kg)')
xlabel('Specific Entropy (kJ/kgK)')
fprintf('\n')
%OUTPUTS
disp('RESULTS :-');
fprintf('\n')
%at state 1
fprintf('At State 1:\n')
fprintf('P1 is : %.2f Bar\n',p1);
fprintf('T1 is : %.2f Deg Celsius\n',t1);
fprintf('H1 is : %.2f kJ/kg\n',h1);
fprintf('S1 is : %.2f kJ/kgK\n',s1);
fprintf('\n')
%at state 2
fprintf('At State 2:\n')
fprintf('P2 is : %.2f Bar\n',p2);
fprintf('T2 is : %.2f Deg Celsius\n',t2);
fprintf('H2 is : %.2f kJ/kg\n',h2);
fprintf('S2 is : %.2f kJ/kgK\n',s2);
fprintf('\n')
%at state 3
fprintf('At State 3:\n')
fprintf('P3 is : %.2f Bar\n',p3);
fprintf('T3 is : %.2f Deg Celsius\n',t3);
fprintf('H3 is : %.2f kJ/kg\n',h3);
fprintf('S3 is : %.2f kJ/kgK\n',s3);
fprintf('\n')
%at state 4
fprintf('At State 4:\n')
fprintf('P4 is : %.2f Bar\n',p4);
fprintf('T4 is : %.2f Deg Celsius\n',t4);
fprintf('H4 is : %.2f kJ/kg\n',h4);
fprintf('S4 is : %.2f kJ/kgK\n',s4);
fprintf('\n')
%at state 5
fprintf('At State 5:\n')
fprintf('P5 is : %.2f Bar\n',p5);
fprintf('T5 is : %.2f Deg Celsius\n',t5);
fprintf('H5 is : %.2f kJ/kg\n',h5);
fprintf('S5 is : %.2f kJ/kgK\n',s5);
fprintf('\n')
%at state 6
fprintf('At State 6:\n')
fprintf('P6 is : %.2f Bar\n',p6);
fprintf('T6 is : %.2f Deg Celsius\n',t6);
fprintf('H6 is : %.2f kJ/kg\n',h6);
fprintf('S6 is : %.2f kJ/kgK\n',s6);
fprintf('\n')
%%Printing the results
fprintf('High pressure Turbine_work is : %.2f kJ/kg\n',HPT_work);
fprintf('Low pressure Turbine_work is : %.2f kJ/kg\n',LPT_work);
fprintf('Total Turbine_work is : %.2f kJ/kg\n',Turbine_work);
fprintf('Pump_work is : %.2f kJ/kg\n',pump_work);
fprintf('Heat supplied by the boiler is : %.2f kJ/kg\n',Q_in1);
fprintf('Heat supplied by the Reheater is : %.2f kJ/kg\n',Q_in2);
fprintf('Total heat supplied to the system is : %.2f kJ/kg\n',Q_in);
fprintf('work_net is : %.2f kJ/kg\n',work_net);
fprintf('Thermal_efficiency is : %.2f Percent\n',Thermal_eff);
fprintf('The Back_work_ratio is :%f\n',Back_work_ratio);
fprintf('The steam flow rate is : %.2f kJ/kWh\n',steam_rate);
Code Explanation:
- Keeping the aim of this project in mind the comments were added side by side along with the code is created.
- Initially first enter the basic commands such as clear all, close all and
- Then the Xsteam file was uploaded to the MATLAB drive as i was working with Matlab online.
- Then t
- he Heading and some of the basic processes in the Reheat cycle4 is made to display using the disp()
- Next using the values of"P1" “P3”, "T1" and "P4" were given as inputs and the inputs are got from the user. And the temperature val ue array "t" was created using the "linspace”.
- Here using the "XSteam"(similar to the steam table)library the values of various physical parameters such as Enthalpy, Entropy, Saturated liquid/vapor - enthalpy/entropy, saturation temperature at state 1 is extracted from the file.
- Similarly at the states 2, 3, 4, 5 and 6 same were calculated respectively.
- After calculating the pressure, temperature ,enthalpy, entropy and dryness fraction(in some states) in all the 6 state points
- Then using basic relations between work and physical parameters the "Work net", "back work ratio" ,”thermal efficiency”, “work done high and low pressure turbines”, “steam rate”, “heat supplied by the boiler and Reheater” , “Overall heat supplied to the system”, “Heat rejected from the system “were calculated.
- The above mentioned parameters are calculated using the Reheat cycle enthalpy and relations to arrive at the results.
- Now the T-s curve plotted using the plot() Here again we use the provided "XSteam" library function to plot the T-s Curve at different temperature array values.
- Then the Color, linewidth, linestyle commands are used to make the plot neat and smooth.
- Then the text() command is used to add the state point numbers at each respective state points.
- Then along with the state points the curve was plotted and labelled the axis for better understanding.
- Similarly like the T-s curve was plotted. Again the provided "XSteam" library function is used to plot the h-s Curve at different temperature array values.
- Here also the Color, linewidth, linestyle commands are used to make the plot neat and smooth.
- Here also the text() command is used to add the state point numbers at each respective state points.
- Then along with the state points the curve was plotted and the axis are labelled.
- Then the values of physical parameters at each state is displayed in the command window. The values are displayed using the ‘fprintf()’ command. This was done for all the "6" state points in similar way.
- The ‘\n’ new line command was also included at the end of the each state point parameter result to provide a neat appearing results window at the end of execution.
- Then the final results i.e.
- Work net
- High pressure turbine work
- Low pressure turbine work
- Total Turbine wo04rk Pump work 741
- Back work ratio
- Heat supplied by the boiler
- Heat supplied from the Reheater
- Overall heat supplied
- Steam rate
- Thermal Efficiency
These were printed in the command window using the fprintf() command.
- The ‘\n’ new line command was also included at the end of the each result parameter to provide a neat appearing results window at the end of execution.
- Any warnings and syntax errors are corrected then and there.
- And finally the program was executed successfully to obtain the desired results.
Output:
Matlab screen showing the code and output:
T-S Diagram:
H-S Diagram:
COMMAND WINDOW:
Errors faced:
1)
Entered the wrong keyword while extrating the saturated liquid entropy value from the 'XStream' file.
2)
Instead of entering ';' semicolon mistakenly entered the colon ':' symbol.
3)Other syntax errors that appeared during the execution of the program has been corrected and executed to get the correct results.
References:
- http://mechteacher.com/reheat-rankine-cycle/
- https://www.ecourses.ou.edu/cgi-bin/ebook.cgi?doc=&topic=th&chap_sec=10.2&page=theory
- https://www.tlv.com/global/TI/calculator/steam-table-pressure.html
Conclusions:
Finally the program for the Reheat Cycle Simulator was created using MATLAB then the required results were displayed in the command window and the plots for the corresponding T-s and h-s diagram for the given set of inputs were created. And the objective of this project is successfully completed.