Pipe flow calculator with Darcy-Weisbach head loss
This template finds the friction loss for water flowing in a full circular pipe, then the head a pump must supply and the hydraulic power. You enter the flow, diameter, length, rise in level, a sum of fitting loss coefficients, the pipe material (as a roughness) and the water temperature, and the sheet works through velocity, Reynolds number, friction factor and head loss.
Open this template Open a blank sheet
What it computes
From the flow rate and the bore it gets the mean velocity and the Reynolds number. It picks a friction factor for laminar or turbulent flow, then applies the Darcy-Weisbach equation for the friction loss and adds the loss in fittings. The head to be supplied is the rise in level plus the total loss. It also reports the pressure drop due to losses and the hydraulic power of the water, and flags a velocity above 3 m/s.
Try it
The formulas
- Flow area A = pi D^2 / 4. Velocity V = Q / A. Reynolds number Re = V D / nu, with the kinematic viscosity nu looked up for 5, 20 or 40 degrees C.
- Laminar flow (Re below 2300): friction factor f = 64 / Re.
- Turbulent flow: the explicit Swamee-Jain formula f = 0.25 / [log10(eps / (3.7 D) + 5.74 / Re^0.9)]^2, where eps is the pipe roughness.
- Friction head loss h_f = f (L / D) V^2 / (2 g). Fittings h_m = K V^2 / (2 g).
- Head to supply H = rise + h_f + h_m. Pressure drop = rho g (h_f + h_m). Hydraulic power = rho g Q H.
Worked example
Defaults: 25 L/s of water at 5 degrees C through 300 m of 150 mm commercial steel pipe (roughness 0.045 mm), a rise of 5 m and fittings with a total K of 2.5. Engine results:
| Quantity | Result |
|---|---|
| Flow area | 176.71 cm² |
| Velocity | 1.41 m/s |
| Reynolds number | 139610 |
| Relative roughness | 0.0003 |
| Friction factor | 0.0186 |
| Friction head loss | 3.79 m |
| Head loss in fittings | 0.255 m |
| Total head loss | 4.05 m |
| Head the pump must supply | 9.05 m |
| Pressure drop from losses | 39.72 kPa |
| Hydraulic power | 2.22 kW |
The flow is turbulent (Re is 139610) and the velocity of 1.41 m/s is within the 3 m/s guide, so the sheet prints OK.
Change the flow or the bore
Raising the flow to 40 L/s lifts the velocity to 2.26 m/s, the total loss to 9.83 m and the head to supply to 14.83 m, with a hydraulic power of 5.82 kW. Head loss rises roughly with the square of the flow, which is why the loss more than doubles when the flow grows by 60 percent.
Keeping 25 L/s but dropping the pipe to 100 mm gives 3.18 m/s, which is above 3 m/s, so the sheet warns about it. The loss is then 30.08 m and the head to supply 35.08 m. A modest cut in diameter has a large effect, because the velocity scales with the inverse square of the diameter.
What this is, and is not
This is a generic textbook calculation, not a design-code check. The fluid is water at one of three temperatures from a short table, the pipe is full and of one diameter, and the fittings are lumped into one coefficient. The friction factor uses an explicit approximation, and the sheet switches between laminar and turbulent formulas at Re 2300, with no treatment of the transition zone. Pipe roughness values are typical figures for new pipe; real pipe ages. It does not apply load factors, resistance factors or any limit from a design standard. If you need a code check, use the formulas your standard requires, and treat this sheet as a way to see the mechanics and to check hand calculations.
The sheet source
# Pipe flow: friction loss and pump head
A template with inputs. Choose **Input** in the results bar to fill in the form. Water flows
through a full circular pipe of diameter $D$ and length $L_p$. The Darcy-Weisbach equation gives the
friction head loss $h_f = f \frac{L_p}{D}\frac{V^2}{2g}$. The friction factor is $f = 64/Re$ in laminar
flow and, in turbulent flow, the explicit Swamee-Jain formula
$f = 0.25 / \left[\log_{10}\left(\frac{\varepsilon}{3.7 D} + \frac{5.74}{Re^{0.9}}\right)\right]^2$.
Fittings add $h_m = K V^2 / 2g$.
## Inputs
Q: ? 25 L/s | flow rate
D: ? 150 mm | inside diameter of the pipe
L_p: ? 300 m | pipe length
dz: ? 5 m | rise in level from the inlet to the outlet
K_m: ? 2.5 | sum of the loss coefficients of the fittings
eps: ? [Drawn plastic = 0.0015 mm, *Commercial steel = 0.045 mm, Cast iron = 0.26 mm, Concrete = 1 mm] | pipe material, roughness
temp: ? (5 degrees C = 1, 20 degrees C = 2, 40 degrees C = 3) | water temperature
minor: ? on | include the fittings
## Water properties
rho_tab: [1000 kg/m^3, 998 kg/m^3, 992 kg/m^3] | density at 5, 20 and 40 degrees C
nu_tab: [0.00000152 m^2/s, 0.00000100 m^2/s, 0.00000066 m^2/s] | kinematic viscosity at 5, 20 and 40 degrees C
rho: rho_tab.temp -> kg/m^3
nu: nu_tab.temp -> m^2/s
g_acc: 9.81 m/s^2 | gravitational acceleration
if temp == 1: "The water is at 5 degrees C."
if temp == 2: "The water is at 20 degrees C."
if temp == 3: "The water is at 40 degrees C."
## Flow
A: π * D^2 / 4 -> cm^2 | flow area
V: Q / A -> m/s | mean velocity
Re: V * D / nu | Reynolds number
rr: eps / D | relative roughness
if Re < 2300:
The flow is laminar.
f: 64 / Re | friction factor, laminar
else:
The flow is turbulent.
f: 0.25 / (log(rr / 3.7 + 5.74 / Re^0.9))^2 | friction factor, Swamee-Jain
## Head loss
h_f: f * (L_p / D) * V^2 / (2 * g_acc) -> m | friction head loss
h_m: minor * K_m * V^2 / (2 * g_acc) -> m | head loss in the fittings, when included
h_L: h_f + h_m -> m | total head loss
H: dz + h_L -> m | head the pump must supply
dp: rho * g_acc * h_L -> kPa | pressure drop from losses
P_h: rho * g_acc * Q * H -> kW | hydraulic power
if V <= 3 m/s: "OK: the velocity is within the usual limit of 3 m/s." else: "High velocity: more than 3 m/s, consider a larger pipe."
How to use it
- Open the template. Choose Open this template on this page. The sheet opens in a new tab of CivilKit Calcs, with the inputs set to the values used on this page.
- Switch to Input mode. In the results bar choose Input. The input lines become boxes, lists, buttons and ticks.
- Enter your values. Change the inputs to your own. Flow, diameter, length, rise, fittings, material and temperature are the inputs. Every change recalculates the whole page.
- Read and export the result. Read the results and the OK or not OK lines under them. Use Report, then Print PDF, Word or Excel, to keep the calculation with its workings.
Questions
Which friction factor formula is used?
For turbulent flow, the explicit Swamee-Jain approximation of the Colebrook equation. For laminar flow, 64 / Re.
Can I use a fluid other than water?
Edit the density and viscosity tables in the sheet. They hold three entries for water at 5, 20 and 40 degrees C.
Does it handle different diameters in series?
Not as shipped. It models one diameter. You can add sections as further lines in the sheet.
How accurate is the head loss?
It is as accurate as the roughness, the fitting coefficients and the correlation you give it. Treat it as an estimate and compare with a method you trust for a critical line.
What does the 3 m/s warning mean?
It is a rule of thumb in the sheet for noise and wear, not a limit from a standard. Change it to suit your project.