Challenge

Project 2 - Rankine cycle Simulator

AIM:

  • Create a Rankine Cycle Simulator using OCTAVE/MATLAB.
  • calculate the state points of the Rankine Cycle based on user inputs.
  • plot the corresponding T-s and h-s plots for the given set of inputs.

Results are included for the following inputs

Turbine Inlet temperature = 400° C

Turbine Inlet Pressure = 30 bars

Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure.

Formulae used

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

Each of the next four equations is derived from the energy and mass balance for a control volume. defines the thermodynamic efficiency of the cycle as the ratio of net power output to heat input. As the work required by the pump is often around 1% of the turbine work output, it can be simplified.

When dealing with the efficiencies of the turbines and pumps, an adjustment to the work terms must be made:

Theory

  • The Rankine cycle is an idealized thermodynamic cycle describing the process by which certain heat engines, such as steam turbines or reciprocating steam engines, allow mechanical work to be extracted from a fluid as it moves between a heat source and heat sink. The Rankine cycle is named after William John Macquorn Rankine, a Scottish polymath professor at Glasgow University.
  • Heat energy is supplied to the system via a boiler where the working fluid (typically water) is converted to a high pressure gaseous state (steam) in order to turn a turbine. After passing over the turbine the fluid is allowed to condense back into a liquid state as waste heat energy is rejected before being returned to boiler, completing the cycle. Friction losses throughout the system are often neglected for the purpose of simplifying calculations as such losses are usually much less significant than thermodynamic losses, especially in larger systems.

The Rankine cycle closely describes the process by which steam engines commonly found in thermal power generation plants harness the thermal energy of a fuel or other heat source to generate electricity. Possible heat sources include combustion of fossil fuels such as coal, natural gas, or oil, renewable fuels like biomass or ethanol, nuclear fission, and concentrated solar power. Common heat sinks include ambient air above or around a facility and bodies of water such as rivers, ponds, and oceans.

The ability of a Rankine engine to harness energy depends on the relative temperature difference between the heat source and heat sink. The greater the differential, the more mechanical power can be efficiently extracted out of heat energy, as per Carnot's theorem.

The efficiency of the Rankine cycle is limited by the high heat of vaporization of the working fluid. Unless the pressure and temperature reach super critical levels in the boiler, the temperature range that the cycle can operate over is quite small: Steam turbine entry temperatures are typically around 565 °C and condenser temperatures are around 30 °C. This gives a theoretical maximum Carnot efficiency for the turbine alone of about 63.8% compared with an actual overall thermal efficiency of less than 50% for typical power stations. This low steam turbine entry temperature (compared to a gas turbine) is why the Rankine (steam) cycle is often used as a bottoming cycle to recover otherwise rejected heat in combined-cycle gas turbine power stations.

Rankine engines generally operate in a closed loop where the working fluid is reused. The water vapor with condensed droplets often seen billowing from power stations is created by the cooling systems (not directly from the closed-loop Rankine power cycle). This 'exhaust' heat is represented by the "Qout" flowing out of the lower side of the cycle shown in the T–s diagram below. Cooling towers operate as large heat exchangers by absorbing the latent heat of vaporization of the working fluid and simultaneously evaporating cooling water to the atmosphere.

While many substances can be used as the working fluid, water is usually chosen for its simple chemistry, relative abundance, low cost, and thermodynamic properties. By condensing the working steam vapor to a liquid the pressure at the turbine outlet is lowered and the energy required by the feed pump consumes only 1% to 3% of the turbine output power and these factors contribute to a higher efficiency for the cycle. The benefit of this is offset by the low temperatures of steam admitted to the turbine(s). Gas turbines, for instance, have turbine entry temperatures approaching 1500 °C. However, the thermal efficiency of actual large steam power stations and large modern gas turbine stations are similar.

T–s diagram of a typical Rankine cycle operating between pressures of 0.06 bar and 50 bar. Left from the bell-shaped curve is liquid, right from it is gas, and under it is saturated liquid–vapour equilibrium.

There are four processes in the Rankine cycle. The states are identified by numbers (in brown) in the T–s diagram.

  • 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 1-2 is isentropic compression.
  • 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. The input energy required can be easily calculated graphically, using an enthalpy–entropy chart (h–s chart, or Mollier diagram), or numerically, using steam tables or software. Process 2-3 is constant pressure heat addition in boiler.
  • 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. The output in this process can be easily calculated using the chart or tables noted above. Process 3-4 is isentropic expansion.
  • Process 4–1: The wet vapour then enters a condenser, where it is condensed at a constant pressure to become a saturated liquid. Process 4-1 is constant pressure heat rejection in condenser.

In an ideal Rankine cycle the pump and turbine would be isentropic, i.e., the pump and turbine would generate no entropy and hence maximize the net work output. Processes 1–2 and 3–4 would be represented by vertical lines on the T–s diagram and more closely resemble that of the Carnot cycle. The Rankine cycle shown here prevents the state of the working fluid from ending up in the superheated vapor region after the expansion in the turbine, which reduces the energy removed by the condensers.

The actual vapor power cycle differs from the ideal Rankine cycle because of irreversibilities in the inherent components caused by fluid friction and heat loss to the surroundings; fluid friction causes pressure drops in the boiler, the condenser, and the piping between the components, and as a result the steam leaves the boiler at a lower pressure; heat loss reduces the net work output, thus heat addition to the steam in the boiler is required to maintain the same level of net work output.

VARIABLES:

Heat flow rate to or from the system (energy per unit time)
Mass flow rate (mass per unit time)
Mechanical power consumed by or provided to the system (energy per unit time)
Thermodynamic efficiency of the process (net power output per heat input, dimensionless)
Isentropic efficiency of the compression (feed pump) and expansion (turbine) processes, dimensionless
The "specific enthalpies" at indicated points on the T–s diagram
The final "specific enthalpy" of the fluid if the turbine were isentropic
The pressures before and after the compression process

CODE

clear all
close all
clc

fprintf('SIMULATOR Of RANKINE CYCLE \n')
fprintf('1-2 Isentropic expansion in the turbine \n')
fprintf('2-3 constant pressure heat rejection by the condensor \n')
fprintf('3-4 isentropic compression in the pump \n')
fprintf('4-1 constant pressure heat addition by the boiler \n')

%inputs
p1=input('enter the pressure at the turbine inlet(in bar):');
t1=input('enter the temperature at the turbine inlet(in degree celsius):');
p2=input('enter the pressure at the condensor(in bar):');
disp('results')

%getting cp & cv values from xsteam
%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);

%getting important 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 deg celsius',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/kg \n',s1)

%%state point 2
disp('at state point 2:')
fprintf('p2 is :%f bar \n',p2)
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);
else
    x2=1;
end
fprintf('x2 is :%f \n',x2)
%calculating t2
if(x2<1)
    t2=t2s;
else
    %t2 calculate by 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 deg celsius \n',t2)
if(x2<1)
    h2=h2f+x2*h2fg;
else
    h2=h2g+low_cpV*(t2-t2s);
end
fprintf('h2 is : %f kJ/kg \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;
fprintf('t3 is : %f deg celsius \n', t3)
h3=h2f;
fprintf('h3 is : %f kJ/kg \n', h3)
s3=s2f;
fprintf('s3 is : %f kJ/kg \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/t1s?t4
term=exp((s1f-s4)/high_cpL);

t4=t1s/term;
fprintf('t4 is : %f deg celsius \n',t4)

%%work done,heat,ssc & efficiency calculation
wt=h1-h2;
fprintf('work done by turbine is : %f kJ/kg \n', wt)
fprintf('work done by compressor is : %f kJ/kg \n', wp)
wnet=wt-wp;
fprintf('net work done is : %f kJ/kg \n', wnet)
qin=h1-h4;
eff_thermal=wnet/qin;
fprintf('thermal efficiency is : %f ',eff_thermal);
ssc=3600/wt;
fprintf('s.s.c is : %f kg/kwh', ssc)

%%calculating for plotting liquid & vapout lies
%
%
temperature=linspace(1,373,500);
for i=1:length(temperature)
    h_L(i)=XSteam('hL_t',temperature(i));
    h_V(i)=XSteam('hV_t',temperature(i));
    s_L(i)=XSteam('sL_t',temperature(i));
    s_V(i)=XSteam('sV_t',temperature(i));
end

%%plotting T-S & H-S diagram
figure(1) % T-S
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,temperature,'b','linestyle','--','linewidth',1)
plot(s_V,temperature,'b','linestyle','--','linewidth',1)
%marking direction
text(s1,(t1+t2)/2,'\vee','color','r')
text((s2g+s2f)/2,t3,'\angle','color','r')
text(s3,(t3+t4)/2,'\wedge','color','r')
text((s1f+s1g)/2,t1s,'\angle','color','r')
title('T-S diagram of Ideal Rankine cycle')
xlabel('specific entropy(kJ/kgk)')
ylabel('temperature(deg c)')

figure(2)%h-s
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)
xlabel('specific entropy(kJ/kgk)')
ylabel('specific enthalpy(kJ/kg)')

CODE EXPLANATION:

  • The creation of rankine cycle simulator starts with input values to be defined by the user to calculate the state points in the cycle.
  • We use Xsteam function file for reading the state point, we get the values of enthalpy and entropy from state point 1 from the function file.
  • As process 1-2 is isentropic compression the entropy at state 1 is equal to state2.
  • sg and sf are referred to saturated liquid and saturated vapour entropy respectively. This values will be used to calculate other functions.
  • Workdone in turbine and pump are calculated for further getting the net work done in the rankine cycle.
  • once work done is calculated, efficiency of rankine cycle is calculated along wiht the specific steam consumption which is steam consumed by a locomotive cylinders per unit of output of work done.
  • Temperature at each point of the cycle is calculated using input taken from start of program and data of xsteam file. for given temperature range from lower to higher entropy points are calculated to create the T-S plot. Similarly another for loop is used to create the saturation curve in each plot.
  • Plots of temperature vs entropy and enthalpy vs entropy in rankine cycle for given user inputs are plotted and are presented in this report under results section.

RESULTS:

CONCLUSION:

Rankine cycle simulator is carried out using matlab code for inputs defined by the user.

Plots for H-S and T-S are presented.

Values of temperature, entropy and enthalpy at each state point are calculated.

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.