Pressure calculations

pyeng.hydraulics.pipe_flow.pressure_calcs.pressuredrop_relativeroughness_moody(reynolds_number, pipe_diameter, pipe_material, pipe_length, average_velocity, fluid_density, gravity_coefficient=9.81, relative_roughness=nan, fail_silently=True, **kwargs)

The Moody diagram relates Reynolds number to Darcy-Weissbach friction factor. This friction factor is used to calculate the head loss in a pipe. The underlying dataset consists of more than 10,000 experiments from various sources. For the laminar flow regime (Re < 3000), roughness has no discernible effect, and the Darcy-Weisbach friction factor was determined analytically by Poisseuille. For the turbulent flow regime, the relationship between the friction factor, the Reynolds number Re, and the relative roughness is more complex and is derived from the Moody chart. The figure shows values for typical pipe walls. These values are coded into the function but an override can also be specified.

Parameters:
  • reynolds_number – Reynolds number (\(Re\)) [\(-\)] - Suggested range: 500.0<=reynolds_number<=100000000.0
  • pipe_diameter – Pipe inside diameter (\(d\)) [\(m\)] - Suggested range: 0.0<=pipe_diameter
  • pipe_material – Pipe material [\(-\)] Options: (“Concrete,coarse”,”Concrete,new smooth”,”Drawn tubing”,”Glass,plastic,perspex”,”Iron,cast”,”Sewers,old”,”Steel,mortar lined”,”Steel,rusted”,”Steel,structural or forged”,”Water mains,old”), regex: None
  • pipe_length – Pipe length (\(L\)) [\(m\)] - Suggested range: 0.0<=pipe_length
  • average_velocity – Average velocity of the fluid in the pipe (\(V\)) [\(m/s\)] - Suggested range: 0.0<=average_velocity
  • fluid_density – Density of the fluid (\(\rho\)) [\(kg/m3\)] - Suggested range: 500.0<=fluid_density<=2500.0
  • gravity_coefficient – Acceleration due to gravity (\(g\)) [\(m/s2\)] (optional, default=9.81) - Suggested range: 9.7<=gravity_coefficient<=10.0
  • relative_roughness – Relative roughness override [\(-\)] (optional, default=np.NaN) - Suggested range: relative_roughness<=0.05
\[ \begin{align}\begin{aligned}\text{Head loss:} \quad f_D \frac{L}{d} \frac{V^2}{2 g}\\\text{Pressure drop:} \quad \rho g h_f\\\text{Relative pipe roughness} = \epsilon / d\\\text{Laminar flow:} \quad f_D = \frac{64}{Re}\end{aligned}\end{align} \]
Returns:Darcy Weissbach friction factor (\(f_D\)) [-], Pipe roughness (\(\epsilon\)) [\(mm\)], Head loss (\(h_f\)) [\(m\)], Pressure drop (\(\Delta P\)) [\(Pa\)], Flow regime [-], Friction factor for laminar flow (\(f_{d,laminar}\)) [-], Friction factor for fully turbulent flow (\(f_{d,turbulent}\)) [-]
Return type:Python dictionary with keys [‘friction_factor [-]’,’roughness [mm]’,’head_loss [m]’,’pressure_drop [Pa]’,’flow_regime [-]’,’friction_factor_laminar [-]’,’friction_factor_turbulent [-]’]
../../../_images/Moody_diagram_matplotlib.png

Moody diagram - Matplotlib output

Reference - Moody, L. F. (1944), “Friction factors for pipe flow”, Transactions of the ASME, 66 (8): 671-684