Challenge

Project 2 - Rankine cycle Simulator

RANKINE CYCLE SIMULATOR

The Rankine cycle is the basic operating cycle for all power plants where a working fluid is continuously changing its phase from liquid to vapor and vice-versa.

The Rankine Cycle is a mechanical cycle commonly used in power plants to convert the pressure energy of steam into mechanical energy through steam turbines. The Rankine Cycle’s major components include a rotating steam turbine, a boiler pump, a stationary condenser, and a boiler.

A boiler is used to heat the water for steam at the required pressure and temperature as per the turbine’s requirement for power generation.

The (T-s) diagrams are useful in understanding the working of the Rankine cycle .

The Rankine Cycle is a mechanical cycle commonly used in power plants to convert the pressure energy of steam into mechanical energy through steam turbines. The Rankine Cycle’s major components include a rotating steam turbine, a boiler pump, a stationary condenser, and a boiler.

A boiler is used to heat the water for steam at the required pressure and temperature as per the turbine’s requirement for power generation.

1-2-3 Isobaric Heat Transfer or Constant pressure heat addition in a boiler

The boiler is a large heat exchanger where heat liberating fuel like coal, lignite, or oil transfers the heat indirectly to water at constant pressure. Water enters the steam boiler from the boiler feed pump as a compressed liquid at state-1 and is heated to the saturation temperature as shown in the T-s diagram as state-3.

The energy balance in the boiler is or energy added in a steam generator,
qin= h3-h1

3-4 Isentropic Expansion or Isentropic expansion in a turbine

Vapor from the boiler outlet enters the turbine at state 3, where it expands isentropically over the turbine fixed and moving blade to produce work done in the form of mechanical rotation of the turbine shaft, which is connected to the electrical generator.
Work delivered by the turbine (Neglecting heat transfer with the surroundings)
Wturbine out= h3-h

Isobaric Heat Rejection or Constant pressure heat rejection in a condenser

At state-4, vapor enters the condenser. The change of phase occurs as vapor is condensed to liquid at constant-pressure in the condenser by transferring the steam’s heat to the circulating water flow through the tubes of the condenser. Change of phase occurs in the condenser, and the working fluid leaving the condenser is in a liquid state and marked as point 5.
Energy rejected in the condenser, qout= h4-h5

Isentropic Compression or Isentropic compression in a pump

Water exits the condenser at state 5 and enters the pump. This pump raises the pressure of the water by imparting work during the processes. In units of smaller size and low specific volume, this small work can be neglected compared to the work-output of a steam turbine.
Work was done on the pump per kg of water, W51= h5-h1.

The thermal efficiency of the Rankine cycle is given by:


OR

Thermal efficiency of Ideal Rankine cycle

Actual Rankine Cycle Components

Heat

Work

Boiler feed Pump Wpump-in

Boiler

Turbine

Condenser

Energy balance for the actual Rankine Cycle is as follows

Actual Rankine Cycle Components

Heat

Work

Boiler feed Pump Wpump-in

Boiler

Turbine

Condenser

Thermal efficiency of Ideal Rankine cycle

https://www.electrical4u.com/ideal-verses-actual-in-rankine-cycle/#What-is-the-Rankine-Cycle

in this programme we are going to use XSteam function to get data from steam table

code for rankine cycle simulator

clear all
close all
clc
fprintf("rankine cycle simulator \n\n");
fprintf("1-2 is isentropic expension in the turbine \n");
fprintf("2-3 is constant pressure heat rejection by condensor \n");
fprintf("3-4 is isentropic compression in the pump \n");
fprintf("4-1 is constant pressure heat addtion in boiler \n");
% inputs
fprintf('\n')

P1=input('Enter the pressure at inlet of turbine(in bar): ');
T1=input('Enter the temperature at turbine inlet(in degree celsius): ');
P2=input('Enter the pressure at outlet of turbine(in bar): ');
fprintf('\n')

h1=XSteam('h_PT',P1,T1);%ENTHALPY at state 1(BOILER OUTLET)
s1=XSteam('s_PT',P1,T1);
sf1=XSteam('SL_P',P1);
ts1=XSteam('Tsat_P',P1);
sv1=XSteam('sv_P',P1);

%calculation at state point 2
%for state 3
P3=P2;
h3=XSteam('hL_p',P3);
s3=XSteam('sL_p',P3);
v3=XSteam('vL_p',P3);
T3=XSteam('Tsat_P',P3);
%state point 3
P4=P1; %constant PRESSURE HEAT ADDTION
s4=s3;%ENTROPY AT STATE 3 AND STATE 4 REMAINS SAME
cp4=XSteam('cp_ps',P4,s4);
cv4=XSteam('cv_ps',P4,s4);
sg1=XSteam('sV_p',P1);
Cr4=cp4/cv4; % heat capacity ratio or adiabatic index
o=(Cr4-1)/Cr4;
W_p=v3*(P4-P3);
h4=(h3+W_p);
T4=T3*(P4/P3)^o;
%state point 2
T2=T3;
s2=s1;%ENTROPY AT STATE 1 AND STATE ARE SAME
%lets find enthalpy,entropy,temp at saturation points state 2
Ts2=XSteam('Tsat_P',P2);% saturation temp at state 2
sf2=XSteam('sL_P',P2); %entropy of liquid at state 2
sg2=XSteam('sV_p',P2);%SATURATED LIQUID ENTROPY AT STATE 2
hf2=XSteam('hL_p',P2); %enthalpy of liquid at state 2
hg2=XSteam('hV_p',P2);%enthalpy of vapour at state 2
sfg2=sg2-sf2;%specific entropy change of vapourazation at 2
hfg2=hg2-hf2;
%CALCULATING DRYNESS FRACTION AT STATE 2(x)/quality of mixture
x2=(s2-sf2)/sfg2;
h2=hf2+x2*hfg2;
W_t=h1-h2;
W_net=W_t-W_p;
%heat addtion in boiler
Q_in=h1-h4;
%heat rejected in the condensor
Q_out=h2-h3;
%calculating various parameters
th_eff=(W_net/Q_in)*100; %thermal efficiency
%specific heat consumption
SSC=3600/W_t;
W_r=W_net/W_t;
B_W_R=(W_net/W_t); %back work ratio


%printing out results
fprintf('RESULTS\n');
fprintf('at state point 1: \n')
fprintf('P1 = %f barn \n',P1);
fprintf('T1 = %f degree celcius n',T1);
fprintf('H1 = %f kj/kg \n',h1);
fprintf('S1 = %f kj/kgk \n',s1);
fprintf('\n')
fprintf('RESULTS\n');
fprintf('at state point 2: \n')
fprintf('P2 = %f bar \n',P2);
fprintf('T2 = %f degree celcius \n',T2);
fprintf('H2 = %f kj/kg \n',h2);
fprintf('S2 = %f kj/kgk \n',s2);
fprintf('\n')

fprintf('RESULTS \n');
fprintf('at state point 3:\n')
fprintf('P3 = %f bar \n',P3);
fprintf('T3 = %f degree celcius \n',T3);
fprintf('H3 = %f kj/kg \n',h3);
fprintf('S3 = %f kj/kgk \n',s3);
fprintf('\n');
fprintf('RESULTS \n');
fprintf('at state point 4: \n')
fprintf('P4 = %f bar \n',P4);
fprintf('T4 = %f degree celcius \n',T4);
fprintf('H4 = %f kj/kg \n',h4);
fprintf('S4 = %f kj/kgk \n',s4);
fprintf('\n');
fprintf('RESULTS \n');
fprintf('the turbine work(W_t) = %f kj/kg \n ',W_t);
fprintf('the pump work (W_p)= %f kj/kg \n',W_p);
fprintf('the net work is(w_net) = %f kj/kg \n',W_net);
fprintf('the thermal efficency = %f \n',th_eff);
fprintf('the work ratio = %f \n',W_r);
fprintf('back work ratio=%f \n',B_W_R);

%ploting the graph
%calculate for ploting liquid and vapour lines
temp=linspace(0,400,1000);
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

%for T-S diagram
figure(1)
hold on
grid on
plot([s1,s2],[T1,T2],'color','r','linewidth',2)
text(s1,T1,'1')
text(s2,T2,'2')
plot([s2,sg2],[T2,Ts2],'color','r','linewidth',2)
text(sg2,Ts2,'3')
plot([sg2,s3],[Ts2,T3],'color','c','linewidth',2)
text(s3,T3,'4')
plot([s3,s4],[T3,T4],'color','b','linewidth',2)
text(s4,T4,'5')
plot([s4,sf1],[T4,ts1],'color','m','linewidth',2)
text(sf1,ts1,'6')
plot([sf1,sg1],[ts1,ts1],'color','b','linewidth',2)
text(sg1,ts1,'7')
plot([sg1,s1],[ts1,T1],'color','r','linewidth',2)
text(s1,T1,'8')
plot(s_v,temp,'color','b','linestyle','--','linewidth',1.5)


plot(s_v,temp,'color','b','linestyle','--','linewidth',1.5)
plot(s_l,temp,'color','b','linestyle','--','linewidth',1.5)
ylabel('temperature(T) in degree C')
xlabel('entropy (S)')
title('T_S diagram')
% ploting for H_S diagram
figure(2)
hold on
grid on
plot([s1,s2],[h1,h2],'color','r','linewidth',2)
text(s1,h1,'1')
plot([s2,s3],[h2,h3],'color','b','linewidth',2)
text(s2,h2,'2')
plot([s3,s4],[h3,h4],'color','g','linewidth',2)
text(s4,h4,'3')
plot([s4,s1],[h4,h1],'color','k','linewidth',2)
xlabel('entropy (Kj/KgK)')
ylabel('enthalpy (Kj/Kg)')
title('H_S DIAGRAM')

% the results of this programme has been attachet bellow

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.