# Chapter 2 : Hydrodynamics¶

### Example 2.1 pageno : 41¶

In [3]:
#initialisation of variables

import math

Q = 0.8 			#ft**3/sec
w = 62.4 			#lb/sec
d1 = 3. 			#in
d2 = 1.5 			#in
#CALCULATIONS
Q1 = Q*w*60/10.
a1 = math.pi*(d1/12.)**2/4.
a2 = math.pi*(d2/12.)**2/4.
v1 = Q/a1
v2 = Q/a2

#RESULTS
print 'Q = %.f gpm'%Q1
print  'v1  = %.1f ft/sec '%(v1)
print  'v2  = %.1f ft/sec '%(v2)

Q = 300 gpm
v1  = 16.3 ft/sec
v2  = 65.2 ft/sec


### Example 2.2 page no : 45¶

In [3]:
#initialisation of variables
import math
d1 = 12. 			#in
d2 = 9. 			#in
z1 = 10. 			#ft
z2 = 10. 			#ft
p1 = 15. 			#lb/in**2
w = 62.4 			#lb/ft**3
Q = 2. 			#cuses
g = 32.2 			#ft/sec**2
#CALCULATIONS
v1 = Q/(math.pi*(d1/12.)**2/4.)
v2 = Q/(math.pi*(d2/12.)**2/4.)
p2 = w*(z1-z2+(p1*144/w)+(v1**2/(2*g))-(v2**2/(2*g)))/144
#RESULTS
print  'p2  = %.2f lb/in**2 '%(p2)

# note : answer is slightly differet because of rounding error.

p2  = 14.91 lb/in**2


### Example 2.3 page no : 46¶

In [6]:
#initialisation of variables
import math
d0 = 4. 			#ft
d2 = 2. 			#ft
z0  = 0 			#ft
z1 = 5. 			#ft
z2 = 13. 			#ft
h = 9.5 			#in
w = 62.4 			#lb/ft**3
w1 = 30. 			#lb/ft**3
g = 32.2 			#ft/sec**2
r = 0.1
#CALCULATIONS
p2 = -h*34/w1
v2 = math.sqrt(2*g*(z1-p2-z2)/(1+r))
Q = math.pi*(d2/12)**2*v2*w*60/(10*4)
#RESULTS
print  'Discharge  = %.f gpm '%(Q)

Discharge  = 104 gpm


### Example 2.4 pageno :47¶

In [7]:
#initialisation of variables

import math
d1 = 2 			#ft
d2 = 3 			#ft
v1 = 20 			#ft/sec
z1 = 20 			#ft
z2 = 0 			#ft
h = 5 			#ft
w = 62.4 			#lb/ft**3
g = 32.2 			#ft/sec**2
#CALCULATIONS
Hl = v1**2*0.15/(2*g)
a1 = math.pi*d1**2/4
a2 = math.pi*d2**2/4
v2 = a1*v1/a2
p1 = ((h-z1+(v2**2)/(2*g))-(0.85*v1**2/(2*g)))
#RESULTS
print  'water pressure at top  = %.2f ft of water '%(p1)

water pressure at top  = -19.05 ft of water


### Example 2.5 page no : 50¶

In [12]:
#initialisation of variables

import math
d1 = 15. 			#in
d2 = 6.			#in
h = 10. 			#in of mercury
C = 0.98
sm = 13.6
w = 12.
g = 32.2 			#ft/sec**2
#CALCULATIONS
a1 = math.pi*(d1/12)**2/4
a2 = math.pi*(d2/12)**2/4
h1 = h*(sm-1)/w
Q = round(C*(a1*a2/(math.sqrt(a1**2-a2**2)))*math.sqrt(2*g)*math.sqrt(h1)*6.24*60*60,-2)

#RESULTS
print  'Discharge  = %.f gph '%(Q)


Discharge  = 113900 gph


### Example 2.6 page no : 52¶

In [4]:
#initialisation of variables
import math
d1 = 8. 			#in
d2 = 4. 			#in
h = 10. 			#in of mercury
Cd = 0.98
g = 32.2 			#ft/sec**2
sm = 13.56
#CALCULATIONS
a1 = math.pi*(d1/12)**2/4
a2 = math.pi*(d2/12)**2/4
h1 = h*(sm-1)/12
Q = a1*a2*math.sqrt(2*g)*math.sqrt(h1)/math.sqrt(a1**2-a2**2)
Qactual = Cd*Q
#RESULTS
print  'Actual discharge  = %.2f cusecs '%(Qactual)

# Note : Answer is slightly different because of rounding error.

Actual discharge  = 2.29 cusecs


### Example 2.7 page no : 54¶

In [17]:
#initialisation of variables

import math
h = 6.8 			#in of mercury
sm = 13.6
ssw = 1.026
g = 32.2 			#ft/sec**2
#CALCULATIONS
V = math.sqrt(2*g*h*(sm-ssw)/12)*3600/5280
#RESULTS
print  'speed of submarine  = %.1f miles per hour '%(V)

speed of submarine  = 14.6 miles per hour


### Example 2.8 page no : 58¶

In [7]:
#initialisation of variables

import math
g = 32.2 			#ft/sec**2
d1 = 2. 			#in
d2 = 12. 			#in
r = 1.4
n = 0.905
Q = 2995. 			#lb/ft**2
w = 0.083 			#lb/ft**3
#CALCULATIONS
V1 = round(1/w,2)
n1 = round(n**((r-1)/r),2)
n2 = n**(2/r)
Q = math.pi*(d1/12)**2*math.sqrt(2*g*Q*(1-n1)*r/((r-1)*n2*(1-(d1/d2)**2)))

#RESULTS
print  'Volume of air passing through the Venturimeter  = %.1f cuses '%(Q)

# note : answer is different because of rounding error.

Volume of air passing through the Venturimeter  = 13.5 cuses

In [ ]: