Project 2 - Rankine cycle Simulator
PROJECT 2 - RANKINE CYCLE SIMULATOR
AIM: Creation of rankine cycle simulator from given inputband reading the data from standard thermodynamic library of steam table.
OBJECTIVE:
1.To create a rankine cycle simulator in matlab.
2.To calculate the state point using function xsteam.
3.To plot the t-s and h-s curve for given input in rankine cycle.
4.To get output in the command window for each state point in cycle.
DESCRIPTION:
* The rankie cycle is one of the vapor powered cycle. This cycle is somewhat different than gas powered cycle in which working fluid remained gas throughout the entire cycle.
* In vapor powered cycle the working fluid is steam because of its many desirable characteristics such as low cost production,availability and high enthalpy of vaporization.
* There are many impracticalities associated with carnot cycle which can be elimimated by superheating thr steam and condense in condenser which makes it best for nuclear power plants and other steam related power generation sources.
THE PROCESS IN RANKINE CYCLE ARE GIVEN AS:
* Isentropic compression in pump.
* Constant pressure heat addition in boiler.
* Isentropic expansion in a turbine.
* Constant pressure heat rejection in condenser.

* Water enters the pump at state 1 as saturated liquid and is compressed isentropic compression process due to a slight decrease in the specific volume of water.The vertical distance between states 1 and 2 on the t-s diagram is greatly exaggerated for clarity.
* Water enters the boiler as a compressed liquid at state 2 and leave as a superheated vapor at state 3. The boiler is basically a large heat origination from combustion gases,nuclear reactors,or other sources is transferred to the water essentially at constant pressure.
* The superheated vapour at state 3 enters the turbine ,where it expands isentripically and produces work by rotating the shaft connected to on electric generator.
* The pressure and the temperature of steam drop during this process to the values at state4,where steam enters the condenser.At this
state,steam enters the condenser.At this state,steam is usually a saturated liquid-vapor mixturevwith a high quality.
* In areas where water is precious,the power plants are cooled by air instead of water. This method of cooling,which is also used in car engines,is called dry cooling.
* Remembering that the area under the process curve on a T-S diagram represents the heat transfer for internally reversible processes,we see that the area under process curve 2-3 represents the heat transferred tobthe water in the boiler and the area under the process curve 4-1 represent the heat rejected in the condenser.The difference between these two is the net work produced durning the cycle.
* All the four components of rankie cycle are steady flow devices hence the process regarding this devices can be evaluated as steady state process.The steady state flow energy equation per unit mass of steam reduces to:
(Qin-Qout)+(Win-Wout) = hc-hi
* The boiler and condenser are not involved in any mechanical work whereas pump and turine are assumed to isentropic in nature while
working throughtout the cycle,then conservation of energy relation for each device can be expressed as:
Wpump = h2-h1
where,
h1 = hj at p1 and v1 = vf at p1
The heat added in boiler can be given as:
qin = h3-h2
The work which can be taken out of cycle from turbine is given as:
Wout = h3-h2
The heat removed from the condenser is given as:
qout = h4-h1
The thermal efficiency of rankie cycle is given as:
nth = Wnet/qin = 1-qout/qin
where,
Wnet = qin - qout = Wturb-Wpump
CODE EXPLANATION:
1.The creation of rankie cycle simulator starts with some input value which are required to calculate the other state point in cycle eventually.
2.The rankie cycle process is displayed in the command window and then inputs are entered which are inlet pressure for turbine,temperature at turbine inlet and pressure at condenser.
3.Then we are using xsteam function file for reading state point.First,we get the value of entholpy and entropy at state point 1 from the xsteam function file.
4.As process from 1-2 is isentropic compression the entropy at point 1 is equal to point 2.The team '(s_pt,p1,t1)'refers to entropy at pressure and temperature point 1.
5.The term 'sg'and 'sf' are referred to saturated liquid and saturated vapor entropy respectively . This value is used to calculated
other function according to mathematical relations.
6.Similarly,other point are taken from xsteam function file which are necessary to calculate other parameters.After that work done in turbine and pump are calculated for further getting the net work done rankie cycle.
7.After calculation the net work done the efficiency of the rankie cycle is calculated along with is steam consumed by a locomotive cyclinder per unit of output of work done.
8.Then plotting is done respectively for T-S and H-S graph in rankie cycle and each state point value has been put in command window.
THE CODE FOR RANKINE CYCLE SIMULATOR IS GIVEN AS:



The value for the state point in command windows are given as:
For inlet pressure in turbine as = 500 bar
Inlet temperature in turbine = 500 deg.cel
pressure in condenser = 5 bar
For input given in challenge:
For inlet pressure in turbine as = 30 bar
Inlet pressure in turbine = 400 deg.cel
Pressure in condenser = 0.05 bar
COMMAND WINDOW:
Rankine cyclen1-2 is isentropic expansion in turbien2-3 is constant pressure heat removaln 3-4 is isentropic compression in pump n4-1 constant pressure heat addition in boilern
t5 =
263.9429
results of rankine cycle
at state point 1tttttat state point 2np1 = 50.000000 in barrttttp2 = 5.000000 in barnt1 = 500.000000 in deg.celciusttt2 = 151.836244 in deg.celciusnh1 = 3434.476097 in kj/kgttth2 = 2814.925098 in kj/kgns1 = 6.977804 in kj/kg-kttts2 = 6.977804 in kj/kg-knnat state point 3tttttat state point 4np3 = 5.000000 in barnp4 = 50.000000 in barnt3 = 151.836244 in deg.celciusttt4 = 231.746236 in deg.celciustth3 = 640.185335 in kj/kgttth4 = 635.268830 in kj/kgns3 = 1.860599 in kj/kg-kttts4 = 1.860599 in kj/kg-knnturbine work done = 619.550998 in kj/kgnpump work done = 4.916505 in kj/kgnnet work done = 614.634493 in kj/kgnthermal efficiency = 21.957448 in percentnsp.steam consumption = 5.857140 in kj/kwn>> plot(time,pressure)
From the two different input value it is seen that increasing the pressure and temperature in turbine result in lowering the efficiency of rankie cycle.
ERRORS:

* This error is mostly coming because of entering wrong keywords for saturated entropy and enthalpy from xsteam function file.
CONCLUSION:
So,we have created the rankine cycle simulator the given input ,in which we have taken the data from xsteam function file.