Challenge

Project 2 - Rankine cycle Simulator

Project 2 - Rankine cycle Simulator

Aim – Create a rankine cycle simulator and plot T-s and h-s diagram.

Basic of Rankine Cycle:

The Rankine cycle is the fundamental operating cycle of all power plants where an operating fluid is continuously evaporated and condensed. The selection of operating fluid depends mainly on the available temperature range. Figure 1 shows the idealized Rankine cycle.

The pressure-enthalpy (p-h) and temperature-entropy (T-s) diagrams of this cycle are given in Figure 2. The Rankine cycle operates in the following steps:

  • 1-2-3 Isobaric Heat Transfer. High pressure liquid enters the boiler from the feed pump (1) and is heated to the saturation temperature (2). Further addition of energy causes evaporation of the liquid until it is fully converted to saturated steam (3).

  • 3-4 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 vapor stream as the process moves further into the two-phase region. Exit vapor qualities should be greater than 90%.

  • 4-5 Isobaric Heat Rejection. The vapor-liquid mixture leaving the turbine (4) 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.

  • 5-1 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.

FIGURE 1:-IDEALIZE RANKINE CYCLE

FIGURE 2:- (a)Pressure-Enthalpy(p-h) and (b)Temperature-Entropy(T-s) and (c)Enthalpy-Entropy(H-s) diagrams of Rankine Cycle.

Code:-

Use Click here to download the Xsteam Library. Xsteam is function to get steam data

Main Program:-

close 
clear 
clc
% displaying rankine cycle simulator and its processess
disp("         Rankine cycle simulator")
fprintf('\n 1-2  is the  isentropic expansion process')
fprintf('\n 2-3  is the constant pressure heat rejection process')
fprintf('\n 3-4  is the isentropic compression process')
fprintf('\n 4-1  is the constant pressure heat addition process')
% variables for stage1 
p1 = 30;
t1 = 400;
h1 = XSteam('h_pT',30,400);
s1 = XSteam('s_ph',30,h1);
fprintf('\n\n           Results')
fprintf('\n\n At state point 1')
fprintf('\n P1 is:%f bar',p1)
fprintf('\n T1 is:%f deg celcius',t1)
fprintf('\n H1 is:%f KJ/Kg',h1)
fprintf('\n S1 is:%f KJ/KgK',s1)


% variables for stage2 
p2 = 0.05;
s2 = s1;
t2 = XSteam('T_ps',0.05,6.1858);
sf2 = XSteam('sL_p',p2);
sg2 = XSteam('sV_p',p2);
hf2 = XSteam('hL_p',p2);
hg2 = XSteam('hV_p',p2);
x = ((s2 - sf2)/(sg2 - sf2));
h2 = hf2 + (x*(hg2 - hf2));
v2 = XSteam('v_ph',p2,h2);
fprintf('\n\n At state point 2')
fprintf('\n P2 is:%f bar',p2)
fprintf('\n T2 is:%f deg celcius',t2)
fprintf('\n H2 is:%f KJ/Kg',h2)
fprintf('\n S2 is:%f KJ/KgK',s2)

% variables for stage3
t3 = t2;
p3 = p2;
s3 = XSteam('sL_p',p3);
h3 = XSteam('hL_T',32.875);
v3 = XSteam('v_ph',p3,h3);
fprintf('\n\n At state point 3')
fprintf('\n P3 is:%f bar',p3)
fprintf('\n T3 is:%f deg celcius',t3)
fprintf('\n H3 is:%f KJ/Kg',h3)
fprintf('\n S3 is:%f KJ/KgK',s3)

% variables for stage4
s4 = s3;
v4 = v3;
p4 = p1;
h4 = XSteam('h_ps',p4,s4);
t4 = XSteam('T_hs',h4,s4);
fprintf('\n\n At state point 4')
fprintf('\n P4 is:%f bar',p4)
fprintf('\n T4 is:%f deg celcius',t4)
fprintf('\n H4 is:%f KJ/Kg',h4)
fprintf('\n S4 is:%f KJ/KgK',s4)


% variables for stage6
p5 = p4;
t5 = XSteam('Tsat_p',p5);
h5 = XSteam('hL_T',t5);
s5 = XSteam('sL_p',p5);
fprintf('\n\n At state point 5')
fprintf('\n P5 is:%f bar',p5)
fprintf('\n T5 is:%f deg celcius',t5)
fprintf('\n H5 is:%f KJ/Kg',h5)
fprintf('\n S5 is:%f KJ/KgK',s5)


% variables for stage6
t6 = t5;
p6 = XSteam('psat_T',t5);
s6 = XSteam('sV_T',t6);
h6 = XSteam('hV_T',t6);
fprintf('\n\n At state point 6')
fprintf('\n P6 is:%f bar',p6)
fprintf('\n T6 is:%f deg celcius',t6)
fprintf('\n H6 is:%f KJ/Kg',h6)
fprintf('\n S6 is:%f KJ/KgK',s6)

% loop to find variables on saturation lines
t = linspace(0,400,1000);
for i=1:length(t)
s_line1(i)=XSteam('sL_T',t(i));
end

for j=1:length(t)
s_line2(j)=XSteam('sV_T',t(j));
end
for i=1:length(t)
h_line1(i)=XSteam('hL_T',t(i));
end

for j=1:length(t)
h_line2(j)=XSteam('hV_T',t(j));
end

% net work output calculation
w_turbine = h1 - h2;                          % work done by turbine
w_pump = h4 - h3;                             % work taken by pump
work = w_turbine - w_pump;                    % net work output
fprintf('\n NET Work is:%f ',work)
q_in = h1 - h4;                               % heat addition
q_out = h2 -h3;                               % heat rejection

% thermal efficiency
n = work/q_in;

%Back work ratio
BWR = w_pump/w_turbine;
fprintf('\n Back Work Ratio is:%f ',BWR)

% Specific steam consumption
ssc = 3600/work;

%plotting T-s graph
figure(1)
hold on
plot([s_line1 s_line2],[t t])
plot([s1 s2 s3 s4 s5 s6 s1],[t1 t2 t3 t4 t5 t6 t1])
text(s1,t1,'1')
text(s2,t2,'2')
text(s3,t3,'3')
text(s4,t4,'4')
text(s5,t5,'5')
text(s6,t6,'6')
title("Rankine cycle T-S Diagram")
xlabel('Entropy(KJ/KgK)')
ylabel('Temperature(K)')
axis([0,8,0,450])
%plotting h-s graph
figure(2)
hold on
plot([s_line1 s_line2],[h_line1 h_line2])
plot([s1 s2 s3 s4 s5 s6 s1],[h1 h2 h3 h4 h5 h6 h1])
text(s1,h1,'1')
text(s2,h2,'2')
text(s3,h3,'3')
text(s4,h4,'4')
text(s5,h5,'5')
text(s6,h6,'6')
title("Rankine cycle H-S Diagram")
xlabel('Entropy(KJ/KgK)')
ylabel('Enthalpy(KJ/Kg)')
axis([0,8,0,3500])

Stepwise Explanation of Main Program:

1) The task is to take user input, to facilitate users to continue or end the program, introduce a while statement at the start of the script. While statement, the first step is to make provision for MatLab to accept user input. \'input()\' is used to provide the user input. The user input includes temperature and pressure before entry to the turbine and pressure after exiting to the turbine.

2) Now based on user inputs parameters provided all 6 stage points are calculated. Thermodynamic parameters include enthalpy H, entropy S, temperature T, pressure P, and dryness factor X at state point 2. For calculating these parameters XSteam() i.e. steam table MatLab program is used. This program consists of functions for all thermodynamic properties. After calling these functions in the main script gives us thermodynamic properties based on other properties like temperature and pressure.

3) Calculating all parameters, the next objective is to calculate pump work, turbine work, net work output, back ratio, and thermal efficiency.

4) Now, to display all these results in the command window which is done by using command \'fprintf()\'.

5) The objective is to plot the graph for H-S and T-S. The first step in plotting this graph is to plot the saturation curve which is calculated using \'for\' loop. Under \'for\' loop, values for entropy and enthalpy are calculated over a temperature range. Plotting these calculated values, the plot of a saturation curve can is obtained.

6)Other processes are plotted by plotting respective values of H, S, T.

7) The program asks the user to input Turbine Inlet temperature, Turbine Inlet Pressure, Turbine Outlet Pressure which is Condenser Inlet Pressure also gives net work and back work ratio values.

8) After the input parameters are given, all the results are displayed in the command window.

RESULTS:

NET Work is:1117.863403 MW
Back Work Ratio is:
0.002676

Rankine Cycle T-S Diagram

Rankine Cycle H-S Diagram

OUTPUT SCREEN-Command Window shows values for For Turbine Inlet temperature = 400° C ,Turbine Inlet Pressure = 30 bars ,Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure.

Conclusion:

  1. The Rankine cycle is successfully simulated using MATLAB.
  2. Rankine cycle help in understanding about the steam turbine systems in thermodynamics.
  3. The required output values are obtained for the given input parameters:
  4. Net work output = 1117.863KJ/Kg
  5. Back work ratio = 0.002676

References

1)http://www.thermopedia.com/content/1072/

2) Challenges for xsteam

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.