This notebook contains course material from FAT0413156 by Gilberto Xavier (gmxavier at fat.uerj.br); the content is available on Github. The text is released under the CC-BY-NC-SA-4.0 license, and code is released under the MIT license.
Supplementary material:
from IPython.display import YouTubeVideo
YouTubeVideo('Ghne0ljubJY')
YouTubeVideo('7ixV7M1dUoE')
YouTubeVideo('oUd4WxjoHKY')
YouTubeVideo('D6sbzkYq3_c')
YouTubeVideo('ofiQPZkGPJM')
YouTubeVideo('YKg97YmpuD8')
YouTubeVideo('bnuWxvK8v6g') # rotameter
YouTubeVideo('Pz-Mvdc6nf4') # rotameter
YouTubeVideo('BgZMdBY4kLM') # rotameter
YouTubeVideo('LjEBYDmdo_Q') # v-notch weir
YouTubeVideo('ZcyWsnGcqCs') # parshall flume
YouTubeVideo('-RvwXGzzv4c') # turbine
YouTubeVideo('adJkrG4BP70') # turbine
YouTubeVideo('_GvVUHvHwuA') # turbine
YouTubeVideo('GmTmDM7jHzA') # vortex
YouTubeVideo('mebqTla2vWg') # vortex
YouTubeVideo('OOTbOtmtRE8') # vortex
YouTubeVideo('BpNrvZtobAM') # vortex
Supplementary material:
YouTubeVideo('vopAJLuHwJY') # ultrasonic
YouTubeVideo('DD2bBLu6kLM') # ultrasonic
YouTubeVideo('Cib_kePo458') # ultrasonic
YouTubeVideo('f949gpKdCI4') # electromagnetic
YouTubeVideo('X4uWaiHWkwE') # electromagnetic
YouTubeVideo('KugKx--8r4I') # electromagnetic
YouTubeVideo('9QagP-tqWIA') # electromagnetic
YouTubeVideo('lRSjYjg9WRo') # electromagnetic
YouTubeVideo('TqzkwtT24d0') # electromagnetic
YouTubeVideo('MaA6WtgtuQo') # rotary vane
YouTubeVideo('pplr5hSQ-34') # gear
YouTubeVideo('mOpNVsVV4_w') # oval gear
YouTubeVideo('v3vcPhuWXSs') # nutating disk
YouTubeVideo('h5UMvzf6xOI') # piston
YouTubeVideo('YfQSf2NBGqc') # thermal
YouTubeVideo('-VUL0xWfUeY') # thermal
YouTubeVideo('XIIViaNITIw') # coriolis
YouTubeVideo('Xvlf5fPiQaM') # coriolis
YouTubeVideo('QZ2iQ6K03kk') # coriolis
YouTubeVideo('YnkTi_FmKLI') # conveyor belt scale
The function differential_pressure_meter_solver
from the great Caleb Bell's fluids
package can be used to calculate the bore size of a orifice plate.
Using the scipy
package to converting this problem to SI units and the other great Caleb Bell's thermo
package to obtain the necessary properties of the fluid, let's try to solve this example.
try:
import fluids
except:
!pip install fluids
from fluids.flow_meter import differential_pressure_meter_solver, C_Reader_Harris_Gallagher
try:
import thermo
except:
!pip install thermo
from thermo.chemical import Chemical
from thermo import IAPWS95Gas
import matplotlib.pyplot as plt
import numpy as np
from scipy.constants import *
In this case, for water flowing through an orifice plate with "flange" taps, we have:
inH2O = 248.84
m = 10000*lb/hour # lb/h to kg/s
T = constants.convert_temperature(200, 'F', 'K') # oF to K
P1 = 30*psi
DP = 100*inH2O #in H2O to Pa
P2 = P1 - DP
D = 2.067*inch
water = Chemical('water', T=T, P=P1)
rho = water.rho
mu = water.mu
k = water.isentropic_exponent
Do = differential_pressure_meter_solver(D=D, m=m, P1=P1, P2=P2, rho=rho, mu=mu, k=k, meter_type='ISO 5167 orifice', taps='flange')/inch
print('Do = %.4f in' % Do) # ChemCad calculation gives Do = 0.7686 in
Do = 0.7806 in
Another interesting thing we can do is to see how the flow coefficient varies with the pipe Reynolds number for different values. Let's see how we can do this.
#Calculating C
C = [] #C values
ReD = np.logspace(2,6) #Reynolds number values
beta = np.linspace(0.2,0.8,7) #Beta ratio values
for ReDi in ReD:
for betai in beta:
mi = ReDi*(np.pi*D**2/4)*mu/D #mass flowrate values
C.append(C_Reader_Harris_Gallagher(D, D*betai, rho, mu, m=mi, taps='D')/(1 - betai**4)**0.5) #CD/sqrt(1-beta**4)
C = np.reshape(C, (50,7))
#Plotting
fig, ax = plt.subplots()
ax.plot(ReD, C, linewidth=2.0)
plt.xscale('log')
plt.xlabel('$Re_{D}$')
plt.ylabel('$\\frac{C_{D}}{\\sqrt{1 - \\beta^4}}$')
plt.ylim([0.55,0.85])
plt.grid()
plt.legend(['%.2f' % betai for betai in beta], loc=0, title='$\\beta$')
plt.title('Flow coefficient vs. Reynolds number')
plt.show()
As we can see from this graph, as the ratio increases the meter rangeability decreases. Visually, the meter rangeability can be seen as the length of the flow coeficient flat region.
Now, let's try to solve another example.
D = 7.981*inch #in to m
m = 8000*lb/hour # lb/h to kg/s
P1 = 60*psi + 14.6960001
DP = 29.117*inH2O #in H2O to Pa
P2 = P1 - DP
rho = 0.171328*lb/(foot**3) #lb/ft3 to kg/m3
mu = 0.014093*1e-3 #cP to Pa s
k = 1.317455
Do = differential_pressure_meter_solver(D=D, m=m, P1=P1, P2=P2, rho=rho, mu=mu, k=k, meter_type='ISO 5167 orifice', taps='flange')/inch
print('Do = %.4f in' % Do) # Emerson calculation gives Do = 4.000 in
Do = 4.0078 in