Tools › Numerical Methods › Equation Solvers › ODE and Nonlinear Equation Solver › Example

Colebrook friction factor at Re = 100,000 and relative roughness 0.0002 by Newton's method, iteration by iteration

ToolODE and Nonlinear Equation Solver
SourceOriginal case (illustrative pipe) on the equation of 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, Vol. 11, No. 4, pp. 133–156, checked against scipy.optimize.brentq in test_ode_nonlinear_solver.php.
LevelUndergraduate

Problem

The Darcy friction factor f of turbulent pipe flow satisfies 1/√f = −2 log₁₀(k/3.7 + 2.51/(Re √f)), which cannot be solved for f in closed form. Find f for a Reynolds number Re = 100,000 and a relative roughness k = 0.0002 by Newton's method starting from f = 0.01, to a tolerance of 1e-8.

Inputs to Enter

  • Problem: one equation; 1/sqrt(f) = -2*log10(k/3.7 + 2.51/(Re*sqrt(f))) with Re = 100000 and k = 0.0002
  • Method: Newton, first value 0.01, tolerance 1e-8
Open the ODE and Nonlinear Equation Solver tool

Answers

  • F(f) = left − right; F(0.01) = 2.9687536; slope by central difference (δ = 10⁻⁶) = −535.734
  • First step: f₁ = 0.01 − 2.9687536 / (−535.734) = 0.01554147
  • Iterates: 0.01554147, 0.01852575, 0.01899651, 0.01900543215, 0.01900543522
  • f = 0.019005435 after 5 iterations (brentq: 0.01900543522); measured order of convergence 2.00

Notes

Open this case in the tool: /analysis-tools/numerical-methods/equation-solvers/ode-nonlinear-solver/?try=colebrook-friction. In this tool log is the base-10 logarithm, as the Colebrook equation needs, and ln the natural one. Bisection on the bracket 0.01 to 0.05 reaches the same root in 22 iterations at the same tolerance. For pipe sizing with units, use the Pipe Flow tool, which solves this equation internally.

More Examples for This Tool