Sunday, October 14, 2012

Analysis of a Vapor Power Plant

Analysis of a Vapor Power Plant


8/20/96
ME1361 Thermo II

3.0 Abstract
The objective of this study is to construct a computer model of a water vapor power plant. This model will be used to calculate the state properties at all points within the cycle. Included is an analysis of the ideal extraction pressures based on the calculated values of net work, energy input, thermal efficiency, moisture content, and effectiveness.
4.0 Body
4.1 Introduction
System to be Analyzed
Steam enters the first turbine stage at 120 bar, 520 C and expands in three stages to the condenser pressure of .06 bar. Between the first and second stage, some steam is diverted to a closed feedwater heater at P1, with saturated liquid condensate being pumped ahead into the boiler feedwater line. The Terminal Temperature Difference of the feedwater heater is 5C. The rest of the steam is reheated to 500C, and then enters the second stage of expansion. Part of the steam is extracted between the second and third stages at P2 and fed into an open feedwater heater operating at that pressure. Saturated liquid at P2 leaves the open feedwater heater. The efficiencies of all pumps are 80%, and the efficiencies of all turbines are 85%.

Throughout this report the states will be referenced as depicted above with the numbers 1-13.
The analysis of the system will involve the use of the Energy Rate Balance to isolate the specific enthalpies and associated values of temperature, pressure, specific volume, and steam quality. The Entropy balance equation will be used to calculate the specific entropy at all the above noted states.
Energy Rate Balance (assume KE&PE=0)
dEcv/dt = Qcv-Wcv+Smi(hi) - Sme(he)

Entropy Rate Balance
dScv/dt = SQj/Tj + Smi(si) - Sme(se) + scv

For simplicity, it is assumed in all calculations that kinetic and potential energy have a negligible effect. It is also assumed that each component in the cycle is analyzed as a control volume at steady state; and that each control volume suffers from no stray heat transfer from any component to its surroundings. The steam quality at the turbine exits will also be constrained to values greater than or equal to 90% (Moran, 337).
4.2 Code Development
The C program finalproject.c was developed to calculate the state values given the constraints listed in section 4.1. The program structure consists of three parts:
Header/variable declaration
Calculation section
Data Report section
The Header section includes all the variable declarations, functions to include and system definitions. To obtain accurate data values, this program uses floating point values. The Calculation section is the function that is used to calculate all the state values. In essence this section consists of two nested while() loops that are used to vary the extraction pressures from 12000 kPa to 300 kPa. The while loops are set to terminate when the steam quality becomes less than 90% as defined in the constraints in 4.1. The Data Reporting section is found within the nested while() loops and are used to report the values found in the preceding Calculation section.
4.3 Results and Discussion
T-s diagram

The T-s diagram above shows how specific entropy changes related to temperature. At State 1 the water vapor has just left the boiler and is superheated. It then undergoes an expansion through the turbine. Since the efficiency of the turbine is not 100% the entropy increases and is denoted by the point labeled 2. During the reheat the pressure remains constant but the entropy increases to point 3. Then another two expansions occurs and the fluid reaches state 4 and 5 respectively. The fluid then condenses at constant pressure to a saturated liquid at state 6. The working fluid then enters a pump of efficiency 80% to state 7. The fluid is then heated in an open feedwater heater at constant pressure until it is a saturated liquid at state 8. The fluid is then sent through a pump to a pressure equal to that at state 1 at point 9. The closed feedwater heater, heats the fluid at constant pressure to state 10; and then is heated again by the mixing with the feedwater at state 13. The fluid is then heated back to point 1 in the boiler.
To find the optimum extraction pressure it is necessary to analyze the net work, energy input, thermal efficiency and moisture content at various extraction pressures. These results can be found in the appendix and graphed on the following pages. In Plot of Net Work as a Function of Extraction Pressure P2,P4 it is evident that net work is maximized when extraction pressure, P2 is 300 kPa and pressure P4 is 100 kPa. The corresponding minimum value occurs when P2 is 3100 kPa, and P4 is 100 kPa. In the following graph the total energy input to the system is plotted as a function of extraction pressure. The minimum value is obtained when P4 is 100 kPa and P2 is 3100 kPa. However, it is noteworthy to observe that for all values of P2 the energy input is minimized when P4 is 100 kPa. In Plot of Thermal Efficiency as a Function of Extraction Pressure P2,P4, the thermal efficiency is maximized when P4 is 100 kPa and P2 is 300 kPa. This corresponds directly to the results obtained for the net work of the cycle. The moisture content at the exit of the third stage turbine can then be analyzed to see which extraction pressure combination will be less damaging to the system. The graph shows that the value of steam quality is maximized when P4 is 100 kPa and P2 is 300 kPa. From this it can be concluded that an extraction pressure of P4 equal to 100 kPa and P2 equal to 300 kPa would be optimal for cycle performance. Not only is net work maximized, but damage to system components is minimized by having a high steam quality in the turbine. For this, energy input to the system is sacrificed, however the net result is a more efficient and maintenance free power plant.

5.0 Conclusion
The computer model of the vapor power plant was used to construct a table of data corresponding to every state of the system cycle. Using this data, an optimal solution could be found for a combination of extraction pressures that optimizes the performance of the power plant. In particular a solution was found that maximized net work and efficiency while minimizing the need for equipment replacement. The graphs of net work, thermal efficiency and moisture content versus extraction pressure, depict this contrast in values.


#include "h2osuperc.c"
#include "h2osaturc.c"
#include <stdio.h>
#include <stdlib.h>
#include <float.h>
#include <math.h>

#define P1 12000 /* kPa */
#define T1 793.15 /* degrees Kelvin */
#define T3 773.15 /* degrees Kelvin */
#define P5 6 /* kPa */
#define EFF_TURB .85 /* Isentropic Turbine Efficiency */
#define EFF_PUMP .8 /* Isentropic Pump Efficiency */
#define MIN_QUALITY .9 /* Lowest allowable Turbine Exit Quality */
#define INCREMENT 100 /* kPa */
#define TTD 5.0 /* degrees Celsius */
#define C 4.179 /* specific heat */
#define T_ENV 293.15 /* Environment temp, deg. Kelvin */
#define T_BOUND 1123.15 /* Boundary temp, deg. Kelvin */

void main()
{
/*** FUNCTION DECLARATION ***/
float h2osuper(int,float,float,int);
float h2osatur(int,float,int);

/*** VARIABLE DECLARATION ***/
float h1, s1, v1, t1, p1;
float p2, t2, s2, h2, h2s, x2, hg2, hf2, s2s, sf2, sg2, vf2, vg2, v2;
float p3, s3, h3, v3, t3;
float p4, t4, s4, h4, h4s, x4, s4s, sf4, sg4, hf4, hg4, vf4, vg4, v4;
float t5, s5, h5, h5s, s5s, sf5, sg5, x5, hf5, hg5, p5, vf5, vg5, v5;
float p6, t6, s6, h6, h6s, v6;
float p7, t7, s7, h7, h7s, v7;
float p8, t8, s8, h8, h8s, v8;
float p9, t9, s9, h9, h9s, v9;
float p10, t10, s10, h10, h10s, hf10, vf10, v10;
float p11, t11, s11, h11, h11s, v11;
float p12, h12, t12, v12, s12;
float p13, h13, t13, v13, s13;
float y2, y1, psat, w_turb_1, w_turb_2, w_turb_3;
float w_pump_1, w_pump_2, w_pump_3, w_turb_total, w_pump_total;
float w_net, q_boiler, q_reheat, thermal_eff, irrev;

/* OPEN A FILE FOR DATA */
FILE *fp;
fp=fopen("/bitbucket/ashoemak/proj.out","w");
fprintf(fp, "|______________________STATE_1______________________");
fprintf(fp, "|________________________STATE_2____________________________");
fprintf(fp, "|______________________STATE_3______________________|");
fprintf(fp, "|________________________STATE_4____________________________");
fprintf(fp, "|________________________STATE_5____________________________");
fprintf(fp, "|______________________STATE_6______________________|");
fprintf(fp, "|______________________STATE_7______________________|");
fprintf(fp, "|______________________STATE_8______________________|");
fprintf(fp, "|______________________STATE_9______________________|");
fprintf(fp, "|______________________STATE_10_____________________|");
fprintf(fp, "|______________________STATE_11_____________________|");
fprintf(fp, "|______________________STATE_12_____________________|");
fprintf(fp, "|______________________STATE_13_____________________|");
fprintf(fp, "|______________________Misc_Data____________________|\n");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) | x ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) | x ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) | x ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| T(C) | P(kPa) | v(m^3/kg) | h(kj/kg) | s(kj/kg-K) ");
fprintf(fp, "| W_T1 | W_T2 | W_T3 | W_P1 | W_P2 | W_P3 | WTT | WPT | Wnet | q_b | q_r | T_eff | Irrev. |\n");
fclose(fp);

p2 = P1;
x2 = 1;
x4 = 1;
x5 = 1;
s2 = 0;
s4 = 0;

while( x2 >= MIN_QUALITY )
{

/*** TURBINE INLET ***/
p1=P1;
h1 = h2osuper(12,T1,P1,4);
s1 = h2osuper(12,T1,P1,5);
v1 = h2osuper(12,T1,P1,3);
t1 = T1-273.15;

h2s = h2osuper(25,p2,s1,4);
if (h2s == 0)
{
s2s = s1;
sf2 = h2osatur(2,p2,7);
sg2 = h2osatur(2,p2,8);
x2 = (s2s-sf2)/(sg2-sf2);
if(x2 < MIN_QUALITY || p2 <= 0)
{
break;
}
hf2 = h2osatur(2,p2,5);
hg2 = h2osatur(2,p2,6);
h2s = hf2 + x2*(hg2-hf2);
h2 = h1 - (EFF_TURB*(h1 - h2s));
s2 = ((sg2-sf2)/(hg2-hf2)*(h2-hf2)) + sf2;
t2 = h2osatur(2,p2,1)-273.15;
vf2 = h2osatur(2,p2,3);
vg2 = h2osatur(2,p2,4);
v2 = ((vg2-vf2)/(hg2-hf2)*(h2-hf2)) + vf2;
}
else
{
h2= h1-(EFF_TURB*(h1-h2s));
s2= h2osuper(24,p2,h2,5);
t2= h2osuper(24,p2,h2,1);
v2= h2osuper(24,p2,h2,3);
}

p3 = p2;
h3 = h2osuper(12,T3,p3,4);
s3 = h2osuper(12,T3,p3,5);
v3 = h2osuper(12,T3,p3,3);
t3 = T3-273.15;

x5=1;
x4=1;
p4=p3;
while( x4 >= MIN_QUALITY )
{
h4s = h2osuper(25,p4,s3,4);
if (h4s == 0)
{
s4s = s3;
sf4 = h2osatur(2,p4,7);
sg4 = h2osatur(2,p4,8);
x4 = (s4s-sf4)/(sg4-sf4);
if(x4 < MIN_QUALITY || p4 <= 0)
{
goto a1;
}
hf4 = h2osatur(2,p4,5);
hg4 = h2osatur(2,p4,6);
h4s = hf4 + x4*(hg4-hf4);
h4 = h3 - (EFF_TURB*(h3 - h4s));
s4 = ((sg4-sf4)/(hg4-hf4)*(h4-hf4)) + sf4;
t4 = h2osatur(2,p4,1);
vf4 = h2osatur(2,p4,3);
vg4 = h2osatur(2,p4,4);
v4 = ((vg4-vf4)/(hg4-hf4)*(h4-hf4)) + vf4;
}
else
{
h4= h3-(EFF_TURB*(h3-h4s));
s4= h2osuper(24,p4,h4,5);
t4= h2osuper(24,p4,h4,1);
v4= h2osuper(24,p4,h4,3);
}

/* THIRD TURBINE */
p5=P5;
printf("***\n");
h5s = h2osuper(25,P5,s4,4);
printf("***\n");
if (h5s == 0)
{
s5s = s4;
sf5 = h2osatur(2,P5,7);
sg5 = h2osatur(2,P5,8);
x5 = (s5s-sf5)/(sg5-sf5);
printf("x5 = %f\n",x5);
printf("p2= %f\tp4= %f\n",p2,p4);
if(x5 < MIN_QUALITY || p5 <= 0)
{
goto a2;
}
hf5 = h2osatur(2,P5,5);
hg5 = h2osatur(2,P5,6);
h5s = hf5 + x5*(hg5-hf5);
h5 = h4 - (EFF_TURB*(h4 - h5s));
s5 = ((sg5-sf5)/(hg5-hf5)*(h5-hf5)) + sf5;
t5 = h2osatur(2,P5,1);
printf("t5 = %f\n",t5);
vf5 = h2osatur(2,P5,3);
vg5 = h2osatur(2,P5,4);
v5 = ((vg5-vf5)/(hg5-hf5)*(h5-hf5)) + vf5;
}
else
{
h5= h4-(EFF_TURB*(h4-h5s));
printf("h5 = %f\n",h5);
printf("h5s = %f\n", h5s);
printf("h4 = %f\n",h4);
s5= h2osuper(24,P5,h5,5);
t5= h2osuper(24,P5,h5,1);
printf("t5 = %f\n",t5);
v5= h2osuper(24,P5,h5,3);
}

/* CONDENSER */
p6=P5;
h6=h2osatur(2,p6,5);
s6=h2osatur(2,p6,7);
v6=h2osatur(2,p6,3);
t6=h2osatur(2,p6,1);

/* PUMP 1 EXIT */
p7=p4;
h7=h6+((v6*(p7-p6))/EFF_PUMP);
t7=h2osatur(5,h7,1);
v7=h2osatur(1,(t7+273.15),3);
s7=(C*log((273.15+t7)/(273.15+t6)))+s6; /* page 213 */

/* OPEN FEEDWATER EXIT */
p8=p4;
h8=h2osatur(2,p8,5);
s8=h2osatur(2,p8,7);
v8=h2osatur(2,p8,3);
t8=h2osatur(2,p8,1);

/* PUMP 2 EXIT */
p9=P1;
h9=h8+((v8*(p9-p8))/EFF_PUMP);
t9=h2osatur(5,h9,1);
v9=h2osatur(1,(t9+273.15),3);
s9=(C*log((273.15+t9)/(273.15+t8)))+s8; /* page 213 */

/* CLOSED FEEDWATER HEATER EXIT-CONDENSATE */
p11=p2;
h11=h2osatur(2,p11,5);
s11=h2osatur(2,p11,7);
v11=h2osatur(2,p11,3);
t11=h2osatur(2,p11,1);

/* CLOSED FEEDWATER HEATER EXIT */
t10=t11-TTD;
p10=P1;
psat=h2osatur(1,t10+273.15,2);
hf10=h2osatur(2,p10,5);
vf10=h2osatur(2,p10,3);
h10=hf10+(vf10*(p10-psat));
s10=(C*log((273.15+t10)/(273.15+t9)))+s9;
v10=-1;

/* EXIT PUMP 3 */
p12=P1;
h12=h11+((v11*(p12-p11))/EFF_PUMP);
t12=h2osatur(5,h12,1);
v12=h2osatur(1,(t12+273.15),3);
s12=(C*log((273.15+t12)/(273.15+t11)))+s11; /* page 213 */

/* CALCULATE Y-VALUES */
y1=(h10-h9)/(h2-h11);
y2=(h8-h7+(y1*h7))/(h4-h7);

/* BOILER INLET */
p13=P1;
h13=((1-y1-y2)*h10)+(h12*y1);
t13=h2osatur(5,h13,1);
v13=h2osatur(1,(t13+273.15),3);
s13=-1;

/* PUMP & TURBINE WORK */
w_turb_1=(h1-h2);
w_turb_2=((1-y1)*(h3-h4));
w_turb_3=((1-y1-y2)*(h4-h5));
w_pump_1=((1-y1-y2)*(h7-h6));
w_pump_2=((1-y1)*(h9-h8));
w_pump_3=(y1*(h12-h11));
w_turb_total=(w_turb_1+w_turb_2+w_turb_3);
w_pump_total=(w_pump_1+w_pump_2+w_pump_3);
w_net=(w_turb_total-w_pump_total);
q_boiler=(h1-h13);
q_reheat=((1-y1)*(h3-h2));
thermal_eff=(w_net/(q_boiler+q_reheat));
irrev=((1.0-(T_ENV/T_BOUND))*(q_boiler+q_reheat))-w_net+((h1-h13)-(T_ENV*(s1-s13)));

/* PRINT OUTPUT */
fp=fopen("/bitbucket/ashoemak/proj.out", "a");
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t1,p1,v1,h1,s1);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f | %.4f ",t2,p2,v2,h2,s2,x2);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t3,p3,v3,h3,s3);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f | %.4f ",t4,p4,v4,h4,s4,x4);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f | %.4f ",t5,p5,v5,h5,s5,x5);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t6,p6,v6,h6,s6);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t7,p7,v7,h7,s7);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t8,p8,v8,h8,s8);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t9,p9,v9,h9,s9);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t10,p10,v10,h10,s10);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t11,p11,v11,h11,s11);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t12,p12,v12,h12,s12);
fprintf(fp, "|%.1f | %.0f | %.7f | %.3f | %.8f ",t13,p13,v13,h13,s13);
fprintf(fp, "|%f |%f |%f |%f |%f |%f |%f |%f |%f |%f |%f |%f |%f |\n",w_turb_1,w_turb_2,w_turb_3,w_pump_1, w_pump_2, w_pump_3, w_turb_total, w_pump_total,w_net, q_boiler, q_reheat, thermal_eff,irrev);
fclose(fp);

printf("p2= %f\tp4= %f\n",p2,p4);

a2: p4 = p4 - INCREMENT;
}

a1: p2 = p2 - INCREMENT;
}
}

No comments:

Post a Comment