Challenge

Project 2 - Rankine cycle Simulator

AIM-Rankine Cycle Simulation using Matlab Programming and plot T-s and h-s diagram

THEORY-The Rankine cycle is a model used to predict the performance of steam turbine systems. It was also used to study the performance of reciprocating steam engines. The Rankine cycle is an idealized thermodynamic cycle of a heat engine that converts heat into mechanical work while undergoing phase change. It is an idealized cycle in which friction 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.

RANKINE CYCLE

OBJECTIVES-

-Create Rankine cycle simulator based on user inputs

-Plot T-s Diagram

-plot h-s Diagram

-Calculate Net work output

-Calculate Back work ratio

REQUIRED INPUTS-

Turbine inlet temperature=400 c

Turbine Inlet Pressure=30 bars

Turbine Outlet Pressure =0.05bars

Condenser inlet Pressure=0.05bars

PROGRAM

close all
clear all
clc
 
disp('                    Rankine cycle Simulation                  ')
disp('1-2 Isentropic Expansion in the Turbine')
disp('2-3 constant pressure heat Rejection by the condenser')
disp('3-4 Isentropic compression by Pump')
disp('4-1 constant pressure Heat addition')
disp('-------------------------------------------------------------------')
P1=input('Enter the pressure at the Turbine Inlet(Bar) :');
T1=input('Enter the temperatue at Turbine inlet(Celcius) :');
P2=input('Enter the Pressure at condenser(Bar):');
% 
 t=linspace(0,373.15,200);
 %STATE POINT 1
S1=Steam('s_pT',P1,T1);
sat_l1=Steam('sL_p',P1);
sat_g1=Steam('sV_p',P1);
t_sat=Steam('Tsat_p',P1);
H1=Steam('h_pT',P1,T1);
 
%STATE POINT 2
 %Sf-Entropy of saturated water
 %Sfg-Entropy od saturated steam-saturated water
 
 S2=S1;
Sf_2= Steam('sL_p',P2);
Sg=Steam('sV_p',P2);
T_SAT=Steam('Tsat_p',P2);
 
 
%Dryness Fraction
 x=((S2-Sf_2)/(Sg-Sf_2));
 
 Hf=Steam('hL_p',P2);
 Hg=Steam('hV_p',P2);
 H2=Hf+x*(Hg-Hf);
 T2=Steam('T_ph',P2,H2);
 
 %STATE 3
 P3=P2;
 T3=Steam('Tsat_p',P2);
 S3=Sf_2;
 H3=Hf;
 
 %State point 4
P4=P1;
S4=S3;
T4=Steam('T_ps',P4,S4);
H4=Steam('h_ps',P4,S4);
 
 %SATURATED LINE
 figure(1)
hold on
for i=1:length(t)
    plot(Steam('sL_T',t(i)),t(i),'r.');
    plot(Steam('sV_T',t(i)),t(i),'r.');
    title('T-S Diagram')
    xlabel('Entropy')
    ylabel('Temperature')
    
    
end
plot([S1 S2],[T1 T2],'linewidth',2,'color','g')
text(S1,T1,'1','FontSize',15)
%Rankine cycle
 
if x>1
    plot([S2 Sg S3 S4],[T2 T_SAT T3 T4],'linewidth',2,'color','g') 
    text(S2,T2,'2','FontSize',15)
    text(S3,T3,'3','FontSize',15)
    text(S4,T4,'4','FontSize',15)
else
    plot([S2 S3 S4],[T2 T3 T4],'linewidth',2,'color','g')
    text(S2,T2,'2','FontSize',15)
    text(S3,T3,'3','FontSize',15)
    text(S4,T4,'4','FontSize',15)
end
n=linspace(T1,T2,500);
for i=1:length(n)
    plot(Steam('s_pT',P1,n(i)),n(i),'.','linewidth',2,'color','g')
end
 
plot([sat_l1 sat_g1],[t_sat t_sat],'linewidth',2,'color','g')
 
 
figure(2)
hold on
%Saturated line
for i=1:length(t)
    plot(Steam('sL_T',t(i)),Steam('hL_T',t(i)),'r.')
    plot(Steam('sV_T',t(i)),Steam('hV_T',t(i)),'r.')
end
% Cycle
 plot([S1 S2 S3 S4 S1],[H1 H2 H3 H4 H1],'linewidth',2,'color','g')
 text(S1,H1,'1','FontSize',15);
 text(S2,H2,'2','FontSize',15);
 text(S3,H3,'3','FontSize',15);
 text(S4,H4,'4','FontSize',15);
 xlabel('Entropy');
 ylabel('Enthalpy');
 title('Entropy vs enthalpy Diagram');
 
 % Work done by turbine
 W_t=H1-H2;
 
 %Work done by pump
 W_p=H4-H3;
 
 %net Work done
 net=W_t-W_p;
 
 %Thermal Efficiency
 eff=(1-((H2-H3)/(H1-H4)))*100;
 %Back work ratio
 BWR= W_p/W_t;
 
 %specific steam conductivity
 SSC=3600/W_t;
 
%Display of Results
disp('Result-1')
fprintf('P1= %.2f bar\n',P1)
fprintf('T1= %.2f Celciues\n',T1)
fprintf('S1= %.2f Kj/kgk\n',S1)
fprintf('H1= %.2f Kj/kg\n',H1)
disp(' ')
disp('Result-2')
fprintf('P2= %.2f bar\n',P2)
fprintf('T2= %.2f Celciues\n',T2)
fprintf('S2= %.2f Kj/kgk\n',S2)
fprintf('H2= %.2f Kj/kg\n',H2)
disp(' ')
disp('Result-3')
fprintf('P3= %.2f bar\n',P3)
fprintf('T3= %.2f Celciues\n',T3)
fprintf('S3= %.2f Kj/kgk\n',S3)
fprintf('H3= %.2f Kj/kg\n',H3)
disp(' ')
disp('Result-4')
fprintf('P4= %.2f bar\n',P4)
fprintf('T4= %.2f Celciues\n',T4)
fprintf('S4= %.2f Kj/kgk\n',S4)
fprintf('H4= %.2f Kj/kg\n',H4)
disp(' ')
fprintf('WT is %.2f kj/kg\n',W_t)
fprintf('Wp is %.2f kj/kg\n',W_p)
fprintf('Wnet is %.2f Kj/kg\n',net)
fprintf('Ntherm is %.2f percent\n',eff)
fprintf('S.S.C is %.2f kg/kwh\n', SSC)
disp(' ')

EXPLATION

(Take all the necessary data from Stream file)

Step 1-Display all the necessary Details

Step 2-Input all the values that are given

Step 3- Find all the state points (T ,P ,H ,S)

Step 4-Plot the Saturation line

Step 4-Plot T,s diagram with the help of all the state points

Step 5-Plot Saturation line for H-s diagram

Step 6-Plot all the points for H-s diagram

Step 7-Display all the results using fprintf & disp Commands

RESULTS

command Window

Graphs

1 T-S Graph

2 H-s Graph

CONCLUSION-

Simulated Rankine cycle and plotted T-s & H-s plot and find the efficency and workdone by Turbine and pump

REFERENCES-

11.https://www.tlv.com/global/TI/steam-theory/wet-steam-dry-steam.html#:~:text=Steam%20Dryness%20Fraction,a%20dryness%20fraction%20of%200.9.&text=For%20example%2C%20saturated%20steam%20(100,heat%20available%20at%20that%20pressure.

2https://energyeducation.ca/encyclopedia/Rankine_cycle

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.