Challenge

Project 2 - Rankine cycle Simulator

RANKINE CYCLE SIMULATOR

AIM:

To write MATLAB program to simulate Rankine cycle and to Plot h-s diagram and T-s diagram. Also to calculate Performance parameters.

GOVERNING EQUATIONS:

  • Specific Work produced by Turbine, `W_T=h_1-h_2`
  • Heat released in Condenser, `Q_R=h_2-h_(3)`
  • Feed pump Work. `W_P=h_4-h_3=v_(f3)(P_4-P_3)`
  • Heat added in Boiler, `Q_a=h_1-h_4`
  • Net Work Produced, `W_(n et)=W_T-W_P`
  • Thermal Efficiency of Cycle, `eta_(therm)=W_(n et)/Q_a`
  • Specific Fuel Consumption, `SSC=3600/W_(n et)`
  • Back Work Ratio, `BWR=W_P/W_T`

OBJECTIVES :

  • To input the required state points to the program
  • To calculate Pressure and Temperatures at other state points
  • To calculate performance parameters such as Work output, Thermal efficiency, Specific steam consumption and Back work ratio
  • To plot Temperature - Entropy diagram and Enthalpy - Entropy diagram

CONTENT:

Rankine cycle is the theoretical cycle on which the steam turbine works. It comprises of the following process,

  1. Process 1-2 : Reversible Adiabatic (Isentropic) Expansion in Turbine
  2. Process 2-3 : Constant Pressure Heat rejection in Condenser
  3. Process 3-4 : Reversible Adiabatic Pumping process
  4. Process 4-1 : Constant Pressure Heat addition in Boiler

In any cycle, the inlet temperature of a Turbine is the most critical parameter in design of Turbine. This is limited. So we need to fix this and thus it is read from the user. Also the pressure at Boiler and Condenser are fixed. So these are also fixed and read from the user.

Based on above properties, the properties at other state points are calculated using above mentioned formulas.

At state point 1 :

h1 and s1 is calculated corresponding to given Pressure and Temperature.

At state point 2 :

Process 1-2 is identified as Isentropic Process, so that s1=s2. with this relation, dryness fraction at point 2 is calculated using above formula.

`x_2=(s_2-s_(f2))/(s_(g2)-s_(f2))`

Using dryness fraction, specific enthalpy(h2) is calculated at point 2.

`h_2=h_(f2)+x_2(h_(g2)-h_(f2))`

At state point 3 :

Process 2-3 is identified as Constant pressure (Isobaric) process. So that P2=P3. Also in condenser, only latent heat is removed (Conversion of steam to water), so that Temperature also remains constant T2=T3. Now, it is in liquid state, thus Specific enthalpy and entropy will be hf and sf corresponding to pressure P2 (=P3) at point 3.

At state point 4 :

Process 3-4 is again Isentropic process. So that s3=s4. This is actually Pumping process. So that specific enthalpy at point 4 will be sum of specific enthalpy at point 3 and specific work imparted by the pump to the fluid. That is h4=h3+Wp.

To calculate Temperature, we have isentropic relations. For that Gamma is calculated by taking ratio of Cp and Cv. Cp and Cv are calculated from steam table corresponding to given specific enthalpy and specific entropy. And we assume that Cp and Cv are constant throughout the process. `T_4/T_3=(P_4/P_3)^((gamma-1)/gamma)`

To plot the h - s and T - s diagrams,

Process 1-2 is an Isentropic process, so that it will be a vertical straight line from point 1 to 2.

Process 2-3 is an isobaric process. The slope of isobaric line in T-s diagram is equal to T/Cp at that point. Since Temperature doesn’t change during this process, it will be a straight line from point 2 to 3 in T - s diagram. But in h - s diagram, the slope of isobaric lines is equal to Temperature at that point. But here, Temperature is constant throughout the process 2-3. So that it will again a straight line connecting point 2 and 3.

Process 3-4 is again isentropic process, so that it will be again vertical straight line in both the h -s and T-s diagrams.

Process 4-1 is again isobaric process. But here Temperature is not constant. Because it involves three processes in this stage. Heating of water in to saturation temperature corresponding to boiler pressure (Point 5), latent heating of water to convert it into steam (Point 6) and heating of steam into superheated point (Point 1). So the temperature is not constant throughout process 4-1, thus there is small curvature in the isobaric line in both T-s and h-s diagrams. However we plot it as straight lines.

The MATLAB program is written as follows

clear all
close all
clc
%Displaying Details of Processes in Rankine cycle
fprintf('RANKINE CYCLE SIMULATOR\n')
fprintf('1-2 is Isentropic Expansion in the Turbine\n')
fprintf('2-3 is Const Pressure Heat Rejection by the Condenser\n')
fprintf('3-4 is Isentropic Compression in the Pump\n')
fprintf('4-1 is Const Pressure Heat Addition by the Boiler\n')
%Inputting Required data to the program
p1=input('Enter the Pressure at the Turbine Inlet (in bar): ');
T1=input('Enter the Temperature at the Turbine Inlet (in Degree Celcius): ');
p2=input('Enter the Pressure at the Condenser (in bar): ');

p3=p2;
p4=p1;
%Calculating Enthalpy and Entropy at state point 1 using XSteam function
%Enthalpy corresponding to given pressure and temperature
h1=XSteam('h_pT',p1,T1);
%Entropy Corresponding to given pressure and temperature
s1=XSteam('s_pT',p1,T1);

%Calculating Enthalpy and Entropy at state point 2
%Enthapy throught out process 1-2 is constant, so that s1=s2
s2=s1;
%Using this relation to calculate Dryness fraction
sf2=XSteam('sL_p',p2);
sg2=XSteam('sV_p',p2);
%Dryness fraction x =(s-sf)/(sg-sf)
x2=(s2-sf2)/(sg2-sf2);
%To calculate enthalpy at state point 2
hf2=XSteam('hL_p',p2);
hg2=XSteam('hV_p',p2);
%Enthalpy h=hf+x(hg-hf) for a wet steam
h2=hf2+(x2*(hg2-hf2));
%Calculating Temperature at state 2
T2=XSteam('Tsat_p',p2);
%The work output(Turbine Work) will be equal to h1-h2
wt=h1-h2;

%Calculating poperties state point 3
%Pressure remains constant duing heat rejection in condenser
p3=p2;
%Temperature also remain constant, since only latent heat is removed
T3=T2;
%Now it is in liquid state, so that h3=hf3=hf2 and
%s3=sf3=sf2 (same pressure)
h3=hf2;
s3=sf2;

%Calculating properties at State point 4
%during process 4-1 pressure remains constant so p4=p1
p4=p1;
%3-4 is isentropic compression(Pump) process, so entropy remains constant
s4=s3;
%To calculate pump work, wp=vf(p1-p2)
%Finding specific volume
vf=XSteam('vL_p',p3);
wp=vf*(p1-p2)*100;
%Specific Enthalpy at 4 will be sum of h3 and pump work
h4=h3+wp;
%Calculating Specific Heat capacities corresponding to pressure p4 and
%entropy s4 and assuming Cp and Cv are constant thoughout the process 3-4
cp4=XSteam('Cp_ps',p4,s4);
cv4=XSteam('Cv_ps',p4,s4);
%Calculating gamma
gamma=cp4/cv4;
%calculating T4 using Isentropic relations
T4=T3*((p4/p3)^((gamma-1)/gamma));

%Calculating Net workdone
wnet=wt-wp;
%Calculating Heat added in Boiler
Q1=h1-h4;
%Calculating Thermal Efficiency of cycle
Ntherm=wnet*100/Q1;
%Calculating Specific steam consumption
SSC=3600/wnet;
%Calculating Back work ratio
BWR=wp/wt;

%Calculating points 5 and 6 to plot the process 4-1
%Point 5 represent saturation point of water at pressure p1
s5=XSteam('sL_p',p1);
h5=XSteam('hL_p',p1);
T5=XSteam('Tsat_p',p1);
%Point 6 represents complete conversion into steam from liquid, where there
%is no temperature change
s6=XSteam('sV_p',p1);
h6=XSteam('hV_p',p1);
T6=T5;
%Printing all the results obtained in command window
fprintf('RESULTS\n')
fprintf('At state point 1:\n')
fprintf(' P1 is : %.2f Bar\n',p1)
fprintf(' T1 is : %.2f Deg Celcius\n',T1)
fprintf(' H1 is : %.2f kJ/kg\n',h1)
fprintf(' S1 is : %.2f kJ/kgK\n\n',s1)
fprintf('At state point 2:\n')
fprintf(' P2 is : %.2f Bar\n',p2)
fprintf(' T2 is : %.2f Deg Celcius\n',T2)
fprintf(' H2 is : %.2f kJ/kg\n',h2)
fprintf(' S2 is : %.2f kJ/kgK\n',s2)
fprintf(' X2 is : %.2f\n',x2)
fprintf('At state point 3:\n')
fprintf(' P3 is : %.2f Bar\n',p3)
fprintf(' T3 is : %.2f Deg Celcius\n',T3)
fprintf(' H3 is : %.2f kJ/kg\n',h3)
fprintf(' S3 is : %.2f kJ/kgK\n\n',s3)
fprintf('At state point 4:\n')
fprintf(' P4 is : %.2f Bar\n',p4)
fprintf(' T4 is : %.2f Deg Celcius\n',T4)
fprintf(' H4 is : %.2f kJ/kg\n',h4)
fprintf(' S4 is : %.2f kJ/kgK\n\n',s4)
fprintf(' Wt is : %.2f kJ/kg\n',wt)
fprintf(' Wp is : %.2f kJ/kg\n',wp)
fprintf(' Wnet is : %.2f kJ/kg\n',wnet)
fprintf(' Ntherm is : %.2f Percent\n',Ntherm)
fprintf(' S.S.C is : %.2f kg/kWhr\n',SSC)
fprintf(' Back work ratio is : %.4f\n',BWR)

%Taking a temperature array to plot T-s and h-s diagrams
temp=linspace(0,374,500);
%calculating h and s to plot the saturation lines in h-s and T-s diagrams 
for i=1:length(temp)
    H_vsat(i)=XSteam('hV_T',temp(i));
    H_lsat(i)=XSteam('hL_T',temp(i));
    S_vsat(i)=XSteam('sV_T',temp(i));
    S_lsat(i)=XSteam('sL_T',temp(i));
end
%Plotting h-s diagram
figure(1)
%Plotting saturation line on h-s diagram
plot1=plot(S_vsat,H_vsat,'linewidth',2,'color','r');
hold on
plot(S_lsat,H_lsat,'linewidth',2,'color','r');
%Plotting process lines in h-s diagram, they all are straight lines
plot2=plot([s1 s2],[h1 h2],'linewidth',3,'color','b');
plot3=plot([s2 s3],[h2 h3],'linewidth',3,'color','g');
plot4=plot([s3 s4],[h3 h4],'linewidth',3,'color','b');
plot5=plot([s4 s1],[h4 h1],'linewidth',3,'color','g');
%Labelling axes
xlabel('Entropy (kJ/kgK)')
ylabel('Enthalpy (kJ/kg)')
title('h - s Diagram')
%Marking state Points
text(s1,h1,'1','FontSize',18,'FontWeight','bold');
text(s2,h2,'2','FontSize',18,'FontWeight','bold');
text(s3,h3,'3','FontSize',18,'FontWeight','bold');
text(s4,h4,'4','FontSize',18,'FontWeight','bold');
legend([plot1,plot2,plot3,plot4,plot5],'Satuuration line','1-2 Isentropic Expansion','2-3 Isobaric Heat rejection','3-4 Isentropic Pumping','4-1 Isobaric Heat addition')
%Plotting T-s diagram
figure(2)
%Plotting saturation line on T_s diagram
plot1=plot(S_vsat,temp,'linewidth',2,'color','r');
hold on
plot(S_lsat,temp,'linewidth',2,'color','r')
%Plotting Process lines in T-s diagram
plot2=plot([s1 s2],[T1 T2],'linewidth',3,'color','b');
plot3=plot([s2 s3],[T2 T3],'linewidth',3,'color','g');
plot4=plot([s3 s4],[T3 T4],'linewidth',3,'color','b');
plot5=plot([s4 s5],[T4 T5],'linewidth',3,'color','g');
plot([s5 s6],[T5 T6],'linewidth',3,'color','g')
plot([s6 s1],[T6 T1],'linewidth',3,'color','g')
legend([plot1,plot2,plot3,plot4,plot5],'Satuuration line','1-2 Isentropic Expansion','2-3 Isobaric Heat rejection','3-4 Isentropic Pumping','4-1 Isobaric Heat addition')
%marking state points
text(s1,T1,'1','FontSize',18,'FontWeight','bold');
text(s2,T2,'2','FontSize',18,'FontWeight','bold');
text(s3,T3,'3','FontSize',18,'FontWeight','bold');
text(s4,T4,'4','FontSize',18,'FontWeight','bold');
text(s5,T5,'5','FontSize',18,'FontWeight','bold');
text(s6,T6,'6','FontSize',18,'FontWeight','bold');
%Labelling the axes
xlabel('Entropy (kJ/kgK)')
ylabel('Temperature (K)')
title('T - s diagram')

RESULTS :

  • Calculated all the Properties at each and every state points and it is printed in the command window.
  • Calculated all the performance parameters of Rankine cycle.
  • Specific Enthalpy - Specific Entropy diagram and Temperature - Specific Entropy diagram are plotted

CONCLUSION :

Rankine cycle is nearly practical cycle comparing with Carnot cycle. There are lot of modifications are available for Rankine cycle such as Regenerative cycle, Reheating cycle, Binary vapour cycle,etc to improve the efficiency.

Coming to Programing part, In h - s diagram and T - s diagram, the process 4-1 can be modified by considering the curvature of line by taking their slope.

REFERENCES :

  • Thermal Engineering by Er. R.K. Rajput
  • Steam Tables by R.S. Khurmi and N. Khurmi
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.