Challenge

Project 2 - Rankine cycle Simulator

AIM:

To create a Rankine cycle simulator from given input and reading the data from standard thermodynamic library of steam table.

Objective

  • To create a Rankine Cycle Simulator in MATLAB.
  • To extract Steam and water properties from XSteam data (IAPWS IF-97 standard)
  • To plot the T-S and H-S curve for given input in Rankine Cycle.
  • To display output in the command window for each state point in cycle.

RANKINE CYCLE:

The Rankine cycle or Rankine Vapor Cycle is the process widely used by power plants such as coal-fired power plants or nuclear reactors. In this mechanism, a fuel is used to produce heat within a boiler, converting water into steam which then expands through a turbine producing useful work. This process was developed in 1859 by Scottish engineer William J.M. Rankine.[1] This is a thermodynamic cycle which converts heat into mechanical energy—which usually gets transformed into electricity by electrical generation.


Figure 1. A simple schematic with components for the Rankine Cycle.[2]


Figure 2. The pressure volume diagram of the Rankine cycle. This illustrates the changes in pressure and volume the working fluid (water) undergoes to produce work. [3]

The steps in the Rankine Cycle as shown in Figure 1 and the corresponding steps in the pressure volume diagram (figure 2) are outlined below: [1]

  • · Pump: Compression of the fluid to high pressure using a pump (this takes work) (Figure 2: Steps 3 to 4)
  • · Boiler: The compressed fluid is heated to the final temperature (which is at boiling point), therefore, a phase change occurs—from liquid to vapor. (Figure 2: Steps 4 to 1)
  • · Turbine: Expansion of the vapor in the turbine. (Figure 2: Steps 1 to 2)
  • · Condenser: Condensation of the vapor in the condenser (where the waste heat goes to the final heat sink (the atmosphere or a large body of water (ex. lake or river). (Figure 2: Steps 2 to 3)


The efficiency of the Rankine cycle is limited by the high heat of vaporization by the fluid. The fluid must be cycled through and reused constantly, therefore, water is the most practical fluid for this cycle. This is not why many power plants are located near a body of water—that's for the waste heat.

As the water condenses in the condenser, waste heat is given off in the form of water vapour—which can be seen billowing from a plant's cooling towers. This waste heat is necessary in any thermodynamic cycle. Due to this condensation step, the pressure at the turbine outlet is lowered. This means the pump requires less work to compress the water—resulting in higher overall efficiencies.


Process and working:

There are four processes in the Rankine cycle:

  1. Process 1-2: Isentropic Expansion in the turbine

Turbine (1-2): Superheated steam enters into the turbine and expands isentropically resulting in the production of work. The shaft of the turbine is connected to the generator. This results in the production of electricity (i.e. conversion of Mechanical energy to electrical energy.

Work produced by the turbine, WT = m (h1-h2) K

  1. Process 2-3: Constant pressure heat rejection in condenser

Condenser (2-3): The expanded vapor is then passed through a condenser, where it gets condensed and converts into liquid again. This liquid is again pumped to the boiler.

QT = m (h2-h3) K

  1. Process 3-4: Isentropic compression in the pump

Pump (3-4): The water enters into the pump in a saturated state. Then the liquid is compressed isentropically until it meets the boiler pressure.

Work done by the pump is, WP = m (h3-h4) K

  1. Process 4-1: Constant pressure heat addition in the boiler

Boiler (4-1): The water enters into the boiler as compressed state and leaves as superheated from the boiler. Thus, the phase changes from liquid to vapor.

The heat supplied by the boiler is, Qb = m (h1-h4) K

Here we take mass flow rate m=1 for this code.

EfficiencY:

  • The efficiency of the Steam Cycle is given by


Applying the Steady Flow Energy Equation (SFEE) to all the process, neglecting the friction losses and changes in Kinetic and Potential Energy.

  • Q1 = h1-h4 at boiler
  • Wt = h1-h2 at turbine
  • Q2 = h2-h3 at condenser
  • Wp = h4-h3 at pump
  • The capacity of the Steam Plant is often expressed in terms of Seam Rate (SR) or Specific Steam Consumption (SSC).

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

EXPLANANTION:

  • 'clear all' - clear all the variables in the workspace, 'close all' - closes all the plots and figures and 'clc' - clear the command window.
  • 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.
  • 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).
  • With the help of these inlets and from Xsteam data, the program calculates all the 4 state points of the Rankine cycle.
  • The xsteam data works as, h1 = XSteam('h_pT' , p1 , T1) ;
  • As we extract the data, we use thermodynamic relation to further find state points and extract their data from XSteam.
  • Sf and sg, hf and hg, where f and g stand for saturated liquid and saturated vapour respectively.
  • 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.
  • Efficiency and Specific steam consumption (s.s.c) of the Rankine cycle are calculated.
  • 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.
  • The saturation curve is plotted in red for saturated liquid and saturated gas.
  • The plot of T vs s and h vs s is created from all the points obtained from the program.
  • The plot changes as the user input changes for the above-mentioned inputs.
  • Results are displayed in the command window.

RESULT:

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

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


ENTHALPY VS ENTROPY:


REFERENCES:

https://energyeducation.ca/encyclopedia/Rankine_cycle#:~:text=The%20Rankine%20cycle%20or%20Rankine,a%20turbine%20producing%20useful%20work.

.

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.