Chapter 5 : Bernoulli Equation

Example 5.1 page no : 134

In [1]:
#Calculate the increase in temperature due to falling water of waterfall

# Variables    
g=9.81;           #m/s^2 acc. due to gravity
dz=100.;          #m Height of waterfall

# Calculation
du=g*dz;          #J/kg Change in internal energy
Cv=4184.0;        #J/kg/K;
dT=du/Cv          #K Change in temperature

# Result
print "Change in temperature is %f K or degree centigrade"%dT
Change in temperature is 0.234465 K or degree centigrade

Example 5.2 page no : 141

In [5]:
#calculate velocity of air coming out from the nozzle

# Variables  
T=528.                           #R Rankine scale
R=10.73;                         #psi.ft^3/R/lbmol universal gas constant
p=14.71                          #psi
p_atm=14.7;                      #psi
M=29.;                           #lbm/lbmol

# Calculation  
#considering the velocity at the start of the nozzle is negligible
v=((2*R*T/p/M)*(p-p_atm)*(144*32.2))**0.5;              #ft/s

# Result
print "Velocity of the air flowing out of the pipe %f ft/s"%v
Velocity of the air flowing out of the pipe 35.094226 ft/s

Example 5.3 page no : 143

In [6]:
#Calculate the velocity of water flowing out of a nozzle at the bottom of a tank

# Variables  
g=32.2;                             #ft/s^2
h=30.;                              #ft height tank

# Calculation  
#considering the velocityof water at the top of the tank is negligible
v=(2*g*h)**0.5;                     #ft/s

# Result
print "The velocity of the water flowing out through the nozzle is %f ft/s"%v
The velocity of the water flowing out through the nozzle is 43.954522 ft/s

Example 5.4 page no : 144

In [7]:
#calculate velocity of water flowing out of nozzle

# Variables  
A_nozzle=1.0                          #ft^2
A_tank=4.0                            #ft^2
g=32.2                                #ft/s^2
h=30.                                 #ft

# Calculation  
v=(2*g*h/(1-(A_nozzle/A_tank)**2))**0.5           #ft/s

# Result
print "The velocity of water flowing out of nozzle is %f ft/s"%v
The velocity of water flowing out of nozzle is 45.396035 ft/s

Example 5.5 page no : 145

In [8]:
#calculate the velocity of water flowing out of a nozzle

# Variables  
g=32.2                   #ft/s^2
h=30.                    #ft
M_air=29.                #dimentionless (molecular weight)
M_CO2=44.                #dimentionless (molecular weight)

# Calculation  
v=(2*g*h*(1-(M_air/M_CO2)))**0.5            #ft/s

# Result
print "The velocity of water flowing out of nozzle is %f ft/s"%v
The velocity of water flowing out of nozzle is 25.663912 ft/s

Example 5.6 page no : 147

In [9]:
#calculate velocity of sailboat using pitot tube

# Variables  
h=1.                      #m height of water above the water level
g=9.81                    #m/s^2

# Calculation  
v=(2*g*h)**0.5            #m/s

# Result
print "The velocity of sailboat is %f m/s"%v
The velocity of sailboat is 4.429447 m/s

Example 5.7 page no : 148

In [10]:
#Calculate velocity of air flowing through an air duct

# Variables  
dP=0.05                        #psi or lbf/in^2
rho_air=0.075                  #lbm/ft^3

#1ft = 12in
#1 lbf.s^2 = 32.2 lbm.ft

# Calculation  
v=(2*dP*144*32.2/rho_air)**0.5        #ft/s

# Result
print "The velocity of air in the air duct is %f ft/s"%v
The velocity of air in the air duct is 78.628239 ft/s

Example 5.8 page no : 149

In [1]:
#calculate volumetric flow rate using a venturi-meter
import math

# Variables  
dP=1.                                #psi
rho_water=62.3                       #lbm/ft^3
d1=1.                                #ft area at pt 1 in venturimeter
A1=(math.pi)*d1**2/4.0               #ft^2
d2=0.5                               #ft
A2=(math.pi)*d2**2/4.0               #ft^2

#1ft = 12in

# Calculation  
#1 lbf.s^2 = 32.2 lbm.ft
v=((2*dP*144*32.2/rho_water)/(1-(A2/A1)**2))**0.5            #ft/s
q=v*A2                                                       #ft^3/s

# Result
print "The velocity of the water flowing through venturimeter is %f ft/s"%v
print "The volumetric flow rate of water is %f ft^3/s"%q
The velocity of the water flowing through venturimeter is 12.600696 ft/s
The volumetric flow rate of water is 2.474141 ft^3/s

Example 5.9 page no : 149

In [12]:
#calculate actual volumetric flow rate using a venturi-meter
import math

# Variables  
dP=1.                                #psi
rho_water=62.3                       #lbm/ft^3
d1=1.                                #ft area at pt 1 in venturimeter
A1=(math.pi)*d1**2/4                 #ft^2
d2=0.5                               #ft
A2=(math.pi)*d2**2/4                 #ft^2
#1ft = 12in

# Calculation  
#1 lbf.s^2 = 32.2 lbm.ft
v_th=((2*dP*144*32.2/rho_water)/(1-(A2/A1)**2))**0.5           #ft/s
Cv=0.984                            #dimentionless
v_act=Cv*v_th                       #ft/s actual velocity
q=v_act*A2                          #ft^3/s

# Result
print "The velocity of the water flowing through venturimeter is %f ft/s"%v_act
print "The volumetric flow rate of water is %f ft^3/s"%q
The velocity of the water flowing through venturimeter is 12.399084 ft/s
The volumetric flow rate of water is 2.434555 ft^3/s

Example 5.10 page no : 152

In [13]:
#Calculate the pressure difference in a pipe
import math

# Variables  
v1=1.                    #m/s
d1=0.4                   #m
A1=(math.pi)*d1**2/4     #m^2
d2=0.2                   #m
A2=(math.pi)*d2**2/4     #m^2
v2=A1*v1/A2              #m/s
Cv=0.62                  #dimentionless
rho_water=998.2          #kg/m^3

# Calculation  
dP=(rho_water*v2**2/2/Cv**2)*(1-(A2/A1)**2)/1000.             #KPa

# Result
print "The pressure difference in the pipe is %f KPa"%dP
The pressure difference in the pipe is 19.475806 KPa

Example 5.11 page no : 155

In [14]:
#Calculate the flow rate of helium with rotameter caliberated with nitogen

# Variables  
M_N2=28.                            #dimentionless
M_He=4.                             #dimentionless

#Density is proportional to molecular weight
q_N2=100.                           #cm^3/min

# Calculation  
q_He=q_N2*(M_N2/M_He)**0.5          #cm^3/min

# Result
print "The flow rate of Helium is %f cm^3/min"%q_He
The flow rate of Helium is 264.575131 cm^3/min

Example 5.12 page no : 156

In [15]:
#Calculate the absolute pressure at the top of a inverted manometer tube

# Variables  
p_atm=14.7                        #lbf/in^2
g=32.2                            #ft/s^2

#one end of the inverted manometer is immersed in a tank and the other end is open to atmosphere 10 ft below tank level
#pt 1 is at tank water level, pt 2 is at top of inverted manometer and pt3 is at the other end of manometer
dh=10.                            #ft
v3=(2*g*dh)**0.5                  #ft/s
p1=p_atm                          #lbf/in^2
rho_water=62.3                    #lbm/ft^3

#Difference of height between pt 1 and pt 2 is 40 ft
dh1=40.                           #dft

# Calculation  
p2=p1-(rho_water*v3**2/2/32.2/144)-(rho_water*g*dh1)/32.2/144          #lbf/in^2

# Result
print "The absolute pressure at the top of the inverted manometer is %f lbf/in^2"%p2
The absolute pressure at the top of the inverted manometer is -6.931944 lbf/in^2

Example 5.13 page no : 156

In [16]:
#Calculate pressure at the throat in a venturimeter

# Variables  
dP=10.                             #psi or lbf/in^2
rho_water=62.3                     #lbm/ft^3
#1ft = 12in

# Calculation  and  Result
#1 lbf.s^2 = 32.2 lbm.ft
v3=(2*dP*144*32.2/rho_water)**0.5         #ft/s
print "The velocity of water after the throat is %f ft/s"%v3

ratio_A=0.5                               #dimentionless (ratio of throat area to pipe area)
v2=v3/ratio_A                             #ft/s
print "The velocity of water at the throat is %f ft/s"%v2

P1=24.7                                   #psia
rho_water=62.3                            #lbm/ft^3
P2=P1-(rho_water)*v2**2/32.2/144/2        #psia
print "The pressure of water at the throat is %f psia"%P2
The velocity of water after the throat is 38.581593 ft/s
The velocity of water at the throat is 77.163186 ft/s
The pressure of water at the throat is -15.300000 psia