All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
RANKINE CYCLE SIMULATOR: The Rankine cycle or Rankine Vapor Cycle is the process widely used by power plants such as coal-fired power plants or nuclear reactors. In this mechanism, a fuel is used to produce heat within a boiler, converting water into steam which…
Aravind Subramanian
updated on 23 Oct 2019
RANKINE CYCLE SIMULATOR:
The Rankine cycle or Rankine Vapor Cycle is the process widely used by power plants such as coal-fired power plants or nuclear reactors. In this mechanism, a fuel is used to produce heat within a boiler, converting water into steam which then expands through a turbine producing useful work. This process was developed in 1859 by Scottish engineer William J.M. Rankine. This is a thermodynamic cycle which converts heat into mechanical energy—which usually gets transformed into electricity by electrical generation
COMPONENTS OF RANKINE CYCLE:
The four basic components of Rankine cycle are shown in figure 1 each component in the cycle is regarded as control volume, operating at steady state.
Pump: The liquid condensate leaving the condenser at the state 1 is pumped to the operating pressure of the boiler. The pump operation is considered isentropic.
Boiler: The heat is supplied in the working fluid (feed water) in the boiler and thus vapor is generated. The vapor leaving the boiler is either at saturated at the state 3 or superheated at the state 3, depending upon the amount of heat supplied by the boiler.
Turbine: The vapor leaving the boiler enters the turbine, where it expands isentropically to the condenser pressure at the state 4. The work produced by the turbine is rotary (shaft) work and is used to drive an electric generator or machine.
Condenser: The condenser is attached at the exit of the turbine. The vapor leaving the turbine is wet vapor and it is condensed completely in the condenser to the state 1, by giving its latest heat to some other cooling fluid like water.
The efficiency of the Rankine cycle is limited by the high heat of vaporization by the fluid. The fluid must be cycled through and reused constantly, therefore, water is the most practical fluid for this cycle. This is not why many power plants are located near a body of water—that\'s for the waste heat.
MATLAB CODE:
clear all
close all
clc
% User Inputs for the Rankine Cycle
disp(\' RANKINE CYCLE SIMULATOR\');
disp(\'1-2 is Isentropic Expansion in the turbine\');
disp(\'2-3 is const Pressure heat Rejection by the Condenser\');
disp(\'3-4 is Isentropic Compression in the pump\');
disp(\'4-1 is const Pressure heat Addition by the Boiler\');
p1=input(\'nEnter 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):\');
%inlet of the Turbine
tsat=XSteam(\'Tsat_p\',p1);
sf1=XSteam(\'sL_p\',p1);
sg1=XSteam(\'sV_p\',p1);
if t1>tsat
tsup=t1;
h1=XSteam(\'h_pT\',p1,tsup);
s1=XSteam(\'s_pT\',p1,tsup);
elseif t1==tsat
h1=XSteam(\'hL_p\',p1);
s1=XSteam(\'sL_p\',p1);
else
disp(\'Temperature entered must be greater than or equal to saturation temperature\')
end
%condenser inlet
t2=XSteam(\'Tsat_p\',p2);
hf2=XSteam(\'hL_p\',p2);
hg2=XSteam(\'hV_p\',p2);
s2=s1;
sg2=XSteam(\'sV_p\',p2);
sf2=XSteam(\'sL_p\',p2);
x2=(s2-sf2)/(sg2-sf2);
h2=hf2+(x2*(hg2-hf2));
%condenser exit
p3=p2;
t3=t2;
h3=hf2;
s3=sf2;
%boiler inlet
p4=p1;
s4=s3;
cp4=XSteam(\'Cp_ps\',p4,s4);
cv4=XSteam(\'Cv_ps\',p4,s4);
gamma=cp4/cv4;
t4=t3*(p4/p3)^((gamma-1)/gamma);
vf=XSteam(\'vL_p\',p3);
wp=vf*(p1-p2)*100;
h4=wp+h3;
% work output from turbine
wt=h1-h2;
%heat input
Qin=h1-h4;
%heat output
Qout=h2-h3;
%net work
wnet=wt-wp;
% thermalefficiency
therm_efficiency=(wnet/Qin)*100;
% heat added in the boiler
q_in=h1-h4;
% heat rejected in the condensor
q_out=h2-h3;
%specific fuel consumption
sfc=3600/wnet;
%plotting of T-S and H-S diagram
%T-S diagram
figure(1)
hold on
%plotting saturation lines
temp = linspace(1, 373, 500);
hl=zeros(1,100);
hv=zeros(1,100);
sl=zeros(1,100);
sv=zeros(1,100);
for i = 1 : length(temp)
hl(i) = XSteam(\'hL_T\', temp(i));
hv(i) = XSteam(\'hV_T\', temp(i));
sl(i) = XSteam(\'sL_T\', temp(i));
sv(i) = XSteam(\'sV_T\', temp(i));
end
plot(sl, temp, \'k\', \'linestyle\',\'-\',\'linewidth\', 1.5)
plot(sv, temp, \'k\', \'linestyle\',\'-\',\'linewidth\', 1.5)
xlabel(\'Specific Entropy (kJ/kgK)\')
ylabel(\'Temprature (degC)\')
title(\'T-S diagram\');
plot([s1 s2 s3 s4 sf1 sg1],[t1 t2 t3 t4 tsat tsat],\'color\',\'g\',\'linewidth\', 1.5)
text(s1,t1,\'1\')
text(s2,t2,\'2\')
text(s3,t3-10,\'3\')
text(s4,t4+10,\'4\')
t=linspace(tsat,tsup,1000);
for j =1:length(t)
sp(j) = XSteam(\'s_pT\',p1,t(j));
end
plot(sp,t,\'color\',\'g\',\'linewidth\', 1.5);
%H-S diagram
figure(2)
hold on
title(\'H-S diagram\');
plot(sl, hl, \'r\',\'linestyle\',\'-\', \'linewidth\', 1.5)
plot(sv, hv, \'r\',\'linestyle\',\'-\', \'linewidth\', 1.5)
plot([s1 s2 s3 s4 s1], [h1 h2 h3 h4 h1], \'color\', \'black\',\'linewidth\', 1.5);
text(s1,h1,\'1\')
text(s2,h2,\'2\')
text(s3,h3-100,\'3\')
text(s4,h4+100,\'4\')
ylabel(\'Specific Enthalpy (kJ/kg)\')
xlabel(\'Specific Entropy (kJ/kgK)\')
%output
%at state 1
disp(\'RESULTS\');
disp(\'At State point 1:\');
fprintf(\'P1 is : %.2f Bar\',p1);
fprintf(\'\\n T1 is : %.2f Deg Celcius\',t1);
fprintf(\'\\n H1 is : %.2f kJ/kg\',h1);
fprintf(\'\\n S1 is : %.2f kJ/kgK\\r\\n\',s1);
%at state 2
disp(\' At State point 2:\');
fprintf(\'P2 is : %.2f Bar\',p2);
fprintf(\'\\n T2 is : %.2f Deg Celcius\',t2);
fprintf(\'\\n H2 is : %.2f kJ/kg\',h2);
fprintf(\'\\n S2 is : %.2f kJ/kgK\\r\\n\',s2);
%at state 3
disp(\' At State point 3:\');
fprintf(\'P3 is : %.2f Bar\',p3);
fprintf(\'\\n T3 is : %.2f Deg Celcius\',t3);
fprintf(\'\\n H3 is : %.2f kJ/kg\',h3);
fprintf(\'\\n S3 is : %.2f kJ/kgK\\r\\n\',s3);
%at state 4
disp(\'At State point 4:\');
fprintf(\'P4 is : %.2f Bar\',p4);
fprintf(\'\\n T4 is : %.2f Deg Celcius\',t4);
fprintf(\'\\n H4 is : %.2f kJ/kg\',h4);
fprintf(\'\\n S4 is : %.2f kJ/kgK\\r\\n\',s4);
fprintf(\'Work output by the Turbine (Wt) is : %.2f kJ/kg\',wt);
fprintf(\'\\n Work input by the pump (Wp) is : %.2f kJ/kg\',wp);
fprintf(\'\\n Net Work is : %.2f kJ/kg\',wnet);
fprintf(\'\\n Thermodynamic efficiency is : %.2f Percent\',therm_efficiency);
fprintf(\'\\n %s Heat input in Boiler:%.2f \',q_in,\' KJ/kg\');
fprintf(\'\\n %s Heat rejected in condenser:%.2f \',q_out,\' KJ/kg\');
fprintf(\'\\n Specific Fuel Consumption is : %.2f kg/kWh\',sfc);
OUTPUT:
T vs S plot:
H vs S plot:
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week 11 - Louver/Grille characterization
Aim The objective of the project is to simulate a hexa grille placed at the center of the channel for a streamline flow and do a parametric optiization of the design. Task Define a parameter to optimize the design. Define trials. Define primary and compound functions that you want to report. Calculate parametric solutions.…
20 Sep 2021 12:41 PM IST
Week 12 - Final Project - Modelling and Analysis of a Datacenter
AIM The objective of the project is to create a data center model using macros in the Icepak. The main parts of the data center are Computer room air conditioning (CRAC), server cabinets, power distribution units and perforated tiles. Analyze the flow distribution and behaviour of temperature in the server stacks. Problem…
20 Sep 2021 12:41 PM IST
Week 10 - MRF project
Aim The objective of the project is to create a MRF model by importing the model to Ansys Icepak and setup the physics & solve the thermal model. Moving Reference Frame The Moving reference frame approach is a steady state method used in CFD to model problems with rotating parts. The MRF is a moving/sliding mesh…
24 Aug 2021 05:23 PM IST
Week 9 - PCB Thermal Simulation
PCB Board A printed circuit board (PCB) mechanically supports and electrically connects electronic components using conductive tracks, pads and other features etched from one or more sheet layers of copper laminated onto and/or between sheet layers of a non conductive substrate. Components are generally…
19 Jul 2021 11:56 AM IST
Related Courses
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.