Challenge

Rankine cycle Simulator

AIM
1) To create Rankine cycle simulator.
2) To plot T-S and h-S curves for given inputs.

RANKINE CYCLE
It is a model designed to predict the performance of a steam turbine system. It consists of 4 major components:
• Boiler
• Turbine
• Condenser
• Pump
A fuel is used to produce heat within a boiler, converting water into steam which then expands through a turbine producing useful work. In the entire process of the cycle, the heat energy from the boiler gets converted into the kinetic energy of the steam, which then expands in the turbine, converting kinetic energy into mechanical energy by rotating the turbine blades at high velocity. This mechanical energy is harnessed to get useful work.

There are 4 processes involved in a Rankine cycle:

  1. Process 1-2 (Isentropic expansion): In this process, the dry supersaturated steam expands in the turbine, generating power. It results in decrease in temperature and vapour pressure and the steam no longer remains saturated at the end of the process.
  2. Process 2-3 (Isobaric heat rejection): The wet vapour, obtained at the end of expansion process, enters the condenser where it condenses at constant pressure, till the point it becomes saturated liquid.
  3. Process 3-4 (Isentropic compression): The working fluid undergoes increase in pressure with the help of a pump. Energy is provided to the system during this process.
  4. Process 4-1 (Isobaric heat addition): The high-pressure liquid, leaving the pump enters the boiler, where it is heated at constant pressure by an external source like coal, till it becomes saturated.

Quality (x)

Measure of a fluid’s liquid-gas mixture. If the fluid is in a super-heated vapor state, or compressed liquid state it will not have a quality. Otherwise, it is a mixture of liquid and gas and the value will range from 0 to 1, 0 being a saturated liquid (still unpressurized, but very close to the pressure limit) and 1 being a saturated vapor (steam, on the verge of being superheated).

Entropy (s)

An abstract concept used to represent the changes that occur to heat due to temperature.

Enthalpy(h)

Measure of the internal energy within a system. Each component analysed will be considered a 'system', allowing us to find an enthalpy value for each. This is essentially how the heat transfers through each of the components, and how we keep track of its increases and decreases. Enthalpy is the property we will use to calculate work at the end according to the First Law of Thermodynamics, to be introduced later.

Specific Steam consumption

It is defined as steam consumed per unit output of power. It is typically measured in Kg/kWh or Kg/KJ.

Saturated liquid and saturated vapor curve

A curve connected by all saturated liquid states is known as saturated liquid curve whereas a curve connected by all the saturated vapor stated is called saturated vapor curve. These curves divide the regions into 3 regions:

i) Subcooled liquid region

ii) Saturated liquid-vapour region: Liquid and vapour phase exist together. 0 < x < 1.

let us consider specific entropy (s),

`s = s_f + x*(s_g - s_f)`

or, `s = s_f+x*s_(fg)`, where `s_(fg) = s_g - s_f`

`s_f`= specific entropy of saturated liquid

`s_g`= specific entropy of saturated vapor

`s_(fg)` = specific entropy change of vaporization

iii) Superheated vapour region

IMPORTANT EQUATIONS

Heat input by the boiler, `Q_in` = enthalpy difference across boiler = h1 - h4

Heat rejected by condenser, `Q_(out)` = enthalpy difference across condenser = h2 - h3

Work done by turbine, `W_t` = h1 - h2

Work done by pump, `W_p` = h4 - h3

Net work done, `W_(n et)` = `W_t - W_p`

Efficiency of the cycle, `eta` = `W_(n et)/Q_in`

Specific steam consumption, S.S.C = `W_(n et)/3600`

PROGRAM

% program for rankine cycle simulator
clear all
close all
clc

fprintf('%60s \n','RANKINE CYCLE SIMULATOR')
disp('1-2 is Isentropic Expansion in turbine')
disp('2-3 is constant pressure heat rejection in condensor')
disp('3-4 is Isentropic compression in pump')
disp('4-1 is constant pressure heat addition in boiler')

%taking inputs
P1 = input('enter the turbine inlet pressure (in bar)');
T1 = input('enter the turbine inlet temperature (in degree Celcius)');
P2 = input('enter the condensor pressure (in bar)');

%conditions at the turbine inlet
T1_sat = XSteam('Tsat_p',P1);
if T1 > T1_sat
   h1 = XSteam('h_pt',P1,T1);
   s1 = XSteam('s_pt',P1,T1);
elseif T1 == T1_sat
        h1 = XSteam('hV_p',P1);
        s1 = XSteam('sV_p',P1);
else
    disp('enter higher value of temperature')
end
    
%conditions at turbine outlet
s2 = s1;
s2_sat = XSteam('sV_p',P2);
if s2 < s2_sat
s2_f = XSteam('sL_p',P2);
s2_g = XSteam('sV_p',P2);
%s2 = s_f + x(s_g - s_f)
%x = vapour fraction
x2 = (s2 - s2_f)/(s2_g - s2_f);
h2_f = XSteam('hL_p',P2);
h2_g = XSteam('hV_p',P2);
h2 = h2_f + x2*(h2_g - h2_f);
T2 = XSteam('Tsat_p',P2);
else
    x2 = 1;
    h2 = XSteam('hV_p',P2);
    T2 = XSteam('Tsat_p',P2);
end

%conditions at condensor outlet/ pump inlet
P3 = P2;
T3 = XSteam('Tsat_p',P3);
h3 = XSteam('hL_p',P3);
s3 = XSteam('sL_p',P3);
v3 = XSteam('vL_p',P3);

%conditions at pump outlet
s4 = s3;
P4 = P1;
v4 = XSteam('v_ps',P4,s4);
Cp = XSteam('Cp_ps',P4,s4);
Cv = XSteam('Cv_ps',P4,s4);
g = Cp/Cv; %gamma
T4 = T3*((P3/P4)^((1-g)/g));
W_p = v3*(P4 - P3)*100; %work done by pump
h4 = h3 + W_p;

%considering point 5 and 6 to complete the curve
T5 = XSteam('Tsat_p',P4);
s5 = XSteam('sL_p',P4);
T6 = T5;
s6 = XSteam('sV_T',T6);

% Work done, heat and efficiency
%assuming mass flow rate = 1
W_t = h1 - h2; % work done by turbine
W_net = W_t - W_p; % net work done
Q_in = h1 - h4; % heat added
Q_out = h2 - h3; %heat rejected
eta = W_net/Q_in; %efficiency

%specific steam consumption (SSC)
SSC = 3600/W_net;

%plotting 
t = linspace(0,600,1000);
%for plotting saturation curves
for i = 1:length(t)
    s_l(i) = XSteam('sL_T',t(i));
    s_v(i) = XSteam('sV_T',t(i));
    h_l(i) = XSteam('hL_T',t(i));
    h_v(i) = XSteam('hV_T',t(i));
end

%plotting T-S curve
figure(1)
hold on
plot(s_l,t,'--','color','b')
plot(s_v,t,'--','color','r')
plot([s1,s2],[T1,T2],'linewidth',2,'color','b')
plot([s2,s3],[T2,T3],'linewidth',2,'color','r')
plot([s3,s4],[T3,T4],'linewidth',2,'color','y')
plot([s4,s5],[T4,T5],'linewidth',2,'color','k')
plot([s5,s6],[T5,T6],'linewidth',2,'color','k')
plot([s6,s1],[T6,T1],'linewidth',2,'color','k')
text(s1,T1,'1')
text(s2,T2,'2')
text(s3,T3,'3')
text(s4,T4,'4')
text(s5,T5,'5')
text(s6,T6,'6')
xlabel('Entropy [KJ/Kg-K]')
ylabel('Temperature [C]')
title('T-s curve')
grid on
hold off

%plotting h-s curve
figure(2)
hold on
plot([s1,s2],[h1,h2],'linewidth',2,'color','b')
plot([s2,s3],[h2,h3],'linewidth',2,'color','r')
plot([s3,s4],[h3,h4],'linewidth',2,'color','y')
plot([s4,s1],[h4,h1],'linewidth',2,'color','k')
plot(s_l,h_l,'--','color','b')
plot(s_v,h_v,'--','color','r')
text(s1,h1,'1')
text(s2,h2,'2')
text(s3,h3,'3')
text(s4,h4,'4')
xlabel('Entropy [KJ/Kg-K]')
ylabel('Enthalpy [KJ/Kg]')
title('h-s curve')
grid on
hold off

%getting the output screen
fprintf('%55s \n \n','RESULTS')
fprintf('%s %75s \n','At state point 1','At state point 2')
fprintf('%s %.2f %s %65s %.2f %s \n',' P1 = ',P1,'bar','P2 = ',P2,'bar')
fprintf('%s %.2f %s %56s %.2f %s \n',' T1 = ',T1,'deg celcius','T2 = ',T2,'deg celcius')
fprintf('%s %.2f %s %61s %.2f %s \n',' h1 = ',h1,'KJ/Kg','h2 = ',h2,'KJ/Kg') 
fprintf('%s %.2f %s %62s %.2f %s \n \n',' S1 = ',s1,'KJ/Kg-K','S2 = ',s2, 'KJ/Kg-K')
fprintf('%s %75s \n','At state point 3','At state point 4')
fprintf('%s %.2f %s %66s %.2f %s \n',' P3 = ',P3,'bar','P4 = ',P4,'bar')
fprintf('%s %.2f %s %57s %.2f %s \n',' T3 = ',T3,'deg celcius','T4 = ',T4,'deg celcius')
fprintf('%s %.2f %s %62s %.2f %s \n',' h3 = ',h3,'KJ/Kg','h4 = ',h4,'KJ/Kg') 
fprintf('%s %.2f %s %62s %.2f %s \n \n',' S3 = ',s3,'KJ/Kg-K','S4 = ',s4, 'KJ/Kg-K')
fprintf('%45s %.2f %s \n','Work output by turbine (Wt) = ',W_t,'KJ/Kg')
fprintf('%45s %.2f %s \n','Work input by pump (Wp) = ',W_p,'KJ/Kg')
fprintf('%45s %.2f %s \n','Net work (Wnet) = ',W_net,'KJ/Kg')
fprintf('%45s %.2f %s \n','Thermodynamic efficiency (Ntherm) = ',eta*100,'%')
fprintf('%45s %.2f %s \n','Heat input in boiler = ',Q_in,'KJ/Kg')
fprintf('%45s %.2f %s \n','Heat rejected in condensor = ',Q_out,'KJ/Kg')
fprintf('%45s %.2f %s \n','S.S.C. = ',SSC,'Kg/kWh')

OUTPUT

For the following inputs,

Turbine Inlet temperature = 400° C

Turbine Inlet Pressure = 30 bars

Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure

For the given inputs, the temperature difference across the pump was very low due to which the isentropic compression line is not visible. However, with change in inputs, it might be visible. Let us consider a different set of inputs:

Turbine Inlet temperature = 500° C
Turbine Inlet Pressure = 45 bars
Turbine Outlet Pressure = 6 bars = Condenser Inlet Pressure.

For above set of inputs, the T-s and h-s curves obtained are shown below;

ERRORS

Error 1

MATLAB is case sensitive and this error is the result of not using exact name (using s instead of S) of the XSteam program.

Error 2

In this case, the value of s2 was known and the value of s1 was to be determined. The error occurred due to incorrect formation of the equation. It should be s2 = s1 and not the other way around.

CONCLUSION

In this program, we have done the analysis of an ideal Rankine cycle. It is ideal because the processes are reversible. However, in case of real Rankine cycle, the processes are not reversible, i.e, the compression in pump and the expansion in turbine are not isentropic. This increases the power required by the pump and decreases the power generated by the turbine. Hence, the efficiency of a real Rankine cycle would be less than that of an ideal Rankine cycle, for same input parameters.

REFERENCES

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

https://energyeducation.ca/encyclopedia/Rankine_cycle

https://www.instructables.com/id/Simple-Rankine-Cycle-Thermodynamics/

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.