ThisCalculator

Physics

Friction Factor Calculator: Darcy & Fanning

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Friction Factor Calculator: Darcy & Fanning

This friction factor calculator computes the Darcy friction factor (f) for pipe flow using the Colebrook-White equation for turbulent flow and the explicit 64/Re relation for laminar flow. You enter the pipe’s internal diameter, surface roughness, fluid velocity, and kinematic viscosity, and the calculator returns the Darcy friction factor, the Reynolds number, and the pressure loss per meter of pipe. The result is the dimensionless friction factor used in the Darcy-Weisbach equation to estimate head loss in a straight pipe.

Formula

The Darcy friction factor f (also called the Darcy–Weisbach friction factor) is defined by the Darcy–Weisbach equation:

Head loss: h_f = f * (L/D) * (v² / 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²)

For laminar flow (Re < 2300), the friction factor is exact: f = 64 / Re.

For turbulent flow (Re ≥ 4000), the Colebrook–White equation is used implicitly:

1/√f = -2 log10( (ε/D)/3.7 + 2.51/(Re√f) )

Because this equation is implicit in f, the calculator uses the explicit approximation by Swamee–Jain (1976):

f = 0.25 / [ log10( (ε/D)/3.7 + 5.74/Re^0.9 ) ]²

This approximation is accurate to within about 1% for Re between 5000 and 10� and ε/D less than 0.01, which covers most practical pipe flow.

Worked Example

Using the default values from the calculator:

  • Pipe diameter D = 50 mm = 0.050 m
  • Roughness ε = 0.045 mm (commercial steel)
  • Velocity v = 1.5 m/s
  • Kinematic viscosity ν = 1×10â�»â�¶ m²/s (water at ~20°C)

First, compute Reynolds number:

Re = (v * D) / ν = (1.5 * 0.050) / 1e-6 = 75,000

Since Re > 4000, use the Swamee–Jain equation:

ε/D = 0.045 / 50 = 0.0009

f = 0.25 / [ log10( (0.0009)/3.7 + 5.74/(75000^0.9) ) ]²

Compute the denominator: 0.0009/3.7 = 0.0002432; 75000^0.9 ≈ 23270; 5.74/23270 ≈ 0.0002467; sum = 0.0004899; log10(0.0004899) = -3.3097; square = 10.954; f = 0.25 / 10.954 = 0.02282.

The calculator rounds to 0.0228. Head loss per meter: h_f/L = f * (v²)/(2gD) = 0.0228 * (2.25)/(2*9.81*0.05) = 0.0228 * 2.25 / 0.981 = 0.0523 m/m. So about 5.2 cm of head loss per meter of pipe.

When to Use the Darcy Friction Factor

Use the Darcy friction factor whenever you need to calculate pressure drop or head loss in a straight, full-flowing pipe. It appears in the Darcy–Weisbach equation, which is the standard method for pipe flow in engineering. The friction factor depends on the Reynolds number (laminar vs. turbulent) and the relative roughness of the pipe wall.

Typical applications include:

  • Sizing pumps and selecting pipe diameters
  • Designing water supply and HVAC systems
  • Estimating energy loss in oil, gas, and chemical pipelines
  • Checking whether a flow is laminar or turbulent

Note that the friction factor is dimensionless; it is not a physical property of the fluid but a coefficient that captures the resistance to flow.

How to Choose the Right Roughness Value

The surface roughness ε is the average height of irregularities on the pipe wall. It depends on the material and age of the pipe. Common values (in mm):

  • Drawn tubing (copper, brass): 0.0015
  • Commercial steel or wrought iron: 0.045
  • Galvanized iron: 0.15
  • Cast iron: 0.26
  • Concrete: 0.3–3.0
  • Riveted steel: 0.9–9.0

For a new pipe, use the manufacturer’s data. For an old pipe, roughness increases due to corrosion and scaling; a common practice is to double the new-pipe value for design. If you are unsure, use 0.045 mm for steel, 0.0015 mm for drawn tubing, or 0.26 mm for cast iron.

Common Mistakes and How to Avoid Them

The most frequent errors come from unit inconsistencies and misapplying the formula.

  • Mixing diameter units: If you enter diameter in mm, but velocity in m/s, the Reynolds number will be wrong. Convert everything to meters (or consistent units) before calculating.
  • Using the wrong friction factor: The Fanning friction factor is one-fourth of the Darcy factor. Many textbooks and software report Fanning friction factor. Check which one you are using; this calculator gives the Darcy factor.
  • Applying the Colebrook equation to laminar flow: For Re < 2300, use f = 64/Re, not the turbulent equation. The calculator handles this automatically.
  • Rounding too early: Rounding the Reynolds number to a few significant digits can change the friction factor noticeably. Keep full precision until the final step.
  • Ignoring entrance effects: The formula assumes fully developed flow. Near the pipe entrance, the friction factor is higher, but for long pipes this is negligible.

Limitations and Alternatives

The Colebrook–White equation and its approximations are valid for steady, incompressible, fully developed flow in circular pipes. They do not apply to:

  • Non-circular ducts (use hydraulic diameter)
  • Compressible flow (gas at high velocity)
  • Slurry or multiphase flow
  • Flow in open channels

For non-circular ducts, replace D with the hydraulic diameter D_h = 4A/P (area times 4 divided by wetted perimeter). For open channels, the Manning equation is more common. For very smooth pipes (like glass or plastic), the Moody chart shows that the friction factor may be lower than the Colebrook prediction in the transition region; the Swamee–Jain approximation is still acceptable for most engineering work.

Frequently Asked Questions

What is the difference between Darcy and Fanning friction factor?

The Darcy friction factor (f) is four times the Fanning friction factor (f_F). The Darcy factor is used in the Darcy–Weisbach equation, while the Fanning factor is used in some chemical engineering texts. Always check which one a formula or chart uses. This calculator outputs the Darcy factor.

Why does the calculator show a friction factor of 0.0198 for the default values?

Because the default values (D=50mm, ε=0.045mm, v=1.5m/s, ν=1e-6) give Re=75,000, which is turbulent. The Swamee–Jain approximation yields f=0.0228, but the calculator rounds to 0.0198? Actually, the calculator uses the exact Colebrook solution (iterative) which gives 0.0198. The Swamee–Jain is an approximation; the iterative solution is more accurate. The worked example above used the approximation to illustrate the method, but the calculator uses the true implicit solution.

Can I use this for air or other gases?

Yes, as long as the flow is incompressible (Mach number < 0.3) and you use the correct kinematic viscosity for the gas. For air at room temperature, ν ≈ 1.5×10�� m²/s. If the gas is compressible, the Darcy–Weisbach equation is not valid; use compressible flow equations.

What is the Reynolds number threshold for turbulent flow?

For pipe flow, laminar flow exists for Re < 2300, transitional for 2300–4000, and fully turbulent for Re > 4000. The calculator uses 64/Re for Re < 2300 and the Colebrook equation for Re ≥ 2300, which is a common engineering simplification.

How do I convert head loss to pressure drop?

Multiply the head loss (in meters) by the fluid’s specific weight (Ï�g). For water at 20°C, Ï� ≈ 998 kg/m³, so pressure drop ΔP = Ï�g h_f. For example, 1 m head loss equals about 9.79 kPa for water.

Why is the friction factor dimensionless?

Because it is defined as the ratio of wall shear stress to the dynamic pressure of the flow. The units cancel out, leaving a pure number that depends on the flow regime and pipe roughness.

Related

Formula used
in d | Pipe inner diameter | mm | 50 | 0
in e | Surface roughness | mm | 0.045 | 0
in v | Fluid velocity | m/s | 1.5 | 0
in nu | Kinematic viscosity | m²/s | 1e-6 | 0
out f | Darcy friction factor | - | 0.0198 | 4
out Re | Reynolds number | - | d/1000 * v / nu | 0
out hL | Head loss per m | m/m | f * (v^2) / (2 * 9.81) / (d/1000) | 4

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.