Please enter valid positive numbers for diameter and velocity.
Calculation Results
Flow Rate (Liters/sec):–
Flow Rate (m³/hour):–
Flow Rate (GPM – US):–
Flow Rate (Cubic ft/sec):–
Cross-Sectional Area:–
function calculateDischarge() {
// Get input elements
var dInput = document.getElementById("pipeDiameter");
var dUnit = document.getElementById("diameterUnit");
var vInput = document.getElementById("flowVelocity");
var vUnit = document.getElementById("velocityUnit");
var errorMsg = document.getElementById("errorMessage");
var resultsDiv = document.getElementById("resultsArea");
// Get values
var diameter = parseFloat(dInput.value);
var velocity = parseFloat(vInput.value);
var dUnitVal = dUnit.value;
var vUnitVal = vUnit.value;
// Validation
if (isNaN(diameter) || isNaN(velocity) || diameter <= 0 || velocity < 0) {
errorMsg.style.display = "block";
resultsDiv.style.display = "none";
return;
}
errorMsg.style.display = "none";
// Normalize Diameter to Meters
var diameterMeters = 0;
if (dUnitVal === "mm") {
diameterMeters = diameter / 1000;
} else if (dUnitVal === "cm") {
diameterMeters = diameter / 100;
} else if (dUnitVal === "m") {
diameterMeters = diameter;
} else if (dUnitVal === "in") {
diameterMeters = diameter * 0.0254;
}
// Normalize Velocity to Meters per Second
var velocityMs = 0;
if (vUnitVal === "ms") {
velocityMs = velocity;
} else if (vUnitVal === "fts") {
velocityMs = velocity * 0.3048;
}
// Calculate Area (A = pi * r^2) or (A = pi * (d/2)^2)
var radius = diameterMeters / 2;
var areaM2 = Math.PI * Math.pow(radius, 2);
// Calculate Discharge (Q = A * v) in Cubic Meters per Second (Base Unit)
var qBase = areaM2 * velocityMs;
// Convert Base Unit (m3/s) to other units
var qLps = qBase * 1000; // Liters per second
var qM3h = qBase * 3600; // Cubic meters per hour
var qGpm = qBase * 15850.32314; // US Gallons per minute
var qCfs = qBase * 35.3146667; // Cubic feet per second
// Display Results
document.getElementById("resLps").innerHTML = qLps.toFixed(2) + " L/s";
document.getElementById("resM3h").innerHTML = qM3h.toFixed(2) + " m³/h";
document.getElementById("resGpm").innerHTML = qGpm.toFixed(2) + " GPM";
document.getElementById("resCfs").innerHTML = qCfs.toFixed(3) + " ft³/s";
document.getElementById("resArea").innerHTML = areaM2.toFixed(4) + " m²";
resultsDiv.style.display = "block";
}
Understanding Discharge Flow Rate Calculation
Whether you are designing an irrigation system, engineering a plumbing network, or analyzing industrial fluid transport, calculating the discharge flow rate is a fundamental necessity. This calculator allows you to determine the volumetric flow rate of a liquid moving through a pipe based on the pipe's diameter and the velocity of the fluid.
What is Discharge Flow Rate?
Discharge flow rate (often denoted as Q) is the volume of fluid that passes through a given cross-sectional area per unit of time. In simple terms, it tells you how much water (or other liquid) is coming out of a pipe every second.
It is distinct from velocity. Velocity tells you how fast the particles are moving, while flow rate combines that speed with the size of the pipe to tell you the total quantity being moved.
The Flow Rate Formula
The calculation relies on the continuity equation for incompressible fluids. The formula is simple yet powerful:
Q = A × v
Where:
Q = Discharge Flow Rate (e.g., m³/s)
A = Cross-sectional Area of the pipe (e.g., m²)
v = Flow Velocity (e.g., m/s)
Calculating the Area
Since most pipes are cylindrical, the cross-sectional area is a circle. The area is calculated using the diameter:
A = π × (Diameter / 2)²
Example Calculation
Scenario: You have a water pipe with an internal diameter of 100 mm (0.1 meters). The water is flowing at a velocity of 2 meters per second.
Step 1: Calculate the Area
Radius = 0.1m / 2 = 0.05m
Area = 3.14159 × (0.05)² ≈ 0.007854 m²
Step 2: Calculate Flow Rate (Q)
Q = 0.007854 m² × 2 m/s = 0.0157 m³/s
Step 3: Unit Conversion
To get Liters per Second: 0.0157 × 1000 = 15.7 L/s
Why is this calculation important?
Pump Sizing: You must know the required flow rate to select a pump that can handle the volume without burning out or underperforming.
Pipe Sizing: If the flow rate is too high for a small pipe, velocity increases drastically, leading to friction loss and potential "water hammer" damage.
Tank Filling: Calculating how long it will take to fill or drain a reservoir depends entirely on the discharge rate.
Common Units Used
Depending on your industry and location, discharge is measured in various units:
Liters per second (L/s): Common in metric plumbing and irrigation.
Cubic meters per hour (m³/h): Standard for industrial pumps and municipal water supply.
Gallons per Minute (GPM): The standard unit in the United States for plumbing and pumps.
Cubic Feet per Second (CFS): Often used in hydrology and open channel flow analysis.