Challenge

Project 2 - Rankine cycle Simulator

Rankine cycle Simulator

Aim: To write code to simulate the Rankine Cycle.

Objective:

  1. To create a Rankine Cycle Simulator.
  2. The code should calculate the state points of the Rankine Cycle based on user inputs.
  3. To plot the corresponding T-s and h-s plots for the given set of inputs.

Rankine cycle

The Rankine cycle is a model used to predict the performance of steam turbine systems. The Rankine cycle is an idealized thermodynamic cycle of a heat engine that converts heat into mechanical work while undergoing a phase change.

The Rankine cycle closely describes the process by which steam-operated heat engines commonly found in thermal power generation plants to generate power. Power depends on the temperature difference between a heat source and a cold source. The higher the difference, the more mechanical power can be efficiently extracted out of heat energy, as per Carnot's theorem. The heat sources used in these power plants are usually nuclear fission or the combustion of fossil fuels such as coal, natural gas, and oil, or concentrated solar power.

The efficiency of the Rankine cycle is limited by the high heat of vaporization of the working fluid. Also, unless the pressure and temperature reach supercritical levels in the steam boiler, the temperature range the cycle can operate over is quite small: steam turbine entry temperatures are typically around 565 °C and steam condenser temperatures are around 30 °C. This gives a theoretical maximum 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. This low steam turbine entry temperature (compared to the gas turbine) is why the Rankine (steam) cycle is often used as a bottoming cycle to recover otherwise rejected heat in combined-cycle gas turbine power stations. The efficiency of the Rankine cycle is limited on the cold side by the lower practical temperature of the working fluid.

The working fluid in a Rankine cycle follows a closed loop and is reused constantly. The water vapour with condensed droplets often seen billowing from power stations is created by the cooling systems (not directly from the closed-loop Rankine power cycle). This 'exhaust' heat is represented by the "Qout" flowing out of the lower side of the cycle. Cooling towers operate as large heat exchangers by absorbing the latent heat of vaporization of the working fluid and simultaneously evaporating cooling water to the atmosphere.

While many substances could be used as the working fluid in the Rankine cycle, water is usually the fluid of choice due to its favorable properties, such as its non-toxic and unreactive chemistry, abundance, and low cost, as well as it's thermodynamic properties. By condensing the working steam vapour to a liquid the pressure at the turbine outlet is lowered and the energy required by the feed pump consumes only 1% to 3% of the turbine output power and these factors contribute to higher efficiency for the cycle. The benefit of this is offset by the low temperatures of steam admitted to the turbine(s). Gas turbines, for instance, have turbine entry temperatures approaching 1500 °C. However, the thermal efficiency of actual large steam power stations and large modern gas turbine stations are similar.

The four processes in the Rankine cycle

There are four processes in the Rankine cycle.

  • Process 1–2: 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. In other words Process, 1-2 is [Isentropic expansion].
  • Process 2–3: The wet vapour then enters a condenser, where it is condensed at a constant pressure to become a saturated liquid. In other words Process 2-3 is [Constant pressure heat rejection in condenser]
  • Process 3–4: 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 3-4 is [Isentropic compression]
  • Process 4–1: 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 4-1 is [Constant pressure heat addition in boiler]

In an ideal Rankine cycle, the pump and turbine would be isentropic, i.e., the pump and turbine would generate no entropy and hence maximize the net work output.

The actual vapour power cycle differs from the ideal Rankine cycle because of irreversibilities in the inherent components caused by fluid friction and heat loss to the surroundings; fluid friction causes pressure drops in the boiler, the condenser, and the piping between the components, and as a result, the steam leaves the boiler at a lower pressure; heat loss reduces the net work output, thus heat addition to the steam in the boiler is required to maintain the same level of net work output.

Main Code:

clear all
close all
clc

disp('Rankine Cycle Simulator')
disp('process 1-2: Isentropic expansion in turbine ')
disp('process 2-3: constant pressure heat rejection in condenser')
disp('process 3-4: Isentropic Compression in pump')
disp('process 4-1: constant pressure heat addition in boiler')

% Intial data inputs
T1 = input('Enter the turbine inlet temp: ');
p1 = input('Enter the turbine inlet press: ');
p2 = input('Enter the turbine outlet press: ');


% State Point 1 parameters i.e Turbine Inlet
Tsat = XSteam('Tsat_p',p1);
h1 = XSteam('h_pt',p1,T1);
s1 = XSteam('s_pt',p1,T1);

%State Point 2 parameters i.e Condenser Inlet
s2 = s1;
sf2 = XSteam('sL_p',p2);
sg2 = XSteam('sv_p',p2);

% s2=sf2+(x2*sfg2)
% Dryness fraction
x2 =(s2-sf2)/(sg2-sf2);  

T2 = XSteam('T_ps',p2,s2);
h2 = XSteam('h_px',p2,x2);
hf2 = XSteam('hL_p',p2);

% State Point 3 Parameters i.e Pump Inlet
p3 = p2;
T3 = T2;
s3 = sf2;
h3 = hf2;
T5 = Tsat;

% State Point 4 Parameters i.e Boiler Inlet
s4 = s3;
p4 = p1;
h4=XSteam('h_ps',p4,s4);
cp=XSteam('cp_ps',p4,s4);
cv=XSteam('cv_ps',p4,s4);
c=cp/cv;
T4=T3*((p4/p3)^(c-1)/c)

% State Point 5,6 Parameters
T5=Tsat;
h5=XSteam('hL_p',p1);
s5=XSteam('sL_p',p1);
T6=T1;
h6=XSteam('hV_p',p1);
s6=XSteam('sV_p',p1);

% Plotting T-S Diagram
t=linspace(5,400,25000);
for i=1:length(t)
s(i)=XSteam('sL_t',t(i));
S(i)=XSteam('SV_t',t(i));
h(i)=XSteam('hL_t',t(i));
H(i)=XSteam('hV_t',t(i));
end
figure(1)
plot(s,t);
hold on
plot(S,t);


plot([s1,s2,s3,s4,s5,s6],[T1,T2,T3,T4,T5,Tsat],'linewidth',2,'color','k');
text(s1+0.1, T1, '1')
text(s2+0.1, T2, '2')
text(s3, T3-20, '3')
text(s4, T4+20, '4')
axis([0,10,0,500]);


% Plotting Saturated Temperature 
a=linspace(Tsat,T1,500);
for i=1:length(a)
    d(i)=XSteam('s_pt',p1,a(i));
end
plot(d,a,'linewidth',2,'color','k')
title('Temperature vs Entropy')
xlabel('Entropy(S)- kJ/kg K')
ylabel('Temperature(T)-degree C')
legend('Liquid Phase','Vapour Phase')


figure(2)
plot(s,h);
hold on
plot(S,H);

plot([s1,s2,s3,s4,s5,s6,s1],[h1,h2,h3,h4,h5,h6,h1],'linewidth',2,'color','k');
text(s1+0.1, h1, '1')
text(s2+0.1, h2, '2')
text(s3, h3-100, '3')
text(s4, h4 +200, '4')
title('Enthalpy vs Entropy')
xlabel('Entropy(S)- kJ/kg K')
ylabel('Enthalpy(h)-kJ/kg')
legend('Liquid Phase','Vapour Phase','location','northwest')

% Result to be displayed in the command window 
disp(' The following are the results of rankine cycle operation ')
disp(' ')
disp(' At the state point 1')
disp(' ')
n1=sprintf('p1 is %.2f bar',p1);
disp(n1)
n2=sprintf('T1 is %.2f Deg Celcius',T1);
disp(n2)
n3=sprintf('h1 is %.2f kJ/kg',h1);
disp(n3)
n4=sprintf('s1 is %.2f kJ/kgK',s1);
disp(n4) 

disp(' ')
disp(' At the state point 2')
disp(' ')
n5=sprintf('p2 is %.2f bar',p2);
disp(n5)
n6=sprintf('T2 is %.2f Deg Celcius',T2);
disp(n6)
n7=sprintf('h2 is %.2f kJ/kg',h2);
disp(n7)
n8=sprintf('s2 is %.2f kJ/kgK',s2);
disp(n8) 

disp(' ')
disp(' At the state point 3')
disp(' ')
n9=sprintf('p3 is %.2f bar',p3);
disp(n9)
n10=sprintf('T3 is %.2f Deg Celcius',T3);
disp(n10)
n11=sprintf('h3 is %.2f kJ/kg',h3);
disp(n11)
n12=sprintf('s3 is %.2f kJ/kgK',s3);
disp(n12) 

disp(' ')
disp(' At the state point 4')
disp(' ')
n13=sprintf('p4 is %.2f bar',p4);
disp(n13)
n14=sprintf('T4 is %.2f Deg Celcius',T4);
disp(n14)
n15=sprintf('h4 is %.2f kJ/kg',h4);
disp(n15)
n16=sprintf('s4 is %.2f kJ/kgK',s4);
disp(n16)

% Workdone by turbine

W_D_T = h1-h2

% Workdone by the pump

W_D_Pump = h4-h3

%net workdone

W_D_Net = W_D_T-W_D_Pump

% Heat Supplied
q = h1-h4;

% Effeciency
n = W_D_Net/q*100

% Specific steam consumption
ssc = 3600/W_D_Net

% Back Work Ratio
BWR = W_D_Pump/W_D_T
  1. 'clear all' - clear all the variables in the workspace, 'close all' - closes all the plots and figures and 'clc' - clear the command window.
  2. Xsteam data is used to extract steam and water properties of enthalpy, entropy at a specific pressure and temperatures for saturated liquid, saturated vapour conditions, etc.
  3. The program requires the input of Pressure at state point 1 i.e at turbine inlet, Temperature at the same point (deg Celcius), and Temperature at condenser inlet (state point 2).
  4. With the help of these inlets and from Xsteam data, the program calculates all the 4 state points of the Rankine cycle.
  5. The xsteam data works as, h1 = XSteam('h_pT' , p1 , T1) ;
  6. As we extract the data, we use thermodynamic relation to further find state points and extract their data from XSteam.
  7. Sf and sg, hf and hg, where f and g stand for saturated liquid and saturated vapour respectively.
  8. The net work, work done by the turbine, work done to run the pump, Heat in and heat out are calculated using standard thermodynamic relation.
  9. Efficiency and Specific steam consumption (s.s.c) of the Rankine cycle are calculated.
  10. T, s, and h are extracted at vapour and liquid line for plotting purpose, after 4th point for the variation it can be observed in the plot.
  11. The saturation curve is plotted in red for saturated liquid and saturated gas.
  12. The plot of T vs s and h vs s is created from all the points obtained from the program.
  13. The plot changes as the user input changes for the above-mentioned inputs.
  14. Results are displayed in the command window.

Input:

Command Window

Rankine Cycle Simulator
process 1-2: Isentropic expansion in turbine 
process 2-3: constant pressure heat rejection in condenser
process 3-4: Isentropic Compression in pump
process 4-1: constant pressure heat addition in boiler
Enter the turbine inlet temp: 400
Enter the turbine inlet press: 30
Enter the turbine outlet press: 0.05

Output:

Command Window

T4 =

   36.3413

 The following are the results of rankine cycle operation 
 
 At the state point 1
 
p1 is 30.00 bar
T1 is 400.00 Deg Celcius
h1 is 3231.57 kJ/kg
s1 is 6.92 kJ/kgK
 
 At the state point 2
 
p2 is 0.05 bar
T2 is 32.88 Deg Celcius
h2 is 2110.71 kJ/kg
s2 is 6.92 kJ/kgK
 
 At the state point 3
 
p3 is 0.05 bar
T3 is 32.88 Deg Celcius
h3 is 137.77 kJ/kg
s3 is 0.48 kJ/kgK
 
 At the state point 4
 
p4 is 30.00 bar
T4 is 36.34 Deg Celcius
h4 is 140.76 kJ/kg
s4 is 0.48 kJ/kgK

W_D_T =

   1.1209e+03


W_D_Pump =

    2.9971


W_D_Net =

   1.1179e+03


n =

   36.1674


ssc =

    3.2204


BWR =

    0.0027

Plots:

Temperature vs Entropy Plot:

Enthalpy vs Entropy Plot:

References:

https://en.wikipedia.org/wiki/Rankine_cycle

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

https://www.youtube.com/watch?v=4-BI22Wx4Pc

https://www.youtube.com/watch?v=vt1_7f5l3hI

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.