Project 2 - Rankine cycle Simulator
AIM : To create a Rankine Cycle Simulator.
( Using Octave 4.0.0 GUI )
OBJECTIVE OF THE PROJECT:
Our main objective is to :
- To calculate the state points of the Rankine Cycle.
- To plot the corresponding T-s and h-s plots for the given set of inputs.
- To calculate net work output.
- To calculate back worl ratio.
ABOUT RANKINE CYCLE :
The Rankine cycle is used to predict the performance of steam turbine systems. It describes the process by which steam-operated heat engines commonly found in thermal power generation plants generate power.Power depends on the temperature difference between a heat source and a cold source. The higher the difference, the more mechanical power can be efficiently extracted out of heat energy, as per Carnot's Theorem.It was also used to study the performance of reciprocating steam engines. The Rankine cycle is a thermodynamics cycle of a heat engine that converts heat into mechanical work while undergoing phase change.
Rankine Cycle has basically four process they are :
- Process 1-2 - Isentropic Expansion in the Turbine.The dry saturated vapour expands through a turbine, generating power. This decreases the temperature and pressure of the vapour, and some condensation may occur.
- Process 2-3 - Constant Pressure Heat Rejection by the Condensor.The wet vapour then enters a condensor, where it is condensed at a constant pressure to become a saturated liquid.
- Process 3-4 - Compression Expansion in the Pump.The working fluid is pumped from low to high pressure. As the fluid is a liquid at this stage, the pump requires little input energy.
- Process 4-1 - Constant Pressure Heat Addition by the Boiler.The high-pressure liquid enters a boiler, where it is heated at constant pressure by an external heat source to become a dry saturated vapour.
Required Inputs:
Turbine Inlet temperature = 400° C (T1)
Turbine Inlet Pressure = 30 bars (P1)
Turbine Outlet Pressure = 0.05 bars = Condenser Inlet Pressure (P2)
XSteam link:
https://drive.google.com/file/d/1RK_fvrOj38CIaQvmLT1S3daqHnxKCGU-/view
Code for Rankine Simulator:
%Rankine Cycle Simulator
clear all
close all
clc
%Heading of the project
disp(" RANKINE CYCLE SIMULATOR \n ");
%Different process of the rankine Cycle
disp("Process 1-2 is Isentropic Expansion in the Turbine.");
disp("Process 2-3 is Constant Pressure Heat Rejection by the Condensor.");
disp("Process 3-4 is Compression Expansion in the Pump.");
disp("Process 4-1 is Constant Pressure Heat Addition by the Boiler.\n");
%Input pressure and temperature
P1 = input("Enter the Pressure at the turbine Inlet(in Bar): "); %Inlet pressure at state 1
T1 = input("Enter the Temperature at the Turbine Inlet(in Degree Celsius): "); %Inlet temperature at state 1
P2 = input("Enter the Pressure at the Condenser(in Bar): "); %Inlet pressure at state 2
%Value of different properties at four different states
%State 1
%Entropy
S1 = XSteam("s_pT",P1,T1); %s_pT = Specific entropy as a function of pressure and temperature (Returns saturated vapour enthalpy if mixture.)
S_liquid1 = XSteam("sL_p",P1); %sL_p = Saturated liquid entropy
S_vapour1 = XSteam("sV_p",P1); %sV_p = Saturated vapour entropy
%Enthalpy
H1 = XSteam("h_pT",P1,T1); %h_pT = Entalpy as a function of pressure and temperature.
H_liquid1 = XSteam("hL_p",P1); %hL_p = Saturated liquid enthalpy
H_vapour1 = XSteam("hV_p",P1); %hL_p = Saturated liquid enthalpy
%Temperature
T_sat1 = XSteam("Tsat_p",P1); %Tsat_p = Saturation temperature
%State 2
%Entropy
S2 = S1;
S_liquid2 = XSteam("sL_p",P2);
S_vapour2 = XSteam("sV_p",P2);
%Dryness Fraction
X = (S2-S_liquid2)/(S_vapour2-S_liquid2);
%Enthalpy
H_liquid2 = XSteam('hL_p',P2);
H_vapour2 = XSteam('hV_p',P2); %hV_T = Saturated vapour enthalpy.
H2 = H_liquid2 + X*(H_vapour2 - H_liquid2);
%Temperature
T2 = XSteam('T_ph',P2,H2); %T_ph = Temperture as a function of pressure and enthalpy.
T_sat2 = XSteam('Tsat_p',P2);
%State 3
P3 = P2;
T3 = T2;
H3 = H_liquid2;
S3 = S_liquid2;
%State 4
P4 = P1;
S4 = S3;
T4 = XSteam('T_ps',P4,S4); %T_ps = Temperture as a function of pressure and entropy.
H4 = XSteam('H_ps',P4,S4); %H_ps = Enthalpy as a function of pressure and entropy.
%Net work output
Work_turbine = H1 - H2;
Work_pump = H4 - H3;
Net_work_output = Work_turbine - Work_pump;
%Back work ratio
Back_Work_Ratio = Work_pump/Work_turbine;
%Results
disp("\n RESULTS \n ")
printf("%s%s%s\n","At state point 1:", " " ,"At state point 4: ");
printf("P1 is : %.2f Bar",P1);
printf(" P4 is : %.2f Bar \n",P4);
printf("T1 is : %.2f Deg Celsius",T1);
printf(" T4 is : %.2f Deg Celsius \n",T4);
printf("H1 is : %.2f kj/kg",H1);
printf(" H4 is : %.2f kj/kg \n",H4);
printf("S1 is : %.2f kj/kg-k",S1);
printf(" S4 is : %.2f kj/kg-k \n",S4);
printf("\nAt state point 2:");
printf(" Work of turbine is : %.2f kj/kg \n",Work_turbine);
printf("P2 is : %.2f Bar",P2);
printf(" Work of pump is : %.2f kj/kg \n",Work_pump);
printf("T2 is : %.2f Deg Celsius",T2);
printf(" Net work output is : %.2f kj/kg \n",Net_work_output);
printf("H2 is : %.2f kj/kg",H2);
printf(" Back Work Ratio is : %f \n",Back_Work_Ratio);
printf("S2 is : %.2f kj/kg-k \n",S2);
printf("\nAt state point 3: \n");
printf("P3 is : %.2f Bar \n",P3);
printf("T3 is : %.2f Deg Celsius \n",T3);
printf("H3 is : %.2f kj/kg \n",H3);
printf("S3 is : %.2f kj/kg-k \n",S3);
%plotting T-S curve for Rankine Simulator
temp = linspace(0,373.5,500);
figure(1)
hold on
for i = 1:length(temp)
plot(XSteam('sL_T',temp(i)),temp(i),'r.')
plot(XSteam('sV_T',temp(i)),temp(i),'r.')
end
plot([S1 S2],[T1 T2],'linewidth',2,'color','black')
text(S1,T1," 1 ",'FontSize',14)
if X>1
T3 = T_sat2;
plot([S2 S_G2 S3 S4],[T2 T_sat2 T3 T4],'linewidth',2,'color','black')
T2 = T_sat2;
text(S2,T2," 2 ",'FontSize',14)
text(S3,T3," 3 \n",'FontSize',14)
else
plot([S2 S3 S4],[T2 T3 T4],'linewidth',2,'color','black')
text(S2,T2," 2 ",'FontSize',14)
text(S3,T3," 3 \n",'FontSize',14)
end
x = linspace(T1,T2,500);
for i = 1:length(x)
plot(XSteam('s_pT',P1,x(i)),x(i),'.','linewidth',2,'color','black')
end
plot([S_liquid1 S_vapour1],[T_sat1 T_sat1],'linewidth',2,'color','black')
text(S_liquid1,T_sat1," 4 \n",'FontSize',14)
xlabel('Entropy(kJ/kg-K)')
ylabel('Temperature(k)')
title('T-S Graph')
%Plotting of H-S Curve
figure(2)
hold on
for i = 1:length(temp)
plot(XSteam('sL_T',temp(i)),XSteam('hL_T',temp(i)),'r.')
plot(XSteam('sV_T',temp(i)),XSteam('hV_T',temp(i)),'r.')
end
plot([S1 S2 S3 S4 S1],[H1 H2 H3 H4 H1],'linewidth',2,'color','black')
text(S1,H1," 1 ",'FontSize',14)
text(S2,H2," 2 ",'FontSize',14)
text(S3,H3," 3 ",'FontSize',14)
text(S4,H4," 4 ",'FontSize',14)
xlabel('Entropy(kJ/kg-K)')
ylabel('Enthalpy(kJ/kg)')
title('H-S Graph')
OUTPUT:
T-S plot:
H-S Plot:
ERROR:
1. State point for H-s plot were coinciding with each other and was corrected by giving space between the points.
2. Got zero 'Back work ratio' due to incorrect formula used.
CONCLUSION :
- From this program we have created the Rankine Simulator successfully.
- Plot of T-S and H-S was obtained successfully.
- Calculated state points successfully.