Skip to content

polykin.transport.flow¤

fD_Colebrook ¤

fD_Colebrook(Re: float, er: float) -> float

Calculate the Darcy friction factor using Colebrook's equation.

For turbulent flow, i.e., \(Re \gtrsim 2300\), the friction factor is given by the following implicit expression:

\[ \frac{1}{\sqrt{f}}= -2 \log \left( \frac {\epsilon/D} {3.7} + \frac {2.51} {Re \sqrt{f}} \right) \]

This equation is a historical landmark but has the disadvantage of being implicit, requiring an iterative solution.

References

  • Colebrook, C F (1939). "Turbulent Flow in Pipes, with Particular Reference to the Transition Region Between the Smooth and Rough Pipe Laws", Journal of the Institution of Civil Engineers. 11 (4): 133-156.
PARAMETER DESCRIPTION
Re

Reynolds number.

TYPE: float

er

Relative pipe roughness, \(\epsilon/D\).

TYPE: float

RETURNS DESCRIPTION
float

Darcy friction factor.

See also

Examples:

Calculate the friction factor for water flowing at 2 m/s through a PVC pipe with an internal diameter of 25 mm.

>>> from polykin.transport import fD_Colebrook
>>> rho = 1e3 # kg/m³
>>> mu = 1e-3 # Pa·s
>>> D = 25e-3 # m
>>> v = 2.    # m/s
>>> Re = rho*v*D/mu
>>> er = 0.0015/25 # from pipe table
>>> fD = fD_Colebrook(Re, er)
>>> print(f"fD = {fD:.3f}")
fD = 0.021
Source code in src/polykin/transport/flow.py
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
def fD_Colebrook(Re: float, er: float) -> float:
    r"""Calculate the Darcy friction factor using Colebrook's equation.

    For turbulent flow, i.e., $Re \gtrsim 2300$, the friction factor
    is given by the following implicit expression:

    $$  \frac{1}{\sqrt{f}}= -2 \log \left( \frac {\epsilon/D} {3.7} +
        \frac {2.51} {Re \sqrt{f}} \right) $$

    This equation is a historical landmark but has the disadvantage of
    being implicit, requiring an iterative solution.

    **References**

    * Colebrook, C F (1939). "Turbulent Flow in Pipes, with Particular Reference
      to the Transition Region Between the Smooth and Rough Pipe Laws", Journal
      of the Institution of Civil Engineers. 11 (4): 133-156.

    Parameters
    ----------
    Re : float
        Reynolds number.
    er : float
        Relative pipe roughness, $\epsilon/D$.

    Returns
    -------
    float
        Darcy friction factor.

    See also
    --------
    * [`fD_Haaland`](fD_Haaland.md): alternative method.

    Examples
    --------
    Calculate the friction factor for water flowing at 2 m/s through a PVC pipe
    with an internal diameter of 25 mm.
    >>> from polykin.transport import fD_Colebrook
    >>> rho = 1e3 # kg/m³
    >>> mu = 1e-3 # Pa·s
    >>> D = 25e-3 # m
    >>> v = 2.    # m/s
    >>> Re = rho*v*D/mu
    >>> er = 0.0015/25 # from pipe table
    >>> fD = fD_Colebrook(Re, er)
    >>> print(f"fD = {fD:.3f}")
    fD = 0.021
    """

    check_range_warn(Re, 2.3e3, inf, 'Re')

    def fnc(f):
        return 2*log10(er/3.7 + 2.51/(Re*sqrt(f))) + 1/sqrt(f)

    sol = fzero_newton(fnc, fD_Haaland(Re, er), 1e-5)

    return sol.x

Graphical Illustration¤

fD_Colebrook