Pipe Flow and Head Loss simulation
What's on screen
Two panels. Top panel has two views: a pipe cross-section (left) showing the velocity profile shape, and a longitudinal pipe view (right) showing streamlines (smooth for laminar, wavy for turbulent), wall roughness texture, flow direction, HGL pressure gradient line, and head loss value.
Bottom panel is a Moody chart (log-log) with the operating point plotted, laminar line, turbulent curves for different roughness, and transition zone highlighted.
Velocity profile visualization (cross-section):
Laminar: parabolic profile, v(r) = Vmax(1 - r²/R²), Vmax = 2V
Turbulent: flatter 1/7th power law, v(r) = Vmax(1 - r/R)^(1/7), Vmax ≈ 1.2V
Switch between laminar and turbulent by dragging velocity up. Below Re = 2300, you see smooth parallel streamlines and a parabolic profile. Above Re = 4000, streamlines become wavy and the profile flattens.
Moody chart (bottom panel):
Drawn with real Colebrook-computed curves:
Blue line: f = 64/Re (laminar region)
Background curves for ε/D = 0, 0.0001, 0.001, 0.005, 0.01, 0.05 (faded)
Bold curve for the active pipe material
Orange shaded transition zone (Re 2300 to 4000)
Red/blue operating point with dashed lines to both axes and f value label
4 sliders:
Velocity V (0.1 to 10 m/s): At low V, flow is laminar (Re < 2300). Increase V and watch the regime switch to turbulent, streamlines go wavy, the Moody dot jumps from the laminar line to the turbulent curve.
Diameter D (10 to 300 mm): Larger D = higher Re (turbulent sooner) but lower L/D ratio = less head loss. Head loss depends on both.
Pipe length L (1 to 100 m): Head loss is directly proportional to L. Double the length, double the loss.
Viscosity ν (0.1 to 15 ×10⁻⁶ m²/s): Water at 20°C ≈ 1.0×10⁻⁶. Oil ≈ 10-100×10⁻⁶. Higher viscosity = lower Re = more likely to stay laminar.
Key slider experiments::
Start at V = 0.2 m/s, D = 50 mm (Re ≈ 10,000, laminar if viscosity is high). Set ν = 10×10⁻⁶ (oil). Re drops below 1000. Streamlines become smooth. Moody dot sits on the f = 64/Re line.
Now drag velocity to 5.0 m/s. Re rockets past 25,000. Turbulent. Streamlines go chaotic. Moody dot jumps to the turbulent curve. Head loss increases dramatically.
Switch from smooth to cast iron. The roughness bumps appear on the pipe wall. The Moody dot jumps to a higher f curve. Head loss increases by 2 to 3× at the same velocity.
Increase D from 50 to 200 mm at same V. Re increases (more turbulent) but hf drops because (L/D) shrinks. Bigger pipe = less pressure drop per meter. This is why upsizing pipe diameter is the cheapest way to reduce pumping cost.
