Calculate gas density using ideal gas law, real gas behavior with compressibility factor Z, and equations of state for accurate pipeline and process design.
Gas density is the mass per unit volume of a gas at specified pressure and temperature. Accurate density calculations are fundamental to:
Pipeline hydraulics
Flow calculations
Reynolds number, pressure drop, erosional velocity all depend on ρ.
Metering
Mass flow rate
Orifice, turbine, and ultrasonic meters require density for mass flow.
Equipment sizing
Compressors, separators
Compressor power and separator sizing use gas density.
Custody transfer
Contract volumes
Standard volume calculations require accurate density at base conditions.
Key Concepts
Density (ρ): Mass per unit volume, typically lb/ft³ or kg/m³
Specific gravity (SG): Gas density relative to air density (dimensionless)
Molecular weight (MW): Average MW of gas mixture, lb/lbmol or g/mol
Compressibility (Z): Deviation from ideal gas behavior (Z = 1 for ideal gas)
Why density matters: A 5% error in density translates directly to 5% error in mass flow rate, which impacts custody transfer revenue, pipeline capacity calculations, and equipment sizing.
2. Ideal Gas Law
The ideal gas law assumes no intermolecular forces and that gas molecules occupy negligible volume. Valid at low pressures and high temperatures relative to the critical point.
Fundamental Equation
Ideal Gas Law:
PV = nRT
Where:
P = Absolute pressure (psia or kPa abs)
V = Volume (ft³ or m³)
n = Number of moles (lbmol or kmol)
R = Universal gas constant
= 10.7316 psia·ft³/lbmol·°R (US)
= 8.314 kJ/kmol·K (SI)
T = Absolute temperature (°R or K)
Ideal gas assumptions: molecules as point masses with no intermolecular forces, elastic collisions, and random motion. Valid at P < 100 psia when gas is far from condensation.
Density Form
Gas Density (Ideal):
ρ = (P × MW) / (R × T)
Where:
ρ = Gas density (lb/ft³ or kg/m³)
MW = Molecular weight (lb/lbmol or kg/kmol)
P = Absolute pressure (psia or kPa abs)
R = 10.7316 psia·ft³/lbmol·°R or 8.314 kJ/kmol·K
T = Absolute temperature
°R = °F + 459.67
K = °C + 273.15
Specific Gravity Form
Using Specific Gravity:
SG = MW_gas / MW_air = MW_gas / 28.9647
Standard air density (14.73 psia, 60°F):
ρ_air = 0.0765 lb/ft³
Quick estimation formula:
ρ = 2.70 × SG × P / T
Where:
P = Absolute pressure (psia)
T = Absolute temperature (°R)
ρ = Gas density (lb/ft³)
Note: This is an ideal gas approximation.
When Ideal Gas Law Applies
Condition
Ideal Gas Accuracy
Recommendation
P < 100 psia, T > 100°F
< 1% error
Use ideal gas law
100 < P < 500 psia
1–5% error
Consider Z-factor correction
P > 500 psia
> 5% error
Must use Z-factor or EOS
Near dew point
Highly inaccurate
Must use real gas equations
Example Calculation
Calculate density of methane (MW = 16.04) at 100 psia and 80°F:
Real gases deviate from ideal behavior due to intermolecular attractive/repulsive forces and finite molecular volume. The compressibility factor Z quantifies this deviation.
Real Gas Equation
Real Gas Law:
PV = Z n R T
Where Z = compressibility factor (dimensionless)
For density:
ρ = (P × MW) / (Z × R × T)
Or:
ρ = ρ_ideal / Z
Since Z < 1 typically, real gas density is higher than ideal prediction.
Standing-Katz Chart Method
The Standing-Katz correlation (1942) is the industry-standard graphical method for determining Z-factor from reduced pressure and temperature:
Reduced Properties:
P_r = P / P_pc (pseudo-reduced pressure)
T_r = T / T_pc (pseudo-reduced temperature)
Where:
P_pc = pseudo-critical pressure (psia)
T_pc = pseudo-critical temperature (°R)
For natural gas mixtures (Kay's mixing rule):
P_pc = Σ(y_i × P_ci)
T_pc = Σ(y_i × T_ci)
Z = f(P_r, T_r) from Standing-Katz chart
Standing-Katz compressibility chart: Z-factor vs. pseudo-reduced pressure at various T_r values. Lower T_r curves show deeper dips (more deviation from ideal gas behavior).
Sutton Correlation for P_pc and T_pc
When full gas composition is unavailable, use specific gravity to estimate pseudo-critical properties:
Impact of Z-factor: At 1000 psia and Z = 0.88, real gas is 14% denser than ideal gas prediction (ρ_real = ρ_ideal / 0.88 = 1.14 × ρ_ideal). Ignoring Z causes significant errors in flow rate and equipment sizing.
Z-factor vs. pressure for natural gas: Higher temperature → Z closer to 1.0. Shaded zones show when ideal gas is acceptable vs. when Z-factor correction is required.
Z-Factor Variations with Gas Composition
Dry gas (lean): High methane content → higher T_c relative to MW → Z closer to 1.0
Wet gas (rich): Higher ethane+ content → lower T_c → lower Z (more deviation)
Acid gas (CO₂/H₂S): High CO₂ or H₂S → significantly affects P_c and T_c → custom correlations needed
Nitrogen dilution: High N₂ → raises P_c → affects Z, especially at high pressure
4. Equations of State
Equations of state (EOS) relate pressure, volume, and temperature through thermodynamic models. More accurate than Z-factor charts for complex mixtures and extreme conditions.
Peng-Robinson EOS
Peng-Robinson Equation (1976):
P = RT/(V - b) - a·α(T) / [V(V+b) + b(V-b)]
Where:
a, b = substance-dependent constants
α(T) = temperature function
V = molar volume
Widely used in oil/gas industry for:
- Phase equilibrium (VLE)
- Density near critical point
- Hydrocarbon mixtures with heavy components
AGA-8 Detail Method
The AGA-8 (American Gas Association Report No. 8) detail characterization method is the industry standard for custody transfer and high-accuracy applications.
AGA-8 Detail Method:
Z = 1 + B/V + C/V² + D/V³ + E/V⁴ + F/V⁵ + G/V⁶
Where B, C, D, E, F, G are virial coefficients that depend on:
- Gas composition (21 components)
- Temperature
- Density (solved iteratively)
Accuracy: ±0.1% for natural gas mixtures
Required inputs:
- Composition (C1 through C10+, N2, CO2, H2S)
- Pressure
- Temperature
GERG-2008 EOS
GERG-2008 (Groupe Européen de Recherches Gazières) is the reference equation for natural gas, similar to AGA-8 but with extended range and 21 components.
Z-factor (Standing-Katz or CNGA): Pipeline design, compressor sizing, general engineering
Peng-Robinson: Multiphase flow, gas processing, near critical conditions
AGA-8 or GERG: Custody transfer, revenue metering, high-accuracy requirements
Method selection: For pipeline hydraulics and equipment sizing, Z-factor methods (Standing-Katz or CNGA) provide sufficient accuracy. For custody transfer and revenue metering, AGA-8 is the contractual standard.
5. Practical Applications
Pipeline Flow Rate Calculations
Gas density directly affects mass flow rate and Reynolds number:
Mass Flow Rate:
ṁ = ρ × Q
Where:
ṁ = Mass flow rate (lb/hr or kg/s)
ρ = Gas density (lb/ft³ or kg/m³)
Q = Volumetric flow rate (ft³/hr or m³/s)
Reynolds Number:
Re = ρ V D / μ
Where:
V = Gas velocity (ft/s)
D = Pipe diameter (ft)
μ = Dynamic viscosity (lb/ft·s)
Re determines flow regime (laminar vs turbulent) and friction factor.
Orifice Meter Flow Calculation
Orifice meters measure differential pressure to infer flow rate:
Orifice Flow Equation (AGA Report 3):
Q = C × E × Y × d² × √(ΔP / ρ)
Where:
Q = Volumetric flow rate at flowing conditions (ft³/hr)
C = Discharge coefficient
E = Velocity of approach factor
Y = Expansion factor
d = Orifice diameter (in)
ΔP = Differential pressure (in H2O or psi)
ρ = Gas density at flowing P/T (lb/ft³)
A 1% error in ρ causes 0.5% error in calculated flow rate.
Compressor Power Calculation
Compressor power depends on inlet density and compression ratio:
Adiabatic Compression Power:
HP = (Q × ρ₁ × R × T₁ × Z_avg / (MW × 33000)) × [(k/(k-1)) × ((P₂/P₁)^((k-1)/k) - 1)]
Where:
Q = Inlet volumetric flow (ft³/min)
ρ₁ = Inlet density (lb/ft³)
k = Specific heat ratio (Cp/Cv ≈ 1.27 for natural gas)
P₂/P₁ = Compression ratio
Inlet density affects both suction volume handling and power requirement.
Standard Volume Conversion
Convert actual flow to standard conditions for contracts and custody transfer:
API RP 14E provides erosional velocity limit to prevent pipe erosion:
Erosional Velocity (API RP 14E):
V_erosion = C / √ρ
Where:
V_erosion = Maximum safe velocity (ft/s)
C = Empirical constant (100 for non-corrosive, 125 for clean gas)
ρ = Gas density (lb/ft³)
For ρ = 0.3 lb/ft³:
V_erosion = 100 / √0.3 = 183 ft/s
Higher density → lower allowable velocity → larger pipe diameter required.
Common Pitfalls
Using gauge pressure instead of absolute: Always add atmospheric pressure (14.7 psia at sea level)
Mixing °F and °R: Gas law requires absolute temperature (°R = °F + 459.67)
Ignoring Z-factor at high pressure: Z < 1.0 makes gas denser than ideal prediction
Assuming constant density in long pipelines: Density varies with P/T profile along line
Using air MW (28.97) for natural gas: Natural gas MW typically 16–22 depending on composition
Using Z = 1.0 for custody transfer: Unacceptable for revenue metering—use AGA-8
Density error from ignoring Z-factor: 2% at 100 psia (acceptable) to 32% at 2000 psia (unacceptable). At 1000 psia, 16% error directly impacts mass flow and revenue calculations.