Lesson 12 of 16

Pipe Friction Losses

Pipe Friction Losses

Real pipe flow loses energy to viscous friction. The Darcy-Weisbach equation quantifies this as a head loss hfh_f (metres of fluid):

hf=fLDv22gh_f = f \frac{L}{D} \frac{v^2}{2g}

where:

  • ff — Darcy friction factor (dimensionless)
  • LL — pipe length (m)
  • DD — pipe diameter (m)
  • vv — mean flow velocity (m/s)
  • g=9.81g = 9.81 m/s²

Head loss is the height a fluid column would need to fall to supply the same energy. It is proportional to v2v^2, so turbulent flow is expensive.

Friction Factor for Laminar Flow

For laminar flow (Re<2300Re < 2300) the friction factor has an exact analytical value:

f=64Ref = \frac{64}{Re}

For turbulent flow, empirical correlations such as the Moody chart or the Colebrook equation are used instead.

Pressure Drop

Head loss converts to a pressure drop via:

ΔP=ρghf\Delta P = \rho g h_f

This is the pressure the pump must provide to maintain the flow.

Your Task

Implement:

  • head_loss(f, L, D, v) — returns hfh_f (m). Use g=9.81g = 9.81 m/s² inside the function.
  • friction_factor_laminar(Re) — returns Darcy f=64/Ref = 64/Re for laminar flow
  • pressure_drop(rho, h_f) — returns ΔP\Delta P (Pa). Use g=9.81g = 9.81 m/s² inside the function.
Python runtime loading...
Loading...
Click "Run" to execute your code.