Challenge

Project 2 - Rankine cycle Simulator

Rankine cycle Simulator

AIM: - Create a Rankine Cycle Simulator using MATLAB.

1) Develop a basic program that calculates the state points

2) Add the thermodynamic relation to get the points in-between the state variables.

3) To plot Rankine cycle on T-s and H-s curve.

Calculate the followings,

  • Net-work output
  • Back work ratio

Required Inputs:

Turbine Inlet temperature = 400° C

Turbine Inlet Pressure = 30 bars

Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure

Theory of Rankine cycle

The Rankine cycle or Rankine Vapor Cycle is the process widely used by power plant such as coal fire plant or nuclear reactor. 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.

The steps in the Rankine Cycle as shown in Figure

  • Pump:Compression of the fluid to high pressure using a pump
  • Boiler:The compressed fluid is heated to the final temperature (which is at boiling point), therefore, a phase change occurs—from liquid to vapor.
  • Turbine:Expansion of the vapor in the turbine.
  • Condenser:Condensation of the vapor in the condenser (where the waste heat goes to the final heat sink (the atmosphere or a large body of water

The efficiency of power cycles is defined as,

Xsteam function

https://drive.google.com/open?id=1RK_fvrOj38CIaQvmLT1S3daqHnxKCGU-

Four processes of the Rankine cycle:

1- 2: Isentropic Expansion

Turbine (1-2): Superheated steam enters into the Turbine and expands isentropically resulting in the production of work. The shaft of the turbine is connected to the generator. This results in the production of electricity i.e Mechanical energy gets converted into electric energy. Work produced by the turbine,

Wt = m(h1-h2)k

2-3: Constant Pressure Heat Rejection

Condenser (2-3): The expanded vapour is then passed through a condenser, where it gets condensed and converts into liquid again. This liquid is again pumped to the boiler.

Qt = m(h2-h3)k

3-4: Isentropic Compression by the Pump

Pump (3-4): The water enters into the pump in a saturated state. Then the liquid is compressed isentropically until it meets the boiler pressure. Work done by the pump is,

Wp = m(h3-h4)k

4-1: Constant Pressure Heat Addition

Boiler (4-1): The water enters into the boiler as compressed and leaves as superheated from the boiler. Thus the phase changes from liquid to vapour. The heat supplied by the boiler is

Qb = m(h1-h4)k

MATLAB PROGRAMMING: -

close all

clear all

clc

% Print each Process Description

fprintf('1-2 = Isobaric heat Transfer\n')

fprintf('2-3 = Isentropic Expansion\n')

fprintf('3-4 = Isobaric heat Rejection\n')

fprintf('4-1 = Isentropic Compression\n')

%step 1:Inputs

p1 = input('Pressure at the Turbine Inlet (bar):');

T1 = input('Temperature at the Turbine inlet (Degree Celcius):');

p2 = input('Pressure at the Condensor (bar):');

%step 2: Calculate state point values

% state point 1

h1 = XSteam('h_pt',p1,T1);

s1 = XSteam('s_pt',p1,T1);

%step 3: state point 2

s2=s1;

sf2 = XSteam('sL_p',p2);

sg2 = XSteam('sV_p',p2);

hf2 = XSteam('hL_p',p2);

hg2 = XSteam('hV_p',p2);

s2 = sg2;

h2 = hg2;

T2=XSteam('T_hs',h2,s2);

%step 4: state point 3

T3=T2;

p3= p2;

s3=XSteam('sL_T',T3);

h3=XSteam('hL_T',T3);

v3 = XSteam('vL_p',p2);

%step 5: state point 4

p4 =p1;

s4= s3;

Cp4 = XSteam('Cp_ps',p4,s4);

Cv4 = XSteam('Cv_ps',p4,s4);

gamma = Cp4/Cv4;

r = (gamma - 1)/gamma;

T4 = T3 *(p4/p3)^r;

%step 6: Calculate other output values.

% Turbine Work

Wt = h1-h2;

% Pump Work

Wp = v3*(p1-p2)*100;

h4 = Wp + h3;

% Net Work unit (kj/kg)

W_net = Wt-Wp;

%Calculating Back Work Ratio:

Bw_ratio = Wp/Wt;

% heat supplyed

Qs = h1 - h4;

% Efficiency

N_per = (W_net/Qs)*100;

% Steam rate per second

steam_rate = 3600/(Wt - Wp);

% step 7: state point 5 and 6 to plot the value

T5=XSteam('Tsat_p',p1);

T6=T5;

s5=XSteam('sL_p',p1);

s6=XSteam('sV_p',p1);

h5=XSteam('hL_p',p1);

h6=XSteam('hV_p',p1);

%step 8: print all state poont values to show.

fprintf('\n RESULT\n')

fprintf('At State point 1:\nP1 is : %4.2f Bar\nT1 is : %4.2f Degree Celcius\nH1 is : %4.2f kJ/kg\nS1 is : %4.2f kJ/kgk\n\n',p1,T1,h1,s1)

fprintf('At State point 2:\nP2 is : %4.2f Bar\nT2 is : %4.2f Degree Celcius\nH2 is : %4.2f kJ/kg\nS2 is : %4.2f kJ/kgk\n\n',p2,T2,h2,s2)

fprintf('At State point 3:\nP3 is : %4.2f Bar\nT3 is : %4.2f Degree Celcius\nH3 is : %4.2f kJ/kg\nS3 is : %4.2f kJ/kgk\n\n',p3,T3,h3,s3)

fprintf('At State point 4:\nP4 is : %4.2f Bar\nT4 is : %4.2f Degree Celcius\nH4 is : %4.2f kJ/kg\nS4 is : %4.2f kJ/kgk\n\n',p4,T4,h4,s4)

fprintf('Wt is :%4.2f kJ/kg\nWp is : %4.2f kJ/kg\nWnet is : %4.2f kJ/kg\nNtherm is : %4.2f percent\nS.S.C is : %4.2f kg/kWh',Wt,Wp,W_net,N_per,steam_rate)

%step 9:plot T-S Diagram

subplot(1,2,1)

T_rankine = linspace(T5,T1,5050);

for i = 1:length(T_rankine)

s_rankine(i) = XSteam('s_pT',p1,T_rankine(i));

end

plot([s1 s2 s3 s4 s5 s6 s_rankine],[T1 T2 T3 T4 T5 T6 T_rankine],'linewidth',1.5);

hold on

T_curve = linspace(1,373, 500);

for i=1:length(T_curve)

s_l(i) = XSteam('sL_T',T_curve(i));

s_v(i) = XSteam('sV_T',T_curve(i));

h_l(i) = XSteam('hL_T',T_curve(i));

h_v(i) = XSteam('hV_T',T_curve(i));

end

plot(s_l,T_curve);

plot(s_v,T_curve);

text(s1,T1,'1','FontSize',15)

text(s2,T2,'2','FontSize',15)

text(s3,T3,'3','FontSize',15,'HorizontalAlignment','right','VerticalAlignment','top')

text(s4,T4,'4','FontSize',15,'HorizontalAlignment','right','VerticalAlignment','bottom')

text(s5,T5,'5','FontSize',15)

text(s6,T6,'6','FontSize',15)

xlabel('Entropy in kJ/KgK');

ylabel('Temperature in Degree Celcius');

%step 10:plot H-S diagram

subplot(1,2,2)

plot([s1 s2 s3 s4 s1],[h1 h2 h3 h4 h1],'linewidth',2)

hold on

plot(s_v,h_v,'color','r')

plot(s_l,h_l,'color','r')

text(s1,h1,'1','FontSize',15)

text(s2,h2,'2','FontSize',15)

text(s3,h3,'3','FontSize',15,'HorizontalAlignment','right','VerticalAlignment','top')

text(s4,h4,'4','FontSize',15,'HorizontalAlignment','right','VerticalAlignment','bottom')

xlabel('Entropy in kJ/KgK')

ylabel('Enthalpy in kJ/kg')

Command window output Result: -

1-2 = Isobaric heat Transfer

2-3 = Isentropic Expansion

3-4 = Isobaric heat Rejection

4-1 = Isentropic Compression

Pressure at the Turbine Inlet (bar):30

Temperature at the Turbine inlet (Degree Celcius):400

Pressure at the Condensor (bar):0.05

RESULT

At State point 1:

P1 is : 30.00 Bar

T1 is : 400.00 Degree Celcius

H1 is : 3231.57 kJ/kg

S1 is : 6.92 kJ/kgk

At State point 2:

P2 is : 0.05 Bar

T2 is : 32.87 Degree Celcius

H2 is : 2560.77 kJ/kg

S2 is : 8.39 kJ/kgk

At State point 3:

P3 is : 0.05 Bar

T3 is : 32.87 Degree Celcius

H3 is : 137.73 kJ/kg

S3 is : 0.48 kJ/kgk

At State point 4:

P4 is : 30.00 Bar

T4 is : 36.92 Degree Celcius

H4 is : 140.74 kJ/kg

S4 is : 0.48 kJ/kgk

Wt is :670.81 kJ/kg

Wp is : 3.01 kJ/kg

Wnet is : 667.79 kJ/kg

Ntherm is : 21.61 percent

S.S.C is : 5.39 kg/kWh>>

Procedure to writing a program: -

  • Program begins write clear all, close all, clc to erase the data.
  • Input variables p1,T1,p2 are given by input command
  • These values are entered in command window.
  • State-1, Values for Enthalpy & Entropy are extracted as a function of Pressure & Temperature.
  • h_pT, s_pT, hL_p, sV_p etc.... are the default variables
  • These value are stored in XSteam file.
  • All the variable write in a suitable formate.
  • Pressure, Temperature, Enthalpy, Entropy for all the State Variable
  • Extracted the function of the dependent variable from the XSteam File.
  • State 2 is a Condenser inlet
  • Calculate the Specific Enthalpy.
  • State-3 The water is condensed back to its Saturation Temperature and fed to the Pump
  • State-4 This is Constant Pressure Heat addition, hence pressure is equal to p1
  • Cp/Cv=gamma is considered to find temperature T4.
  • define two more points 5 and 6 to plot cycle in detail.
  • Finally, Work done and Heat Evolved & SSC are calculated by basic formulae.
  • To plot the graph.in between theT-S & H-S curves using the plot commands
  • fprintf command use to print the cycle.

Result Plot: -

T-S and H-S diagram

Below the graph we are conclude that in a practical condition this diagram can’t exponentially behaviour.

Workspace windows output: -

Conclusion:

  1. Net Work = 667.794kJ/kg
  2. Thermal Efficiency = 21.605%
  3. Back Work Ratio = 0.005%

Hence we plot the successfully T-S and H-S graph

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.