CHURCHILL
Evaluates the Churchill (1977) universal correlation for Darcy friction factor across laminar, transitional, and turbulent pipe-flow regimes. It combines Reynolds number and relative roughness into a single explicit expression, making it useful when a smooth transition across regimes is preferred.
In compact form, the model is:
f_d = 2\left[\left(\frac{8}{Re}\right)^{12} + (A_2 + A_3)^{-1.5}\right]^{1/12}
where A_2 and A_3 are auxiliary terms defined from Re and \epsilon/D. This gives a continuous approximation without switching formulas at regime boundaries.
Excel Usage
=CHURCHILL(Re, eD)
Re(float, required): Reynolds number, [-]eD(float, required): Relative roughness, [-]
Returns (float): Darcy friction factor across all pipe-flow regimes [-]
Example 1: Laminar flow regime (Re = 1000)
Inputs:
| Re | eD |
|---|---|
| 1000 | 0.0001 |
Excel formula:
=CHURCHILL(1000, 0.0001)
Expected output:
0.064
Example 2: Turbulent flow regime (Re = 100000)
Inputs:
| Re | eD |
|---|---|
| 100000 | 0.0001 |
Excel formula:
=CHURCHILL(100000, 0.0001)
Expected output:
0.0184626
Example 3: Transition flow regime (Re = 3000)
Inputs:
| Re | eD |
|---|---|
| 3000 | 0.0001 |
Excel formula:
=CHURCHILL(3000, 0.0001)
Expected output:
0.043049
Example 4: Higher roughness value (Re = 100000, eD = 0.01)
Inputs:
| Re | eD |
|---|---|
| 100000 | 0.01 |
Excel formula:
=CHURCHILL(100000, 0.01)
Expected output:
0.0387336
Python Code
Show Code
from fluids.friction import Churchill_1977 as fluids_churchill_1977
def churchill(Re, eD):
"""
Calculate Darcy friction factor using the Churchill (1977) universal equation for all flow regimes.
See: https://fluids.readthedocs.io/fluids.friction.html#fluids.friction.Churchill_1977
This example function is provided as-is without any representation of accuracy.
Args:
Re (float): Reynolds number, [-]
eD (float): Relative roughness, [-]
Returns:
float: Darcy friction factor across all pipe-flow regimes [-]
"""
try:
Re = float(Re)
eD = float(eD)
if Re <= 0:
return "Error: Reynolds number must be positive."
if eD < 0:
return "Error: Relative roughness cannot be negative."
result = fluids_churchill_1977(Re=Re, eD=eD)
if result != result:
return "Error: Result is NaN."
if result == float('inf') or result == float('-inf'):
return "Error: Result is not finite."
return float(result)
except Exception as e:
return f"Error: {str(e)}"