Chapter 4 : Flow of Water Through Orifices and Mouthpieces

Example 4.1 Page No : 98

In [2]:
import math 
		
#initialisation of variables
M = 31*10 		#lbs
P = 3.6 		#lbs
t = 60. 		#sec
g = 32.2 		#ft/sec**2
H = 9. 		#ft
d = 1. 		#in
w = 6.24 		#gallons
		
#CALCULATIONS
v = P*g*t/M
V = math.sqrt(2*g*H)
Cv = v/V
V1 = math.pi*(d/12)**2*V*60*w/4
Cd = M/(10*V1)
Cc = Cd/Cv
Cr = (1/Cv**2)-1
		
#RESULTS
print  'Coefficient of resistance  = %.2f '%(Cr)

# rounding off error
Coefficient of resistance  = 0.15 

Example 4.2 Page No : 100

In [5]:
import math 
		
#initialisation of variables
M = 1.65 		#lbs
Q = 31. 		#gallons per min
d = 1. 		#in
h = 4. 		#ft
t = 60. 		#sec
g = 32.2 		#ft/sec**2
Q1 = 6.24 		#gallons per min
c = 0.36
P = 3.6         # lbs
H = 9. 

#CALCULATIONS
v = P*g*t/(Q*10)
V = math.sqrt(2*g*H)
Cv = (v/V)
vf = V*math.pi*(d/12)**2*60*Q1/4
Cd = Q/vf
Cc = Cd/Cv
Cr = (1/Cv**2)-1

#RESULTS
print  'velocity of jet  = %.2f ft/sec'%(v)
print  'theoretical velocity of jet  = %.2f ft/sec'%(V)
print  'Cv  = %.2f '%(Cv)
print  'volume flow  = %.2f gallons per minute'%(vf)
print  'Cd  = %.2f '%(Cd)
print  'Cc  = %.2f '%(Cc)
print  'Coefficient of resistance  = %.2f '%(Cr)

# Note : Answer for theoretical velocity is wrong in book. Please check.
velocity of jet  = 22.44 ft/sec
theoretical velocity of jet  = 24.07 ft/sec
Cv  = 0.93 
volume flow  = 49.16 gallons per minute
Cd  = 0.63 
Cc  = 0.68 
Coefficient of resistance  = 0.15 

Example 4.3 Page No : 101

In [15]:
import math 
		
#initialisation of variables
x = 11.5 		#in
y = 1.2 		#in
H = 29. 		#in
q = 6.24 		#gallons per minute
d = 1.  		#in
g = 32.2 		#ft/sec**2
Q = 16. 		#gallons per min
		
#CALCULATIONS
Cv = math.sqrt(x**2/(4*H*y))
Q1 = math.pi*(d/12)**2*math.sqrt(2*g*H/12)*q*60/4
Cd = Q/Q1
Cc = Cd/Cv
Cr = (1/Cv**2)-1
		
#RESULTS
print  'Coefficient of resistance  = %.2f '%(Cr)

# rounding off error.
Coefficient of resistance  = 0.05 

Example 4.4 Page No : 102

In [4]:
import math 
		
#initialisation of variables
x = 3.2 		#ft
d = 8. 		#ft
W = 5.12 		#lb
A = 1./144
H = 4. 		#ft
g = 32.2 		#ft/sec**2
Q = 251.5 		#lbs/min
w = 62.4 		#lbs/ft**2
		
#CALCULATIONS
F = W*x/d
v = W*x*g*60/(d*Q)
V = math.sqrt(2*g*H)
Cv = v/V
Q1 = A*V*60*w
Cd = Q/Q1
Cc = Cd/Cv
		
#RESULTS
print  'Cc  = %.2f '%(Cc)
Cc  = 0.61 

Example 4.5 Page No : 106

In [9]:
import math 
		
#initialisation of variables
d = 8. 		#in
		
#CALCULATIONS
Cd = 1/math.sqrt(1+((1./(8.**2/100)))-1)
area = math.pi/4 * (2./12)**2
Discharge = area * Cd * math.sqrt(2*32.2*4) 		

#RESULTS
print  'Cd  = %.2f '%(Cd)
print "Discharge = %.1f cubic ft./sec."%Discharge

# note : rounding off error. please check.
Cd  = 0.80 
Discharge = 0.3 cubic ft./sec.

Example 4.6 Page No : 109

In [7]:
import math 
		
#initialisation of variables
d =2.   		#in
h = 6. 	    	#ft
H = 26. 		#ft
g = 32.2 		#ft/sec**2
R = 6.
		
#CALCULATIONS
v2 = math.sqrt(2*g*(H+h))
Q = math.pi*(d/12)**2*v2/4
v3 = math.sqrt(2*g*h)
r = v2/v3
d3 = math.sqrt(r*d**2)
v4 = math.sqrt(v2**2/R)
d4 = math.sqrt(d**2*(v2/v4))
		
#RESULTS
print  'diameter  = %.2f in'%(d4)
diameter  = 3.13 in

Example 4.7 Page No : 111

In [17]:
import math 
		
#initialisation of variables
r = 9./16
r1 = 7./16
h = 26. 		#ft
		
#CALCULATIONS
r2 = 1/((r**2)+(0.25*r1**2))
H1 = h/(r2-1)
		
#RESULTS
print  'maximu head of the tank  = %.3f ft of water'%(H1)

# rounding off error
maximu head of the tank  = 14.897 ft of water

Example 4.8 pageno : 114

In [21]:
# variables
A = 30.*15       # sq ft
a = 2.           # sq ft
H1 = 5.           # ft
H2 = 0.   

# calculation
T = a*A*H1**(1./2)/(.62*a*8.02)

# result
print "Time of emptying pool : T = %.1f seconds"%T

# rounding off error
Time of emptying pool : T = 202.4 seconds

Example 4.9 Page No : 115

In [7]:
import math 
		
#initialisation of variables
H1 = 9. 		#ft
A = 2.  		#ft**2
H2 = 4. 		#ft
d = 2.25 		#in
t = 60. 		#sec
g = 32.2 		#ft/sec**2
		
#CALCULATIONS
a = (d/12)**2
Cd = (2*A*(H1-H2)**0.5)/(t*a*math.sqrt(2*g))
		
#RESULTS
print  'coefficient of dicharge  = %.3f '%(Cd)


#ANSWER GIVEN IN THE TEXTBBOK IS WRONG..VERIFIED WITH CALCULATOR
coefficient of dicharge  = 0.528 

Example 4.10 Page No : 115

In [10]:
import math 
		
#initialisation of variables
d = 1.  		#ft
h1 = 10. 		#ft
h2 = 2. 		#ft
Cd = 0.6
g = 32.2 		#ft/sec**2
t = 12.6
		
#CALCULATIONS
A = math.pi*d**2/4
a = 1./144
T1 = (A/(a*Cd*math.sqrt(2*g)))*(1./3)*(h1**1.5-(h1-h2)**1.5-h2**1.5)+t
T2 = 2*A*(h2**0.5)/(Cd*a*math.sqrt(2*g))
T = T1+T2
		
#RESULTS
print  'Total time  = %.2f sec'%(T)
Total time  = 127.32 sec

Example 4.11 Page No : 117

In [31]:
import math 
from scipy.integrate import quad

#initialisation of variables
l = 600. 		#ft
w = 400. 		#ft
s = 1.
h = 20. 		#ft
d = 3. 	    	#ft
dh = 10. 		#ft
Cd = 0.7
g = 32.2 		#ft/sec**2
k = 240000.
k1 = 2000.
k2 = 4.
		
#CALCULATIONS
def f(x):
    return (k/math.sqrt(x) + k1*math.sqrt(x) + k2*x**(3./2))

T1 = 1./(Cd * math.pi/4 * 9 * 8.02) * quad(f,10,20)[0]
		
#RESULTS
print  'Time taken for 10 feet fall  = %.f sec'%(T1)

# note : quad() gives accurate answer. so answer is slightly different.
Time taken for 10 feet fall  = 17846 sec

Example 4.12 Page No : 118

In [32]:
import math 
		
#initialisation of variables
Cd = 0.6
H1 = 8. 		#ft
H2 = 3. 		#ft
l = 90. 		#ft
b = 30. 		#ft
g = 32.2 		#ft/sec**2
A = 2.   		#ft**2
		
#CALCULATIONS
T1 = 2*l*b*(H1**0.5-(H1-H2)**0.5)/(Cd*math.sqrt(2*g)*A)
T2 = (l*b*2/10)*(2./3)*(H1-H2)**1.5/(Cd*math.sqrt(2*g)*A)
T = T1+T2
		
#RESULTS
print  'Time it take to emptify the swimming bath  = %.1f sec'%(T)

# rounding off error
Time it take to emptify the swimming bath  = 750.1 sec

Example 4.13 Page No : 120

In [13]:
import math 
		
#initialisation of variables
Cd = 0.8
g = 32.2 		#f/sec**2
d = 3.  		#in
x = 6. 	    	#ft
l = 25. 		#ft
d1 = 8. 		#ft
		
#CALCULATIONS
A = math.pi*(d/12)**2/4
T = (2*l/(Cd*A*math.sqrt(2*g)))*(-2./3)*((d1-x)**1.5-d1**1.5)
		
#RESULTS
print  'Time it take to emptify the boiler  = %.f sec'%(T+6)
Time it take to emptify the boiler  = 2100 sec

Example 4.14 Page No : 125

In [8]:
import math 
		
#initialisation of variables
l = 30. 		#ft
w = 10. 		#ft
d = 4.  		#in
h1 = 10. 		#ft
h2 = 2. 		#ft
Cd = 0.97
g = 32.2 		#ft/sec**2
		
#CALCULATIONS
A1 = w*3*l/4
A2 = l*w/4
A = math.pi*(d/12)**2/4
T = 2*A1*(math.sqrt(h1)-math.sqrt(h2))*10/(Cd*A*math.sqrt(2*g)*(l+w))
		
#RESULTS
print  'Time it take to reduce the height  = %.f sec'%(round(T,-1))
Time it take to reduce the height  = 290 sec

Example 4.15 Page No : 125

In [35]:
import math 
		
#initialisation of variables
A1 = 1000. 		#ft**2
A2 = 1000. 		#ft**2
a = 2. 		#ft**2
H1 = 9. 		#ft
H2 = 4. 		#ft
Cd =0.8
g = 32.2 		#ft/sec**2
		
#CALCULATIONS
T = a*1000*(math.sqrt(H1)-math.sqrt(H2))/(Cd*a**2*math.sqrt(2*g))
		
#RESULTS
print  'Time it take to reduce the height  = %.1f sec'%(T)

# rounding off error
Time it take to reduce the height  = 77.9 sec

Example 4.16 Page No : 128

In [16]:
import math 
		
#initialisation of variables
l = 70. 		#ft
b = 10. 		#ft
Hl = 10. 		#ft
H1 = 6. 		#ft
h1 = 4. 		#ft
h2 = 2. 		#ft
w = 2. 		#ft
h3 = 3. 		#ft
Cd = 0.6
g = 32.2 		#ft/sec**2
		
#CALCULATIONS
t = (l*b)*(Hl+H1)/(Cd*h2*w*h1*math.sqrt(2*g*H1))
t1 = 2*l*b*math.sqrt(Hl)/(Cd*h2*w*h3*math.sqrt(2*g))
		
#RESULTS
# 2nd ans is wrong in book
print  'Time of filling = %.2f sec'%(t)
print  ' Time of emptying = %.2f sec'%(t1)
Time of filling = 59.35 sec
 Time of emptying = 76.62 sec

Example 4.17 Page No : 129

In [41]:
import math 
from sympy import Symbol,solve
		
#initialisation of variables
HL = 12.5 		#ft
H1 = 10.5 		#ft
Cd = 0.62
h = 4.   		#ft
l = 3. 	    	#ft
n = 2.
t = 5. 		    #min
g = 32.2 		#ft/sec**2
		
#CALCULATIONS
a1 = n*l*l
A = Symbol('A')
ans = solve( (2*A/(Cd*a1*26)) + 2*A*math.sqrt(H1)/(Cd*a1*8.02) - 300 )
A = ans[0]

#RESULTS
print  'Area = %.f sq ft'%(A)

# rounding off error
Area = 3783 sq ft

Example 4.18 Page No : 130

In [42]:
import math 
		
#initialisation of variables
Cd = 0.62
g = 32.2 		#ft/sec**2
l = 200. 		#ft
w = 25. 		#ft
a1 = 5. 		#ft**2
h = 20. 		#ft
		
#CALCULATIONS
t = 2*l*w*math.sqrt(h-(h/a1))/(Cd*math.sqrt(2*g)*a1)
		
#RESULTS
print  'tme rquired to fill the lock = %.f sec'%(t)

# rounding off error
tme rquired to fill the lock = 1608 sec

Example 4.19 Page No : 130

In [19]:
import math 
		
#initialisation of variables
L = 150. 		#ft
w = 20. 		#ft
t = 5.  		#min
h = 5. 	    	#ft
Cd = 0.6 
Hl = 9. 		#ft
g = 32.2 		#ft/sec**2
		
#CALCULATIONS
T = 2*L*w*math.sqrt(Hl)/(Cd*t*60*math.sqrt(2*g))
		
#RESULTS
print  'Area of sumberged slice = %.1f sq ft'%(T)
Area of sumberged slice = 12.5 sq ft

Example 4.20 Page No : 132

In [20]:
import math 
		
#initialisation of variables
L = 3. 		#ft
H1 = 1.5 		#ft
H2 = 0.75 		#ft
Cd = 0.62
g = 32.2 		#ft/sec**2
		
#CALCULATIONS
Q = 2*Cd*60*L*math.sqrt(2*g)*(H1**1.5-H2**1.5)/3
		
#RESULTS
print  'Discharge per minute = %.1f cubic ft per minute'%(Q)
Discharge per minute = 709.1 cubic ft per minute

Example 4.21 Page No : 134

In [21]:
import math 
		
#initialisation of variables
Cd = 0.62
H1 = 6. 		#ft
H2 = 3. 		#ft
H = 4.   		#ft
g = 32.2 		#ft/sec**2
		
#CALCULATIONS
Q1 = 2*Cd*H*math.sqrt(2*g)*(H**1.5-H2**1.5)/3
Q2 = Cd*H*(H1-H)*math.sqrt(2*g*H)
Q = Q1+Q2
		
#RESULTS
print  'Total discharge = %.f cuses'%(Q)
Total discharge = 117 cuses