Project 2 - Rankine cycle Simulator
AIM: create a Rankine Cycle Simulator using Matlab.
OBJECTIVE:
- calculate each state point of the Rankine cycle based on code (user) inputs.
- plot the corresponding T-S and H-S plots for a given set of inputs.
- calculate efficiency.
THEORY:
The Rankine cycle is an idealized thermodynamics cycle of a heat engine that converts heat into mechanical work while undergoing a phase change. It is an idealized cycle in which losses in each of the four components are neglected. The heat is supplied externally to a closed loop. Which usually uses water as the working fluid.
*four components of the Rankine-Cycle*

- pump
- boiler
- Turbine
- condenser
four processes of the Rankine cycle:-
process (1-2) isentropic expansion
super heated steam enters 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, mechanical energy converted into electrical energy. Work produced by the turbine.
Wt = m(h-h2)K
process(2-3):constant pressure heat rejection
condenser(2-3): The expanded vapour is then passed though a condenser where it gets condensed and convert into liquid is compressed liquid agian. This liquid is again oumped into the boiler.
Qr=m(h2-h3)K
3-4:Isentropic Compression by the pump
pump (3-4): The water enters into the pump in a satursated state. then the liquid is compressed isentropically until it meets the boiler pressure. Work done by the pump is,
Wp=m(h3-h4)
process (4-1): constant pressure heat addition
boiler:the water enrters into the boiler as compressed and leaves as superheated from the boiler.Thus the heat supplied by the boiler is
Qb = m(h1-h4)K
ere take mass flow rate m=1 for this code


The efficiency of the Steam Cycle is given by.
η=Wn/Q1=Wt-Wp/Q1
***applyibg the study flow energy equation(SFEE) to all process neglecting the friction losses and change in kinetic &potential Energy.
- Q1=h1-h4@boiler
- Wt=h1-h2@Turbine
- Q2=h2-h3@condenser
- Wp=h4-h3@pump
The capacity of the Steam plant is often expressed in terms of Steam rate or Specific Steam Consumption(ssc)
SSC=3600/W kg/kwh
Required inputs:
Turbine Inlet temperature = 400 C
Turbine Inlet pressure =30 bars
Turbine outlet pressure = 0.05bars (consdenser inlet pressure)
MATLAB CODE
- The program begins with clear all, alose all,clc to erase the workspace and plots.
- input varaibles p1,T1,p2 are given by input command those values are enterd in command window while excuting the program.
- @state(1): Variables for entropy, enthapy are extracted as a function of pressure & temperature
- h_pT,s_pT,hL_p,sV_p etc... are the default variables stored in XSteam file.
- similalrly all the variables for all state are extracted using suitable format
- note: [**The formulae for the factors are reffered frompower plant Reference Books.]
- Pressure,Temperature,Entropy,enthalpy for all the state varaiables are extracted from Xsteam file/
- @state(2): condenser inlet where the high pressure steam is converted into low pressure water and hence dryness fraction, Enethalpy&Entropy for saturated vapour&Saturated water are consideredto calculate specific Enthalpy.
- @state(3): the water is condensed back to its saturation Temperature and fed to the pump,This temperature of water at the exist of the condenser and entry of pump is the same.
- @state (4):- This is constant pressure heat addition hence pressure is equal to p1,but the temperature increase on heating at constant pressure temperature and volume as our Entropy remains same and hence Cp/Cv=gamma to find T4
- define two more points 5 and 6 to plot cycle in details.
- finally, workdoen and Heat Evolved&SSC are calculated by basic formulae
- to plot the saturation Curve,aTemperature range is defined using linspace command and for the over all length of this Temperature value enthalpy& entropy are calculated at every temperature point.The Break in the saturation curve separates the Liquid phase &Vapour Phase.
- Now all the neccesary data is found out,Plotting is done for both T-S & H-S curves using the plot commands annovations are assigned to text command
- result of the Cycle simulation is displayed over Command window using fprintf command.
RESULTS:-
The RAnkine cycle plots have generated by calculating the state poinnts, efficiency and the output is printed in the command
COMMAND WINDOW



WORKSPACE
