Skip to content
Tutorials Center
My learning

Topics

Lesson 42 of 46 · Projects and Practice

Project: sizing a pipe system with Darcy-Weisbach

Size a water pipe system step by step: Reynolds number, Colebrook friction factor, pressure drop, minor losses, parallel branches and pump power, with runnable code.

This project turns the theory of the course into a tool that engineers use every day: computing the pressure drop in a pipe system and choosing a pump. It uses laminar and turbulent friction from chapters 5 and 6, and the problem-solving habits from chapter 8: write a small program, check it, and test the limits.

A tank, a pump and a long pipe that splits into two parallel branches and rejoins
A pump drives water through a long pipe that splits into a wide and a narrow branch.

What you will learn

  • How to compute a friction factor from the Reynolds number and relative roughness (Colebrook equation).
  • How to turn friction into pressure drop with the Darcy-Weisbach formula and add minor losses.
  • How to solve for the flow split between parallel pipes.
  • How to estimate pump head and shaft power.

Key terms

  • Darcy-Weisbach equation: Δp = f (L/D) (ρ V²/2).
  • Relative roughness (ε/D): the wall roughness height divided by the diameter.
  • Colebrook equation: 1/√f = -2 log₁₀( (ε/D)/3.7 + 2.51/(Re √f) ), an implicit formula for turbulent f.
  • Minor loss: extra loss in fittings, Δp = K ρ V²/2.
  • Head (H): pressure expressed as a height of fluid, H = Δp/(ρ g).

The model

For a pipe of diameter D, length L and flow rate Q, the mean speed is V = 4Q/(π D²) and the Reynolds number Re = V D/ν. The friction factor is

  • laminar (Re < 2,300): f = 64/Re
  • turbulent: Colebrook, solved iteratively (for smooth pipes it reduces to Prandtl's law of chapter 6)

The pressure drop is Δp = (f L/D + ΣK) ρ V²/2. A typical K is about 0.9 for a standard 90° elbow and about 0.2 for an open gate valve, though real values depend on the fitting; use manufacturer data for a real design. For a pump with efficiency η_p, the hydraulic power is ρ g Q H and the shaft power ρ g Q H/η_p.

Parallel branches

If two pipes connect the same two points, both have the same pressure drop, and the flows add: Q = Q₁ + Q₂. Because Δp increases with Q, there is one split that satisfies equal Δp. Solve it numerically: guess Q₁, compute Δp₁(Q₁) and Δp₂(Q - Q₁), and adjust until they match.

Try it

Python Moody diagram and the operating point

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Python Minor losses, parallel pipes and pump power

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

JS Quick head-loss calculator

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The code uses standard textbook formulas. Roughness values, K factors and efficiencies are typical values, not data for any particular product.

Exercises

  1. In the second program, change the wide pipe to 40 mm and describe how the flow split changes. Why does the narrow pipe still carry a significant share?
  2. Replace the steel roughness 0.045 mm by 0.0015 mm (smooth plastic) and recompute f and the pump power.
  3. Find the flow rate at which the flow in the 50 mm pipe becomes laminar (Re = 2,300) and compute the pressure drop with f = 64/Re. Compare it with the Colebrook value at Re = 2,300, and comment.
  4. Add a second pump in series and discuss how the required head changes.

Common misconceptions

  • "Parallel pipes split the flow equally." They split it so the pressure drops match, which sends more flow through the wider, smoother branch.
  • "Friction factor is a constant." It depends on Re and roughness; in turbulent flow it changes slowly, but it does change.
  • "Pump power equals ρ g Q H." That is the hydraulic power delivered to the fluid; the shaft needs more because the pump is not 100% efficient.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is the Darcy-Weisbach formula for pressure drop in a straight pipe?

    Darcy-Weisbach: friction factor times length over diameter times dynamic pressure.
  2. 2. For two parallel branches, which quantity is the same in both?

    Both branches connect the same two points, so the pressure drop must match; the flow rates add.
  3. 3. At fixed flow rate, how does turbulent head loss scale with pipe diameter (roughly)?

    V ∝ 1/D², so V²/D ∝ 1/D⁵ with f roughly constant.
  4. 4. Why is shaft power larger than hydraulic power?

    Shaft power = hydraulic power / pump efficiency.

Summary

  • Friction factors come from 64/Re (laminar) or Colebrook (turbulent); pressure drop follows from Darcy-Weisbach plus minor losses.
  • Parallel branches share one pressure drop; solve for the split numerically.
  • Pump head is Δp/(ρg); shaft power is ρgQH divided by efficiency.
  • Larger pipes reduce losses very strongly.

Next: Practice problems with worked answers