Chapter 9 - Properties of the pure substance

Example 1 - Pg 194

In [1]:
#calculate the internal energy of the system.
#Initialization of variables
T=32. #F
m=1 #lbm
J=778.16
#calculations
print '%s' %("From steam tables,")
hf=0 
p=0.08854 #psia
vf=0.01602 #ft^3/lbm
u=hf-p*144*vf/J
#results
print '%s %.7f %s' %("Internal energy =",u,"Btu/lbm")
From steam tables,
Internal energy = -0.0002625 Btu/lbm

Example 2 - Pg 194

In [2]:
#calculate the change in entropy of the process
#Initialization of variables
P=40. #psia
#calculations
print '%s' %("from steam tables,")
hf=200.8 #Btu/lbm
hg=27 #Btu/lbm
T=495.  #R
ds=(hf-hg)/T
#results
print '%s %.3f %s' %("Change in entropy =",ds,"Btu/lbm R")
from steam tables,
Change in entropy = 0.351 Btu/lbm R

Example 3 - Pg 194

In [3]:
#calculate the specific enthalpy of the mixture
#Initialization of variables
x=0.35
T=18. #F
#calculations
print '%s' %("From table B-14,")
hf=12.12 #Btu/lbm
hg=80.27 #Btu.lbm
hfg=-hf+hg
h=hf+x*hfg
#results
print '%s %.1f %s' %("specific enthalpy =",h,"Btu/lbm")
From table B-14,
specific enthalpy = 36.0 Btu/lbm

Example 4 - Pg 194

In [4]:
#calculate the heat required for the process
#Initialization of variables
x=0.35
T=18. #F
T2=55.5 #F
#calculations
print '%s' %("From table B-14,")
hf=12.12 #Btu/lbm
hg=80.27 #Btu.lbm
hfg=-hf+hg
h=hf+x*hfg
h2=85.68 #Btu/lbm
dh=h2-h
#results
print '%s %.2f %s' %("Heat required =",dh,"Btu/lbm")
From table B-14,
Heat required = 49.71 Btu/lbm

Example 5 - Pg 194

In [5]:
#calculate the enthalpy given out and the quality of the gas
#Initialization of variables
P=1460. #psia
T=135. #F
P2=700. #psia
#calculations
print '%s' %("From mollier chart,")
h=120 #Btu/lbm
x=0.83
#results
print '%s %d %s' %("enthalpy =",h," Btu/lbm")
print '%s %.2f' %("\n Qulaity = ",x)
From mollier chart,
enthalpy = 120  Btu/lbm

 Qulaity =  0.83

Example 6 - Pg 195

In [6]:
#calculate the heat transferred in the process
#Initialization of variables
m=1 #lbm
P1=144. #psia
P2=150. #psia
T1=360. #F
J=778.16
#calculations
print '%s' %("From table 3,")
v1=3.160 #ft^3/lbm
h1=1196.5 #Btu/lbm
u1=h1-P1*144*v1/J
h2=1211.4 #Btu/lbm
u2=h2-P2*144*v1/J
dq=u2-u1
#results
print '%s %.1f %s' %("Heat transferred =",dq," Btu/lbm")
From table 3,
Heat transferred = 11.4  Btu/lbm

Example 7 - Pg 195

In [1]:
#calculate the work required, reversible work and the work done in compression 
#Initialization of variables
T1=100 #F
P2=1000. #psia
x=0.6
J=778.16
tir=2 
P1=0.9 #psia
#calculations
print '%s' %("From table 3,")
hf=67.97
htc=2.7
hpc=0.32
h1=67.97
dv=0.000051
v=0.01613
h2=hf+htc+hpc
wrev=h1-h2
wact=wrev/x
dt=hpc+tir
t2act=T1+dt
wrev2=-v*144*(P2-P1)/J
dw=(P1+P2)/2. *dv *144/J
#results
print '%s %.2f %s' %("Work required =",wact," Btu/lbm")
print '%s %.2f %s' %("\n reversible work done =",wrev2," Btu/lbm")
print '%s %.4f %s' %("\n Work done in compression =",dw,"Btu/lbm")
print '%s' %("The answers are a bit different due to rounding off error in textbook")
From table 3,
Work required = -5.03  Btu/lbm

 reversible work done = -2.98  Btu/lbm

 Work done in compression = 0.0047 Btu/lbm
The answers are a bit different due to rounding off error in textbook

Example 8 - Pg 196

In [8]:
#calculate the heat transferred in the process
#Initialization of variables
pa=1000. #atm
ta=100. #F
#calculations
hf=67.97 #Btu/lbm
w=3 #Btu/lbm
ha=hf+w
print '%s' %("from steam table 2,")
hc=1191.8 #Btu/lbm
qrev=hc-ha
#results
print '%s %.1f %s' %("Heat transferred =",qrev,"Btu/lbm")
from steam table 2,
Heat transferred = 1120.8 Btu/lbm

Example 10 - Pg 197

In [9]:
#calculate the work done and final pressure
#Initialization of variables
P1=144 #psia
T1=400 #F
y=0.7
#calculations
print '%s' %("From steam tables,")
h1=1220.4 #Btu/lbm
s1=1.6050 #Btu/lbm R
s2=1.6050 #Btu/lbm R
P2=3 #psia
sf=0.2008 #Btu/lbm R
sfg=1.6855 #Btu/lbm R
x=(s1-sf)/sfg
hf=109.37 #Btu/lbm
hfg=1013.2 #Btu/;bm
h2=hf+x*hfg
work=h1-h2
dw=y*work
h2d=h1-dw
#results
print '%s %d %s' %("Work done =",work,"Btu/lbm")
print '%s %.1f %s' %("\n work done in case 2 =",dw,"Btu/lbm")
print '%s %d %s' %("\n Final state pressure =",P2,"psia")
From steam tables,
Work done = 266 Btu/lbm

 work done in case 2 = 186.8 Btu/lbm

 Final state pressure = 3 psia

Example 11 - Pg 200

In [10]:
#calculate the quality of wet steam
#Initialization of variables
pb=14.696 #psia
pa=150 #psia
tb=300 #F
#calculations
print '%s' %("From steam tables,")
hb=1192.8 #Btu/lbm
ha=hb
hf=330.51 #Btu/lbm
hfg=863.6 #Btu/lbm
x=(ha-hf)/hfg*100
#results
print '%s %.1f %s' %("Quality of wet steam =",x,"percent")
From steam tables,
Quality of wet steam = 99.8 percent

Example 12 - Pg 204

In [11]:
#calculate the thermal and furnace efficiencies
#Initialization of variables
p1=600 #psia
p2=0.2563 #psia
t1=486.21 #F
t2=60 #F
fur=0.75
#calculations
print '%s' %("from steam tables,")
h1=1203.2
hf1=471.6
hfg1=731.6
h2=1088
hf2=28.06
hfg2=1059.9
s1=1.4454
sf1=0.6720
sfg1=0.7734
s2=2.0948
sf2=0.0555
sfg2=2.0393
xd=(s1-sf2)/sfg2
hd=hf2+xd*hfg2
xa=0.3023
ha=hf2+xa*hfg2
wbc=0
wda=0
wcd=h1-hd
wab=ha-hf1
W=wab+wcd+wbc+wda
Wrev=hfg1- (t2+459.7)*sfg1
etat=(t1-t2)/(t1+459.7)*100
eta=fur*etat
#results
print '%s %d %s' %("Thermal efficiency =",etat,"percent")
print '%s %.1f %s' %("\n Furnace efficiency =",eta,"percent")
from steam tables,
Thermal efficiency = 45 percent

 Furnace efficiency = 33.8 percent

Example 13 - Pg 204

In [12]:
#calculate the thermal and overall efficiencies
#Initialization of variables
dhab=-123.1
etac=0.5
ha=348.5
etaf=0.75
eta=0.85
hf=471.6
hfg=731.6
hc=1203.2
dhcd=452.7
#calculations
dwabs=dhab/etac
hbd=ha-dwabs
dwcds=dhcd*eta
dqa=hc-hbd
etat=(dwcds+dwabs)/dqa*100
eta=etat*etaf
#results
print '%s %.1f %s' %("Thermal efficiency =",etat,"percent")
print '%s %.1f %s' %("\n Overall efficiency =",eta,"percent")
Thermal efficiency = 22.8 percent

 Overall efficiency = 17.1 percent

Example 14 - Pg 205

In [13]:
#calculate the thermal and overall efficiencies
#Initialization of variables
t=60 #F
J=778.16
p1=600 #psia
p2=0.2563 #psia
etaf=0.85 
#calculations
print '%s' %("From steam tables,")
vf=0.01604 #ft^3/lbm
dw=-vf*(p1-p2)*144/J
ha=28.06 #Btu/lbm
hb=29.84 #Btu/lbm
hd=1203.2 #Btu/lbm
he=750.5 #Btu/lbm
dqa=hd-hb
dqr=ha-he
dw=dqa+dqr
dwturb=hd-he
dwpump=ha-hb
etat=dw/dqa*100
eta=etat*etaf
#results
print '%s %.1f %s' %("Thermal efficiency =",etat,"percent")
print '%s %.1f %s' %("\n Overall efficiency =",eta,"percent")
    
From steam tables,
Thermal efficiency = 38.4 percent

 Overall efficiency = 32.7 percent

Example 15 - Pg 206

In [14]:
#calculate the thermal and overall efficiencies
#Initialization of variables
dhab=-1.78
etac=0.5
ha=28.06
eta=0.85
hf=471.6
hfg=731.6
hd=1203.2
dhcd=452.7
#calculations
dwabs=dhab/etac
hbd=ha-dwabs
dwcds=dhcd*eta
dqa=hd-hbd
etat=(dwcds+dwabs)/dqa*100
eta=etat*eta
#results
print '%s %.1f %s' %("Thermal efficiency =",etat,"percent")
print '%s %.1f %s' %("\n Overall efficiency =",eta,"percent")
Thermal efficiency = 32.5 percent

 Overall efficiency = 27.7 percent

Example 16 - Pg 207

In [15]:
#calculate the coefficient of performance, hp required, work of compression and expansion
#Initialization of variables
Ta=500. #R
Tr=540. #R
#calculations
cop=Ta/(Tr-Ta)
hp=4.71/cop
print '%s' %("From steam tables,")
ha=48.02
hb=46.6
hc=824.1
hd=886.9
Wc=-(hd-hc)
We=-(hb-ha)
#results
print '%s %.1f' %("Coefficient of performance = ",cop)
print '%s %.3f %s' %("\n horsepower required per ton of refrigeration =",hp,"hp/ton refrigeration")
print '%s %.1f %s' %("\n Work of compression =",Wc,"Btu/lbm")
print '%s %.2f %s' %("\n Work of expansion =",We,"Btu/lbm")
From steam tables,
Coefficient of performance =  12.5

 horsepower required per ton of refrigeration = 0.377 hp/ton refrigeration

 Work of compression = -62.8 Btu/lbm

 Work of expansion = 1.42 Btu/lbm

Example 17 - Pg 209

In [16]:
#calculate the coefficient of performance
#Initialization of variables
x=0.8
he=26.28 #Btu/lbm
hb=26.28 #Btu/lbm
pe=98.76 #psia
pc=51.68 #psia
hc=82.71 #Btu/lbm
hf=86.80+0.95
#calculations
dwisen=-(hf-hc)
dwact=dwisen/x
hd=hc-dwact
cop=(hc-hb)/(hd-hc)
#results
print '%s %.2f' %("Coefficient of performance = ",cop)
Coefficient of performance =  8.96