Calculate the mass flow rate ($\dot{m}$) based on pipe geometry, fluid density, and velocity.
Unit: kg/m³ (Water $\approx$ 1000, Air $\approx$ 1.2)
Unit: millimeters (mm)
Unit: meters per second (m/s)
Please enter valid positive numbers for all fields.
Calculation Results
Cross-Sectional Area:0.0000 m²
Volumetric Flow Rate:0.0000 m³/s
Mass Flow Rate (kg/s):0.0000 kg/s
Mass Flow Rate (kg/hr):0.00 kg/hr
function calculateMassFlow() {
// Get input values using var
var densityInput = document.getElementById("fluidDensity").value;
var diameterInput = document.getElementById("pipeDiameter").value;
var velocityInput = document.getElementById("flowVelocity").value;
var resultBox = document.getElementById("resultsContainer");
var errorBox = document.getElementById("errorMessage");
// Parse values
var density = parseFloat(densityInput); // kg/m3
var diameterMm = parseFloat(diameterInput); // mm
var velocity = parseFloat(velocityInput); // m/s
// Validation logic
if (isNaN(density) || isNaN(diameterMm) || isNaN(velocity) || density <= 0 || diameterMm <= 0 || velocity < 0) {
errorBox.style.display = "block";
resultBox.style.display = "none";
return;
}
errorBox.style.display = "none";
// Physics Calculations
// 1. Convert Diameter from mm to meters
var diameterM = diameterMm / 1000;
// 2. Calculate Cross-Sectional Area (A = pi * r^2 OR A = pi * (d/2)^2)
var radius = diameterM / 2;
var area = Math.PI * Math.pow(radius, 2);
// 3. Calculate Volumetric Flow Rate (Q = A * v)
var volumetricFlow = area * velocity; // m3/s
// 4. Calculate Mass Flow Rate (m_dot = rho * Q)
var massFlowSec = density * volumetricFlow; // kg/s
var massFlowHour = massFlowSec * 3600; // kg/hr
// Update DOM Elements with results
document.getElementById("displayArea").innerHTML = area.toFixed(6) + " m²";
document.getElementById("displayVolumetric").innerHTML = volumetricFlow.toFixed(6) + " m³/s";
document.getElementById("displayMassFlowSec").innerHTML = massFlowSec.toFixed(4) + " kg/s";
document.getElementById("displayMassFlowHour").innerHTML = massFlowHour.toFixed(2) + " kg/hr";
// Show result container
resultBox.style.display = "block";
}
How to Calculate Mass Flow Rate Through a Pipe
Determining the mass flow rate through a pipe is a fundamental task in fluid dynamics, chemical engineering, and mechanical systems design. Unlike volumetric flow rate, which measures the volume of fluid passing a point per unit of time, mass flow rate measures the actual mass of the substance moving through the system. This distinction is critical in applications involving compressible fluids (like gases) or processes where chemical stoichiometry relies on mass balance.
The Mass Flow Rate Formula
To calculate the mass flow rate ($\dot{m}$), you need to integrate the fluid's density with the cross-sectional area of the pipe and the velocity of the flow. The governing equation is:
$\dot{m} = \rho \times A \times v$
Where:
$\dot{m}$ (m-dot): Mass Flow Rate (typically measured in kg/s).
$\rho$ (rho): Density of the fluid (kg/m³).
$A$: Cross-sectional Area of the pipe (m²).
$v$: Average Velocity of the fluid (m/s).
Step-by-Step Calculation Guide
1. Determine the Cross-Sectional Area ($A$)
Most pipes are cylindrical. To find the area, you must first know the internal diameter of the pipe. If you are measuring in millimeters (which is common for pipe scheduling), you must convert this to meters to maintain consistency with SI units.
Formula for Area:
$$A = \pi \times \left(\frac{D}{2}\right)^2$$
Example: For a 100mm pipe, the radius is 0.05 meters. $A = 3.14159 \times 0.05^2 \approx 0.007854 \text{ m}^2$.
2. Identify Fluid Density ($\rho$)
Density changes depending on the fluid and its temperature. For accurate calculations, consult a property table for the specific fluid at its operating temperature.
Water (4°C): ~1000 kg/m³
Air (20°C, 1 atm): ~1.204 kg/m³
Crude Oil: ~800 to 900 kg/m³
3. Measure Fluid Velocity ($v$)
The velocity is often obtained from flow meters or calculated based on the pump capacity and pipe size. It is usually expressed in meters per second (m/s).
Real-World Calculation Example
Let's say you are pumping water ($\rho = 1000 \text{ kg/m}^3$) through a pipe with an internal diameter of 50 mm at a velocity of 2.5 m/s.
Using the calculator above simplifies these steps by automatically handling unit conversions and applying the formulas instantly.
Why Mass Flow Rate Matters?
In industries like Oil & Gas, HVAC, and Chemical Processing, mass flow is often more important than volume. Since gases expand and contract with temperature and pressure changes, a volumetric measurement might yield different results for the same amount of substance. Mass flow remains constant regardless of pressure changes (assuming no leaks), making it the gold standard for custody transfer and chemical reaction stoichiometry.