polykin.transport.flow¤
DP_Darcy_Weisbach ¤
DP_Darcy_Weisbach(
v: float, D: float, L: float, rho: float, fD: float
) -> float
Calculate the pressure drop in a pipe using the Darcy-Weisbach equation.
For a fluid flowing through a circular pipe, the pressure drop is given by:
where \(f_D\) is the Darcy friction factor, \(v\) is the velocity, \(D\) is the pipe diameter, \(L\) is the pipe length, and \(\rho\) is the fluid density. This equation is valid for both laminar and turbulent flow. In laminar flow, \(f_D=64/Re\). For turbulent flow, \(f_D\) can be estimated using either Colebrook's or Haaland's equation.
PARAMETER | DESCRIPTION |
---|---|
v
|
Velocity (m/s).
TYPE:
|
D
|
Diameter (m).
TYPE:
|
L
|
Length (m).
TYPE:
|
rho
|
Density (kg/m³).
TYPE:
|
fD
|
Darcy friction factor. Should not be confused with the Fanning friction factor.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
float
|
Pressure drop (Pa). |
See also
fD_Colebrook
: associated method to estimate the friction factor.fD_Haaland
: associated method to estimate the friction factor.DP_Hagen_Poiseuille
: specific method for laminar flow.
Examples:
Calculate the pressure drop for water flowing at 2 m/s through 500 m of PVC pipe with an internal diameter of 25 mm.
>>> from polykin.transport import DP_Darcy_Weisbach, fD_Haaland
>>> rho = 1e3 # kg/m³
>>> mu = 1e-3 # Pa·s
>>> L = 5e2 # m
>>> D = 25e-3 # m
>>> v = 2. # m/s
>>> Re = rho*v*D/mu # turbulent flow
>>> print(f"Re = {Re:.1e}")
Re = 5.0e+04
>>> er = 0.0015e-3/D # from pipe table
>>> fD = fD_Haaland(Re, er)
>>> DP = DP_Darcy_Weisbach(v, D, L, rho, fD)
>>> print(f"DP = {DP:.1e} Pa")
DP = 8.3e+05 Pa
Source code in src/polykin/transport/flow.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
|