Chapter 3 - Fluid Kinematics

Example 1 - Pg 52

In [1]:
#calculate the mean velocity of flow at both the sections
#Initialization of variables
import math
gam=0.0765 #lb/ft^3
Q=100. #ft^3/sec
d1=2.5 #ft
d2=9. #in
l=12. #ft
#calculations
A1=math.pi/4. *d1*d1
V1=Q/A1
A2=math.pi*l*d2/12.
V2=Q/A2
#results
print '%s %.1f %s' %("Mean velocity of flow at section 1 =",V1,"ft/sec")
print '%s %.2f %s' %("\n Mean velocity of flow at section 2 =",V2,"ft/sec")
Mean velocity of flow at section 1 = 20.4 ft/sec

 Mean velocity of flow at section 2 = 3.54 ft/sec

Example 5 - Pg 60

In [2]:
#calculate the horizontal and vertical components of velocity
#Initialization of variables
x=3. 
y=1.
#calculations
u=-3*y*y
v=-6*x
#results
print '%s %d' %("Horizontal component of velocity = ",u)
print '%s %d' %("\n vertical component of velocity = ",v)
Horizontal component of velocity =  -3

 vertical component of velocity =  -18