Computational study of how flow regime transition affects energy loss in water pipe systems, using Reynolds number, Poiseuille's Law, and the Darcy–Weisbach equation.
This repository contains the complete, reproducible Python simulation used in the paper:
"How the Laminar-to-Turbulent Transition Affects Energy Efficiency in Water Pipe Systems: A Computational Study Using Reynolds Number, Poiseuille's Law, and the Darcy–Weisbach Equation"
Rajdeep Paul — Academy Of Technology 📄 Full Paper on ResearchGate https://doi.org/10.13140/RG.2.2.35092.26243
Increasing pipe diameter from 2 cm → 20 cm (at fixed flow rate Q = 0.01 m³/s) reduces:
- Head loss from 2,889 m → 0.05 m — a reduction of > 99.99%
- Required pumping power from 283 kW → 5 W
The energy efficiency of a water pipe system is governed by three core principles:
1. Reynolds Number — determines the flow regime:
Re = ρvD / μ
Re < 2,300 → Laminar (smooth, ordered flow)
2300–4000 → Transitional (unstable, avoid in design)
Re > 4,000 → Turbulent (chaotic eddies, high energy loss)
2. Darcy–Weisbach Equation — universal head loss formula:
hf = f × (L/D) × (v²/2g)
Laminar: f = 64/Re (exact)
Turbulent: f = 0.316 × Re^(-0.25) (Blasius, smooth pipe)
3. Pumping Power:
P = ρ g Q hf [Watts]
In turbulent flow, hf ∝ v^1.75 — doubling velocity increases head loss by ~3.4×, not 2×.
pipe-flow-energy-efficiency/
│
├── pipe_flow_simulation.py ← Main simulation script (run this)
│
├── outputs/ ← Generated automatically on first run
│ ├── sim1_velocity_results.csv
│ ├── sim2_diameter_results.csv
│ ├── fig1_velocity_vs_headloss.png
│ ├── fig2_diameter_vs_headloss.png
│ ├── fig3_moody_friction.png
│ └── fig4_pumping_power.png
│
├── figures/ ← Pre-generated figures for this README
│ └── *.png
│
├── README.md
└── LICENSE
pip install numpy pandas matplotlibPython 3.7 or higher required. No other dependencies.
git clone https://github.com/rajdeep13-coder/pipe-flow.git
cd pipe-flow-energy-efficiency
python pipe_flow_simulation.pyAll outputs are automatically saved to the outputs/ folder.
Parameters: D = 0.05 m, L = 100 m
| Velocity (m/s) | Reynolds No. | Regime | f | hf (m) | Power (W) |
|---|---|---|---|---|---|
| 0.01 | 500 | Laminar | 0.12800 | 0.0013 | 0.0 |
| 0.05 | 2,500 | Transitional | N/A | N/A | N/A |
| 0.10 | 5,000 | Turbulent | 0.03758 | 0.0383 | 0.07 |
| 0.50 | 25,000 | Turbulent | 0.02513 | 0.6404 | 6.17 |
| 1.00 | 50,000 | Turbulent | 0.02113 | 2.154 | 41.5 |
| 2.00 | 100,000 | Turbulent | 0.01777 | 7.246 | 279.1 |
| 5.00 | 250,000 | Turbulent | 0.01413 | 36.01 | 3,469 |
Parameters: Q = 0.01 m³/s, L = 100 m
| Diameter (m) | Velocity (m/s) | Reynolds No. | hf (m) | Power (W) |
|---|---|---|---|---|
| 0.02 | 31.83 | 636,620 | 2,888.6 | 283,372 |
| 0.05 | 5.09 | 254,648 | 37.19 | 3,649 |
| 0.10 | 1.27 | 127,324 | 1.382 | 135.6 |
| 0.15 | 0.57 | 84,883 | 0.201 | 19.8 |
| 0.20 | 0.32 | 63,662 | 0.051 | 5.0 |
Based on simulation results:
- Target flow velocity: 0.5–2.0 m/s — keeps Re in lower turbulent range
- Use the largest practical pipe diameter — hf scales as D^(-4.75) at fixed Q
- Avoid the transitional regime (Re 2,300–4,000) — unstable and inefficient
- Use smooth-bore materials (PVC, HDPE) to stay on the Blasius curve
- Economic optimum typically lies where pipe CAPEX ≈ NPV of pumping energy savings
The current model assumes smooth pipes. To add roughness (Colebrook–White equation):
import scipy.optimize as opt
def friction_factor_rough(Re, epsilon, D):
"""
Colebrook–White equation for rough pipes (implicit, solved iteratively).
epsilon : absolute roughness [m] (e.g. 0.046e-3 for commercial steel)
"""
def colebrook(f):
return 1/f**0.5 + 2.0*np.log10(epsilon/(3.7*D) + 2.51/(Re*f**0.5))
f0 = 0.02 # initial guess
return opt.fsolve(colebrook, f0)[0]Other natural extensions:
- Pipe network analysis (Hardy Cross method)
- Seasonal temperature variation (μ changes with T)
- CFD validation using OpenFOAM
- Economic optimization (minimize CAPEX + NPV of OPEX)
If you use this code or data in your research, please cite:
@article{yourname2024pipeflow,
title = How the Laminar-to-Turbulent Transition Affects Energy Efficiency
in Water Pipe Systems,
author = Rajdeep Paul,
year = 2026,
journal = Preprint — ResearchGate,
url = https://doi.org/10.13140/RG.2.2.35092.26243
}-
Reynolds, O. (1883). An experimental investigation of the circumstances which determine whether the motion of water shall be direct or sinuous, and of the law of resistance in parallel channels. Philosophical Transactions of the Royal Society of London, 174, 935–982. https://doi.org/10.1098/rstl.1883.0029
-
Darcy, H. (1857). Recherches expérimentales relatives au mouvement de l'eau dans les tuyaux. Mallet-Bachelier.
-
Weisbach, J. (1845). Lehrbuch der Ingenieur- und Maschinen-Mechanik [Textbook of engineering and machine mechanics]. Vieweg.
-
Nikuradse, J. (1933). Strömungsgesetze in rauhen Rohren [Flow laws in rough pipes] (VDI-Forschungsheft 361). VDI-Verlag.
-
Colebrook, C. F. (1939). Turbulent flow in pipes, with particular reference to the transition region between the smooth and rough pipe laws. Journal of the Institution of Civil Engineers, 11(4), 133–156. https://doi.org/10.1680/ijoti.1939.13150
-
Moody, L. F. (1944). Friction factors for pipe flow. Transactions of the ASME, 66(8), 671–684.
-
Munson, B. R., Young, D. F., Okiishi, T. H., & Huebsch, W. W. (2013). Fundamentals of fluid mechanics (7th ed.). Wiley.
-
White, F. M. (2016). Fluid mechanics (8th ed.). McGraw-Hill Education.
- Avci, A., & Karagoz, I. (2019). A new explicit friction factor formula for laminar, transition and turbulent flows in smooth and rough pipes. European Journal of Mechanics - B/Fluids, 78, 182–191. https://doi.org/10.1016/j.euromechflu.2019.07.007
-
Bolognesi, A., et al. (2014). Energy efficiency optimization in water distribution systems. Procedia Engineering, 70, 181–190. https://doi.org/10.1016/j.proeng.2014.02.021
-
Gessler, J., & Walski, T. M. (1985). Water distribution system optimization (Technical Report EL-85-11). U.S. Army Engineer Waterways Experiment Station.
-
Pang, Y., et al. (2022). Synchronization optimization of pipe diameter and pump operation frequency in irrigation systems. Agriculture, 12(5), Article 673. https://doi.org/10.3390/agriculture12050673
-
Engineering Toolbox. (2024). Laminar, transitional and turbulent flow. https://www.engineeringtoolbox.com/laminar-transitional-turbulent-flow-d_577.html
-
Michael Smith Engineers. (2023). Pipe flow velocity recommendations. https://www.michael-smith-engineers.co.uk
-
Fiorillo, F., et al. (2024). New insights into turbulent and laminar flow regimes in drainage systems. Water, 16(10), Article 1452. https://doi.org/10.3390/w16101452
-
Wikipedia. (2024). Darcy–Weisbach equation. https://en.wikipedia.org/wiki/Darcy–Weisbach_equation
Note: Wikipedia is acceptable for quick reference or definition in student and preprint work but should be supplemented with primary sources in formal journal submissions.
MIT License — see LICENSE for details. Free to use, modify, and distribute with attribution.



