Chapter 6 : Flow in Pipes

Example 6.1 Page No : 95

In [1]:
import math 

#initialisation of variables
l= 5000.     #ft long
l1= 2000.    #ft
d= 12.       #in diameter
f= 0.005     # coefficient
d1= 24       #in diameter
f1= 0.0045   
l2= 3000.    #ft
Q= 1800.     #gal/min flow
w= 6.24      #lb/ft**3
g=32.2       #ft/s**2

#CALCULATIONS
F= Q/(60*w)
v1= F*4/(math.pi*(d/12)**2)
v2= v1/(d1/d)**2
H= (f*l1*F**2/(10*(d/12)**5))+(f1*l2*F**2/(10*(d1/12)**5))+(v1**2/(4*g))+((v1-v2)**2/(2*g))+(v2**2/(2*g))

#RESULTS
print  'Available Head = %.2f ft'%(H)
Available Head = 24.74 ft

Example 6.2 Page No : 96

In [1]:
import math 

#initialisation of variables
g= 32.2 	#ft/sec**2
f= 0.01
h= 42.   	#ft
l= 3200. 	#ft length
d= 14.   	#in diameter
h1= 8.   	#ft
l1= 1800. 	#ft point
w= 6.24 	#lb/ft**3

#CALCULATIONS
v= math.sqrt(2*g*h/(1+0.5+(4*f*l/(d/12.))))
h2= h-h1-(v**2/(2*g))-h1-(0.5*v**2/(2*g))-(4*f*l1*v**2/(2*g*(d/12)))
Q= math.pi*(d/12)**2*v*w*60/4

#RESULTS
print  'Height of siphon above A = %.2f ft'%(h2)
print  ' Total Discharge = %.f gal/min'%(Q)

# rounding off error
Height of siphon above A = 2.13 ft
 Total Discharge = 1974 gal/min

Example 6.3 Page No : 97

In [2]:
import math 

#initialisation of variables
H= 950. 	#lb/in**2
l= 5.    	#miles distance
d= 4.    	#in
f= 0.0075    # friction
p= 92.   	#per cent
hp= 200. 	#h.p power
g= 32.2 	#ft/sec62
w= 62.4 	#lb/ft**3

#CALCULATIONS
H1= H*2.3
H2= H1*100/p
Hf= H2-H1
v= math.sqrt(2*g*(d/12)*Hf/(4*f*l*5280))
n= hp/(w*v*(H1/550)*math.pi*(d/12)**2/4)

#RESULTS
print  'number of pipes required = %.2f'%(n)
number of pipes required = 4.07

Example 6.4 Page No : 98

In [3]:
import math 

#initialisation of variables
l= 1.5 	    #miles length
d= 18. 	    #in diameter
Q= 12.4 	#/cusecs
h= 130. 	#ft
r= 169.
r1= 338.
w= 62.4 	#lb/ft**3
g= 32.2 	#ft/sec**2

#CALCULATIONS
f= h*10*l**5/(l*5280*Q**2)
R= math.sqrt(1.5*r1-r)
d= math.sqrt(l**2/R*144)
v= math.sqrt(h*g*2/(r/R**2+1))
HP= w*0.25*math.pi*(d/12)**2*v**3/(550*2*g)

#RESULTS
print  'f = %.3f '%(f)
print  ' Diameter of jet d = %.2f in'%(d)
print  ' Water h.p = %.1f h.p'%(HP)


#The answer is a bit different due to rounding off error in textbook
f = 0.008 
 Diameter of jet d = 4.20 in
 Water h.p = 70.6 h.p

Example 6.5 Page No : 100

In [4]:
import math 

#initialisation of variables
l= 5000. 	#ft long
d= 24. 	    #in diameter
Q= 18.  	#cuses
t= 10. 	    #sec 
P= 275000. 	#lb/in**2
g= 32.2 	#ft/sec**2
w=62.4

#CALCULATIONS
v= Q/(math.pi*(d/24)**2)
C= v/(t**2/2)
Pr= ((l*C*t/g)+(v**2/(2*g)))/2.3
Pr1= v*12*math.sqrt(w*P/(386.4*1728))

#RESULTS
print  'Pressure Rise = %.1f lb/in**2'%(Pr)
print  ' Pressure Rise = %d lb/in**2'%(Pr1)
Pressure Rise = 77.6 lb/in**2
 Pressure Rise = 348 lb/in**2

Example 6.6 Page No : 102

In [5]:
import math 

#initialisation of variables
g= 32.2 	#ft/sec**2
v= 4.     	#ft/sec velocity
K= 300000. 	#lb/in**2 water
d= 6. 	#in
t= 0.25 	#in
E= 30*10**6 	#lb/in**2
w= 62.4 	#lb/ft**3

#CALCULATIONS
P= math.sqrt((w*v**2/g)/((d/(E*144*t))+(1/(K*144))))/144
Sm= P*d/(2*t)

#RESULTS
print  'Hoop stress = %.f lb/in**2'%(Sm)

# rounding off error
Hoop stress = 2739 lb/in**2

Example 6.7 Page No : 104

In [6]:
import math 

#initialisation of variables
l1= 19. 	#ft
l2= 1.   	#ft
r1= 0.298
r2= 0.238
r3= 0.359
r4= 0.242
r5= 0.121
d= 6 	    #in diameter

#CALCULATIONS
m= -(-r4-math.sqrt(r4**2-4*(3*r1-r5)*(-(d/2)*r2-r3)))/(2*(3*r1-r5))
v2= math.sqrt((l1+l2)/(r1*m**2-r2))
v3= m*v2
Q2= math.pi*v2/d**2
Q3= math.pi*v3/d**2
Q= Q2+Q3

#RESULTS
print  'Q2 = %.3f cusec'%(Q2)
print  ' Q3 = %.2f cusec'%(Q3)
print  ' Total Quantity = %.3f cusecs'%(Q)
Q2 = 0.711 cusec
 Q3 = 0.96 cusec
 Total Quantity = 1.668 cusecs

Example 6.8 Page No : 106

In [7]:
import math 

#initialisation of variables
h= 80.   	#ft levels
f= 0.008    # friction coefficient
l= 3000. 	#ft long
r1= 6.07
r2= 377.5
r3= 4733. 
r4= 0.0466
r5= 3220.
r6= 51.5

#CALCULATIONS
Q= math.sqrt(h*10/(f*l))
Q1= math.sqrt(r2+math.sqrt(r2**2-4*r1*r3)/(2*r1))/3
Q2= Q1-r4*math.sqrt(r5-r6*Q1**2)

#RESULTS
print  'rate discharge when valve B is closed= %.2f cusecs'%(Q)
print  ' Flow in reservoir= %.2f cusecs'%(Q2)

#The answer is a bit different due to rounding off error in textbook
rate discharge when valve B is closed= 5.77 cusecs
 Flow in reservoir= 5.13 cusecs

Example 6.9 Page No : 108

In [8]:
import math 

#initialisation of variables
Q= 450.  	#gal/min
w= 6.24 	#lb/ft**3
f= 0.005
l1= 1000. 	#ft from reservoir A
l2= 2000. 	#ft from reservoir D
r1= 1.6
r2= 4.4
r3= 0.8
r4 = 12.85
h1= 59.1 	#ft
h2= 40.19 	#ft
v= 1.2 	    #ft/sec
f= 0.0056
l= 10 	    #ft  below reservoir A

#CALCULATIONS
Q1=  Q/(w*60)
Q2= (r1+math.sqrt(r1**2+4*r2))/2
Q3= Q2-Q1
Q4= (-r3+math.sqrt(r3**2+4*r4))/2
Q5= Q4+Q1
d= (f*5500*v**2/(l*(h1-h2)))**0.2*12

#RESULTS
print  'flow in to reservoir B= %.2f cusecs'%(Q3)
print  ' flow in to reservoir D= %.1f cusecs'%(Q5)
print  ' diameter of MN= %.f in'%(d)
flow in to reservoir B= 1.84 cusecs
 flow in to reservoir D= 4.4 cusecs
 diameter of MN= 9 in

Example 6.10 Page No : 110

In [10]:
import math 

#initialisation of variables
d= 2.5 	#ft
a= 45. 	#degrees
Q= 69. 	#cuses
l= 30. 	#ft
w= 62.4 	#lb/ft**3
g= 32.2 	#ft/sec**2

#CALCULATIONS
Ps= 0.25*math.pi*d**2*w*l/2240
Rs= Ps*math.sqrt((1-math.cos(math.radians(a)))*2)
W= Q*w/2240
v= Q*4/(math.pi*d**2)
Rd= W*v*math.sqrt(2*(1-math.cos(math.radians(a))))/g
Rt= Rs+Rd

#RESULTS
print  'total resultant thrust = %.3f tons'%(Rt)
total resulmath.tant thrust = 3.782 tons

Example 6.11 Page No : 112

In [11]:
import math 

#initialisation of variables
r1= 1./3
r2= 7./12
l= 5000. 	#ft
l1= 10000. 	#ft
d= 27. 	#in
d1= 18. 	#in
Q= 10. 	#cuses
f= 0.006

#CALCULATIONS
Q2= Q/(math.sqrt(r2/r1)+1)
Q1= Q-Q2
H= (f*l*Q**2/(10*(d/12)**5))+(f*l1*Q1**2/(3*10**(d1/12)**5))

#RESULTS
print  'total difference in head = %.2f ft'%(H)


#ANSWER GIVEN IN THE TEXTBOOK IS WRONG
total difference in head = 5.20 ft

Example 6.12 Page No : 115

In [12]:
import math 

#initialisation of variables
V= 4. 	    #ft/sec
L= 1225. 	#ft
l= 1200. 	#ft
H= 50.   	#ft
d= 1./3 	#ft
f= 0.008
g= 32.2 	#ft/sec**2

#CALCULATIONS
a= 2*g*H
b= (4*f*L/d)+1.5
c= math.sqrt(a/b)
d= math.sqrt(a*b)
T= math.log(math.sqrt((c+V)/(c-V)))*l*2/d

#RESULTS
print  'time interval for elapse = %.2f sec'%(T)
time interval for elapse = 3.95 sec

Example 6.14 Page No : 119

In [13]:
import math 

#initialisation of variables
L= 8000. 	#ft
d= 5.    	#ft
g= 32.2 	#ft/sec**2
d= 5. 	    #ft
l= 250. 	#ft
b= 100.

#CALCULATIONS
A= math.pi*0.25*d**2*l-0.5*d**2*b
V= A*g/L

#RESULTS
print  'Velocity = %.2f ft/sec'%(V)
Velocity = 14.73 ft/sec

Example 6.15 Page No : 121

In [14]:
import math 

#initialisation of variables
B= 3.    	#ft
Cd= 0.6
g= 32.2 	#ft/sec**2
d1= 6. 	    #in
d2= 4.   	#in

#CALCULATIONS
Q2= 0.428 	#cuses
r= math.sqrt((((d1/12)**5)/((d2/12)**5)))
Q1= r*Q2
Q= Q1+Q2

#RESULTS
print  'Total inflow = %.3f cuses'%(Q)
Total inflow = 1.607 cuses

Example 6.17 Page No : 124

In [1]:
import math 

#initialisation of variables
f= 0.007
l= 30.        	#miles
Q1= 5.*10**6 	#gal/day
w= 6.24 	    #lb/ft**3
H= 500. 	    #ft
Q2= 7*10**6 	#gal/day

#CALCULATIONS
Qi= Q1/(w*24*3600)
d= (f*l*5280*Qi**2/(10*H))**0.2
Qe = Q2*Qi/Q1
x= (30-(H*10*d**5/(f*Qe**2*5280)))*(4./3)

#RESULTS
print 'diameter of pipes = %.1f ft'%d
print  'length of new pipe required = %.1f miles'%(x)
diameter of pipes = 1.8 ft
length of new pipe required = 19.6 miles