In [1]:

```
#From the Steam Tables or Mollier chart in Appendix 3,we find that
hf = 340.49; #Unit:kJ/kg #at 50kPa #enthalpy
h1 = hf; #at 50kPa #hf = enthalpy of saturated liquid #Unit:kJ/kg
h4 = 3230.9; #Unit:kJ/kg #enthalpy
h5 = 2407.4; #Unit:kJ/kg # #enthalpy
#Here,point 5 is in the wet steam region.
print "Solution for a";
#Neglecting pump work (h2 = h1) gives
nR = (h4-h5)/(h4-h1); #Thermal efficiency of the cycle
print "The thermal efficiency of the cycle is %.2f percentage"%(nR*100);
print "Solution for b";
p2 = 3000; #Unit:kPa #Upper pressure
p1 = 50; #Unit:kPa #Lower pressure
vf = 0.001030; #Specific volume of saturated liquid #m**3/kg
Pumpwork = (p2-p1)*vf; #Unit:kJ/kg #pump work
#The efficiency of the cycle including pump work is
nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); #Thermal efficiency of the cycle
print "The thermal efficiency of the cycle including pump work is %.2f percentage"%(nR*100);
```

In [2]:

```
#Using the computer disk to obtain the neccesary properties
print "Solution for a";
#For the conditions given in problem8.1,the properties are found to be
hf = 340.49; #Unit:kJ/kg #at 50kPa #enthalpy
h1 = hf; #at 50kPa #hf = enthalpy of saturated liquid
h2 = h1; #Enthalpy #Unit:kJ/kg
h4 = 3230.9; #Unit:kJ/kg #enthalpy
h5 = 2407.4; #Unit:kJ/kg #enthalpy
#Neglecting pump work
nR = (h4-h5)/(h4-h2); #Thermal efficiency of the cycle
print "The thermal efficiency of the cycle is %.2f percentage"%(nR*100);
print "Solution for b";
#For the pump work,we do not need the approximation,because the computerized tables give us the necessary values directly.
#Assuming that the condensate leaving the condenser is saturated liquid gives us an enthalpy of 340.54 kJ/kg and an entropy of 1.0912 kJ/kg*K for an isentropic compression, the final cond-ition is the boiler pressure of 3Mpa and an entropy of 1.0912 kJ/kg*K. For these values,the program yields an enthalpy of 343.59 kJ/kg*K.The isentropic pump work is equal to
Pumpwork = 343.59-340.54; #Unit:kJ/kg #pumpwork
#The efficiency of the cycle including pump work is
nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); #Thermal efficiency of the cycle
print "The thermal efficiency of the cycle including pump work is %.2f percentage"%(nR*100);
#Final results in this problem agree with the result in problem8.1
```

In [4]:

```
#Solution for (a)
#Figurre 8.3 with the cycle extending into the superheat region and expanding along 4->5 is the appropriate diagram for this process.
print "Solution for b";
#This problem can be solved either by use of the Mollier chart or the Steam Tables.If the chart is used,14.696 psia is first located on the saturated vapor line.Because the expansion,4->5,is isentropic,a vertical line on the chart is the path of the process.The point corresponding to 4 in figure 8.3 is found where this vertical line intersects 400 psia.At this point,the ent-halpy is 1515 Btu/lbm,and the corresponding temperature is approximatelty 980F.Saturated vapor at 14.696 psia has an enthalpy of 1150.5 Btu/lbm(from the Mollier chart).The Steam Tables sh-ow that saturated liquid at 14.696 psia has an enthalpy of 180.15 Btu/lbm.In terms of figure 8.3,and neglecting pump work,we have
h1 = 180.15; #Unit:Btu/lbm #enthalpy
h2 = h1; #Enthalpy #Unit:Btu/lbm
h4 = 1515; #Unit:Btu/lbm #enthalpy
h5 = 1150.5; #Unit:kJ/kg #enthalpy
#Neglecting pump work yields
nR = (h4-h5)/(h4-h2); #Thermal efficiency of the cycle
print "Neglecting the pump work, The thermal efficiency of the cycle is %.2f percentage"%(nR*100);
p2 = 400; #Unit:Psia #Upper pressure
p1 = 14.696; #Unit:Psia #Lower pressure
vf = 0.01167; #Specific volume of saturated liquid #ft**3/lbm
J = 778; #Conversion factor
Pumpwork = ((p2-p1)*vf*144)/J; #Unit:Btu/lbm #1ft**2 = 144 in**2 #pumpwork
#The efficiency of the cycle including pump work is
nR = ((h4-h5)-Pumpwork)/((h4-h1)-Pumpwork); #Thermal efficiency of the cycle
print "The thermal efficiency of the cycle including pump work is %.2f percentage"%(nR*100);
#where the denominator is h4-h2 = h4-h1-(h2-h1).Neglecting pump work is obviously justified in this case.An alternative solution is obtained by Using the Steam Tables:at 14.696 psia ans sat-uration,sg = 1.7567 ; at 400 psia,s = 1.7567.From Table 3(at 400 psia)
# s h t
#1.7632 1523.6 1000
#1.7567 1514.2 982.4
#1.7558 1512.9 980
```

In [6]:

```
#Refer to figure8.3.The desired quantities are obtained as follows:
#at 14.696 psia,saturated vapor (x = 1),s = 1.7566 Btu/lbm*R
h5 = 1150.4; #Unit:Btu/lbm #enthaply
#at 14.696 psia,saturated liquid (x = 0),s = 0.3122 Btu/lbm*R
h2 = 180.17; #Unit:Btu/lbm #enthaply
h1 = h2;
#at 400 psia,s = 1.7566 Btu/lbm*R,
h4 = 1514.0; #Unit:Btu/lbm #Enthalpy
t = 982.07; #Unit:F #tempearature
#at 400 psia,s = 0.3122 Btu/lbm*R, #s = entropy
h = 181.39; #Unit:Btu/lbm #Enthalpy
#Note the agreement of these values with the ones obtained for problem8.4.Alos,note the temperature of 982.07F compared to 982.4F.Continuing,
#Neglecting pump work
nR = (h4-h5)/(h4-h2); #Thermal efficiency of the cycle
print "Neglecting the pump work, The thermal efficiency of the cycle is %.2f percentage"%(nR*100);
Pumpwork = h-h2; #Unit:kJ/kg #/pumpwork
#The efficiency of the cycle including pump work is
nR = ((h4-h5)-Pumpwork)/((h4-h2)-Pumpwork); #Thermal efficiency of the cycle
print "The thermal efficiency of the cycle including pump work is %.2f percentage"%(nR*100);
```

In [7]:

```
#The Carnot cycle would operate between 982.4F and 212F.
T1 = 982.4+460; #temperature converted to absolute temperature #Unit:R
T2 = 212+460; #temperature converted to absolute temperature #Unit:R
nc = ((T1-T2)/T1)*100; #Efficiency of carnot cycle
print "The efficiency is %.2f percentage"%(nc);
#In problem 8.3,
nR = 27.3; #Thermal efficiency of the cycle neglecting the pump work
typen = (nR/nc)*100; #Type efficiency = ideal thermal efficiency/efficiency of carnot cycle operating between min and max temperature limits
print "The type efficiency of the ideal Rankine cycle is %.2f percentage"%(typen);
```

In [8]:

```
#For the upper temperature of the cycle,we have 400C,and for 50kPa,the steam tables give us a saturation temperature of 81.33C.The efficiency of a Carnot cycle operating between the limits would be
T1 = 400+273; #Celcius temperature converted to fahrenheit temperature
T2 = 81.33+273; #temperature converted to fahrenheit temperature
nc = ((T1-T2)/T1)*100; #Efficiency of carnot cycle
print "The efficiency is %.2f percentage"%(nc);
#In problem 8.1,
nR = 28.5; #Thermal efficiency of the cycle neglecting the pump work
typen = (nR/nc)*100; #Type efficiency = ideal thermal efficiency/efficiency of carnot cycle operating between min and max temperature limits
print "The type efficiency of the ideal Rankine cycle is %.2f percentage"%(typen);
```

In [9]:

```
#From problem 8.3,
work = 1515-1150.5; #Unit:Btu/lbm of steam #pump work is neglected #Useful ideal work
#Because of the heat losses, 50 Btu/lbm of the 364.5 Btu/lbm becomes unavailable.
available = 364.5-50; #Unit:Btu/lbm
n = available/(1515-180.15); #Thermal efficiency of the cycle neglecting pump work h4 = 1515; #Unit:Btu/lbm #enthalpy & h1 = 180.15; #Unit:Btu/lbm #enthalpy
print "The thermal efficiency of the cycle neglecting pump work is %.2f percentage"%(n*100);
```

In [10]:

```
#Neglecting the pump work,we have
heatrate = 3413/0.273; #Unit:Btu/kWh #0.273 = efficiency #1 kWh = 3413 #heat rate
print "The heat rate is %.2f Btu/kWh"%(heatrate);
#Per pound of steam,1515-1150.5 = 364.5 Btu is delivered.
#Because 1 kWh = 3413
print "The steam rate is %.2f lbm of steam per kilowatt-hour"%(3413./1515-1150.5)
```

In [12]:

```
#The Mollier chart provides a convenient way of solving this problem.Expanding from 980F,400 psia,s = 1.7567 to 200 psia yields a final enthalpy of 1413 Btu/lbm.Expanding from 200 psia ans an enthalpy of 1515 Btu/lbm to 14.696 psia yields a final enthaply of 1205 Btu/lbm.
h4 = 1515; #Unit:Btu/lbm #enthalpy
h5 = 1205; #Unit:Btu/lbm #enthalpy
h7 = 1413; #Unit:Btu/lbm #enthalpy
h1 = 180.15; #Unit:Btu/lbm #enthalpy
nreheat = ((h4-h5)+(h4-h7))/((h4-h1)+(h4-h7)); #The efficiency of the reheat cycle
print "The efficiency of the reheat cycle is %.2f percentage"%(nreheat*100);
#It is apparent that for the conditions of this problem,the increase in efficiency is not very large.The final condition of the fluid after the second expansion is superheated steam at
#14.696 psia.By condenmath.sing at this relatively high pressure condition,a large amount of heat is rejected to the condenser cooling water.7
```

In [13]:

```
#Some of the property data required was found in problem8.4.In addition we have,
#at 200 psia,s = 1.7566 Btu/lbm*R,
h7 = 1413.6; #Unit:Btu/lbm #Enthalpy
#at 200 psia,s = 1.8320 Btu/lbm*R,
h4 = 1514.0; #Unit:Btu/lbm #Enthalpy
#at 14.696 psia,s = 1.8320 Btu/lbm*R,
h5 = 1205.2; #Unit:Btu/lbm #Enthalpy
h1 = 180.17; #Unit:Btu/lbm #enthalpy
# Calculations
#Using these data,
nreheat = ((h4-h5)+(h4-h7))/((h4-h1)+(h4-h7)); #The efficiency of the reheat cycle
# Results
print "The efficiency of the reheat cycle is %.2f percentage"%(nreheat*100);
```

In [15]:

```
print "Solution for a";
#For the rankine cycle,the Mollier chart gives
h4 = 1505; #Enthalpy #Unit:Btu/lbm
h5 = 922; #Enthalpy #Unit:Btu/lbm
h6 = h5; #Enthalpy #Unit:Btu/lbm
#and at the condenser,
h1 = 69.74; #enthalpy #Unit:Btu/lbm
nR = (h4-h5)/(h4-h1); #efficiency of rankine cycle
print "The efficiency of rankine cycle is %.2f percentage"%(nR*100);
print "Solution for b";
#Figure 8.16 shows the regenerative cycle.After doing work(isentropically),W lbs of steam are bled from the turbine at 50 psia for each lbm of steam leaving the steam generator,and (1-W) pound goes through the turbine and is condensed in the condenser to saturated liquid at 1 psia.This condensate is pumped to the heater,where it mixes with the extraced steam and leaves as saturated liquid at 50 psia.The required enthalpies are:
#Leaving turbine:
h5 = 1168; #Btu/lbm at 50 psia
#Leaving condenser:
h7 = 69.74; #Btu/lbm at 1 psia # is equal to h8 if pump work is neglected
#Leaving heater:
h1 = 250.24; #Btu/lbm at 50 psia #is equal to h2 if pump work is neglected(saturated liquid)
#A Heat balance around the heater gives
#W*h5 + (1-W)*h7 = 1*h1
W = ((1*h1)-h7)/(h5-h7); #Unit:lbm #W lb of steam
print "W = %.2f lbm"%(W);
work = (1-W)*(h4-922) + W*(h4-h5); #h5 = 922 from the mollier chart #Unit:Btu/lbm #The work output
print "The work output is %.2f Btu/lbm"%(work);
#Heat into steam generator equals the enthalpy leaving minus the enthalpy of the saturated liquid entering at 50 psia:
qin = h4-h1; #Unit:Btu/lbm #Heat in
n = work/qin; #Efficiency of regenerative cycle
print "The efficiency of regenerative cycle is %.2f percentage"%(n*100);
#The efficiency of a regenerative cycle with one open heater is given by
n = 1-(((h5-h1)*(h6-h7))/((h4-h1)*(h5-h7))); #efficiency of a regenerative cycle
W = (h1-h7)/(h5-h7); #Unit:lbm #W lb of steam
print "When the rankine cycle is compared with regenerative cycle"
print "W = %.2f lbm and the efficiency of a regenerative cycle with one open heater is given by %.2f percentage"%(W,n*100)
```

In [17]:

```
#Figure 8.16(a) shows the cycle.For this cycle,W2 pounds are extracted at 100 psia,and W1 pounds are extracted at 50 psia for each pound produced by the steam generator.The enthalpies that are required are:
#Leaving turbine: 922 #Btu/lbm at 1 psia
#Leaving condenser: 69.74 #Btu/lbm at 1 psia (saturated liquid)
#Leaving low pressure heater: 250.24 #Btu/lbm at 50 psia (saturated liquid)
#Leaving high pressure heater: 298.61 #Btu/lbm at 100 psia
#At low pressure extraction: 1168 #Btu/lbm at 50 psia
#At high pressure extraction: 1228.6 #Btulbm at 100 psia
#Entering turbine: 1505 #Btu/lbm
#The heat balance around the high pressure heater gives us
#W2*1228.6 + (1-W2)*250.24 = 1*298.61
W2 = ((1*298.61)-250.24)/(1228.6-250.24); #lbm #W2 pounds are extracted at 100 psia
print "W2 = %.2f lbm"%(W2);
#A heat balance around the low pressure heater yields
#W1*1168 + (1-W1-W2)*69.74 = (1-W2)*250.24
W1 = (((1-W2)*250.24)-69.74+(W2*69.74))/(1168-69.74); #lbm #W1 pounds are extracted at 50 psia
print "W1 = %.2f lbm"%(W1);
work = ((1505-1228.6)*1)+((1-W2)*(1228.6-1168))+((1-W1-W2)*(1168-922)); #The work output #Btu/lbm
print "The work output is %.2f Btu/lbm"%(work);
#Heat into the steam generator equals the enthalpy leaving minus the enthalpy of saturated liquid at 100 psia:
qin = 1505-298.61; #Btu/lbm #Heat in
print "Heat in = %.2f Btu/lbm"%(qin);
n = work/qin; #The efficiency
print "The efficiency is %.2f percentage"%(n*100);
#In terms of figure 8.16a,
#W2 = (h1-h11)/(h5-h11)
#W1 = (h5-h1/h6-h9)*(h10-h9/h5-h10) neglecting the pump work
#n = 1-(h7-h8/h4-h1)*(h5-h1/h5-h10)*(h6-h10/h6-h8)
#For this problem , h8 = h9 , h10 = h11 and h1 = h2.Thus
W2 = (298.61-250.24)/(1228.6-250.24); #lbm #W2 pounds are extracted at 100 psia
print "Comparing the results"
print "W2 = %.2f lbm"%(W2);
W1 = ((1228.6-298.61)*(250.24-69.74))/((1168-69.74)*(1228.6-250.24)); #lbm #W1 pounds are extracted at 50 psia
print "W1 = %.2f lbm"%(W1);
n = 1-(((922-69.74)*(1228.6-298.61)*(1168-250.24))/((1505-298.61)*(1228.6-250.24)*(1168-69.74))); #Efficiency
print "The efficiency is %.2f percentage"%(n*100);
```

In [18]:

```
#Regenerative cycle
#Assume that 1 lbm of steam leaves the steam generator and that W1 lbm is bled off to the closed heater at 100psia and that W2 lbm is bled off to the open heater at 50 psia.Alos,assume that the feedwater leaving the closed heater at 310F,18F less than the saturation temperature corresponding to 100 psia.For calculation purposes,we will use hf at 310 F for this enthalpy.Using the Mollier diagram and the steam tables,we find the following values of enthalpy:
#h to turbine = 1505 Btu/lbm(at 1000 psia and 1000F)
#h at first extraction = 1228 Btu/lbm(isentropically to 100 psia)
#h at second extraction = 1168 Btu/lbm(isentropically to 100 psia)
#h at turbine exit = 922 Btu/lbm (isentropically to 1 psia)
#hf = 298.61 Btu/lbm(at 100 psia)
#hf = 250.24 Btu/lbm(at 50 psia)
#hf = 280.06 Btu/lbm(at 310 F)
#hf = 69.74 Btu/lbm (at 1 psia)
#A heat balance around the high pressure heater gives us
#W1*(1228-298.61) = 1*(280.06-250.24)
W1 = ((1*(280.06-250.24)))/(1228-298.61); #lbm #W1 lbm is extracted at 100 psia
print "W1 = %.2f lbm"%(W1);
#A heat balance around the open heater gives us
#W2*1168 +(1-W1-W2)*69.74 + W1*268.61 = 1*250.24
W2 = ((1*250.24)-(W1*268.61)-69.74+(W1*69.74))/(1168-69.74); #lbm #W2 lbm is extracted at 50 psia
print "W2 = %.2f lbm"%(W2);
#The work output of the cycle consists of the work that 1 lbm does in expanding isentropically to 100 psia,plus the work done by (1-W1)lbm expanding isentropicaly from 100 to 50 psia,plus the work done by (1-W1-W2)lbm expanding isentropically from 50 to 1 psia.
#Numerically,the work is
workoutput = (1*(1505-1228))+((1-W1)*(1228-1168))+((1-W1-W2)*(1168-922)); #Btu/lbm #the work output
print "The work output is %.2f Btu/lbm"%(workoutput);
heatinput = 1505-280.06; #Btu/lbm #the heat input
print "The heat input is %.2f Btu/lbm"%(heatinput);
n = workoutput/heatinput; #Efficiency
print "The efficiency is %.2f percentage"%(n*100);
#When compared to 8.11,we conclude that the addition of additional closed heater raises the efficiency.
```

In [19]:

```
#From problem 8.11,
#Leaving turbine:
h5 = 1168.; #Btu/lbm at 50 psia
#For the rankine cycle,the Mollier chart gives
h4 = 1505.; #Enthalpy #Unit:Btu/lbm
h6 = 922.; #Enthalpy #Unit:Btu/lbm #h6 = h5;
#and at the condenser,
h1 = 69.74; #enthalpy #Unit:Btu/lbm
#Leaving condenser:
h7 = 69.74; #Btu/lbm at 1 psia # is equal to h8 if pump work is neglected
#Leaving heater:
h2 = 250.24; #Btu/lbm at 50 psia #is equal to h1 if pump work is neglected(saturated liquid)
#A Heat balance around the heater gives
#W*h5 + (1-W)*h7 = 1*h1
W = ((1*h2)-h7)/(h5-h7); #Unit:lbm
liquidleaving = (W*h2)+(1-W)*h1; #Btu/lbm #liquid leaving the heatexchange
#Using these data,,
heatin = h4-liquidleaving; #Btu/lbm #heat in the boiler
print "Heat in at boiler is %.2f Btu/lbm"%(heatin);
workout = ((1-W)*(h4-h6))+(W*(h4-h5)); #Btu/lbm #The work out of turbine
print "The work out of turbine is %.2f Btu/lbm"%(workout);
n = workout/heatin; #efficiency #The conventional thermal efficiency
print "The conventional thermal efficiency is %.2f percentage"%(n*100);
#If at this time we have define the efficiency of energy utilization to be the ratio of the work out plus the useful heat out divided by the heat input to the cycle, nenergyutilization = ((w+qoutuseful)/qin)*100
qout = W*(h5-h2); #heat out #Btu/lbm
n = (workout+qout)/heatin; #efficiency of energy utilization
print "Efficiency of energy utilization is %.2f percentage"%(n*100);
#Comparing with 8.11, we see that conventional thermal efficiency is decreased and efficiency of energy utilization is increased
```