Challenge

Project 2 - Rankine cycle Simulator

Rankine Cycle simulator using MATLAB programme

Objective:

Create Rankine cycle simulator using MATLAB programme and plot the T-s ,P-S plots. For steam table references we are here to refer from another MATLAB programme which is equivalent. Explore how to fetch the data using the MATLAB Xsteam programme.

Introduction:

The Rankine cycle is the fundamental operating cycle of all power plants where an operating fluid is continuously evaporated and condensed. The selection of operating fluid depends mainly on the available temperature range.

The pressure-enthalpy (p-h) and temperature-entropy (T-s) diagrams of this cycle are given in Figure 2. The Rankine cycle operates in the following steps:

  • 1-2-3 Isobaric Heat Transfer. High pressure liquid enters the boiler from the feed pump (1) and is heated to the saturation temperature (2). Further addition of energy causes evaporation of the liquid until it is fully converted to saturated steam (3).
  • 3-4 Isentropic Expansion. The vapor is expanded in the turbine, thus producing work which may be converted to electricity. In practice, the expansion is limited by the temperature of the cooling medium and by the erosion of the turbine blades by liquid entrainment in the vapor stream as the process moves further into the two-phase region. Exit vapor qualities should be greater than 90%.
  • 4-5 Isobaric Heat Rejection. The vapor-liquid mixture leaving the turbine (4) is condensed at low pressure, usually in a surface condenser using cooling water. In well designed and maintained condensers, the pressure of the vapor is well below atmospheric pressure, approaching the saturation pressure of the operating fluid at the cooling water temperature.
  • 5-1 Isentropic Compression. The pressure of the condensate is raised in the feed pump. Because of the low specific volume of liquids, the pump work is relatively small and often neglected in thermodynamic calculations.

Figure 1 shows the idealized Rankine cycle.

Figure 2.

Given Inputs for finding the state points:

Turbine Inlet temperature = 400° C

Turbine Inlet Pressure = 30 bars

Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure

Understanding Xsteam table:

Example: XSteam('h_pt',1,20). Returns the enthalpy of water at 1 bar and 20 degC.

Using the XSteam functions enthalpy(h) and entropy(s) and Pressure (p) points can

be calculated.

Properties variable to be calculated.

Matlab Code:

In Matlab code we

  • Display the Rankine cycle process for underdtanding.
  • And imputing the given temperature and pressure value condition for state point 1.
  • Fetching the data from Xsteam table using given stat point 1 condition.
  • Calculate the other state points 1, 2,3,4.
  • Calculate the Thermal effcciency,Back work ratio,Specific fuelc onsumtion

Output Plots:

Result in Command Window:

MATLAB CODE:

                    
                       %Rankine Cycle
clear al
close all
clc

disp ('             RankineCycle                 ')

disp (['1-2-3 Isobaric Heat Transfer'])

disp ('3-4 Isentropic Expansion')

disp ('4-5 Isobaric Heat Rejection')

disp ('5-1 Isentropic Compression')

%inlet Condition for Turbine

disp(' Inputs: ')

P1 = 30  % bar  Turbine inlet Pressure

T1 = 400  % ° C Turbine inlet Temperature

P2 = 0.05 % bar Condenser inlet Pressure


%Example: XSteam('h_pt',1,20)  Returns the enthalpy of water at 1 bar and 20 degC
% Using the XSteam functions enthalpy(h) and entropy(s)  and Pressure (p) points can be calculated asd below:

%State point 1

h1 = XSteam('h_pT',P1,T1);
s1 =XSteam('s_pT',P1,T1);

%Caluclating  at state point 2:

s2=s1;  %Isentropic Expansion

%For Isentropic Expansion:
% (T2/T1)=(P2/P1)^(1-(1/g))
%Simply  N=1-(1/g)
g = 1.4;
N= 1-(1/g);

T2 = T1*((P2/P1)^N); %(T2/T1) = (P2/P1)^N:
h2 = XSteam('h_pT',P2,T2);

%Caluclating  at state point 3:

% condition constant Pressure and adiabatic
P3 = P2;
T3 = T2;
h3 = XSteam('hL_T',T3);
s3 = XSteam('sL_T',T3);

%Caluclating  at state point  4:

s4 = s3; %Isentropic Compression

%Since Constant Pressure Process:
P4 = P1;

T4 = XSteam('T_ps',P4,s4);
h4 = XSteam('h_pT',P4,T4);
h41 = XSteam('hL_p',P4);
s41 = XSteam('sL_p',P4);
h42 = XSteam('hV_p',P4);
s42 = XSteam('sV_p',P4);
T41 = XSteam('T_hs',h41,s41);
T42 = XSteam('T_hs',h42,s42);

%Calculating Net Work Output(W_net):

W_t = h1-h2; % workdone-turbine
W_p = h4-h3;% workdone -pump
W_net = W_t-W_p;

%Calculating Back Work Ratio:
Bw_ratio = W_p/W_t;

%Calculating the Thermal efficiency:
Q_in = h1-h4;
Thermal_Eff = (W_net/Q_in)*100;

%Calculating Specific Steam Consumption:
% wkt 1J = 3600kg/s
SFC = 3600/W_net;

%Calculating the Entropy and Enthalpy at the saturation curve:

Temp = linspace(0,500,600);

for i = 1:length(Temp)

sv(i) = XSteam('sV_T',Temp(i));
sl(i) = XSteam('sL_T',Temp(i));

hv(i) = XSteam('hV_T', Temp(i));
hl(i) = XSteam('hL_T', Temp(i));

end

% Displaying Results in the command window:
disp(' Results');
P1 = P1;
T1 = T1;
P2 = P2;
disp('At stage point 1');
n1 = sprintf('P1 is %.3f bar',P1);
disp(n1);
n2 = sprintf('T1 is %.3f C',T1);
disp(n2);
n3 = sprintf('h1 is %.3f kJ/kg',h1);
disp(n3);
n4 = sprintf('s1 is %.3f kJ/kgK',s1);
disp(n4);
disp('At stage point 2');
n11 = sprintf('P2 is %.3f bar',P2);
disp(n11);
n21 = sprintf('T2 is %.3f C',T2);
disp(n21);
n31 = sprintf('h2 is %.3f kJ/kg',h2);
disp(n31);
n41 = sprintf('s2 is %.3f kJ/kgK',s2);
disp(n41);
disp('At stage point 3');
n12 = sprintf('P3 is %.3f bar',P3);
disp(n12);
n22 = sprintf('T3 is %.3f C',T3);
disp(n22);
n32 = sprintf('h3 is %.3f kJ/kg',h3);
disp(n32);
n42 = sprintf('s3 is %.3f kJ/kgK',s3);
disp(n42);
disp('At stage point 4');
n13 = sprintf('P4 is %.3f bar',P4);
disp(n13);
n23 = sprintf('T4 is %.3f C',T4);
disp(n23);
n33 = sprintf('h4 is %.3f kJ/kg',h4);
disp(n33);
n43 = sprintf('s4 is %.3f kJ/kgK',s4);
disp(n43);
n14 = sprintf('W_t is %.3f kJ/kg',W_t);
disp(n14);
n15 = sprintf('W_p is %.3f kJ/kg',W_p);
disp(n15);
n16 = sprintf('W_net is %.3f kJ/kg',W_net);
disp(n16);
n17 = sprintf('Thermal_Efficiency is %.2f Percent',Thermal_Eff);
disp(n17);
n18 = sprintf('SFC is %.2f kg/kWh',SSC);
disp(n18);

figure(1)
plot([s1 s2],[T1 T2],[s2 s3],[T2 T3],[s3 s4],[T3 T4],[s4 s41],[T4 T41],[s41 s42],[T41 T42],[s42 s1],[T42 T1],'marker','*','color','b')
hold on
plot(sv,Temp)
plot(sl,Temp)
xlabel('Entropy-s(kJ/kgK)');
ylabel('Temperature-T(K)');
legend('State Point')

figure(2)
plot([s1 s2],[h1 h2],[s2 s3],[h2 h3],[s3 s4],[h3 h4],[s4 s1],[h4 h1],'marker','*','color','r')
hold on
plot(sv,hv)
plot(sl,hl)
xlabel('Entropy-s(kJ/kgK');
ylabel('Enthalpy-h(kJ/k)');
legend('State Point')



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.