Challenge

Project 2 - Rankine cycle Simulator

Aim:

To develop a simulator using MATLAB that represents the Rankine cycle, and demonstrates the T-s and h-s plots for a set of given inputs.

Objectives:

Develop a Rankine cycle simulator using MATLAB.

Calculate state points of the Rankine Cycle based on user inputs.

Display h-s and T-s plots based on the input values.

Introduction:

The Rankine cycle serves as a fundamental model for analyzing the performance and efficiency of steam turbine systems. Developed on a series of assumptions, it offers insights into the operation and efficiencies of various thermal systems, including the reciprocating steam engine. In the domain of thermal power plants, the Rankine cycle helps assess the characteristics of several operational parameters.

Components of the Rankine Cycle:

The Rankine cycle revolves around four primary components, ensuring the transformation of heat input into work output:

Turbine: This is where the conversion of the fluid's energy into mechanical work happens. The dry saturated vapour drives the turbine, resulting in power output.

Boiler: The central point for heat input, the boiler heats the working fluid, turning it into dry saturated vapour. The source of this heat can vary, ranging from coal combustion to nuclear reactions.

Pump: Responsible for increasing the pressure of the working fluid, the pump transfers the fluid from a low to a high-pressure state, setting the stage for the heating process in the boiler.

Condenser: The vapour exiting the turbine enters the condenser. Here, under constant pressure, the vapour condenses and turns back into its saturated liquid form, ready to be pumped once more.

Various process in rankine cycle:

 

       Process 1-2 : Isentropic compression.

 

       Process 2-3 : Constant pressure heat addition in boiler.

 

       Process 3-4 : Isentropic expansion.

 

       Process 4-1 : Constant pressure heat rejection in condenser.

 

   Technical terms:

 

      a) Enthalpy:

 

              The enthalpy is the amount of heat content present in a system. It was denoted by 'h'.

 

      b) Entropy:

 

              Entropy is defined as a measure of randomness or disorder of a system. It was denoted by 's'.

 

   Formulae:

Steam conditions:

 

       Based on the nature of the steam in the turbine inlet, the three types of condition is proposed. The three conditions are,

 

       1) Wet steam ( x<1>

 

       2) Saturated steam (x=1)

 

 

       3) Super saturated steam (x>1)

The 'x' value is defined as the 'dryness fraction' based on the dryness fraction value the conditions can be classified. The 'x' value can be calculated by using the formula given below,

       hi = hfi + x(hfgi) where i is the position in which all datas are known.

 

Rankine cycle simulator code:

clear all

close all

clc

fprintf('RANKINE CYCLE SIMULATOR\n')

fprintf('1-2 is Isentropic Expansion in turbine\n')

fprintf('2-3 is constant pressure heat rejection in condensor\n')

fprintf('3-4 is Isentropic compression in pump\n')

fprintf('4-1 is constant pressure heat addition in boiler\n')

%Inputs

P1 = input('turbine inlet pressure (bar)');

T1 = input('turbine inlet temperature (degree c)');

P2 = input('turbine outlet pressure (bar)');

%Turbine inlet condition

T1_sat = XSteam('Tsat_p',P1);

if T1>T1_sat

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

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

elseif T1 == T1_sat

    h1 = XSteam('hV_p',P1);

    s1 = XSteam('sV_p',P1);

else

    fprintf('Enter higher temperature value')

end

%Turbine outlet condition

s2 = s1;

s2_sat = XSteam('sV_p',P2);

if s2

    s2_f = XSteam('sL_p',P2);

    s2_g = XSteam('sV_p',P2);

    x2 = (s2 - s2_f)/(s2_g - s2_f);

    h2_f = XSteam('hL_p',P2);

    h2_g = XSteam('hV_p',P2);

    h2 = h2_f + x2*(h2_g - h2_f);

    T2 = XSteam('Tsat_p',P2);

else

    x2 = 1;

    h2 = XSteam('hV_p',P2);

    T2 = XSteam('Tsat_p',P2);

end

%Condensor outlet condition

P3 = P2;

T3 = XSteam('Tsat_p',P3);

h3 = XSteam('hL_p',P3);

s3 = XSteam('sL_p',P3);

v3 = XSteam('vL_p',P3);

%Pump outlet condition

s4 = s3;

P4 = P1;

v4 = XSteam('v_ps',P4,s4);

Cp = XSteam('Cp_ps',P4,s4);

Cv = XSteam('Cv_ps',P4,s4);

g = Cp/Cv;

T4 = T3*((P3/P4)^((1-g)/g));

W_p = v3*(P4-P3)*100;

h4 = h3 + W_p;

T5 = XSteam('Tsat_p',P4);

s5 = XSteam('sL_p',P4);

T6 = T5;

s6 = XSteam('sV_T',T6);

�lculation of work done, heat and efficiency

W_t = h1 - h2;

W_net = W_t - W_p;

Q_in = h1 - h4;

Q_out = h2 - h3;

efficiency = W_net/Q_in;

�ck work ratio calculation

SSC = 3600/W_net;

%Plotting

%T-S diagram

a=linspace(0,374,500);

figure (1)

hold on

for i=1:length(a)

    plot(XSteam('sL_T',a(i)),a(i),'.','color','r')

    plot(XSteam('sV_T',a(i)),a(i),'.','color','r')

end

plot([s1 s2],[T1 T2],'color','k','linewidth',2)

text(s1,T1,' 1')

text(s2,T2,' 2')

plot([s2 s6],[T1 T6],'color','k','linewidth',2)

plot([s6 s5],[T6 T6],'color','k','linewidth',2)

plot([s5 s4],[T6 T4],'color','k','linewidth',2)

text(s4,T4,' 4')

plot([s4 s3],[T4 T3],'color','k','linewidth',2)

text(s3,T3,' 3')

plot([s3 s1],[T3 T3],'color','k','linewidth',2)

title('T-S diagram')

xlabel('Entropy (KJ/KgK)')

ylabel('Temperature (Deg celcius)')

%H-S diagram

figure (2)

hold on

plot([s1 s2],[h1 h2],'color','k','linewidth',2)

text(s1,h1,' 1')

text(s2,h2,' 2')

plot([s2 s3],[h2 h3],'color','k','linewidth',2)

plot([s3 s4],[h3 h4],'color','k','linewidth',2)

text(s3,h3,' 3')

text(s4,h4,' 4')

plot([s4 s1],[h4 h1],'color','k','linewidth',2)

for i=1:length(a)

    plot(XSteam('sL_T',a(i)),XSteam('hL_T',a(i)),'.','color','r')

    plot(XSteam('sV_T',a(i)),XSteam('hV_T',a(i)),'.','color','r')

end

title('H-S diagram')

xlabel('Entropy (KJ/KgK)')

ylabel('Enthalpy (KJ/kg)')

%Output

fprintf('                                       RESULTS\n')

fprintf('At state point 1:                                                    At state point 3:\n')

fprintf('%s %.2f','P1 is : ',P1,' Bar')

fprintf('%s %.2f','                                                  P3 is : ',P3,' Bar')

fprintf('\n')

fprintf('%s %.2f','T1 is : ',T1,' Deg celcius')

fprintf('%s %.2f','                                         T3 is : ',T3,' Deg celcius')

fprintf('\n')

fprintf('%s %.2f','H1 is : ',h1,' KJ/kg')

fprintf('%s %.2f','                                              H3 is : ',h3,' KJ/kg')

fprintf('\n')

fprintf('%s %.2f','S1 is : ',s1,' KJ/KgK')

fprintf('%s %.2f','                                                S3 is : ',s3,' KJ/KgK')

fprintf('\n\n')

fprintf('At state point 2:                                                    At state point 4:\n')

fprintf('%s %.2f','P2 is : ',P2,' Bar')

fprintf('%s %.2f','                                                   P4 is : ',P4,' Bar')

fprintf('\n')

fprintf('%s %.2f','T2 is : ',T2,' Deg celcius')

fprintf('%s %.2f','                                          T4 is : ',T4,' Deg celcius')

fprintf('\n')

fprintf('%s %.2f','H2 is : ',h2,' KJ/kg')

fprintf('%s %.2f','                                              H4 is : ',h4,' KJ/kg')

fprintf('\n')

fprintf('%s %.2f','S2 is : ',s2,' KJ/KgK')

fprintf('%s %.2f','                                                S4 is : ',s4,' KJ/KgK')

fprintf('\n\n')

fprintf('%s %.2f','Wt is     : ',W_t,' KJ/kg')

fprintf('\n')

fprintf('%s %.2f','Wp is     : ',W_p,' KJ/kg')

fprintf('\n')

fprintf('%s %.2f','Wnet is   : ',W_net,' KJ/kg')

fprintf('\n')

fprintf('%s %.2f','Ntherm is : ',efficiency,' Percent')

fprintf('\n')

fprintf('%s %.2f','S.S.C is  : ',SSC,' KJ/KWh')

fprintf('\n')

Code explanation:

Initially, the different process in a rankine cycle is displayed.

The input parameters are obtained from the user.

The different parameters at the turbine inlet condition is derived. The various constant values are obtained from the steam table.

Here XSteam library is used for obtaining the steam table values.

Then, the different parameters at turbine outlet condition is derived.

In condenser outlet condition, different parameters are derived with the help of XSteam library.

The various values at the pump outlet condition are also calculated.

Once the different values at different conditions are obtained, we can proceed further for calculating the main resultant values.

The work done, input and output heat and the efficiency of the rankine cycle is calculated.

The back work ratio is also calculated.

From all the values obtained, the h-s plot and the t-s plot were drawn

All the values calculated are shown under result.

Input values:

Turbine Inlet temperature = 400° C

Turbine Inlet Pressure = 30 bars

Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure.

Output:

   Result values:

       The various result values calculated for the given input is shown below,

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.