Chapter 7 - Flow of incompressible fluids in closed conduits

Example 1a - Pg 241

In [2]:
#calculate the reynolds number of the flow
#Initialization of variables
import math
z1=2. #ft
Q=0.1 #gal/min
alpha=2.
g=32.2 #ft/s^2
L=4. #ft
D=1./96. #ft
#calculations
v2=Q/(7.48*60* math.pi/4. *D*D)
hl=z1-alpha*v2*v2 /(2*g)
Nr=64./hl *L/D *v2*v2 /(2*g)
#results
print '%s %d %s' %("Reynolds number is",Nr,".Hence the flow is laminar")
print '%s' %("The answers are a bit different from textbook due to rounding off error")
Reynolds number is 1459 .Hence the flow is laminar
The answers are a bit different from textbook due to rounding off error

Example 1b - Pg 242

In [1]:
#calculate the kinematic viscosity
#Initialization of variables
import math
z1=2 #ft
Q=0.1 #gal/min
alpha=2.
g=32.2 #ft/s^2
L=4. #ft
D=1./96. #ft
#calculations
v2=Q/(7.48*60* math.pi/4. *D*D)
hl=z1-alpha*v2*v2/(2*g)
Nr=64./hl *L/D *v2*v2 /(2*g)
mu=v2*D/Nr
#results
print '%s %.2e %s' %("Kinematic viscosity =",mu,"ft^2/s")
print '%s' %("The answers are a bit different from textbook due to rounding off error")
Kinematic viscosity = 1.87e-05 ft^2/s
The answers are a bit different from textbook due to rounding off error

Exaple 1c - Pg 242

In [3]:
#calculate the theoretical entrance transistion length
#Initialization of variables
import math
z1=2. #ft
Q=0.1 #gal/min
alpha=2.
g=32.2 #ft/s^2
L=4. #ft
D=1./96. #ft
#calculations
v2=Q/(7.48*60* math.pi/4. *D*D)
hl=z1-alpha*v2*v2 /(2*g)
Nr=64./hl *L/D *v2*v2 /(2*g)
Ld=0.058*Nr*D
#results
print '%s %.3f %s' %("Theoretical entrance transistion length =",Ld,"ft")
print '%s' %("The answers are a bit different from textbook due to rounding off error")
Theoretical entrance transistion length = 0.882 ft
The answers are a bit different from textbook due to rounding off error

Example 2 - Pg 246

In [5]:
#calculate the horsepower required for the motor
#Initialization of variables
import math
Q=350. #gal/min
D=6. #in
rho=0.84
gam=62.4
g=32.2 #ft/s^2
mu=9.2e-5 #lb-sec/ft^2
L=5280. #ft
#calculations
V=Q/(7.48*60*math.pi/4. *math.pow((D/12),2))
Nr=V*D/12 *rho*gam/g /mu
f=0.3164/math.pow((Nr),0.25)
hl=f*L*12/D *V*V /(2*g)
hp=hl*gam*Q*rho/(550*7.48*60.)
#results
print '%s %.2f %s' %("Horsepower required =",hp,"hp/mile")
Horsepower required = 4.44 hp/mile

Example 3 - Pg 250

In [6]:
#calculate the values of the coefficients alpha and beta
#Initialization of variables
n=7.
import math
#calculations
alpha= math.pow((n+1),3) *math.pow((2*n+1),3) /(4*math.pow(n,4) *(n+3)*(2*n+3))
bet=math.pow((n+1),2) *math.pow((2*n+1),2) /(2*n*n *(n+2)*(2*n+2))
#results
print '%s %.2f' %("alpha = ",alpha)
print '%s %.2f' %("\n beta = ",bet)
alpha =  1.06

 beta =  1.02

Example 5 - Pg 252

In [7]:
#calculate the mass flow rate and horsepower input of the fan
#Initialization of variables
import math
spg=0.84
z=1. #in
gam=62.4
patm=14.7 #psia
T=459.6+85 #R
R=53.3
g=32.2 #ft/s^2
D=3. #ft
mu=3.88e-7 #lb-sec/ft^2
#calculations
dp=spg*z/12. *gam
rho=patm*144. /(R*T*g)
umax=math.sqrt(2*dp/rho)
V=0.8*umax
Nr=V*D*rho/mu
V2=0.875*umax
mass=rho*math.pi/4. *D*D *V2
emf=V2*V2 /(2*g)
hp=emf*mass*g/550.
#results
print '%s %.2f %s' %("Mass flow rate =",mass,"slug/sec")
print '%s %.2f %s' %("\n Horsepower input of the fan =",hp,"hp")
Mass flow rate = 0.87 slug/sec

 Horsepower input of the fan = 2.34 hp

Example 7a - Pg 266

In [8]:
#calculate the velocity using several equations listed above
#Initialization of variables
import math
D=36. #in
rho=0.00226  #slug/ft^3
mu=3.88e-7 #lb-sec/ft^2
umax=62.2 #ft/s
V=54.5 #ft/s
Nr=9.5e5
r0=18. #in
r=12. #in
n=8.8
k=0.4
#calculations
f=0.0032 + 0.221/(math.pow(Nr,0.237))
Vs=math.sqrt(f/8) *V
y=r0-r
u1=umax*math.pow((y/r0),(1/n))
u2=umax+ 2.5*Vs*math.log(y/r0)
u3=umax+ Vs/k *(math.sqrt(1-y/r0) + math.log(1-math.sqrt(1-y/r0)))
u4=Vs*(5.5+ 5.75*math.log10(Vs*y/12 *rho/mu))
#results
print '%s %.1f %s' %("Using equation 7-13, velocity =",u1," ft/s")
print '%s %.1f %s' %("\n Using equation 7-18, velocity =",u2," ft/s")
print '%s %.1f %s' %("\n Using equation 7-25, velocity =",u3," ft/s")
print '%s %.1f %s' %("\n Using equation 7-34a, velocity =",u4," ft/s")
Using equation 7-13, velocity = 54.9  ft/s

 Using equation 7-18, velocity = 56.5  ft/s

 Using equation 7-25, velocity = 57.6  ft/s

 Using equation 7-34a, velocity = 56.7  ft/s

Example 7b - Pg 266

In [9]:
#calculate the outer edge buffer zone distance and also its thickness
#Initialization of variables
import math
D=36. #in
rho=0.00226  #slug/ft^3
mu=3.88e-7 #lb-sec/ft^2
umax=62.2 #ft/s
V=54.5 #ft/s
Nr=9.5e5
r0=18. #in
r=12. #in
n=8.8
k=0.4
#calculations
f=0.0032 + 0.221/(math.pow(Nr,0.237))
Vs=math.sqrt(f/8.) *V
y=r0-r
delta1=D*5*math.sqrt(8) /(Nr*math.sqrt(f))
vss=70.
thick=13*delta1
#results
print '%s %d' %("Outer edge of buffer zone is at ",vss)
print '%s %.4f %s' %("\n Thickness of buffer zone =",thick,"in")
Outer edge of buffer zone is at  70

 Thickness of buffer zone = 0.0645 in

Example 7c - Pg 266

In [10]:
#calculate the velocity using the given equations
#Initialization of variables
import math
D=36. #in
rho=0.00226  #slug/ft^3
mu=3.88e-7 #lb-sec/ft^2
umax=62.2 #ft/s
V=54.5 #ft/s
Nr=9.5e5
r0=18. #in
r=12. #in
n=8.8
k=0.4
#calculations
f=0.0032 + 0.221/(math.pow(Nr,0.237))
Vs=math.sqrt(f/8) *V
delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))
y=delta1
u2=Vs*Vs *delta1/12. *rho/mu
u1=62.2 *math.pow((delta1/18.),(1/n))
#results
print '%s %.1f %s' %("using equation 7-13, velocity =",u1,"ft/s")
print '%s %.1f %s' %("\n using equation 7-30, velocity =",u2,"ft/s")
using equation 7-13, velocity = 24.5 ft/s

 using equation 7-30, velocity = 10.4 ft/s

Example 7d - Pg 266

In [11]:
#calculate the velocity using the listed equations
#Initialization of variables
import math
D=36. #in
rho=0.00226  #slug/ft^3
mu=3.88e-7 #lb-sec/ft^2
umax=62.2 #ft/s
V=54.5 #ft/s
Nr=9.5e5
r0=18. #in
r=12. #in
n=8.8
k=0.4
#calculations
f=0.0032 + 0.221/(math.pow(Nr,0.237))
Vs=math.sqrt(f/8.) *V
delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))
y=14*delta1
u2=62.2*math.pow((y/18.),(1/n))
u3=Vs*(5.50 + 5.75*math.log10(Vs*y/12 *rho/mu))
#results
print '%s %.1f %s' %("Using equation 7-13, velocity =",u2,"ft/s")
print '%s %.1f %s' %("\n using equation 7-34a, velocity =",u3,"ft/s")
Using equation 7-13, velocity = 33.1 ft/s

 using equation 7-34a, velocity = 33.5 ft/s

Example 7e - Pg 266

In [12]:
#calculate the shearing stress using both the equations
#Initialization of variables
import math
D=36. #in
rho=0.00226  #slug/ft^3
mu=3.88e-7 #lb-sec/ft^2
umax=62.2 #ft/s
V=54.5 #ft/s
Nr=9.5e+5
r0=18. #in
r=12. #in
n=8.8
k=0.4
#calculations
f=0.0032 + 0.221/(math.pow(Nr,0.237))
Vs=math.sqrt(f/8.) *V
delta1=D*5*math.sqrt(8.) /(Nr*math.sqrt(f))
u2=Vs*Vs *delta1/12. *rho/mu
T0=rho*Vs*Vs
T02=mu*u2/delta1 *12.
#results
print '%s %.5f %s' %("Using equation 7-9a, shearing stress =",T0,"lb/ft^2")
print '%s %.5f %s' %("\n Using equation 7-28, shearing stress =",T02,"lb/ft^2")
print '%s' %("The answers are a bit different due to rounding off error in textbook")
Using equation 7-9a, shearing stress = 0.00979 lb/ft^2

 Using equation 7-28, shearing stress = 0.00979 lb/ft^2
The answers are a bit different due to rounding off error in textbook

Example 8 - Pg 273

In [13]:
#calculate the required velocity
#Initialization of variables
import math
umax=62.2 #ft/s
r0=18. #in
e=0.0696 #in
r=6. #in
#calculations
Vs=umax/(8.5 + 5.75*math.log10(r0/e))
u=Vs*(8.5 + 5.75*math.log10(r/e))
#results
print '%s %.1f %s' %("Velocity =",u,"ft/s")
Velocity = 54.6 ft/s

Example 9 - Pg 277

In [14]:
#calculate the flow rate and roughness factor
#Initialization of variables
import math
d=8. #in
V=3.65 #ft/s
u1=4.75 #ft/s
r0=4. #in
#calculations
f=0.0449
Q=V*math.pi/4. *math.pow((d/12),2)
Vs=(u1-V)/3.75
r0e=math.pow(10,((u1/Vs - 8.5)/5.75))
e=r0/r0e
#results
print '%s %.2f %s' %("Flow rate =",Q,"ft^3/s")
print '%s %.3f %s' %("\n roughness factor =",e,"in")
Flow rate = 1.27 ft^3/s

 roughness factor = 0.184 in

Example 10 - Pg 285

In [15]:
#calculate the pressure difference per foot of horizontal pipe
#Initialization of variables
import math
e0=0.00085 #ft
alpha=0.25 #/year
t=15. #years
r0=3. #in
Q=500. #gal/min
d=6. #in
mu=2.04e-5 #lb-sec/ft^2
rho=1.94 #slugs/ft^3
g=32.2 #ft/s^2
L=1. #ft
gam=62.4
#calculations
e15=e0*(1+ alpha*t)
ratio=r0/(12.*e15)
V=Q/(7.48*60*math.pi/4. *math.pow((d/12),2))
Nr=V*d*rho/(mu*12)
f=0.036
hl=f*L/(d/12.) *V*V /(2*g)
dp=gam*hl
#results
print '%s %.2f %s' %("Pressure difference =",dp,"lb/ft^2 per foot of horizontal pipe")
Pressure difference = 2.25 lb/ft^2 per foot of horizontal pipe

Example 11 - Pg 289

In [16]:
#calculate the horsepower required
#Initialization of variables
import math
d2=4. #in
d1=3. #in
e=0.0005 #ft
mu=3.75e-5 #lb-sec/ft^2
rho=1.94 #slugs/ft^3
Q=100. #gal/min
L=100. #ft
g=32.2 #ft/s^2
gam=62.4
#calculations
A=math.pi/4. *(math.pow((d2/12),2) -math.pow((d1/12),2))
WP=math.pi*(d1+d2)/12.
R=A/WP
RR= 2*R/e
V= Q/(7.48*60*A)
Nr=V*4*R*rho/mu
f=0.035
hl=f*L/(4*R) *V*V /(2*g)
hp=hl*Q/(7.48*60) *gam/550.
#results
print '%s %.2f %s' %("horsepower required =",hp," hp/100 ft")
horsepower required = 0.56  hp/100 ft

Example 12 - Pg 296

In [17]:
#calculate the discharge flow
#Initialization of variables
import math
p1=25. #psig
p2=20. #psig
d1=18. #in
d2=12. #in
Cl=0.25
gam=62.4
g=32.2 #ft/s^2
#calculations
Vr=(d2/d1)*(d2/d1)
xv=(p2-p1)*144/gam
V22=xv/(-1-Cl+Vr*Vr) *2*g
V2=math.sqrt(V22)
Q=V2*math.pi/4. *(d2/12.)*(d2/12.)
#results
print '%s %.1f %s' %("Discharge =",Q,"ft^3/s")
Discharge = 20.9 ft^3/s

Example 13 - Pg 300

In [18]:
#calculate the discharge flow rate
#Initialization of variables
import math
V61=10.8 #ft/s
V81=6.05 #ft/s
r0=3 #in
e=0.00015
d1=6. #in
rho=1.94 #slugs/ft^3
mu=2.34e-5 #ft-lb/s^2
#calculations
roe=r0/(12*e)
Nr1=V61*(d1/12.)*rho/mu
f6=0.0165
V6=11.6 #ft/s
V8=6.52 #ft/s
Q=V6*math.pi/4 *(d1/12.)*(d1/12.)
#results
print '%s %.2f %s' %("Discharge =",Q,"ft^3/s")
Discharge = 2.28 ft^3/s

Example 14 - Pg 302

In [19]:
#calculate the diameter of steel pipe
#Initialization of variables
import math
L=1000. #ft
Q=2000/(7.48*60) #ft63/s
g=32.2 #ft/s^2
p=5. #psi/1000 ft
gam=62.4
sp=0.7
f=0.02
r0=0.904/2.
e=0.00015
mu=7e-6 #lb-ft/s^2
L=1000. #ft
#calculations
hl=p*144/(sp*gam)
D5=f*8*L*Q*Q /(math.pi*math.pi *g*hl)
D=math.pow(D5,(1./5.))
Nr=4*Q*sp*gam/(g*(math.pi*D*mu))
f2=0.0145
D5=f2*8*L*Q*Q /(math.pi*math.pi *g*hl)
D1=math.pow(D5,(1./5.))
#results
print '%s %.3f %s' %("Diameter of steel pipe =",D1," ft")
Diameter of steel pipe = 0.848  ft