Project 2 - Rankine cycle Simulator
Aim:
To create a Rankin cycle stimulator using Matlab. To find the thermodynamic state points of each state.
Objective:
- To Calculate the Rankin cycle State points at different stage.
- To calculate the net work done by the system.
- To find the Ratio of pump work.
Theory:
What is Rankin cycle:
The Rankine cycle is an idealized thermodynamic cycle describing the process by which certain heat engines, such as steam turbines or reciprocating steam engines, allow mechanical work to be extracted from a fluid as it moves between a heat source and heat sink
The Rankine cycle or Rankine Vapor Cycle is the process widely used by power plants such as coal plants or neuclear reactor. 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. This is a thermodynamic cycle which converts heat into mechanical energy—which usually gets transformed into electricity by electrical generation.
- Pump:Compression of the fluid to high pressure using a pump (this takes work)
- Boiler:The compressed fluid is heated to the final temperature (which is at boiling point), therefore, a phase change occurs—from liquid to vapor.
- Turbine:Expansion of the vapor in the turbine.
- 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).
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, is the water 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, is given off waste 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:
Process 1-2: Isentropic expansion in the turbine.
Process 2-3: Isobaric cooling in the condenser.
Process 3-4: Isentropic compression in the pump.
Process 4-1: Isobaric heating in the boiler.

Equation applied is steady flow energy equation:
- For boiler Q1 = h1 – hf4
- For Turbine Wt = h1 – h2
- For the Condenser Q2 = h2 – h3
- For the feed pump Wp = hf4 – hf3
- To calculate Efficiency => Eff = (Wt – Wp)/Q2
- For the Net work done :
- Wnet = Wp/Wt
Main Code:
Explanation:
- Frist Displaying the Rankin cycle using disp command.
- Using Disp command for displaying process takes place in Rankin cycle.
- Now reading the Xsteam.m file provided carefully to obtain thermodynamic properties at different Stages.
- When phase changes the temperature remains constant.
- Calculating Net work, thermal efficiency, output and inputs all are displayed in the command prompt.
- Now plotting the T-S and H-S diagram showing Entropy during the isobaric process.
- Computing the variation of entropy during Isobaric process.
- Displaying all the result at command window.
- Generating .txt file by using Dairy command at the starting of the program.
Errors:
There were small syntax error which have been resolved immidiately.
Output:
Rankin Cycle
process 1-2: Isentropic expansion of the turbine
process 2-3: Const pressure heat rejection from the condenser
process 3-4: Isentropic compression in the pump
process 4-5: Constant pressure heat addition in the boiler
Enter the pressure in Turbine Inlet(in bars):30
Enter the pressure at Condenser (in bars):0.05
Enter the Temperature in Turbine inlet (in degree celcius):400
Result
At 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)
Result
At 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)
Result
At 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)
Result
At state point 4
P4 is : 30.00 Bar
T4 is : 36.94 Deg Celcius
H4 is : 140.78 (kJ/kg)
S4 is : 0.48 (kJ/kgK)
Work output by turbine Wt is : 1120.86 kJ/kg
Work input by the pump Wp is : 3.01 kJ/kg
Net work done Wnet is : 1117.85 kJ/kg
Thermodynamic eff is : 36.17 percent
Heat input by boiler : 3090.79
Heat input by boiler : 32.00
Heat input by boiler : 107.00
Heat input by boiler : 74.00
Heat input by boiler : 47.00
Heat input by boiler : 107.00
Heat input by boiler : 103.00
Heat rejected by condenser : 1972.94
Heat rejected by condenser : 32.00
Heat rejected by condenser : 107.00
Heat rejected by condenser : 74.00
Heat rejected by condenser : 47.00
Heat rejected by condenser : 107.00
Heat rejected by condenser : 103.00
Specific fuel consumption is : 3.22 kg/Kwh
Plotting:





Reference:
https://en.wikipedia.org/wiki/Rankine_cycle
https://thereaderwiki.com/en/Rankine_cycle
https://energyeducation.ca/encyclopedia/Rankine_cycle
https://www.youtube.com/watch?v=Ec9kXfrZaR4