Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Loading...

All Courses

All Courses

logo

Loading...
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. Aniket Kumbhar/
  3. Project 5 - MATLAB - Simulator - Rankine Cycle .

Project 5 - MATLAB - Simulator - Rankine Cycle .

 AIM:  Create the Rankine Cycle Simulator using MATLAB.                                           OBJECTIVE:          â€¦

  • MATLAB
  • Aniket Kumbhar

    updated on 06 Jun 2022

 AIM:  Create the Rankine Cycle Simulator using MATLAB.          

                               

OBJECTIVE:

          Simulate the Rankine Cycle using MATLAB.

         Extracting steam and water properties from XSteam data (IAPWS IF-97 standers)

         Calculating all the state points of the cycle based on user inputs.

         Plotting the T vs S and H vs s plot the given inputs.

RANKINE CYCLE :

        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 Macqueen Rankine. 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. 

        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.

 

              Rankine engines generally operate in a closed loop where the working fluid is reused. The water vapour 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.

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.

The 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 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.

 

The main program –

%% RANKINE CYCLE SIMULATOR 

% OBJECTIVE - SIMULATE THE RANKLINE CYCLE 
% PLOTING T-S AND H-S DIAGRAM USING DATA FORM XSTREAM DATA 
% WATER AND STEAM PROPERTY ACCORDING RO IAPWS IF-97

clear all
close all
clc


%% DISPLAYING RANKINE CYCLE 

disp(' RANKINE CYCLE ');
disp('1-2 IS Isentropic Expansion in the turbine');
disp('2-3 IS constant pressure heat removal in condenser');
disp('3-4 IS isentropic compression in the pump');
disp('4-1 IS constant pressure heat addition in the boiler');

%% OBTAIN THE INPUT DATA

p1 = input('nValue of pressure at turbine inlet, p1 (in bar)');
T1 = input('nValue of temprature at turbine inlet, T1 (in degree.C)');
p2 = input('nValue of temprature at condenser inlet, p2 (in bar)');

%% DEFININE THE VARIABLES AND EXTRATING THE DATA
% EXTRACTING ENTHALPY AT STATE PT 1
% AT STATE 1 

h1 = XSteam('h_pT', p1, T1);
% SIMILARLY 
s1 = XSteam('s_pT', p1, T1);

% AT STATE 2

% ISENTROPIC EXPANSION
% SATURATED LIQUID ENTROPY
s2 = s1;
sf2 = XSteam('sL_p', p2);
% SATURATED VAPOUR ENTROPY
sg2 = XSteam('sV_p', p2);
x2 = (s2-sf2)/(sg2-sf2);
hf2 = XSteam('hL_p', p2);
hg2 = XSteam('hV_p', p2);
h2 = hf2 + (x2*(hg2-hf2));

% STATE 3

%CONSTANT PRESSURE HEAT REJECTION IN CONDENSER 
p3 = p2;
s3 = XSteam('sL_p', p3);
h3 = XSteam('hL_p', p3);

% STATE 4 

s4 = s3;
p4 =p1;

%WORKDONE BY TURBIBE 

Wt = h1 - h2;

% WORKDONE TO RUN PUMP

v3 = XSteam('vL_p', p3);
Wp = v3*(p4 - p3)*100;
h4 = h3 + Wp;

%NET WORK 

Wnet = Wt - Wp;

%HEAT INTO THE SYSTEM 

Qin = h1 - h4;

%HEAT OUT OF THE SYSTEM

Qout = h2 - h3;

%THERMAL EFFICIENCY 
eff = (Wnet/Qin)*100;

% SPECIFIC STEAM CONSUMPTION 

%SSC = MASS FLOW RATE/POWER
s.s.c = (3600/Wnet);



%% CALCULATING TEMPERATURES AT THE STATE POINTS
T3 = XSteam('Tsat_p', p3);
T2 = T3;
Cp4 = XSteam('Cp_ps', p4, s4);
Cv4 = XSteam('Cv_ps', p4, s4);
k = Cp4/Cv4;
T4 = T3/((p3/p4)^((k-1)/k));

% CALCULATING TEMPRATURE, ENTROPY AND ENTHALPHY AT VAOUR AND LIQUID
% PLOTTING LINE 

T6 = XSteam('Tsat_p', p1);
s5 = XSteam('sL_p', p1);
s6 = XSteam('sV_p', p1);
h5 = XSteam('hL_p', p1);
h6 = XSteam('hV_p', p1);
T5 = T6;


%% PLOTING THE SATURATION CURVE 
T = linspace(1,375,1000);

for i = 1:length(T)
    
    sf(i) = XSteam('sL_T', T(i));
    sg(i) = XSteam('sV_T', T(i));
    hf(i) = XSteam('hL_T', T(i));
    hg(i) = XSteam('hV_T', T(i));
    
end

%PLOTING T-S DIAGRAM 

figure(1)
hold on 
plot(sf, T, 'r', 'linewidth',1)
plot(sg, T, 'r', 'linewidth',1)
plot([s1 s2], [T1 T2], 'k', 'linewidth',2)
plot([s2 s3], [T2 T3], 'k', 'linewidth',2)
plot([s3 s4], [T3 T4], 'k', 'linewidth',2)
plot([s4 s5], [T4 T5], 'k', 'linewidth',2)
plot([s5 s6], [T5 T6], 'k', 'linewidth',2)
plot([s6 s1], [T6 T1], 'k', 'linewidth',2)

sc1 = linspace(s6, s1, 1000);

for i = 1:length(sc1)
    Tc1(1) = XSteam('T_ps', p1, sc1(1));
end

plot(sc1, Tc1, 'k', 'linewidth', 2)
text(s1+0.1, T1, '1')
text(s2+0.1, T2, '2')
text(s3, T3-20, '3')
text(s4, T4+20, '4')
text(s5, T5, '5')
text(s6, T6, '6')
title('Temp vs Entropy plot')
xlabel('Entropy,S (Kj/kgk')
ylabel('Temperature (degree C)');
legend('Saturation curve')

%% PLOTING H-S DIAGRAM 

figure(2)
hold on 
plot(sf, hf, 'r', 'linewidth',1)
plot (sg, hg, 'r', 'linewidth',1)
plot([s1 s2], [h1 h2], 'k', 'linewidth',2)
plot([s2 s3], [h2 h3], 'k', 'linewidth',2)
plot([s3 s4], [h3 h4], 'k', 'linewidth',2)
hc = linspace(h4, h5, 100);

for k = 1:length(hc)
    sch(k) =  XSteam('s_ph',p1,hc(k));
end

plot(sch,hc, 'k', 'linewidth', 2)
plot([s5 s6],[h5 h6], 'k', 'linewidth', 2)

for m = 1:length(sc1)
    hc1(m) = XSteam('h_ps',p1, sc1(m));
end

plot(sc1,hc1, 'k', 'linewidth', 2)
text(s1+0.1, h1, '1')
text(s2+0.1, h2, '2')
text(s3, h3-100, '3')
text(s4, h4+200, '4')
title('Enthalpy vs Entropy plot')
xlabel('Entropy , S (KJ/kgk)')
ylabel('Enthalpy , H (KJ/kg)')
legend('Saturation curve', 'location','northwest')


%% DISPLAYING RESULTS 

disp('RESULTS');
fprintf('At State Point 1:n');
fprintf('p1: %8.3f barn', p1);
fprintf('T1: %8.3f Cn', T1);
fprintf('h1: %8.3f KJ/kgn', h1);
fprintf('s1: %8.3f KJ/kgnn', s1);

fprintf('At State Point 2:n');
fprintf('p2: %8.3f barn', p2);
fprintf('T2: %8.3f Cn', T2);
fprintf('h2: %8.3f KJ/kgn', h2);
fprintf('s2: %8.3f KJ/kgnn', s2);
fprintf('x2: %8.3fnn', x2);

fprintf('At State Point 3:n');
fprintf('p3: %8.3f barn', p3);
fprintf('T3: %8.3f Cn', T3);
fprintf('h3: %8.3f KJ/kgn', h3);
fprintf('s3: %8.3f KJ/kgnn', s3);

fprintf('At State Point 4:n');
fprintf('p4: %8.3f barn', p4);
fprintf('T4: %8.3f Cn', T4);
fprintf('h4: %8.3f KJ/kgn', h4);
fprintf('s4: %8.3f KJ/kgnn', s4);

fprintf('Turbine Work: %8.3f KJ/kgn', Wt);
fprintf('pump Work: %8.3f KJ/kgn', Wp);
fprintf('Wnet: %8.3f KJ/kgn', Wnet);
fprintf('Efficiency: %8.3f Precent n', eff);
fprintf('s.s.c: %8.3f KJ/KWh', s.s.c);




 

PROCEDURE FOR CREATING THE STEAP WISE PROGRAM –

 

XSteam data is used to extract steam and water properties of enthalpy, entropy and specific pressure liquid, saturated vapour conditions etc.

 

The program required the input of pressure (in bar) at state point 1 (turbine inlet) temperature at point and temperature at condenser inlet (point 2).

 

Within the help of these inlets & from XSteam data, the program calculates all the state points.

The XSteam data work as,

h1 = XSteam(‘h_pT’,p1, T1); ( returns the enthalpy of water at given pressure and temperature)

 

As we extract the data, we use thermodynamics relation further find state point and extracts the parameters.

Sf and sg, hf and hg, where f and g stands for saturated liquid and saturated vapour respectively

 

The net work, work done by turbine, work done to run the pump , heat on and heat out are calculated using standard thermodynamics relations.

 

Efficiency and specific steam consumption’s (s.s.c) of the Rankine cycle is calculated.

 

T,s and h are extracted at vapour and liquid line for plotting purpose, Saturated curve is plotted in a red for saturated liquid and saturated gas.

 

Plot of T and s and h vs s is created from all the point of obtains from diagram.

 

The plot changes as a user inputs changes for the above mentioned points.

 

Results are displayed in the command window.

 

 

PROGRAM AND RESULTS FROM COMMAND WINDOW FOR CALCULATIONS –

  

RANKINE CYCLE

1-2 IS Isentropic Expansion in the turbine

2-3 IS constant pressure heat removal in condenser

3-4 IS isentropic compression in the pump

4-1 IS constant pressure heat addition in the boiler

nValue of pressure at turbine inlet, p1 (in bar)30

nValue of temprature at turbine inlet, T1 (in degree.C)400

nValue of temprature at condenser inlet, p2 (in bar)0.05

 

RESULTS

At State Point 1:n

p1:   30.000 barn

T1:  400.000 Cn

h1: 3231.571 KJ/kgn

s1:    6.923 KJ/kgnn

 

At State Point 2:n

p2:    0.050 barn

T2:   32.875 Cn

h2: 2110.708 KJ/kgn

s2:    6.923 KJ/kgnn

x2:    0.814nn

 

At State Point 3:n

p3:    0.050 barn

T3:   32.875 Cn

h3:  137.765 KJ/kgn

s3:    0.476 KJ/kgnn

 

At State Point 4:n

p4:   30.000 barn

T4:   36.935 Cn

h4:  140.776 KJ/kgn

s4:    0.476 KJ/kgnn

 

Turbine Work: 1120.863 KJ/kgn

pump Work:    3.011 KJ/kgn

Wnet: 1117.852 KJ/kgn

Efficiency:   36.167 Precent n

s.s.c:    3.220 KJ/KWh>>

  

REASULTS AND GRAPH –

SCREEN SHOT ERRORS FACING WHILE PROGRAMING –

 

 

SCREEN SHOT WHILE PROGRAM SUCESSFULLY RUNS –

 

 

*Remaining detail documents are in attachments.

 

Conclusion –

Rankine Cycle using MATLAB successfully simulated.

Successfully plotted the T vs S and H vs s curves.

Calculated all the state points of the cycle based on user inputs.

The project gives a good expose to use various techniques, commands in MatLab.

 

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.

Please  login to add a comment

Other comments...

No comments yet!
Be the first to add a comment

Read more Projects by Aniket Kumbhar (24)

Week 11 - Final project

Objective:

Aim: To Creation of CAD model considering Class A surface, Nominal thickness and Attachment strategy.   Objective: To Creation of CAD model considering Class A surface, Nominal thickness and Attachment strategy. Create thickened part using master section for reference Create the mounting features as per design guidelines…

calendar

05 Jan 2023 11:12 AM IST

  • CATIA
Read more

Hood design-Week 2

Objective:

HOOD DESIGN OF A CAR AIM : To design the hood of a car with the given input Outer panel and its dimensions.   Hood Introduction :   The hood (North American English) or bonnet (Commonwealth English) is the hinged cove over the engine of motor vehicles. Hoods can open to allow access to the engine compartment…

calendar

01 Nov 2022 10:50 AM IST

  • BIM
  • CAE
  • CFD
  • CSS
  • DEM
  • DESIGN
  • FEA
  • GIS
  • HEV
  • MBD
Read more

Week 8 - Challenge 4 - Bumper

Objective:

BUMPER DESIGN AIM: to make a model from the provided class-A surface.INTRODUCTION:CLASS-A SURFACE: a surface made by the designer which is given as an input to the plastic modeler to work on. It is aesthetic surfaceand the outer most surface.CLASS-B SURFACE: a surface below a certain thickness from the class-A…

calendar

18 Sep 2022 08:20 PM IST

  • BIM
  • CAE
  • CFD
  • CSS
  • DEM
  • DESIGN
  • FEA
  • GIS
  • HEV
  • MBD
Read more

Week 10- Assembly Workbench

Objective:

AIMIn this week’s assignment, you will have to create 2 assemblies according to the contentcovered in the course videos. You will be provided with 2D diagrams of the componentsand you will have to first create the individual part files and then create a completeassembly of those part files in the assembly workbench.…

calendar

14 Sep 2022 01:38 PM IST

  • BIM
  • CAE
  • CFD
  • CSS
  • DEM
  • FEA
  • GIS
  • HEV
  • MBD
  • QGIS
Read more

Schedule a counselling session

Please enter your name
Please enter a valid email
Please enter a valid number

Related Courses

coursecardcoursetype

Post Graduate Program in Computer Vision for Autonomous Vehicles

4.7

223 Hours of Content

coursecardcoursetype

Post Graduate Program in Autonomous Vehicles

Recently launched

88 Hours of Content

coursecard

Simulation and Design of Power Converters for EV using MATLAB and Simulink

4.9

22 Hours of Content

coursecard

Introduction to Hybrid Electric Vehicle using MATLAB and Simulink

4.8

23 Hours of Content

coursecardcoursetype

Mechanical Engineering Essentials Program

4.7

21 Hours of Content

Schedule a counselling session

Please enter your name
Please enter a valid email
Please enter a valid number

              Do You Want To Showcase Your Technical Skills?
              Sign-Up for our projects.