# Chapter 15 : Compressible and Sonic Flow¶

## Example 15.2 Page no 169¶

In [1]:
from __future__ import division
from math import sqrt
print " Example 15.2 page no 169\n\n"
#nitrogen gas is flowing in a duct,neglect compressibility effects
T=293#temperature,k
R=8314.4#gas constant
k=1.4#for nitrogen
M=28#molecular weight of nitrogen
c=sqrt(k*R*T/M)#speed of sound in nitrogen
print "\n speed of sound on nitrogen c=%0.2f m/s"%(c)#
v=82#flow velocity
M_a=v/c#mach no.
print "\n mach no. M_a=%0.3f "%(M_a)#

 Example 15.2 page no 169

speed of sound on nitrogen c=349.01 m/s

mach no. M_a=0.235


## Example 15.3 Page no 170¶

In [2]:
from __future__ import division
from math import sqrt
print "Example 15.3 page no 170\n\n"
#propane is flowing in a tube
k=1.3#degree of freedom for propane
T=290#temperature,k
M=44#mol. weight
R=8314.4#gas constant
c=sqrt((k*R*T)/M)#speed of sound in propane
print "\n speed of sound in propane c=%0.2f m/s"%(c)#
v=43#average velocity
M_a=v/c#mach no.
print "\n M_a mach no=%0.2f "%(M_a)#
#mach no is< 0.3,that's why flow is incompressible
rho=6.39#density,kg/m**3
meu=8e-6#viscosity ,m**2/s
D=0.0254#inside diameter of tube
R_e=D*rho*v/meu#reynolds no.
print "\n reynolds no R_e=%0.2f "%(R_e)#
#because R_e is >4000,flow is turbulent

Example 15.3 page no 170

speed of sound in propane c=266.91 m/s

M_a mach no=0.16

reynolds no R_e=872394.75


## Example 15.6 Page no 173¶

In [3]:
from __future__ import division
from math import sqrt,pi
print "Example 15.6 page no 173\n\n"
#methane is flowing through a horizontal steel pipe
m_dot=10#mass flow rate, lb/s
D=1#diameter of pipe,ft
G=m_dot/((pi/4)*D**2)#mass velocity flux
P=89.7#inlet pressure
T=530#temprature,k
MW=16#mol. weight
R=10.73#gas constant
#applying eq 15.7
rho=P*MW/(R*T)#density
f=0.008#friction factor
L=15840#length of pipe,ft
g_c=32.2#gravitational constant
P_drop=(2*f*L*(G**2))/(g_c*rho*D)#pressure drop
P1=89.7#inlet pressure,psia
P2=P1-(P_drop/144)
P2=54.7#corrected value
P_drop=P1-P2#updated value of P_drop
print "\n pressure drop P_drop=%0.2f psia"%(P_drop)#

Example 15.6 page no 173

pressure drop P_drop=35.00 psia


## Example 15.7 Page no 174¶

In [4]:
from __future__ import division

print "Example 15.7 page no 174\n\n"
#refr to example 15.6
D=1#diameter of pipe
G=12.7#mass velocity flux
meu=7.39e-6#viscosity,lb/ft.s
R_e=(D*G)/(meu)#reynolds no
print "\n reynolds no R_e=%0.2f "%(R_e)#

Example 15.7 page no 174

reynolds no R_e=1718538.57


## Example 15.8 Page no 174¶

In [5]:
from __future__ import division
print "Example no page no 174\n\n"
#air flowing through a steel pipe
P_1=2.7#pressure,atm
T=288#temperature,k
v=30#velocity at the entrance of the pipe ,m/s
Mw=29#mol. weight of air
V=22.4#standard volume
T_s=273#st. temp
P_s=1#st. pressure
rho=(Mw*P_1*T_s)/(V*T*P_s)#density
print "\n density rho =%0.2f kg/m**3"%(rho)#
G=v*rho#mass veocity flux
print "\n G mass velocity flux =%0.2f kg/m**2.s"%(G)#
f=0.004#friction factor
D=0.085#diameter ,m
L=65#length of pipe,m
#gravitational constant
P_2=P_1-2*f*L*G**2/(rho*D*101325)#pressure drop across the line
#factor 101325 for atm
print "\n pressure drop P__2=%0.2f atm"%(P_2)#
P_drop=P_1-P_2#pressure drop
print "\n P_drop pressure=%0.2f atm"%(P_drop)#

Example no page no 174

density rho =3.31 kg/m**3

G mass velocity flux =99.40 kg/m**2.s

pressure drop P__2=2.52 atm

P_drop pressure=0.18 atm


## Example 15.9 Page no 175¶

In [6]:
from __future__ import division

print " Example 15.9 page no 175\n\n"
#refer to Example 15.9
meu=1.74e-5#viscosity,kg/m.s
D=0.085#diameter of pipe
G=99.3#mass velocity flux
R_e=D*G/meu#reynolds no.
print "\n reynolds no R_e=%0.2f "%(R_e)#

 Example 15.9 page no 175

reynolds no R_e=485086.21