Project 2 - Rankine cycle Simulator
PROJECT NAME – RANKINE CYCLE SIMULATOR
AIM-
- To create the MATLAB program for simulation of Rankine cycle and analyse it.
- To find the net work output and back work ratio with the help of given input parameters.
OBJECTIVE-
- Developing basic program that calculates the state points of the cycle at various stages
- Addition of thermodynamic relation for getting points in between the state variables.
- Plotting Rankine to het t-s and h-s diagram.
- Extracting steam and water properties from XSteam file.
- Calculation of performance parameters for Rankine cycle.
CONSTRUCTION OF RANKINE CYCLE-
There are four processes in the Rankine cycle-
Process 1-2 = Isentropic expansion in the turbine.
Process 2-3 = Constant pressure heat rejection in condenser.
Process 3-4 = Isentropic compression in the pump.
Process 4-1 = Constant pressure heat addition in the boiler.
COMPONENTS USED –
- Boiler for generation of steam at constant pressure.
- A turbine in which the expansion of steam (isentropicaly) and work is done.
- A condenser in which removal of heat from the exhausted steam and complete conversion of it into the water.
- A pump which is used for raising the pressure of liquid water to pressure of boiler and pumping it into the boiler for conversion into the steam.
ASSUMPTIONS MADE-
- Expansion and compression process is assumed to be an isentropic process but actually these are not perfect compression and expansion processes.
- Addition of heat and Removal of heat are considered to be isobaric processes but in actual pressure varies with some amount.
- Due to these above conditions we can say that the stimulation of Rankine cycle will be ideal.
THEORY-
The Rankine cycle or Rankine Vapour cycle mostly used in power plants for e.g. Coal fired power plants or we can use them in the nuclear reactors. In this cycle principle used is - use of fuel to produce heat within the boiler and hence converting it into the steam and then expansion of it into the turbine which produces useful work.
This process is invented and developed by William J. Rankine in 1859 which converts heat into the mechanical energy then converting it into electrical energy. It is the idealised thermodynamic cycle governing the working of heat engine as an idealised cycle friction losses of heat engine are neglected. We can say that Rankine Cycle is the advanced and modified version of Carnot cycle. As it is widely used in steam power plants by some changes we can improve the efficiency of this cycle for e.g. we have placed pump in place of condenser to handle liquid only not a mixture of vapour and liquid, secondly, exhaust steam leaving turbine is completely condensed with the help of condenser.
The function file used for coding is here - XSteam File
STEPWISE PEOCEDURE-
- To extract the steam and water properties of enthalpy, entropy, at specific temperature & pressure for saturated vapour and liquid conditions XSteam data is used.
- This program requires pressure(input) [in bars] at the state pont 1 which is called as turbine inlet also the temp. at the same point as well as pressure at condenser inlet (point 2).
- Program calculates state points of the Rankine cycle with the help of XSteam data and the inlet points.
- Working of XSteam data is as h1 = XSteam(h,p,T) which returns enthalpy of water at given temperature and pressure in degree celcius and in bar
- With the help of extraction of this data using the thermodynamic relations extracting data from XSteam which is mentioned after studying the Rankine cycle.
- In hf and hg , f & g stands for saturated liquid and saturated vapour which are calculated after studying the plots of Rankine cycle and extraction of data from XSteam file.
- Entities like heat in, heat out, work done by pump, work done by turbine, the net work are calculated with the help of standard thermodynamic relations.
- Specific steam consumption (S.S.C) & efficiency of Rankine cycle calculated with the thermodynamic relations.
- T, s, h are extracted at vapour and liquid line for plotting purpose.
CODE-
% Rankine cycle simulator
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all;
close all;
clc
% Processes
fprintf(" RANKINE CYCLE SIMULATOR n")
fprintf("1-2 is isentropic expansion in the turbinen")
fprintf("2-3 is constant pressure heat rejection by condensern")
fprintf("3-4 is isentropic compression in the pumpn")
fprintf("4-1 is the constant pressure head addition by boilern")
% taking inputs
p1 = input("enter the pressure inlet at turbine inlet: ");
t1 = input("enter the temp. at turbine inlet: ");
p2 = input("enter the pressure at conderser: ");
h1 = XSteam('h_pT',p1,t1);
s1 = XSteam('s_pT',p1,t1);
sf1 = XSteam('SL_p',p1);
ts1 = XSteam('Tsat_p',p1);
sv1 = XSteam('sV_p',p1);
% calculations
% for state point 3
p3 = p2;
h3 = XSteam('hL_P',p3);
s3 = XSteam('sL_P',p3);
v3 = XSteam('vL_P',p3);
t3 = XSteam('Tsat_P',p3);
% for state point 4
p4 = p1;
s4 = s3;
cp4 = XSteam('Cp_ps',p4,s4);
cv4 = XSteam('Cv_ps',p4,s4);
g4 = cp4/cv4;
o =(g4-1)/g4;
W_p = v3*(p4-p3);
h4 = h3+ W_p;
% t4/t3 = (p4/p3)^o
t4 = t3*(p4/p3)^o;
% for state point 2
t2 = t3;
s2 = s1;
ts2 = XSteam('Tsat_P',p2);
sf2 = XSteam('sL_P',p2);
sg2 = XSteam('sV_P',p2);
hf2 = XSteam('hL_P',p2);
hg2 = XSteam('hV_P',p2);
sfg2 = sg2-sf2;
hfg2= hg2-hf2;
x2 = (s2-sf2)/sfg2;
h2 = hf2+x2*hfg2;
W_t = h1-h2;
W_net = W_t - W_p;
Q_in = h1-h4;
Q_out = h2-h3;
% caluclating various parameters
eff_th = W_net/Q_in;
SSC = 3600/W_t;
W_r = W_net/W_t;
% printing output
fprintf(' RESULTS n');
fprintf('At state point 1: n');
fprintf(' P1 is %f barn',p1);
fprintf(' T1 is %f degree celcius n',t1);
fprintf(' H1 is %f KJ/kg n',h1);
fprintf(' S1 is %f kj/kgk n',s1);
fprintf('n')
fprintf('At state point 2: n');
fprintf(' P2 is %f barn',p2);
fprintf(' T2 is %f degree celcius n',t2);
fprintf(' H2 is %f KJ/kg n',h2);
fprintf(' S2 is %f kj/kgk n',s2);
fprintf(' x2 is %f n',x2);
fprintf('n')
fprintf('At state point 3: n');
fprintf(' P3 is %f barn',p3);
fprintf(' T3 is %f degree celcius n',t3);
fprintf(' H3 is %f KJ/kg n',h3);
fprintf(' S3 is %f kj/kgk n',s3);
fprintf('n')
fprintf('At state point 4: n');
fprintf(' P4 is %f barn',p4);
fprintf(' T4 is %f degree celcius n',t4);
fprintf(' H4 is %f KJ/kg n',h4);
fprintf(' S4 is %f kj/kgk n',s4);
fprintf('n')
fprintf('The turbine work is %f KJ/kgn',W_t);
fprintf('The pump work is %f KJ/kgn',W_p);
fprintf('The net work is %f KJ/kg n', W_net);
fprintf('The thermal efficiency is %f percentn',eff_th);
fprintf('The Work ratio is is %f n',W_r);
% plotting the graph
% creates a array of temp of given limits
temp = linspace(1,400,600);
for i = 1:length(temp)
% to plot the saturation curve
h_l(i) = XSteam('hL_T',temp(i));
h_v(i) = XSteam('hV_T',temp(i));
s_l(i) = XSteam('sL_T',temp(i));
s_v(i) = XSteam('sV_T',temp(i));
end
% fot T-s Diagram
figure(1)
hold on
plot([s1, s2],[t1,t2],'k');
text(s1,t1,'1')
plot([s2, s3],[t2,t3],'k')
text(s2,t2,'2')
%plot([sg2, s3] ,[ts2, t3],'k');
plot([s3, s4] ,[t3, t4],'k');
text(s3,t3,'3')
plot([s4, sf1] ,[t4, ts1],'k')
text(s4,t4,'4')
plot([sf1, sv1] ,[ts1, ts1],'k')
plot([sv1, s1] ,[ts1, t1],'k')
plot(s_v,temp,'g--');
plot(s_l, temp,'g--');
title('T-s Diagram')
xlabel('Entropy')
ylabel('Temperature')
% h-s DIAGRAM
figure(2)
hold on
plot(s_l,h_l,'g--');
plot(s_v,h_v,'g--');
%plot(h_v,temp,'g--');
plot([s1 s2],[h1 h2],'k');
text(s1,h1,'1');
plot([s2 s3],[h2 h3],'k');
text(s2,h2,'2');
plot([s3 s4],[h3 h4],'k');
text(s3,h3,'3');
plot([s4 s1],[h4 h1],'k');
text(s4,h4,'4');
plot(s_l,h_l,'g--');
plot(s_v,h_v,'g--');
title('H-s Diagram');
xlabel('entropy')
ylabel('enthalpy')
COMMAND WINDOW DISPLAY-
t-s & h-s plots
CONCLUSIONS-
- More the number of assumptions more plot will deviate from original conditions.
- Rankine cycle simulated and we found out thermal efficiency of the cycle and ways to improve it
- Under the various processes of cycle understood P-V & H-S behaviour of the cycle.
REFERENCE MATERIALS-
https://en.wikipedia.org/wiki/Rankine_cycle
http://www.thermopedia.com/content/1072/
http://www.ecourses.ou.edu/cgi-bin/ebook.cgi?topic=th&chap_sec=10.1&page=theory
https://www.learnthermo.com/T1-tutorial/ch09/lesson-E/pg10.php
ERRORS FACED-
Got the error that “the XSteam” function is undefined as it is not the built in function in matlab and with the help of XSteam library name as – Modelling of rankine cycle using Spencer, Cotton & Canon Method. I have downloaded, installed it and then the file ran.