Challenge

Project 2 - Rankine cycle Simulator

AIM-

To calculate the performance of the steam turbine engine and plot the T-S and H-S diagram of the rankine cycle in matlab

OBJECTIVES-

* To calcualate the performance of the steam turbine engine

* plot the T-S and H-S diagram of the rankine cycle

* calculate the efficency

THEORY-

A rankine cycle is an idealized Thermodynamic cycle which governs the working of a heat engine.In rankine cycle,the fraction losses of a heat engine are neglected.Heat is supplied externally in loop where the working fluid is water.There are four components in this cycle which works on four different processes.The four components are turbine,condensor,pump and boiler.

Four componets of the rankine cycle-

*turbine

*boiler

*pump

*condensor

The four proces of the rankine cycle-

1-2 process of iscentropic expansion happens in the turbine where the steam from the boiler is converted into mechanical energy.

2-3 process of constant pressure heat rejection taken place where the vapour is converted to liqued inside a condensor.

3-4 process of iscentropic compression heppen in the pump where the pressure increase and the liquid is fed to the boiler

4-1 process of constant pressure heat addition takes place inside the boiler from where the superheated steam is fed to the turbine.

Thermodynamic equation and formulae:

For isentropic expansion:

`frac{T2}{T1}=(frac{P2}{P1})^(1-(1/gamma))`

where,

T is the temperature of that state(k)

p is pressure at that state (bar)

`gamma` is heat capacity ratio

For net work (w_net) and back work ratio (bw_ratio):

W_net=W_T-W_P

bw ratio=`frac{W_P}{W_T}`

W_T=h1-h2

W_P=h4-h3

where,

h is enthalpy at that state (kj/kg)

W_T is turbine work (kj/kg)

W_P is pump work (kj/kg)

For thermal efficiency(`etat`)

`etat`=W_net/(Q_in)

Q_in=h1-h4;

where,

Q_in is heat added by the boiler (j)

h is enthalpy at that state (kj/kg)

*Applying the steady flow energy equation (SFEE) to all the process neglecting the fraction losses and change in kinetic & potential

>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 interms of stem rate (sr) or specific steam consumption(SSC)

S.S.C=`frac{3600}{Wn}frac{kg}{kWh}`

REQURIED INPUTS-

Turbine inlet temperature =400 c

Turbine inlet pressure =30 bars

Turbine outlet pressure=0.05 bars=condensor inlet pressure

MAIN CODE-

clear all
close all
clc
disp('          RANKINE CYCLE          ');
disp('1-2 isentropic expansion in the turbine');
disp('2-3 constant pressure heat injected by the condenser');
disp('3-4 isentropic expansion in the pump');
disp('4-1 constant pressure heat addition to the boiler');

%inputs
disp('          INPUTS                 ');
P1=input('Enter the pressure at turbine inlet(bar):');
T1=input('Enter the Temperature at the turbine inlet (degree c):');
P2=input('Enter the pressure at the condensor(bar):');

%using the xsteam function,the enthalpy and entropyat various
% point can be calculated
% calculating the enthalpy(h) and entropy(s) at point 1
h1=XSteam('h_pt',P1,T1);
s1=XSteam('s_pt',P1,T1);

%calculating the pressure(p),enthalpy(h) and entropy(s) at point 2
% since isentropic expansion
s2=s1;
% for isentropic expansion
% wkt (T2/T1)=(P2/P1)^(1-(1/g))
g=1.4;
power=1-(1/g);

%hence (T2/T1)=(P2/P1)^power
T2=T1*((P2/P1)^power);
h2=XSteam('h_pt',P2,T2);

% calculating the pressure(p),enthalpy(h) and entropy(s) at point 3
% since constant pressure heat removal;
P3=P2;
T3=T2;
h3=XSteam('hL_T',T3);
s3=XSteam('sL_T',T3);

% calculating the pressure(p),enthalpy(h) and entropy(s) at point 4
% since insentropic compression
s4=s3;
% since constant pressure process
P4=P1;
T4=XSteam('T_ps',P4,s4);
h4=XSteam('h_pt',P4,T4);
h41=XSteam('hL_p',P4);
s41=XSteam('sL_p',P4);
h42=XSteam('hv_p',P4);
s42=XSteam('sv_p',P4);
T41=XSteam('T_hs',h41,s41);
T42=XSteam('T_hs',h42,s42);

% calculating the pressure(p),enthalpy(h) and entropy(s) at the saturation
% curve
Temp=linspace(0,500,600);
for i =1:length(Temp)
    sv(i)=XSteam('sv_T',Temp(i));
    sl(i)=XSteam('sl_T',Temp(i));
    hv(i)=XSteam('hv_T',Temp(i));
    hl(i)=XSteam('hl_T',Temp(i));
end
%calculating net work output(W_net)
W_T=h1-h2;
W_P=h4-h3;
W_net=W_T-W_P;
%calculating the thermal efficency:
Q_in=h1-h4;
eff_thermal=(W_net/Q_in)*100;
%calculating back work ratio
Bw_ratio=W_P/W_T;
%calculating specific steam consumption
%wkt 1j=3600kg/s
ssc=3600/W_net;

%plotting
figure(1)
plot([s1 s2],[T1 T2],[s2 s3],[T2 T3],[s3 s4],[T3 T4],[s4 s41],[T4 T41],[s41 s42],[T41 T42],[s42 s1],[T42 T1],'marker','*','color','r')
hold on
plot(sv,Temp)
plot(sl,Temp)
xlabel('Entropy-s(kg/kgk)')
ylabel('Temperature-T(k)')

figure(2)
plot([s1 s2],[h1 h2],[s2 s3],[h2 h3],[s3 s4],[h3 h4],[s4 s1],[h4 h1],'marker','*','color','r')
hold on
plot(sv,hv)
plot(sl,hl)
xlabel('Entropy-s(kg/kgk)');
ylabel('Enthalpy-(kg/k)');

% displaying the results on command window
disp('            RESULTS           ')
P1=P1;
T1=T1;
P2=P2;
disp('At stage point 1');
n1=sprintf('P1 is %.3f bar',P1);
disp(n1);
n2=sprintf('T1 is %.3f c',T1);
disp(n1);
n3=sprintf('h1 is %.3f kj/kg',h1);
disp(n3);
n4=sprintf('s1 is %.3f kj/kgk',s1);
disp(n4);
disp('At stage point 2');
n11=sprintf('P2 is %.3f bar',P2);
disp(n11);
n21=sprintf('T2 is %.3f c',T2);
disp(n21);
n31=sprintf('h2 is %.3f kj/kg',h2);
disp(n31);
n41=sprintf('s2 is %.3f kj/kgk',s2);
disp(n41);
disp('At stage point 3');
n12=sprintf('P3 is %.3f bar',P3);
disp(n12);
n22=sprintf('T3 is %.3f c',T3);
disp(n22);
n32=sprintf('h3 is %.3f kj/kg',h3);
disp(n32);
n42=sprintf('s3 is %.3f kj/kgk',s3);
disp(n42);
disp('At stage point 1');
n13=sprintf('P4 is %.3f bar',P4);
disp(n13);
n23=sprintf('T4 is %.3f c',T4);
disp(n23);
n33=sprintf('h4 is %.3f kj/kg',h4);
disp(n33);
n43=sprintf('s4 is %.3f kj/kgk',s4);
disp(n43);
n14=sprintf('W_T is %.3f kj/kg',W_T);
disp(n14);
n15=sprintf('W_P is %.3f kj/kg',W_P);
disp(n15);
n16=sprintf('W_net is %.3f kj/kg',W_net);
disp(n16);
n17=sprintf('eff_thermal is %.2f percent',eff_thermal);
disp(n17);
n18=sprintf('ssc is %.2f kj/kwt',ssc);
disp(n18);

EXPLANATION-

* The program begins with clear all,close all,clc,to erase the workspace and plots

* inputs variables p1,T1,p2 are given input cpmmand whose values are entered in command window while executing the program

*@state-1,values for enthalpy & entropy are extracted as a function of pressure & temperature

*h_pt,s_pt,hL-p,sv_petc..... are the default variables whose values is stored in XSteam file.

*similarly all the variables for all states are extracted using a suitable format.

*pressure,temperature,enthalpy and entropy for all the state variable are extracted as a function of the dependent variable from the xsteam file

*@state 2 is a condenser inlet where the high pressure steam is converted into low pressure water and hence dryness fraction,enthalpy&entropy for saturated vapour & saturated water are considered to calculate specific enthalpy

*@state 3 this is constant pressure heat addition hence the pressure is equal to the p1,but temperature increases on heating at constant pressure & constant volume and cp/cv=gammais consideded to find temperature t4

*@state 4 The water is condenser back to its saturated temperature and fed to the pump,the temperature of the water at the exit of the condensor and entry of pump is the same

*To plot the stauration curve a temperature range is define using linspace command and for the overall length of the temperture values and enthropy and enthalpy are calucated at every point

*plotting done for both T_S and H_S curves using the plot commands

*results of the cycle simulation is displayed over command window using fprintf command

OUTPUT-

T-S diagram-

H-S diagram-

command window results-

RESULTS-

The performance of heat engine was calcualted

1)Net work=608.093 kj/kg

2)Thermal efficency=20.55%

3)back work ratio=0.4%

* The T-S and H-S performance of curve of a rankine cycle were plotted.

REFERANCE-

https://en.wikipedia.org/wiki/Rankine_cycle

https://energyeducation.ca/encyclopedia/Rankine_cycle

https://in.mathworks.com/matlabcentral/fileexchange/9817-x-steam-thermodynamic-properties-of-water-and-steam

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.