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:
- 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
- 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
- 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
- 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
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:
.