Darcy-Weisbach Calculator

Calculate pipe head loss, friction factor, and flow regime using the Darcy-Weisbach equation. Includes Colebrook-White solver for turbulent flow.

Darcy-Weisbach Equation: \( h_f = f \cdot \frac{L}{D} \cdot \frac{V^2}{2g} \)

Colebrook-White (turbulent): \( \frac{1}{\sqrt{f}} = -2 \log_{10} \left( \frac{\epsilon/D}{3.7} + \frac{2.51}{Re\sqrt{f}} \right) \)

Steel pipe ~0.046 mm, Concrete ~0.3-3 mm
Water at 20°C: 1e-6, Air: ~1.5e-5
PVC (0.0015 mm)
Steel (0.046 mm)
Concrete (0.3 mm)
Galvanized (0.15 mm)
Smooth (0 mm)

Understanding the Darcy-Weisbach Equation

The Darcy-Weisbach equation is the most theoretically sound and universally applied formula for calculating friction head loss in pipes. It is valid for any fluid (liquid or gas) and any flow regime, provided the correct friction factor is used.

Fundamental Form:

\( h_f = f \cdot \frac{L}{D} \cdot \frac{V^2}{2g} \)

where:
\( h_f \) = head loss due to friction (m)
\( f \) = Darcy friction factor (dimensionless)
\( L \) = pipe length (m)
\( D \) = internal pipe diameter (m)
\( V \) = average flow velocity (m/s)
\( g \) = gravitational acceleration (9.81 m/s²)

Origin & Derivation

The equation can be derived from dimensional analysis or from the energy equation applied to a control volume. It expresses the loss of mechanical energy per unit weight of fluid (head loss) as proportional to the velocity head (\(V^2/2g\)) and the pipe aspect ratio (\(L/D\)). The proportionality factor \(f\) accounts for the effects of viscosity and wall roughness.

The Friction Factor – Heart of the Equation

The friction factor \(f\) is not constant; it depends on two dimensionless parameters:

  • Reynolds number \(Re = \frac{VD}{\nu}\) – characterizes the flow regime (laminar, transitional, turbulent).
  • Relative roughness \(\frac{\varepsilon}{D}\) – where \(\varepsilon\) is the absolute roughness of the pipe wall (in meters).

The relationship is traditionally presented in the Moody chart (a log-log plot of \(f\) vs. \(Re\) with curves for constant \(\varepsilon/D\)). This calculator generates a similar chart for your specific relative roughness.

Friction Factor Correlations

Flow Regime Reynolds Range Friction Factor Formula
Laminar Re < 2000 \( f = \dfrac{64}{Re} \) (exact solution of Poiseuille flow)
Transitional 2000 ≤ Re ≤ 4000 Flow unstable; use turbulent correlations with caution. This calculator applies the turbulent Colebrook equation and flags the result as approximate.
Turbulent (smooth & rough) Re > 4000 Colebrook-White equation (implicit):
\( \frac{1}{\sqrt{f}} = -2 \log_{10} \left( \frac{\varepsilon/D}{3.7} + \frac{2.51}{Re\sqrt{f}} \right) \)

Because the Colebrook equation is implicit in \(f\), it must be solved iteratively. This calculator uses a robust Newton-Raphson solver with an initial guess from the Swamee‑Jain explicit approximation (valid for \(10^{-6} \le \varepsilon/D \le 10^{-2}\) and \(5000 \le Re \le 10^8\)). For completeness, several explicit approximations exist (e.g., Haaland, Zigrang‑Sylvester), but the iterative solution guarantees high accuracy over the entire turbulent range.

Typical Absolute Roughness Values

The absolute roughness \(\varepsilon\) depends on the pipe material and age. Values are usually provided in millimeters. Common examples:

Material \(\varepsilon\) (mm)
PVC, drawn tubing 0.0015 – 0.007
Steel (commercial) 0.045 – 0.09
Galvanized iron 0.15 – 0.20
Concrete (cast) 0.3 – 3.0
Riveted steel 0.9 – 9.0

Common Fluid Kinematic Viscosities

Fluid Temperature ν (m²/s)
Water 20°C 1.00 × 10⁻⁶
Water 10°C 1.31 × 10⁻⁶
Air (at 1 atm) 20°C 1.52 × 10⁻⁵
Engine oil 40°C ≈ 2.5 × 10⁻⁴

Step-by-Step Calculation Example

Using the default values: \(D = 0.1\,\text{m}\), \(\varepsilon = 0.046\,\text{mm}\), \(V = 1.5\,\text{m/s}\), \(\nu = 1\times10^{-6}\,\text{m²/s}\), \(L = 100\,\text{m}\), \(g = 9.81\,\text{m/s²}\).

  1. Reynolds number: \(Re = \frac{1.5 \times 0.1}{1\times10^{-6}} = 150\,000\) → turbulent.
  2. Relative roughness: \(\varepsilon/D = \frac{0.046/1000}{0.1} = 0.00046\).
  3. Solve Colebrook: Newton‑Raphson yields \(f \approx 0.0185\).
  4. Head loss: \(h_f = 0.0185 \times \frac{100}{0.1} \times \frac{1.5^2}{2 \times 9.81} \approx 2.36\,\text{m}\).

Applications in Engineering

  • Water distribution networks – sizing pipes and selecting pumps.
  • Oil & gas pipelines – pressure drop estimation over long distances.
  • HVAC duct design – air flow friction loss in ducts.
  • Hydraulic engineering – spillways, storm drains, sewer systems.

Calculator Features (validated):

  • ✔ Accurate Reynolds number and flow regime identification.
  • ✔ Newton‑Raphson solver for Colebrook equation (turbulent) with rapid convergence.
  • ✔ Laminar flow handled exactly with \(f = 64/Re\).
  • ✔ Transitional zone flagged for user awareness.
  • ✔ Interactive log‑log chart (Moody‑style) for the given relative roughness.
  • ✔ Material examples for quick roughness input.

Frequently Asked Questions

Darcy-Weisbach is theoretically based and applicable to any fluid (water, oil, air) over all flow regimes. Hazen-Williams is empirical and only valid for water at ordinary temperatures (≈20°C) in turbulent flow.

The friction factor appears on both sides of the equation, so it must be solved iteratively. This calculator uses an efficient Newton-Raphson solver to find f within seconds.

Flow in the transition zone (Re 2000–4000) is unstable; the friction factor can vary widely. The calculator provides a value based on the turbulent Colebrook equation but flags it as approximate. For design, avoid this range if possible.

Use consistent SI units: meters for length/diameter, m/s for velocity, m²/s for kinematic viscosity. Roughness is entered in mm (automatically converted to meters).