Calculating the flow rate of a liquid or gas through a pipe is a fundamental task in hydraulic engineering and plumbing. The relationship between pipe size, velocity, and flow volume is governed by the continuity equation.
The Formula
The basic formula for volumetric flow rate (Q) is:
Q = A × v
Q: Flow Rate
A: Cross-sectional Area of the pipe ($\pi \times r^2$)
v: Flow Velocity
Standard Flow Velocity Guidelines
Choosing the right pipe size depends on the recommended velocity for the specific fluid to prevent erosion, noise, or excessive pressure drop:
Water (Suction): 0.5 – 1.5 m/s
Water (Delivery): 1.5 – 3.0 m/s
Compressed Air: 5.0 – 10.0 m/s
Practical Example:
If you have a pipe with an internal diameter of 100mm and the water is moving at 2 meters per second:
Convert diameter to meters: 100mm = 0.1m.
Calculate Area: $\pi \times (0.05)^2 = 0.00785$ m².
Convert to m³/h: $0.0157 \times 3600 = 56.52$ m³/h.
Why Pipe Sizing Matters
Proper pipe sizing ensures that your system operates efficiently. If a pipe is too small, the velocity increases, leading to higher friction losses, potential water hammer issues, and pipe erosion. If the pipe is too large, the system becomes unnecessarily expensive to install and may lead to sediment buildup in low-velocity areas.
function calculatePipeFlow() {
var diameterMm = document.getElementById('pipeDiameter').value;
var velocityMs = document.getElementById('flowVelocity').value;
var d = parseFloat(diameterMm);
var v = parseFloat(velocityMs);
if (isNaN(d) || isNaN(v) || d <= 0 || v <= 0) {
alert("Please enter valid positive numbers for diameter and velocity.");
return;
}
// Convert diameter mm to meters
var dMeters = d / 1000;
// Calculate Area (A = pi * r^2)
var radius = dMeters / 2;
var area = Math.PI * Math.pow(radius, 2);
// Flow rate in cubic meters per second
var qM3S = area * v;
// Convert to other units
var qM3H = qM3S * 3600;
var qLPM = qM3S * 60000;
var qLPS = qM3S * 1000;
// Display results
document.getElementById('resM3H').innerText = qM3H.toFixed(3);
document.getElementById('resLPM').innerText = qLPM.toFixed(2);
document.getElementById('resLPS').innerText = qLPS.toFixed(3);
document.getElementById('resArea').innerText = area.toFixed(6);
document.getElementById('flowResult').style.display = 'block';
}