Article — Pipe Flow Calculator
Pipe Flow Calculator
Pipe flow analysis combines continuity (Q = v·A), the Reynolds number (Re = ρvd/μ) to classify regime, and the Darcy–Weisbach equation (Δp = f (L/d) ρv²/2) to compute pressure loss. The friction factor f depends on Re and pipe roughness ε.
Hydraulic engineers have used these equations since the 19th century. Henry Darcy measured pressure drops in cast-iron pipes in Dijon in the 1850s. Julius Weisbach formalized the equation a few years later. Cyril Colebrook and Cedric White published their implicit friction formula in 1939, and Prabhata Swamee and Akalank Jain gave an explicit fit in 1976 — the basis of most modern calculators.
What is pipe flow?
Pipe flow refers to fluid moving through a closed conduit under pressure. The fluid completely fills the cross section, distinguishing it from open-channel flow (rivers, gutters) where a free surface exists. The pressure drop along the pipe drives the flow against viscous resistance from the pipe walls and internal shear.
For incompressible fluids (liquids, and gases at low Mach number), volume flow rate Q is constant along the pipe. Average velocity is Q/A. The detailed velocity profile is parabolic in laminar flow and nearly flat in turbulent flow, but the engineering analysis uses only the average.
The Hagen–Poiseuille law, derived independently by Gotthilf Hagen and Jean-Léonard-Marie Poiseuille in the 1830s and 1840s, gives the volumetric flow rate of a viscous fluid in laminar regime: Q = π Δp r⁴ / (8 μ L). The r⁴ dependence means halving a pipe's radius cuts flow rate to 1/16th at the same pressure — which is why arterial blockages are so dangerous.
Pipe flow and the Reynolds number
Osborne Reynolds in 1883 introduced the dimensionless number that bears his name: Re = ρvd/μ. It measures the ratio of inertial forces to viscous forces. For pipe flow, Re < 2300 means viscous forces dominate and the flow is laminar — fluid moves in concentric layers without mixing. Re > 4000 means inertia wins and flow becomes turbulent — irregular eddies and intense lateral mixing.
Between 2300 and 4000 lies the transitional regime, which is unstable and unpredictable. Real pipes occasionally show laminar flow up to Re ≈ 10⁵ if the inlet is very smooth and free of disturbances, but most practical systems are turbulent from Re = 4000 upward. Designers avoid the transition zone because pressure drop fluctuates erratically there.
Re < 2300 laminar (f = 64/Re)2300 ≤ Re ≤ 4000 transitional — avoidRe > 4000 turbulent (Swamee–Jain)Re > 10⁶ fully rough — f ≈ constThe pipe flow friction factor
The Darcy friction factor f is dimensionless. In laminar flow, f = 64/Re — derived analytically. In turbulent flow, f depends on both Re and the relative roughness ε/d, captured by the Moody diagram or the Colebrook–White equation. The Colebrook formula is implicit (f appears on both sides) and must be solved iteratively.
The Swamee–Jain explicit approximation, f = 0.25 / [log₁₀(ε/(3.7d) + 5.74/Re^0.9)]², gives the same answer to ~1% accuracy in a single evaluation. It is what most hydraulic software uses internally. The calculator on this page implements Swamee–Jain for Re > 4000 and linearly interpolates between f_laminar(Re=2300) and f_Swamee(Re=4000) in the transitional zone.
Pipe flow pressure drop — Darcy–Weisbach
The Darcy–Weisbach equation Δp = f (L/d) ρv²/2 is the most general formula for friction pressure loss in a pipe. It applies to any fluid (liquid or gas), any pipe material, and any flow regime, as long as f is computed correctly. The structure says four things at once: Δp grows linearly with length, inversely with diameter, with the square of velocity, and proportionally to fluid density.
Worked example: 100 m of new commercial steel pipe with 50 mm inner diameter carries water at 60 L/min. The velocity is Q/A = (60/60000)/(π × 0.025²) = 0.51 m/s. Re = 998 × 0.51 × 0.05 / 0.001 = 25,420 — turbulent. Relative roughness ε/d = 0.045/50 = 0.0009. Swamee–Jain gives f ≈ 0.027. Δp = 0.027 × (100/0.05) × (998 × 0.51² / 2) = 7,025 Pa = 7.0 kPa over the 100 m run.
Doubling flow rate quadruples Δp at constant pipe size. A pump rated for 5 kPa loss at 60 L/min will see 20 kPa at 120 L/min — and the motor must supply roughly 8× the hydraulic power because power = Q × Δp. Always size pumps for peak flow, not nominal.
Pipe roughness and aging
Pipe roughness ε represents the average height of microscopic surface protrusions. Commercial steel ships at 0.045 mm new. Galvanized steel is rougher at 0.15 mm. Cast iron is 0.26 mm. Plastic and copper are smooth at 0.0015 mm. Concrete varies enormously, from 0.3 to 3 mm depending on finish.
Pipes age. Internal corrosion, mineral scale, and biofilm increase roughness. A 30-year-old steel water main can have an effective ε of 0.5 to 2 mm — five to forty times the new-pipe value. Friction loss climbs accordingly, and old systems often run at 2–3 bar lower delivery pressure than the new design. Major water utilities now use cured-in-place lining or pipe-bursting replacement to restore performance.
- New PVC ε = 0.0015 mm — close to hydraulically smooth
- 30-year steel main ε can be 5–40× the new-pipe value
- Cast iron common in pre-1970s mains, ε = 0.26 mm new
- HDPE pipe popular for new water utility runs, ε ≈ 0.007 mm
- Concrete sewer pipes highly variable; ε ranges 0.3–3 mm
Pipe flow in practice
For residential water supply, design rules of thumb fix velocity at 0.5–1.5 m/s. Lower velocities risk silt deposits and stagnation; higher velocities cause noise, water hammer, and pipe erosion. From there, the pipe size is set by required flow rate. A bathroom with 30 L/min peak demand at 1 m/s needs an inner diameter of √(4 × 0.0005 / π) ≈ 25 mm — exactly the 1-inch nominal size that residential codes specify.
HVAC duct sizing follows similar logic but with much larger pipes and air instead of water. Hydraulic systems for machine tools use small high-pressure tubing carrying viscous oil — often laminar despite high pressures because the viscosity is so high. Pipeline gas transmission runs at 50–80 m/s but designs around compressibility effects that this simple calculator does not handle.
For long pipe runs, minor losses at fittings can total 20–40% of the friction loss. Add equivalent lengths to L before computing Δp: a 90° elbow contributes about 30 pipe diameters; a fully open gate valve contributes 8; a tee adds 60. Sum these and add to the straight-pipe length for a complete pressure budget.
Common pipe flow mistakes
The first is using inner diameter inconsistently. Pipe nominal sizes are not inner diameters — 1-inch schedule 40 steel has an inner ID of 26.6 mm, not 25.4 mm. Always look up the actual inner dimension before computing area. The second is forgetting unit conversion: diameter in inches and viscosity in Pa·s produces a Reynolds number that is meaningless.
The third is ignoring minor losses at fittings — they can dominate in short pipe runs. The fourth is using the Hazen–Williams equation (popular in US plumbing codes) outside its design envelope; it is empirical and only valid for water at 60°F, not for hot water or other fluids. The fifth is treating pipe aging as negligible; old pipes deliver 30–50% less flow at the same pump pressure compared to new pipes.