Project 2 - Rankine cycle Simulator
AIM:
To create a Rankine Cycle Simulator from the given input and read the data from the standard thermodynamic library of steam table.
OBJECTIVE:
- To create a Rankine Cycle simulator in MATLAB.
- To calculate the state points of the Rankine Cycle based on user inputs and data from Xsteam.
- Plotting the corresponding T-s and h-s plots for the given inputs.
- To get output in the command window for each state point in cycle.
Basic 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 - Rankine cycle.

Figure - 2 - T-s and p-h diagrams.

The efficiency of power cycles is defined as

MATLAB CODE -
%% Rankine cycle simulator
clear all
close all
clc
Explanation of Code -
- The XSteam data is used to extract vapour and liquid properties of enthalpy, entropy at specific pressure and temperatures for saturated liquid, saturated vapour conditions
- The program requires the input pressure (p1 in bar) at state 1 (Turbine Inlet), temperature at same point (in degree celcius) and pressure at Condenser Inlet (point 2).
- With the help of these inputs & from XSteam data, the program calculates all the 4 states of the Rankine cycle.
- The XSteam data works as, h1 = XSteam('h_pT' , p1 , T1) it returns the enthalpy of water at given pressure and temperature.
- Thermodynamic relation used to find the state points and extract their data from XSteam which are mentioned after studying the Rankine cycle.
- saturated liquid and saturated vapour are calculated after studying the plots of the Rankine Cycle and extracting data from XSteam file.
- Further, the network, work done by turbine, work done to run the pump, heat in and heat out are calculated using standard thermodynamic relations
- The thermal efficiency, specific steam consumption and back work ratio of the Rankine cycle is calculated from thermodynamic relations and mentioning them in program using relations.
- T, s and h are extracted at vapour and liquid line for plotting purpose, after 4th point for the variation you observe in the plot.
- Saturation curve is plotted in red for saturated liquid and saturated gas in T-s diagram and h-s diagram.
- Plots of T vs s and h vs s are created from all the points obtained from the program using the plot command and mentioning all the lables, linewidth, color and the title to the plots.
- Results are displayed in the command window by using printf command.
Code Output -


Command Window Output -
RANKINE CYCLE SIMULATOR
1-2 is Isentropic Expansion in the turbine
2-3 is constant pressure heat removal in the condenser
3-4 is Isentropic compression in the pump
4-1 is Constant pressure heat addition in the boiler
Value of pressure at turbine inlet, p1(in bar) = 30
Value of temperature at turbine inlet, T1(in degree.C) = 400
Value of temperature at condenser inlet, p2(in bar) = 0.05
RESULTS OF IDEAL RANKINE CYCLE
At State Point 1:
p1: 30.000000 bar
T1: 400.000000 C
h1: 3231.571027 KJ/kg
s1: 6.923259 KJ/kgK
At State Point 2:
p2: 0.050000 bar
T2: 32.875490 C
h2: 2110.708212 kJ/kg
s2: 6.923259 kJ/kgK
x2: 0.814256
At State Point 3:
p3: 0.050000 bar
T3: 32.875490 K
h3: 137.765119 kJ/kg
s3: 0.476254 kJ/kgK
At State Point 4:
p4: 30.000000 bar
T4: 36.935287 K
h4: 140.776056 KJ/kg
s4: 0.476254 kJ/kgK
Turbine Work: 1120.862815 kJ/kg
Pump Work: 3.010937 kJ/kg
Wnet: 1117.851878 kJ/kg
Efficiency: 36.167131
S.S.C: 3.220462 kJ/kWh
Back Work Ratio: 0.002686
Conclusion –
Rankine cycle simulator is obtained where the values are extracted from 'XSteam' data file and following results were obtained
- Net work done is 1117.851 KJ/KG.
- Thermal efficiency is 36.167 %.
- Back work ratio is 0.003
References -
- https://www.thermopedia.com/content/1072/
- Engineering Thermodynamics by PK Nag