Chapter 5: Flow

Example 5.1, Page Number: 310

In [1]:
import math
#(i)

#variable declaration
d=75.0*10**-3                   # diameter of pipe
a=math.pi*d**2/4                # area of cross section of pipe
v=760.0*10**-3                  # flow velocity

#calculation
Q=v*a
Q=Q*10**3
print('(i)\nVolume Flow Rate Q=%.3f *10^-3 m^3/sec' %Q)
rho=1000.0
W=rho*Q*10**-3

#result
print('\n(ii)\nMass Flow rate W=%.3f kg/sec' %W)
(i)
Volume Flow Rate Q=3.358 *10^-3 m^3/sec

(ii)
Mass Flow rate W=3.358 kg/sec

Example 5.2, page Number:310

In [2]:
import math

#variable declaration
D=40.0                   # Diameter of pipe
d=20.0                   # Diameter of Orifice
mr=15.0                  # Manometer reading

#calculation
h=(13.6-1)*15.0*10.0
B=d/D
M=1/math.sqrt(1-(B**4))
Cd=0.5999
x=math.sqrt(2*9.8*h*(10**-3))
Q=x*Cd*M*(math.pi*((20*(10**-3))**2))/4
Q=Q*3600.0

#result
print('Volumetric flow rate Q= %.4f m^3/hr' %Q)
#Answer slightly deviates from answer given in the book because of pi value.
#if pi=3.14, then answer is same as in textbook  
Volumetric flow rate Q= 4.2649 m^3/hr

Example 5.3, Page Number: 310

In [3]:
import math
#variable declaration
Re=10.0**5                # Reynolds number
D=40.0*10**-3             # Diameter of pipe 
v=10**-6                  # Kinematic viscosity in m^2/sec

#calculation
V1=Re*v/D
A1=(math.pi*(40.0*10**-3)**2)/4
A2=(math.pi*(20.0*10**-3)**2)/4
V2=V1*A1/A2

#result
print('V2=%.1f m/sec' %V2)
V2=10.0 m/sec

Example 5.4, Page Number: 311

In [4]:
import math

#variable declaration
Cd=0.61                          # discharge coefficient
D=40.0*10**-3                    # Diameter of pipe
d=20.0*10**-3                    # Diameter of Orifice 

#calculation
M=1/math.sqrt(1-(d/D)**4)
V2=10.0
rho=1000.0
g=9.8
X=V2*math.sqrt(rho/(2*g))/(Cd*M)
p_diff=X**2
p_diff=math.floor(p_diff/100)
p_diff=p_diff/100.0


#result
print('P1-P2 = %.2f kg/cm^2'%p_diff)
P1-P2 = 1.28 kg/cm^2

Example 5.5, Page Number: 312

In [5]:
import math

#variable declaration
Cd=0.6                      # discharge coefficient
D=150.0*10**-3              # Diameter of pipe
d=75.0*10**-3               # Diameter of Orifice 
p=250.0                     # pressure recorded
g=9.8                       # acceleration due to gravity
rho=1000.0                  # Water density    
s=75.0*10**-3               # venturi tube size

#(a)

#calculation
Q=Cd*math.pi*s**2*math.sqrt(2*g*p/rho)/(4*math.sqrt(1-(d/D)**4))  

#result
print('(a) For orifice plate\nQ=%f m^3/sec = %.3f litres/sec'%(Q,Q*1000))

#calculation
Cd1=0.99
Q2=Cd1*math.pi*s**2*math.sqrt(2*g*p/rho)/(4*math.sqrt(1-(d/D)**4))

#result
print('\n\n(b)For venturi tube\nQ=%f m^3/sec = %.2f litres/sec'%(Q2,Q2*1000))
#Answer slightly deviates from answer given in the book because of pi value.
#if pi=3.14, then answer is same as in textbook  
(a) For orifice plate
Q=0.006060 m^3/sec = 6.060 litres/sec


(b)For venturi tube
Q=0.009999 m^3/sec = 10.00 litres/sec

Example 5.6, Page Number: 312

In [6]:
import math

#(i)

#variable declaration
V=0.02                   # volumetric flow rate
d=10*10**-2              # Diameter of pipe

#calculation
A=math.pi*d**2/4
v=V/A
rho=1000.0
Re=rho*v*d/10**-3
Re=Re/100000.0

#result
print('(i)\nReynolds number(Re) = %.3f * 10^5'%Re)

#(ii)

#variable declaration
Cd=0.98                     # discharge coefficient 
D=20*10**-2                 # Diameter of pipe  
d=10*10**-2                 # Diameter of orifice

#calculation
M=1/math.sqrt(1-(d/D)**4)
a2=math.pi*d**2/4
Q=0.02
g=9.8
X=Q*math.sqrt(rho)/(M*Cd*a2*math.sqrt(2*g))
p_diff=math.ceil(X**2)

#result
print('\n(ii)\nPressur_difference = %d kg/m^2 = %.4f kg/cm^2'%(p_diff,p_diff/10000))
#Answer slightly deviates from answer given in the book because of pi value.
#if pi=3.14, then answer is same as in textbook  
(i)
Reynolds number(Re) = 2.546 * 10^5

(ii)
Pressur_difference = 323 kg/m^2 = 0.0323 kg/cm^2

Example 5.7, Page Number: 313

In [7]:
import math



#variable declaration
g=9.81                          #acceleration due to gravity
h=20.0                          #height

#calculation
v=math.sqrt(2*g*h)
d=300.0*10**-3
A=(math.pi*d**2)/4
A=math.floor(A*1000)
A=A/1000.0
Q=A*v

#result
print('Q = %.3f m^3/sec'%Q)
Q = 1.387 m^3/sec

Example 5.8, Page Number:313

In [8]:
import math

#variable declaration
Cd=0.6                          # coefficient of discharge 
g=9.8                           #acceleration due to gravity
h=400*10**-3                    #height

#calculation
V=Cd*math.sqrt(2*g*h)

#result
print('V = %.2f m/sec' %V)
V = 1.68 m/sec

Example 5.9, Page Number: 314

In [9]:
import math

#variable declaration
Cd=0.98                    # coefficient of discharge
g=9.8                      #acceleration due to gravity
h=900.0*10**-3             #height

#calculation
V=Cd*math.sqrt(2*g*h)
V=math.floor(V*100)
V=(V/100.0)

#result
print('V = %.2f m/sec' %V)
V = 4.11 m/sec

Example 5.10, Page Number:314

In [10]:
import math

#Variable declaration
del_p=20*10**3                  #Pa
dens_water=1000                 #kg/m^3
dens_air=1.29                   #kg/m^3

#calculations

#(i)When flowing fluid is water
v=math.sqrt(2*del_p/dens_water)

#(ii)When flowing fluid is air
v1=math.sqrt(2*del_p/dens_air)

#result
print('\n(i)When flowing fluid is water\n\tV=%.3f m/sec'%v)
print('\n(ii)When flowing fluid is air\n\tV=%.0f m/sec'%v1)
(i)When flowing fluid is water
	V=6.325 m/sec

(ii)When flowing fluid is air
	V=176 m/sec

Example 5.11, Page Number: 314

In [11]:
import math

# variable declaration
dens=1026.0                  # density of see water
p=25.0*10**3                 # pressure difference in manometer 

#calculation
V=math.sqrt(2*p/dens)

#result
print('V=%.2f m/sec =%.3f km/hr'%(V,V*18/5))
V=6.98 m/sec =25.131 km/hr

Example 5.12, Page Number: 314

In [12]:
import math

# variable declaration
dens=1.29                  # air density at height 

#calculation
p=12.5*1000
V=math.sqrt(2*p/dens)


#result
print('V=%.2f m/sec =%.2f km/hr'%(V,V*18/5))
V=139.21 m/sec =501.16 km/hr

Example 5.13, Page Number: 315

In [13]:
import math

#variable declaration
Cd=0.6                        # discharge coefficient
Dp=0.05                       # inside diameter of metering tube 
Df=0.035                      # diameter of rotameter 
g=9.8                         # acceleration due to gravity
rho_f=3.9*10**3               # density of cylindrical float
rho=1000.0                    # water density  
Vf=3.36*10**-5                # volume of the float

#calculation
Q=Cd*((Dp**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))
Q=Q*10000.0

#result
print('Volumetric flow Q=%.4f *10^-4 m^3/sec' %Q)
#Answer slightly deviates from answer given in the book because of pi value.
#if pi=3.14, then answer is same as in textbook  
Volumetric flow Q=8.4652 *10^-4 m^3/sec

Example 5.14, Page number: 315

In [14]:
import math
# variable declaration
Cd=1                      # discharge coefficient
Dp=0.018                  # inside diameter of metering tube 
Df=0.015                  # diameter of rotameter 
g=9.81                    # acceleration due to gravity
rho_f=2.7                 # density of cylindrical float
rho=0.8                   # water density  
Vf=520.0*10**-9           # volume of the float

#case 1

#caculation
Qmin=Cd*((Dp**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))
Qmin=Qmin*100000.0

#result
print('Case 1: When float is at the bottom\n Volumetric flow Qmin=%.3f *10^-5 m^3/sec'%Qmin)

#case 2

#calculation
Dp2=0.0617
Qmax=Cd*((Dp2**2-Df**2)/Df)*math.sqrt(math.pi*g*Vf*(rho_f-rho)/(2*rho))
Qmax=Qmax*100000

#result
print('\n\nCase 2: When float is at the bottom\n Volumetric flow Qmax=%.2f *10^-5 m^3/sec'%Qmax)
Case 1: When float is at the bottom
 Volumetric flow Qmin=2.879 *10^-5 m^3/sec


Case 2: When float is at the bottom
 Volumetric flow Qmax=104.17 *10^-5 m^3/sec

Example 5.15, Page Number:316

In [15]:
# variable declaration
W=165.0                 # weight of material on section of length
R=328.0                 # Conveyor speed m/min
L=16.0                  # Length of weighting platform in m

#calculation
Q=W*R/L

#result
print('Flow Rate Q=%.2f kg/min =%.1f kg/hour'%(Q,Q/60))
Flow Rate Q=3382.50 kg/min =56.4 kg/hour

Example 5.16, Page Number:316

In [16]:
import math

#variable declaration
f=100.0              # beat frequency
d=300.0*10**-3       # Sound path
a=45.0               #angle between transmeter and receiver in degrees

#calculation
a_rad=45.0*math.pi/180.0
v=f*d/(2*math.cos(a_rad))

#Result
print('Fluid Velocity V=%.1f m/sec'%v)
Fluid Velocity V=21.2 m/sec

Example 5.17, Page Number: 316

In [17]:
# variable declaration
r=150.0              # speed of rotation
v=120.0              # volume trapped between gears and casting

#clculation
Q=4.0*v*r

#result
print('Volume flow rate Q=%d cm^3/min = %d litres/min'%(Q,Q/1000))
Volume flow rate Q=72000 cm^3/min = 72 litres/min

Example 5.18, Page Number: 317

In [18]:
import math

# variable declaration
Q=2500.0                 # Quantitty flow rate
d=2.75                   # inner diameter

#calculation
a=(math.pi*d**2)/4
v=Q/(60*a)
B=60.0
e=B*d*10**-2*v*10**-2

#result
print('Induced emf e =%.4f V=%.1f mV'%(e,e*1000))
Induced emf e =0.1157 V=115.7 mV

Example 5.19, Pae Number:317

In [19]:
# variable declaration
e=0.2*10**-3             # voltage of electromagnetic flow meter
B=0.08                   # Flux density
l=10.0*10**-2            # Diameter of pipe

#calculation
v=e/(B*l)

#result
print('V = %.3f m/sec = %.2f cm/sec'%(v,v*100))
V = 0.025 m/sec = 2.50 cm/sec

Example 5.20, Page Number: 317

In [20]:
# variable declaration
ei=0.15*10**-3             # peak value
em=2*ei                    # p-p amplifier output 
B=0.1                      # flux density
l=60.0*10**-3              # diameter of the pipe

#calculation
v=em/(B*l)

#result
print('Velocity of flow V = %.2f m/sec = %.1f cm/sec'%(v,v*100))
Velocity of flow V = 0.05 m/sec = 5.0 cm/sec