Project

Program to simulate Rankine cycle

AIM :

1) To Calculate state points of Rankine cycle.

2) To calculate the net work output and back work ratio.

3) To plot the corresponding T-S and H-S plots for the given set of inputs.

Theory :

Rankine cycle -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 hart 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.

The Rankine cycle closely describes the process by which steam-operated heat engine commonly found in thermal power grneration plants generate power.

Power depends on the temperature difference between a heat source and a cold source. The higher the difference, the more mechanical power can be efficiently extracted out of heat energy, as per Carnot's theorem

There are four processes in the Rankine cycle

Process 1–2: The working fluid is pumped from low to high pressure. As the fluid is a liquid at this stage, the pump requires little input energy.

Process 2–3: The high-pressure liquid enters a boiler, where it is heated at constant pressure by an external heat source to become a dry saturated vapour.

Process 3–4: The dry saturated vapour expands through a turbine, generating power. This decreases the temperature and pressure of the vapour, and some condensation may occur.

Process 4–1: The wet vapour then enters a condensor, where it is condensed at a constant pressure to become a saturated liquid.

In general, the efficiency of a simple rankine cycle can be written as

`etathermal= (Wturb)/(QIn`

Given inputs:

Turbine Inlet temperature = 400° C

Turbine Inlet Pressure = 30 bars

Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure

Formulae used:

Specific steam consumption = steam consumed/per unit power

Back work ratio = `(H1 -H4)/(H2-H3)`

CODE:

clear all
close all
clc

fprintf('                      RANKINE CYCLE SIMULATOR\n\n')
fprintf('1-2 Isentropic expansion in the turbine \n')
fprintf('2-3 Constant pressure heat rejection by the compressor\n')
fprintf('3-4 Isentrpic compression in the pump\n')
fprintf('4-5 Constant pressure heat addition by the boiler\n\n')

%inputs
P1 = input('Enter the pressure at the turbine inlet(in bar)=  ')
T1 = input('Enter the temperature at the turbine inlet(in degree celcius)=  ')
P2 = input('Enter the pressure at the condenser(in bar)=  ')

disp('                 RESULTS')

%extracting cp and cv values froM XSteam
%cp and cv are assumed constant with change in temperature
%for vapour
high_cpV = XSteam('CpV_p',P1);
low_cpV = XSteam('CpV_p',P2);
high_cvV = XSteam('CvV_p',P1);
low_cvV = XSteam('CvV_p',P2);

%for liquid
high_cpL = XSteam('CpL_p',P1);
low_cpL = XSteam('CpL_p',P2);
high_cvL= XSteam('CvL_p',P1);
low_cvL = XSteam('CvL_p',P2);

%Extracting parameters from XSteam
%for high pressure
T1s = XSteam('Tsat_p',P1);
S1g = XSteam('sV_p',P1);
S1f = XSteam('SL_p',P1);
S1fg = S1g-S1f;
H1f =XSteam('hL_p',P1); 
H1g = XSteam('hV_p',P1);
H1fg = H1g-H1f;

%for low pressure
S2g =XSteam('sV_p',P2); 
S2f =XSteam('SL_p',P2); 
S2fg = S2g- S2f;
T2s = XSteam('Tsat_p',P2); 
H2f = XSteam('hL_p',P2);
H2g = XSteam('hV_p',P2);
H2fg = H2g-H2f;

%state point 1
disp('At state point 1:')
fprintf('P1 is : %f bar \n',P1)
fprintf('T1 is : %f degree celcius \n',T1)

H1 = XSteam('h_pt',P1,T1);

fprintf('H1 is : %f KJ/kg \n',H1)

S1 = XSteam('s_pt',P1,T1);
fprintf('S1 is : %f KJ/kgk \n\n',S1)

%State point 2
disp('At state point 2:')
fprintf('P2 is : %f bar \n',P2) %P2 is already taken

S2 = S1;
fprintf('S2 is :%f KJ/kgk \n',S2)

%predicting location of point 2 in T-S
if(S2<=S2g)
 X2 = (S2 -S2f)/(S2fg); %dryness fraction at state point 2
else 
 X2 = 1;
end
fprintf('X is :%f \n', X2)

%calculating T2
if(X2<1)
 T2 = T2s;
else
 %calculating T2 by formula s2=s2g+low_cpV(log(T2/T2s))
T2 = (T2s+273.15)*exp((S2-S2g)/low_cpV);
T2=T2-273.15;
end

fprintf('T2 is : %f degree celcius \n',T2)
if(X2<1)
H2 = H2f + X2 *H2fg;
else
H2 = H2g + low_cpV*(T2-T2s);
end
fprintf('H2 is : %f KJ/kg \n\n',H2)

%state point 3
%assuming no subcooling in condensor
disp('At state point 3:')
P3 =P2;
fprintf('P3 is : %f bar \n',P3)
V3 = XSteam('vL_p',P3);

T3 = T2s; %no subcooling assumed
fprintf('T3 is : %f degree celcius \n',T3)

H3 =H2f;
fprintf('H3 is : %f KJ/kg \n',H3)

S3=  S2f;
fprintf('S3 is : %f KJ/kgK \n\n',S3)

%state point 4
disp('At state point 4:')
P4 =P1;
fprintf('P4 is : %f bar \n',P4)


S4 = S3;
fprintf('S4 is : %f KJ/kgK \n',S4)

Wp = V3*(P4-P3)*100;
H4= Wp+H3;
fprintf('H4 is : %f KJ/kg \n',H4)

%to calculate T4 
%S4 = S3 = Sf1-high_cpL*ln(tls/t4)
term = exp((S1f-S4)/high_cpL); %using exp instead of Exp to take input as double
T4= T1s/term;
fprintf('T4 is : %f degree celcius \n\n',T4)

%work done,heat,SSC and thermal efficiency calcculation

Wt= H1- H2;
fprintf('Work by turbine is : %f KJ/kg \n', Wt); %work done at turbine
fprintf('Work by Pump is : %f KJ/kg \n', Wp); %work done at pump
Wnet= Wt- Wp;
fprintf('Net work done is : %f KJ/kg \n', Wnet); %net work done
Qin = H1-H4;
eff_thermal= Wnet/Qin; %thermal effciency
fprintf('Thermal efficiency is : %f %%\r\n',eff_thermal*100);
SSC = 3600/Wt;
fprintf('S.S.C  is : %f kg/kWh \n', SSC); %specific steam cunsumption
BWR = Qin/(H2-H3);
fprintf('Back work ratio is : %f \n',BWR) %back work ratio

%calculation for plotting liquid and vapour lines
temp= linspace(1,373,500);
for i= 1:length(temp)
  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

%plotting T-S and H-S diagram
figure(1) %T-S diagram
hold on
plot([S1 S2],[T1 T2],'r','linewidth',1)
text(S1,T1,'1')
text(S2,T2,'2')
plot([S2 S2g],[T2 T2s],'r','linewidth',1)
text(S2g,T2s,'2s')
plot([S2g S3],[T2s T3],'r','linewidth',1)
text(S3,T3,'3')
plot([S3 S4],[T3 T4],'r','linewidth',1)
text(S4,T4,'4')
plot([S4 S1f],[T4 T1s],'r','linewidth',1)
text(S1f,T1s,'4s')
plot([S1f S1g],[T1s T1s],'r','linewidth',1)
text(S1g,T1s,'1s')
plot([S1g S1],[T1s T1],'r','linewidth',1)
plot(S_L,temp,'b','linestyle','--','linewidth',1)
plot(S_V,temp,'b','linestyle','--','linewidth',1)
title('T-S diagram for Ideal Rankine Cycle')
ylabel('Temperature(degree celcius)');
xlabel('Specific entropy(KJ/kgK)')

figure(2) %H-S diagram
hold on
plot([S1 S2],[H1 H2],'r','linewidth',1);
text(S1,H1,'1')
plot([S2 S3],[H2 H3],'r','linewidth',1)
text(S2,H2,'2')
plot([S3 S4],[H3 H4],'r','linewidth',1)
text(S3,H3,'3')
plot([S4 S1],[H4 H1],'r','linewidth',1)
text(S4,H4,'4')
plot(S_L,H_L,'b','linestyle','--','linewidth',1.5)
plot(S_V,H_V,'b','linestyle','--','linewidth',1.5)
title('H-S diagram','Fontsize',15)
ylabel('Specific enthalpy(KJ/kg)')
xlabel('Specific entropy(KJ/kgK)')

RESULTS:

  RANKINE CYCLE SIMULATOR

1-2 Isentropic expansion in the turbine
2-3 Constant pressure heat rejection by the compressor
3-4 Isentrpic compression in the pump
4-5 Constant pressure heat addition by the boiler

Enter the pressure at the turbine inlet(in bar)=  30
P1 =  30
Enter the temperature at the turbine inlet(in degree celcius)=  400
T1 =  400
Enter the pressure at the condenser(in bar)=  0.05
P2 =  0.050000
                 RESULTS
At state point 1:
P1 is : 30.000000 bar
T1 is : 400.000000 degree celcius
H1 is : 3231.571027 KJ/kg
S1 is : 6.923259 KJ/kgk

At state point 2:
P2 is : 0.050000 bar
S2 is :6.923259 KJ/kgk
X is :0.814256
T2 is : 32.875490 degree celcius
H2 is : 2110.708212 KJ/kg

At state point 3:
P3 is : 0.050000 bar
T3 is : 32.875490 degree celcius
H3 is : 137.765119 KJ/kg
S3 is : 0.476254 KJ/kgK

At state point 4:
P4 is : 30.000000 bar
S4 is : 0.476254 KJ/kgK
H4 is : 140.776056 KJ/kg
T4 is : 147.599058 degree celcius

Work by turbine is : 1120.862815 KJ/kg
Work by Pump is : 3.010937 KJ/kg
Net work done is : 1117.851878 KJ/kg
Thermal efficiency is : 36.167131 %
S.S.C  is : 3.211811 kg/kWh
Back work ratio is : 1.566591

PLOTS:

T-S diagram

H-S diagram:

Conclusion:

Net work done or the work output is 1117.85 KJ/kg

And the thermal efficiency is 36.16%

Efficiency of rankine cycle is less because it's a real cycle and has high work load.

However, we can increase the efficiency by

1)Lowering the condenser pressure

2)Superheating the steam to high pressures

3)Increasing the boiler pressure

Back work ratio is 1.566

as Rankine cycle is a vapour cycle and back work ratio for vapour cycles lies between 1%-2 %

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.