# Chapter 12 Non steady flow friction and availibility¶

## Ex:12.1 Pg:482¶

In :
#Initialization of variables
p1=100 #psia
p2=14.7 #psia
k=1.4
T1=700 #R
R=10.73/29
V=50
cv=0.171
cp=0.24
R2=1.986/29
#calculations
T2=T1/ (p1/p2)**((k-1)/k)
m1=p1*V/(R*T1)
m2=p2*V/(R*T2)
Wrev= cv*(m1*T1 - m2*T2) - (m1-m2)*(T2)*cp
#results
print "Work done in case 1 = %d Btu"%(Wrev)

Work done in case 1 = 572 Btu


## Ex:12.2 Pg:482¶

In :
from __future__ import division
from scipy import log
#Initialization of variables
p1=100 #psia
p2=10 #psia
n=1.3
T1=800 #R
cv=0.172
R=1.986/29
T0=537 #R
cp=0.24
#calculations
T2=T1*(p2/p1)**((n-1)/n)
dwir=cv*(T1-T2)
dwr=R*(T2-T1)/(1-n)
dq=dwr-dwir
dI=-T0*(cp*log(T2/T1) - R*log(p2/p1))
#results
print "The friction of the process per pound of air = %.1f Btu/lbm"%(dq)
print "\n Loss of available energy = %.2f Btu/lbm"%(dI)

The friction of the process per pound of air = 18.6 Btu/lbm

Loss of available energy = -16.20 Btu/lbm


## Ex:12.3 Pg:483¶

In :
#Initialization of variables
ms=10 #lbm
den=62.3 #lbm/ft**3
A1=0.0218 #ft**2
A2=0.00545 #ft**2
p2=50 #psia
p1=100 #psia
gc=32.2 #ft/s**2
dz=30 #ft
T0=537 #R
T1=620 #R
T2=420 #R
#calculations
V1=ms/(A1*den)
V2=ms/(A2*den)
df=-144/den*(p2-p1) - (V2**2 -V1**2)/(2*gc) - dz
dI=-T0/T1 *df
dI2= -T0/T2 *df
#results
print "Friction = %.1f ft-lbf/lbm"%(df)
print "\n Available energy loss in case a = %.1f ft-lbf/lbm"%(dI)
print "\n Available energy loss in case b = %.1f ft-lbf/lbm"%(dI2)

Friction = 72.9 ft-lbf/lbm

Available energy loss in case a = -72.9 ft-lbf/lbm

Available energy loss in case b = -145.9 ft-lbf/lbm


## Ex:12.4 Pg:484¶

In :
#Initialization of variables
r=2.5 #in
mf=160 #cfm
rho=1/14
mu=0.0000121
v=14 #ft**3/lbm
g=32.2 #ft/s**2
z=100 #ft
#calculations
A=3.14*(r/12)**2
V=mf/A /60
Re=(2*r/12)*V*rho/mu
print "From fig 12.4,"
f=0.0225/4
dp=4*f*(rho)*(V/v)**2 /(2*g*(2*r/12)) *z
#dp=2.32
#results
print "Pressure drop = %.2f lbf/ft**2 100 ft"%(dp)
print "The answer in the textbook is wrong. Please use a calculator to verify it."

From fig 12.4,
Pressure drop = 0.00 lbf/ft**2 100 ft
The answer in the textbook is wrong. Please use a calculator to verify it.


## Ex:12.5 Pg:485¶

In :
from math import pi,sqrt
#Initialization of variables
D=0.0724 #ft
gc=32.2 #ft/s**2
rho=1.0/14
L=100 #ft
mu2=1.46*10**(-10)
dp=2.32
dia=5.0 #in
rho2=48500.0
vol=14.0 #ft**3/lbm
#calculations
ref=D**3 *2*dp*gc*rho/(mu2*L)
mf=rho2*pi/4 *(dia/12) *sqrt(mu2)
mfr=mf*vol*60
#results
print "Mass rate of air flow = %d cfm"%(mfr)
print "The answer is a bit different due to rounding off error in textbook"

Mass rate of air flow = 161 cfm
The answer is a bit different due to rounding off error in textbook


## Ex:12.6 Pg:486¶

In :
from math import log
#Initialization of variables
cp=0.25
T=3460 #R
T0=520 #R
dG=1228 #Btu/lbm
#calculations
hf=cp*(T-T0)-T0*cp*log(T/T0)
dC=hf-dG
Ec=hf/dG
#results
print "Loss of available energy = %d Btu/lbm mixture "%(dC)
print "\n Effectiveness of combustion = %.3f "%(Ec)

Loss of available energy = -725 Btu/lbm mixture

Effectiveness of combustion = 0.409


## Ex:12.7 Pg:487¶

In :
#Initialization of variables
cp1=0.25
T=3460 #R
T0=946.2 #R
T00=520 #R
dG=1228 #Btu/lbm
cp=0.45
#calculations
dqa=cp1*(T-T0)
w=cp*dqa
hf=cp1*(T-T00)-T00*cp1*log(T/T00)
heat=w-hf
eff=w/hf
epower=w/dG
#results
print "Loss of available energy = %.1f Btu/lbm mixture "%(heat)
print "\n Efficiency of cycle = %.3f "%(eff)
print "\n Effectiveness of overall cycle = %.2f"%(epower)
print "The answer is a bit different due to rounding off error in textbook"

Loss of available energy = -219.3 Btu/lbm mixture

Efficiency of cycle = 0.563

Effectiveness of overall cycle = 0.23
The answer is a bit different due to rounding off error in textbook


## Ex:12.8 Pg:487¶

In :
#Initialization of variables
p1=400 #psia
t1=600 #F
h1=1306.9 #Btu/lbm
b1=480.9 #Btu/lbm
p2=50 #psia
h2=1122 #Btu/lbm
h3=1169.5 #Btu/lbm
b3=310.9 #Btu/lbm
#calculations
print "All the values are obtained from Mollier chart,"
dw13=h1-h3
dw12=h1-h2
dasf=b3-b1
etae=dw13/dw12
eta=abs(dw13/dasf)
dq=dw13+dasf
#results
print "Engine efficiency = %.1f percent"%(etae*100)
print "\n Effectiveness = %.1f percent"%(eta*100)
print "\n Loss of available energy  = %.1f Btu/lbm"%(dq)

All the values are obtained from Mollier chart,
Engine efficiency = 74.3 percent

Effectiveness = 80.8 percent

Loss of available energy  = -32.6 Btu/lbm