Standard Cubic Feet per Day/Hour at Base Conditions (14.73 psia, 60°F)
How to Calculate Gas Flow Rate Through a Pipe
Calculating the flow rate of compressible fluids like natural gas requires accounting for pressure changes, friction, pipe diameter, and gas properties. Unlike liquid flow, gas changes density as pressure drops along the pipe.
This calculator utilizes the Weymouth Equation, widely considered the industry standard for sizing high-pressure natural gas pipelines (typically used for lines 2 inches and larger with high pressure drops).
The Weymouth Formula
The Weymouth equation determines the volumetric flow rate based on the inlet and outlet pressures, pipe dimensions, and gas characteristics. The simplified formula used in this calculator is:
Q = 433.5 × E × (Tbase/Pbase) × √[ (P1² – P2²) / (S × L × T × Z) ] × D2.667
Where:
Q: Flow rate in Standard Cubic Feet per Day (SCFD)
D: Internal diameter of the pipe (inches)
P1: Inlet absolute pressure (psia)
P2: Outlet absolute pressure (psia)
L: Length of pipe (miles)
S: Specific gravity of the gas (Air = 1.0, Natural Gas ≈ 0.6)
T: Absolute temperature of the gas (Rankine)
433.5: Engineering constant for units
Key Factors Affecting Gas Flow
1. Pipe Diameter: This is the most significant factor. Flow capacity increases exponentially with diameter (to the power of 2.667). Even a small increase in pipe size yields a massive increase in capacity.
2. Pressure Differential: The driving force of flow is the difference between the squared inlet pressure and the squared outlet pressure ($P_1^2 – P_2^2$). Higher inlet pressure or lower outlet pressure increases flow.
3. Length: Friction acts against flow. Doubling the length of the pipe decreases the flow rate by the square root of 2 (approximately 1.414 times less).
Example Calculation
Consider a pipeline transporting Natural Gas ($S = 0.6$) with the following parameters:
Diameter: 10 inches
Length: 20 miles
Inlet Pressure: 600 psig
Outlet Pressure: 500 psig
Temperature: 60°F
Using the Weymouth equation, this configuration would yield a flow capacity of approximately 33,000,000 SCFD (33 MMSCFD).
Standard Conditions
Gas flow is typically measured in "Standard" units (SCFD or SCFH). This normalizes the volume to a standard pressure (usually 14.73 psia) and temperature (60°F), allowing for consistent billing and engineering comparisons regardless of the actual operating pressure inside the pipe.
function calculateGasFlow() {
// 1. Get Input Values
var diameter = document.getElementById('pipeDiameter').value;
var length = document.getElementById('pipeLength').value;
var p1Gauge = document.getElementById('inletPressure').value;
var p2Gauge = document.getElementById('outletPressure').value;
var sg = document.getElementById('specificGravity').value;
var tempF = document.getElementById('gasTemp').value;
// UI Elements
var resultBox = document.getElementById('resultDisplay');
var errorBox = document.getElementById('errorDisplay');
var scfdOutput = document.getElementById('flowRateSCFD');
var scfhOutput = document.getElementById('flowRateSCFH');
// 2. Validate Inputs
errorBox.style.display = 'none';
resultBox.style.display = 'none';
if (diameter === " || length === " || p1Gauge === " || p2Gauge === " || sg === " || tempF === ") {
errorBox.innerText = "Please fill in all fields.";
errorBox.style.display = 'block';
return;
}
// Convert to numbers
var D = parseFloat(diameter);
var L = parseFloat(length);
var P1_g = parseFloat(p1Gauge);
var P2_g = parseFloat(p2Gauge);
var S = parseFloat(sg);
var T_f = parseFloat(tempF);
// Validation logic
if (D <= 0 || L <= 0 || S = P1_g) {
errorBox.innerText = "Inlet Pressure must be higher than Outlet Pressure to generate flow.";
errorBox.style.display = 'block';
return;
}
// 3. Perform Calculations (Weymouth Equation)
// Constants
// Base Temp (Tb) = 60F = 520R
// Base Pressure (Pb) = 14.73 psia
// Efficiency (E) = 1.0 (assuming 100% efficiency for theoretical max)
// Compressibility (Z) = 1.0 (Simplified for general web calc, usually 0.9-0.95 for high pressure)
var Tb = 520;
var Pb = 14.73;
var E = 1.0;
var Z = 1.0;
// Convert Pressures to Absolute (psia)
// Atmospheric pressure assumed 14.7 psi
var Patm = 14.7;
var P1_abs = P1_g + Patm;
var P2_abs = P2_g + Patm;
// Convert Temp to Rankine
var T_abs = T_f + 460;
// Calculate Terms
// Term 1: Constant and Base Conditions
var term1 = 433.5 * E * (Tb / Pb);
// Term 2: Pressure Drop / Resistance
var pressureDiff = (Math.pow(P1_abs, 2) – Math.pow(P2_abs, 2));
var resistance = S * L * T_abs * Z;
// Avoid sqrt negative (already checked P2 >= P1, but safe guard)
if (pressureDiff < 0) pressureDiff = 0;
var term2 = Math.sqrt(pressureDiff / resistance);
// Term 3: Diameter Factor
var term3 = Math.pow(D, 2.667);
// Final Calculation Q (SCFD)
var Q_scfd = term1 * term2 * term3;
// Convert to SCFH
var Q_scfh = Q_scfd / 24;
// 4. Format and Display Results
var formatter = new Intl.NumberFormat('en-US', {
maximumFractionDigits: 0
});
scfdOutput.innerText = formatter.format(Q_scfd) + " SCFD";
scfhOutput.innerText = formatter.format(Q_scfh) + " SCFH";
resultBox.style.display = 'block';
}