Challenge

Project 2 - Rankine cycle Simulator

MATLAB CODE FOR GENERATING RANKINE CYCLE:

GIVEN PROBLEM:

  • Create a Rankine Cycle Simulator using OCTAVE/MATLAB.
  • Your code should calculate the state points of the Rankine Cycle (any type of your choice) based on user inputs.
  • Then, plot the corresponding T-s and h-s plots for the given set of inputs. Title and axes labels are a must, while legends could be used if necessary.
  • The presentation of your code will be taken into consideration while grading. Labelling sections of your code using comments is appreciated.
  • Attach a report explaining the working of a rankine cycle simulator and also the research done by you.

Required Inputs:

Turbine Inlet temperature = 400° C

Turbine Inlet Pressure = 30 bars

Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure

THEORY:

Rankine cycle is used for steam power plant. Its consist of isentropic expansion, constant prerssure heat rejection, isentropic compression, constant pressure heat addition.So its respective components for following those processes are as follows:

Turbine, condenser,Pump & Boiler. Steam is superheated in rankine cycle to increase its efficiency.

THERMODYNAMIC EQUATIONS AND FORMULAS:

For isentropic expansion:

(T2/T1)=(P2/P1)^((g-1)/g));

g=gamma=1.4;

T is temperature at any state(k)

p is pressure at any state(bar)

g is heat capacity ratio

NET WORK AND BACK WORK RATIO:

Turbine work(w_t)=h1-h2

pump work(w_c)=h4-h3

Net work(w_net)= Turbine work(w_t)-pump work(w_c)

Back work ratio=Pump work/ Turbine work=w_c /w_t

h= Enthalpy at any given point in kj/kg

EFFICIENCY AND SPECIFIC STEAM CONSUMPTION:

Heat absorbed(Qin)=h1-h4

Efficiency(eff_thermal)=(w_net/Qin)*100

Sfecific steam consumption=3600/w_net (kj/kg)

EXPLANATION OF CODE:

1.The given inputs are entered

2.using XSteam table and thermodynamic equations various state variables like pressure , temperature , enthalpy and entropy is calculated.

3.The Net work done , Thermal efficiency and back work ratio are calculated.

4. graphs are plotted to get T-S and H-S diagram of rankine cycle.

CODE:

clear all
close all
clc

disp(' Rankine cycle     ')
% inputs
disp('1-2 isentropic expansion');
%inputs at point 1
p1=input('Enter the pressure at turbine inlet(bar):');
T1=input("Enter the temperature at turbine inlet(degree c):");
h1=XSteam('h_pT',p1,T1);
s1=XSteam('s_pT',p1,T1);

%inputs at point 2
p2=input('Enter the pressure at turbine exit or condeser inlet(bar):')
g=1.4;
T2=T1*((p2/p1)^((g-1)/g));
h2=XSteam('h_pT',p2,T2);
s2=s1;

disp('2-3 constant pressure heat rejection');
%inputs at point 3
p3=p2;
T3=T2;
h3=XSteam('hL_T',T3);
s3=XSteam('sL_T',T3);

disp('3-4 isentropic compression in the pump');
%inputs at point 4
p4=p1;
s4=s3;
T4=XSteam('T_ps',p4,s4);
h4=XSteam('h_pT',p4,T4);

disp('4-41-42-1 constant pressure heat addition in the boiler');
%inputs at point 41
p41=p1;
h41=XSteam('hL_p',p41);
s41=XSteam('sL_p',p41);
T41=XSteam("T_hs",h41,s41);

%inputs at point 42
p42=p1;
h42=XSteam('hV_p',p42);
s42=XSteam('sV_p',p42);
T42=XSteam('T_hs',h42,s42);

% calculating thermal efficiency
w_t=h1-h2;
w_c=h4-h3;
w_net=w_t-w_c;
Qin=h1-h4;
eff_thermal=(w_net/Qin)*100 ;

%calculating back work ratio
bcw=(w_c/w_t)*100 ;
% calculating specific steam consumption
ssc=(3600/w_net);

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

    
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[kj/k]');
ylabel('Temperature[k]');

figure(2)

plot([s1 s2],[h1 h2],[s2 s3],[h2 h3],[s3 s4],[h3 h4],[s4 s1],[h4 h1],'Marker','*','Color','g')
hold on
plot(sv,hv);
plot(sl,hl);
xlabel('Entropy[kj/k]');
ylabel('Enthalpy[kj/kg-k]');

RESULTS:

RANKINE CYCLE T-S DIAGRAM

RANKINE CYCLE H-S DIAGRAM:

CONCLUSION :

RANKINE CYCLE performance is given belllow

1. Net work =608.0928

2.Thermal efficiency= 20.5482 %

3.Back work ratio=.4947 %

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.