fluid mechanics calculators

Friction Factor Calculator

Find the Darcy-Weisbach friction factor for laminar or turbulent pipe flow from the Reynolds number and pipe roughness. Essential for calculating head loss in piping system designs.

About this calculator

The Darcy friction factor f quantifies resistance to flow in a pipe and appears in the Darcy-Weisbach head loss equation: h_L = f × (L/D) × V²/(2g). For laminar flow (Re < 2300), the exact analytical solution gives f = 64/Re. For turbulent flow, the industry-standard Colebrook-White equation is implicit: 1/√f = −2·log₁₀(ε/(3.7D) + 2.51/(Re·√f)), which must be solved iteratively. The Swamee-Jain explicit approximation f ≈ 0.25/[log₁₀(ε/(3.7D) + 5.74/Re⁰·⁹)]² is also widely used. Relative roughness ε/D is the ratio of average pipe wall roughness height to pipe diameter. A Moody chart plots f against Re for various roughness values, and this calculator replaces that lookup numerically.

How to use

Example for turbulent flow: Re = 100,000, relative roughness ε/D = 0.0001. Using the Swamee-Jain formula: f = 0.25 / [log₁₀(0.0001/3.7 + 5.74/100000⁰·⁹)]². Compute inner term: 0.0001/3.7 = 0.0000270; 5.74/31623 = 0.0001815. Sum = 0.0002085. log₁₀(0.0002085) = −3.681. Square = 13.55. f = 0.25/13.55 ≈ 0.0184. This means for a 100 m pipe of 0.1 m diameter at 2 m/s, head loss ≈ 0.0184 × (100/0.1) × 2²/(2×9.81) ≈ 3.75 m.

Frequently asked questions

What is the difference between Darcy and Fanning friction factors?

The Darcy-Weisbach friction factor (also called the Moody friction factor) is four times larger than the Fanning friction factor: f_Darcy = 4 × f_Fanning. The Darcy factor is standard in civil and mechanical engineering and is used directly in the Darcy-Weisbach head loss equation. The Fanning factor is common in chemical engineering textbooks. Confusing the two leads to head loss errors of a factor of four, which can be catastrophic in pump sizing. Always verify which convention a formula or software tool uses before applying friction factor values.

How does relative roughness affect the friction factor at high Reynolds numbers?

At very high Reynolds numbers, turbulent flow enters the 'fully rough' regime where the viscous sublayer is thinner than the roughness elements. In this regime, the Colebrook-White equation simplifies to f = [−2·log₁₀(ε/(3.7D))]⁻², which is independent of Re. This means friction factor becomes constant and increasing flow velocity no longer reduces f. In contrast, for smooth pipes at moderate Re, f continues to decrease with increasing velocity. Engineers designing high-velocity water mains or gas pipelines must account for this plateau to avoid underestimating head losses.

Why is the Colebrook-White equation solved iteratively and what explicit alternatives exist?

The Colebrook-White equation is implicit because the friction factor f appears on both sides of the equation, requiring iteration to solve. Starting with an initial guess (often from the Moody chart or Swamee-Jain), engineers substitute and recalculate f until it converges, typically within 3–5 iterations. Explicit alternatives include the Swamee-Jain equation (error < 3% for 10⁻⁶ < ε/D < 10⁻² and 5×10³ < Re < 10⁸) and the more accurate Churchill equation. Modern calculators and CFD tools solve Colebrook-White numerically, making explicit approximations less necessary but still valuable for quick hand calculations.