Challenge

Project 2 - Rankine cycle Simulator

AIM - To calculate the performance of the steam turbine engine and plots the T-S AND H-S daigrams of a Rankine cycle.
RANKINE CYCLE - It is a thermodynamic cycle which governs the working of a heat engine. In rankine cycle the friction losess of a heat engine are neglected. Heat is supplied externally in a loop where the working fluid is water .
There are four components in this cycle which work on four differnt process
The following are four process are
1-2 Isentropic expansion in the turbine
2-3 Constant pressure heat rejection in the condensor
3-4 Isentropic compression in pump
4-1 Constant pressure heat addition in the boiler
TURBINE - it simply says that mechanical energy converted into hydralic energy forthere converted to electrical enrgy
BOILER - it converts the water into steam
PUMP - it converts the electrical enrgy into mechanical enrgy
CONDENSER - it is cooling the expanded vapour
now lets write the code
clear all
close all
clc
% INPUTS
T1 = 400;%[degree ]
P1=30; % bar
P2= 0.05; % bar
%Caluclating enthalpy(h) and entropy(s) at point 1:
h1 = XSteam('h_pT',P1,T1);
s1 = XSteam('s_pT',P1,T1);
%Caluclating pressure(P),enthalpy(h) and entropy(s) at point 2:
%Since Iscentropic Expansion:
s2=s1;
%For Iscentropic 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);
%Caluclating 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);
%Caluclating pressure(P),enthalpy(h) and entropy(s) at point 4:
%Since Iscentropic Compression:
s4 = s3;
%Since Constant Pressure Process:
P4 = P1;
T4 = XSteam('T_ps',P4,s4);
h4 = XSteam('h_pT',P4,T4);
hf2 = XSteam('hL_p',P2);
sf2 = XSteam('sL_p',P2);
hg2 = XSteam('hV_p',P2);
sg2 = XSteam('sV_p',P2);
T41 = XSteam('T_hs',hf2,sf2);
T42 = XSteam('T_hs',hg2,sg2);
sf1=sf2;
%Calculating Net Work Output(W_net):
W_t = h1-h2;
W_p = h4-h3;
W_net = W_t-W_p;
%Calculating Back Work Ratio:
Bw_ratio = W_p/W_t;
%Calculating the Thermal efficiency:
Q_in = h1-h4;
eff_thermal = (W_net/Q_in)*100;
%Calculating Specific Steam Consumption:
% wkt 1J = 3600kg/s
SSC = 3600/W_net;
%Calculating the Entropy and Enthapy at the saturation curve:
Temp = linspace(0,500,600);
for i = 1:length(Temp)
sg(i) = XSteam('sV_T',Temp(i));
sf(i) = XSteam('sL_T',Temp(i));
hg(i) = XSteam('hV_T', Temp(i));
hf(i) = XSteam('hL_T', Temp(i));
end
figure(1)
plot([s1 s2],[T1 T2],[s2 s3],[T2 T3],[s3 s4],[T3 T4],[s4 sf2],[T4 T41],[sf2 sg2],[T41 T42],[sg2 s1],[T42 T1],'marker','*','color','black')
hold on
plot(sg,Temp)
plot(sf,Temp)
xlabel('Entropy-s(kJ/kgK');
ylabel('Temperature-T(K)');
title ('Temperature''vs''Entropy')
legend ('Temperature','Entropy','color','g')
figure(2)
plot([s1 s2],[h1 h2],[s2 s3],[h2 h3],[s3 s4],[h3 h4],[s4 s1],[h4 h1],'marker','*','color','b')
hold on
plot(sg,hg)
plot(sf,hf)
xlabel('Entropy-s(kJ/kgK');
ylabel('Enthalpy-h(kJ/k)');
title ('Entropy''vs''Enthalpy')
legend ('Entropy','Enthalpy','color','r')
The following are the outputs are
plot for ENTROPY VS ENTHALPY
Plot for TEMPERATURE VS ENTROPY
ERRORS
The following are errors for while i am facing errors for write the code
i am facing littile bit of errors are shown on above figurs , i am facing miss matched inputs and parenthaseses
it will be easily corrected by me .
WORKSPACE
In these programme using the below the equations and formulas
T2/T1= (P2/P1)^1-(1/r)
W_net = Wt-Wp
pump q=0 [w_pump = h4-h3]
boiler w=0 [q_in =h1-h4]
turbine q=0 [W turbine ,W_out = h1-h2]
condensor w=0 [ q_out = h2-h3]
Termal efficiency = Wnet/q_in =[ 1-q_out/q_in ]
W_net = q_in - q_out
BW ratio = Wp/Wt
wt = h1-h2
wp = h4-h3
CONCLUTION
The performence of the steam turbine engine was calculated by the using of x stream data and also find out the variables at different states.
the following results are
Network = 608.0928
Themal efficiency= 20.5492
Back work ratio = 0.0049
and the T-S and H-S performance of curves of the rankine cycle are plotted
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.