Project 2 - Rankine cycle Simulator
AIM:
To simulate the rankine cycle and plot the corresponding T-S and H-S plots using matlab
OBJECTIVE:
- calculate the state points of the rankine cycle based on given points .
plot the corresponding T-S and H-S plots for the given set of inputs.
GIVEN:
INPUT VALUES:
- Turbine inlet temperature = 400 c
- Turbine inlet pressure = 30bar
Turbine outlet pressure =0.05= condenser inlet pressure
REQUIRED OUTPUT VALUES:
net work output
back work ratio
NOTE:
the standard XSteam library is used to get the steam table tata for given water ,which is used to calculate the points in between the state variables.
INTRODUCTION:
- rankine cycle converts thermal energy to mechanical energy.
- on road vehicles, which convert around one third of the fuel energy into useful mechanical energynfor propulsion.
- it is found from prior research that the rankine cycle has great potential energy in automobile waste heat harvesting applications which can ,in turn, be connected to the combusion engine.
- rankine cycle is the most basic thermodynamic cycle for any steam power plant.
- it is strating with heat of water in the boiler at constant pressure to produce steam. the steam produced is then isentropically expanded in the turbine produce work.
- after the turbine ,the steam goes into the condenser where it is cooled and convert into the water at constant pressure
- the water is then again pumped back to the boiler by a pump and the cycle continues.
- the ideal rankine cycle consists of following four process:
i.1-2 :isentropic compression in a pump
ii.2-3: constant pressure heat addition in a boiler
iii.3-4: isentropic expansion in a turbine
iv.4-1:constant pressure heat rejection in a condenser

PROCEDURE:
- first, all the required variables and parameters were found out to calculate.
- then, using the 'xsteam' library function,all the parameters were sorted out.
- then,the usual calcultion and plotting of the graphs were done as per the theory of thermodynamics.
CODE EXPLAIN:
- strat the program eith 'clear all',close all',and 'clc' command.
- as our task is to take user input ,to facilitate users to continue or end the program ,we have introduced a while statement at the strat of the script.while statement ,the first step is to make provision the user input.the user input includes temperature and pressure before entry to the turbine and pressure after exiting to the turbine.
- now based on user input parameters at 4 state points are calculated.thermodynamic parameters include enthalpy H,entropy S,tempareture T,pressure P,and dryness factor x at state point2.for calculating these parameters Xsteam() i.e.steam table MatLab program is used.this program consists of for all thermodynamic propertics. after calling these function in the main script gives us thermodynamic properties based on other properties like tempareture and pressure.
- after calculating all parameters ,the next objective is to calculate pump work, turbine work ,net work out,back ratio,and thermal efficiency.
- now ,we need to display all these results inthe command window which is done by using command''fprintf''().
- the next objective is to plot the graph for H-S and T-S.the first step in plotting this graph is to plot the saturation curve which is calculated using ''for'' loop.values for entropy and enthapy are calculated over a tempareture range. plotting these alculated values , the plot of a saturation curve can is obtained.other processes are plotted by plotting respetive values of H,S,T.
- now ,when the program is run it asks the user to input tubine inlet tempareture,turbine inlet pressure,turbine outlet pressure which is condenser inlet pressure.
- after the input parameters are given,all the results are displayed in the command window.
RESULTS:
first, the user has to input the given input parameters in the command window.
- turbine inlet tempareture =400 c
- turbine inlet pressure = 30 bars
- turbine outlet pressure =0.05bars=condenser in.pressure.
T-S plot:

H-S plot:

here in both the plots,the blue curve represents the saturation curve, and the red curve represents cycle.
WORKSPACE VALUES:

ERRORS:
no complicated errors occurred while running the MATLAB program.
CONCLUSION:
rankine cycle is the basic cycle for under standing about the steam turbine systems in thermodynamics.
the required output values are obtained for the given input parameters:
- Net work output = 1117.87KJ/kg
- Back work ratio =0.003
Thus, the rankine cycle is succesfully simulated using MATLAB.