Project

RANKINE CYCLE SIMULATOR

AIM:

1) To write a program that calculates the state points

2) To 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.

GOVERNING EQUATIONS :

THEORY :

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. Figure shows the idealized Rankine cycle.

COMPONENTS OF RANKINE CYCLE:

The four basic components of Rankine cycle are shown in figure each component in the cycle is regarded as control volume, operating at steady state.

Pump: The liquid condensate leaving the condenser at the state 1 is pumped to the operating pressure of the boiler. The pump operation is considered isentropic.

Boiler: The heat is supplied in the working fluid (feed water) in the boiler and thus vapour is generated. The vapour leaving the boiler is either at saturated at the state 3 or superheated at the state 3[1]||, depending upon the amount of heat supplied by the boiler.

Turbine: The vapour leaving the boiler enters the turbine, where it expands isentropically to the condenser pressure at the state 4. The work produced by the turbine is rotary (shaft) work and is used to drive an electric generator or machine.

Condenser: The condenser is attached at the exit of the turbine. The vapour leaving the turbine is wet vapour and it is condensed completely in the condenser to the state 1, by giving its latest heat to some other cooling fluid like water.

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

SOLUTION STEPS:

  1. To simulate and find out different state variables, all the processes parameters are to be described such as all four processes occuring and input parameters.
  2. From the standard Xsteam library to get the steam table data for water, all points in between state variables are calculated. such as enthalpy, entropy, specific heat, saturation temperature, etc.
  3. The calculated points are used to find out net work done, work done by turbine, thermal efficiency, back work ratio, etc according to their thermodynamic relations and necessary formulas.
  4. To plot the property diagram of water, i.e., saturation liquid and vapour line , an array is created using linspace command from 0 to value of T1 with 5000 evenly spaced points in between them and suitable state variables are iterated using for loop.
  5. To plot T-s and h-s diagram, all the required points are plotted and marked using text command.

CODE:

clear all
close all
clc

%user inputs
fprintf('%75s','Rankine Cycle Simulator');
fprintf('\n \n')
fprintf('1-2 is Isentropic Expansion in the turbine \n');
fprintf('2-3 is Constant Pressure Heat Rejection by the Condensor \n');
fprintf('3-4 is Isentropic Compression in the Pump \n');
fprintf('4-1 is Constant Pressure Heat Addition by the Boiler \n \n');

% inputs
p1=input(' Enter the Pressure(in bar) at the inlet of the turbine(at point 1):');
t1=input(' Enter the Temperature(in degrees) at the inlet of the turbine(at point 1):');
p2=input(' Enter the pressure(in degrees) at the inlet of the Condensor(at point 2):');


%inputs to the turbine
s1 = XSteam('s_pT',p1,t1);
h1 = XSteam('h_pt',p1,t1);

% condensor inlet
s2=s1; %1-2 is an isentropic expansion process
sf2=XSteam('sL_p',p2);
sg2=XSteam('sV_p',p2);
hf2=XSteam('hL_p',p2);
hg2=XSteam('hV_p',p2);

%calculating dryness fraction 
if(s2<=sg2)
    x2 = ((s2 - sf2) / (sg2-sf2));   % Dryness Fraction at state point 2
else
    x2=1;    
end
h2=hf2+(x2*(hg2-hf2));

% condensor exit
p3=p2;
t3=XSteam('Tsat_p',p3);
s3=XSteam('sL_p',p3);
h3=XSteam('hL_p',p3);
v3=XSteam('vL_p',p3);
t2=t3;

% boiler inlet
p4=p1; % constant pressure heat addition
s4=s3; %isentropic compression in the pump
h4=XSteam('h_ps',p4,s4);
cp4=XSteam('Cp_ps',p4,s4);
cv4=XSteam('Cv_ps',p4,s4);
g4=(cp4/cv4);
% calculation for t4
%p4^(1-gamma)*t4^gamma=p3^(1-gamma)*t3^gamma;
t4=(t3*((p3/p4)^((1-g4)/g4)));

% calculations
% work done by the turbine
Wt=h1-h2;

% work done by the pump
Wp=h4-h3;

% net work done
W_net=Wt-Wp;

% heat added in the boiler
q_in=h1-h4;

% heat rejected in the condensor
q_out=h2-h3;

%plotting the results

figure(1)

%plotting liquid and vapour curves
t=linspace(1,t1,1000);
for i=1:length(t)
    s_l(i)=XSteam('sL_T',t(i));
end

for i=1:length(t)
    s_v(i)=XSteam('sV_T',t(i));
end
 hold on
 plot(s_l,t,'linewidth',2);
 plot(s_v,t,'linewidth',2);
 grid on


% plotting for the work done by the tubrine(process 1-2)
plot([s1,s2],[t1,t2],'linewidth',2,'color','k')
hold on
title(' T-s Diagram of Ideal Rankine Cycle')
xlabel('Entropy(KJ/KgK)')
ylabel('Temperature(k)')

% Plotting for het rejected in condensor (Process 2-3)
plot([s2,s3],[t2,t3],'linewidth',2,'color','k')
hold on


% Plotting for work done by the pump (Process 3-4)/
plot([s3,s4],[t3,t4],'linewidth',2,'color','k')
hold on


% Plotting for heat added by the boiler(Process 4-1)
tp = XSteam('TSat_p',p4);
sp = XSteam('sL_T',tp);
plot([s4,sp],[t4,tp],'lineWidth',2,'color','k')
hold on

tq = tp;
sq = XSteam('sV_T',tq);
plot([sp,sq],[tp,tq],'lineWidth',2,'color','k')
hold on

plot([sq,s1],[tq,t1],'lineWidth',2,'color','k')
hold on

%Indicate states with numbers
text(s1,t1,' 1');
text(s2,t2,' 2');
text(s3,t3,' 3');
text(s4,t4,' 4');

%Plot for enthalpy vs entropy
figure(2)

plot([s1,s2],[h1,h2],'lineWidth',2,'color','k')
grid on
title('h-s DIAGRAM')
xlabel('Entropy(KJ/kgK)')
ylabel('Enthalpy(KJ/kg)')
hold on

plot([s2,s3],[h2,h3],'lineWidth',2,'color','k')
hold on
plot([s3,s4],[h3,h4],'lineWidth',2,'color','k')
hold on
plot([s4,s1],[h4,h1],'lineWidth',2,'color','k')

%plot for liqiuid and vapour saturation curve

t = linspace(1,t1,1000);
for j = 1:length(t)
    h_l(j) = XSteam('hL_T',t(j));
end

for j = 1:length(t)
    h_v(j) = XSteam('hV_T',t(j));
end

plot(s_l,h_l,'lineWidth',2,'color','r')
hold on
plot(s_v,h_v,'lineWidth',2,'color','r')

%Indicate states with numbers
text(s1,h1,'1');
text(s2,h2,'2');
text(s3,h3,'3');
text(s4,h4,'4');

%Results output

fprintf('%40s \n \n \n','RESULT');
fprintf('%10s %54s \n','At State Point 1','At State Point 2');
fprintf('%s %.2f%s %44s %.2f%s \n','P1:',p1,' bar','P2:',p2,' bar');
fprintf('%s %.2f%s %35s %.2f%s \n','T1:',t1,' Deg Celcius','T2:',t2,' Deg Celcius');
fprintf('%s %.2f%s %40s %.2f%s \n','H1:',h1,' KJ/kg','H2:',h2,' KJ/kg');
fprintf('%s %.2f%s %42s %.2f%s \n','S1:',s1,' KJ/kgK','S2:',s2,' KJ/kgK');
fprintf('%58s %.2f \n \n','X2:',x2);
fprintf('%10s %54s \n','At State Point 3','At State Point 4');
fprintf('%s %.2f%s %45s %.2f%s \n','P3:',p3,' bar','P4:',p4,' bar');
fprintf('%s %.2f%s %35s %.2f%s \n','T3:',t3,' Deg Celcius','T4:',t4,' Deg Celcius');
fprintf('%s %.2f%s %41s %.2f%s \n','H3:',h3,' KJ/kg','H4:',h4,' KJ/kg');
fprintf('%s %.2f%s %42s %.2f%s \n \n','S3:',s3,' KJ/kgK','S4:',s4,' KJ/kgK');

fprintf('%40s %.2f %s \n','Work output by Turbine(Wt): ',Wt,' KJ/kg');
fprintf('%40s %.2f %s \n','Work input by Pump(Wp): ',Wp,' KJ/kg');
fprintf('%40s %.2f %s \n','Net Work(Wnet): ',W_net,' KJ/kg');
fprintf('%40s %.2f %s \n','Thermodynamic Efficiency(Ntherm): ',(W_net/q_in)*100,'Percent');
fprintf('%40s %.2f %s \n','Heat input in Boiler: ',q_in,' KJ/kg');
fprintf('%40s %.2f %s \n','Heat rejected in condenser: ',q_out,' KJ/kg');
fprintf('%40s %.2f %s \n','S.S.C.: ',p3,' Kg/kWh');

OUTPUT:

Inputs:

Turbine Inlet temperature = 400° C

Turbine Inlet Pressure = 30 bars

Turbine Outlet Pressure = 0.05 bars

Command window:

Figure 1:

Figure 2:

REFERENCE:

Thermodynamic textbooks.

http://www.thermopedia.com/content/1072/

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.