ChemProCal
Knowledge Base + New Calculation Login Sign Up

Mastering Gas Line Sizing & Compressible Flow: Theory, Equations & Practice

Learn how isothermal gas equations and Mach number limits prevent acoustic vibration and choked flow.

Published
August 29, 2026
Reading Time
~7 Minutes
Author / Review
ChemProCal Editorial Board
📑 Table of Contents (Tap to view sections)

    1. Thermodynamics of Compressible Gas Flow

    Unlike liquid piping where density remains essentially constant, gas flowing through a pipe undergoes continuous expansion as pressure drops along the conduit length. By the real gas equation of state ($\rho = P \cdot M / (Z \cdot R \cdot T)$), a decrease in pressure causes a corresponding decrease in density and an unavoidable acceleration of gas velocity ($v = \dot{m} / (\rho A)$).

    Accurate compressible line sizing requires accounting for three simultaneous physical phenomena:

    1. Frictional Dissipation: Shear stress at the pipe wall dissipating mechanical energy.
    2. Kinetic Energy Acceleration: Fluid expansion accelerating the gas toward the downstream discharge ($v_2 > v_1$), consuming pressure head.
    3. Joule-Thomson Temperature Shifts: Isenthalpic expansion cooling or warming the gas stream along the pipeline.
    Governing Industry Standards:

    Gas line sizing is governed by ASME B31.8 (Gas Transmission and Distribution Piping), API Recommended Practice 14E (Design and Installation of Offshore Production Platform Piping Systems), and ISO 13623.

    2. Derivation of the General Compressible Flow Equation

    Consider a differential pipe element of length $dx$ and diameter $D$. The one-dimensional differential momentum equation for compressible gas flow with friction and elevation change is:

    $$-dP = \frac{f_D \rho v^2}{2D} dx + \rho v \, dv + \rho g \sin\theta \, dx$$

    Dividing by $\rho$ and substituting mass flux $G = \rho v = \frac{\dot{m}}{A} = \text{constant}$:

    $$-\frac{dP}{\rho} = \frac{f_D G^2}{2 D \rho^2} dx + \frac{G^2}{\rho} d\left(\frac{1}{\rho}\right) + g \sin\theta \, dx$$

    Substituting real gas density $\rho = \frac{P M}{Z R T}$ and integrating across length $L$ under isothermal conditions ($T = \text{constant}$, $Z = Z_{avg}$):

    $$\int_{P_1}^{P_2} -P \, dP = \left(\frac{Z_{avg} R T}{M}\right) \frac{f_D G^2}{2 D} \int_0^L dx + G^2 \left(\frac{Z_{avg} R T}{M}\right) \ln\left(\frac{P_1}{P_2}\right)$$

    For pipelines longer than a few hundred pipe diameters, the acceleration term $G^2 \ln(P_1/P_2)$ is negligible compared to the wall friction term ($< 0.5\%$). Performing the pressure integral yields the fundamental relationship:

    $$P_1^2 - P_2^2 = \frac{f_D L}{D} \left(\frac{Z_{avg} R T}{M}\right) G^2$$

    Expressing volumetric flow at standard reference conditions ($P_b, T_b$) yields the General Pipeline Flow Equation:

    $$Q_h = C \cdot \left(\frac{T_b}{P_b}\right) \cdot \sqrt{\frac{P_1^2 - P_2^2 - E}{G_g \cdot T_{avg} \cdot L \cdot Z_{avg} \cdot f_D}} \cdot D^{2.5}$$

    where $G_g$ is gas specific gravity (relative to air, $MW_{gas} / 28.964$), and $E$ is the elevation correction term.

    3. Comparison of Classical Gas Pipeline Equations

    Historically, solving the implicit Colebrook equation for $f_D$ manually was impractical. Engineers developed empirical equations with built-in friction factor assumptions:

    Equation Name Friction Assumption Recommended Application Range
    Weymouth Equation $f_D = 0.094 / D^{1/3}$ Short gathering lines, fuel gas headers, high $\Delta P$, small diameters ($D < 15^{\prime\prime}$). Tends to overestimate pressure drop in large, long lines.
    Panhandle A Equation $f_D = 0.085 / Re^{0.146}$ Moderate-pressure natural gas transmission pipelines ($Re = 5\times 10^6\text{--}11\times 10^6$). Incorporates pipeline efficiency factor $E_f \approx 0.90\text{--}0.95$.
    Panhandle B Equation $f_D = 0.035 / Re^{0.039}$ Large-diameter, high-pressure natural gas trunklines ($D > 20^{\prime\prime}$, $Re = 4\times 10^6\text{--}40\times 10^6$). Best standard for modern cross-country gas grids.
    Colebrook-White (Strict) Implicit roughness & $Re$ Universal benchmark; used in all modern process simulators and ChemProCal calculators.

    4. Velocity Limits, Mach Number & API RP 14E

    Gas velocity increases continuously along the line as pressure drops. Sizing must verify that the discharge velocity at the lowest operating pressure complies with governing velocity constraints:

    4.1 API RP 14E Erosional Velocity

    To prevent mechanical erosion and acoustic vibration, API RP 14E establishes the erosional velocity ceiling:

    $$v_e = \frac{C}{\sqrt{\rho_g}}$$

    where $C = 100$ for continuous service and $C = 125$ for intermittent relief. For clean, particle-free natural gas in corrosion-resistant alloys (CRAs), modern practice allows $C = 150\text{--}200$, provided the Mach number is not exceeded.

    4.2 Mach Number Limit ($Ma$)

    The speed of sound in a real gas is:

    $$c = \sqrt{\frac{k Z R T}{M}}$$

    where $k = C_p / C_v$ is the isentropic heat capacity ratio. The Mach number is:

    $$Ma = \frac{v}{c}$$

    Design standards strictly limit gas velocity to avoid severe acoustic fatigue, pipe vibration, and excessive noise:

    • Continuous Process Gas Lines: $Ma \le 0.20\text{--}0.30$ (typically $v \le 15\text{--}25\,\text{m/s}$).
    • Compressor Suction / Discharge Headers: $Ma \le 0.15\text{--}0.20$ to prevent acoustic pulsations.
    • Flare & Relief Lines (Peak Emergency): $Ma \le 0.50\text{--}0.70$ (acoustically engineered for short duration).
    • Critical Choked Flow ($Ma = 1.0$): Sonic choking occurs at restricted orifices or control valves where downstream pressure drops below the critical pressure ratio $P_c / P_1 = [2/(k+1)]^{k/(k-1)}$.

    5. Step-by-Step Worked Engineering Example

    Size a natural gas transmission line to deliver gas between a processing facility and a power plant:

    • Gas standard flow rate: $Q_{std} = 50.0\,\text{MMSCFD} = 59{,}000\,\text{Sm}^3\text{/h} = 16.388\,\text{Sm}^3\text{/s}$
    • Gas Specific Gravity: $G_g = 0.65$ ($MW = 18.83\,\text{kg/kmol}$, methane-rich)
    • Inlet pressure: $P_1 = 65.0\,\text{bar a}$ ($6500\,\text{kPa}$)
    • Minimum allowable delivery pressure: $P_2 \ge 45.0\,\text{bar a}$ ($4500\,\text{kPa}$)
    • Pipeline length: $L = 12.0\,\text{km} = 12{,}000\,\text{m}$
    • Flowing gas temperature: $T = 30^\circ\text{C} = 303.15\,\text{K}$ (isothermal assumption)
    • Pipe material: Commercial carbon steel ($\varepsilon = 0.0457\,\text{mm}$)
    • Heat capacity ratio: $k = 1.30$

    Step 1: Estimate Average Gas Properties

    Average pressure in the pipeline:

    $$P_{avg} = \frac{2}{3} \left[P_1 + P_2 - \frac{P_1 P_2}{P_1 + P_2}\right] = \frac{2}{3} \left[65 + 45 - \frac{65 \times 45}{110}\right] = \frac{2}{3} [110 - 26.59] = 55.6\,\text{bar a}$$

    Compressibility factor $Z_{avg}$ at $P_{avg} = 55.6\,\text{bar a}$ and $T = 303.15\,\text{K}$ (Peng-Robinson EOS):

    $$Z_{avg} \approx 0.885$$

    Average gas density:

    $$\rho_{avg} = \frac{P_{avg} M}{Z_{avg} R T} = \frac{5560 \times 18.83}{0.885 \times 8.314 \times 303.15} = \frac{104{,}695}{2227.9} = 47.0\,\text{kg/m}^3$$

    Mass flow rate:

    $$\dot{m} = \rho_{std} Q_{std} = \left(\frac{101.325 \times 18.83}{1.0 \times 8.314 \times 288.15}\right) \times 16.388 = 0.7965\,\text{kg/m}^3 \times 16.388\,\text{m}^3\text{/s} = 13.053\,\text{kg/s}$$

    Step 2: Trial Pipe Diameter Selection ($10^{\prime\prime}$ Sch 40 vs. $12^{\prime\prime}$ Sch 40)

    Let us evaluate $10^{\prime\prime}$ Nominal Sch 40 ($D = 254.5\,\text{mm} = 0.2545\,\text{m}$):

    $$A = \frac{\pi (0.2545)^2}{4} = 0.05087\,\text{m}^2$$

    Evaluating mass flux:

    $$G = \frac{\dot{m}}{A} = \frac{13.053\,\text{kg/s}}{0.05087\,\text{m}^2} = 256.6\,\text{kg/m}^2\text{s}$$

    Gas viscosity at $55\,\text{bar}$, $30^\circ\text{C}$: $\mu \approx 1.25 \times 10^{-5}\,\text{Pa}\cdot\text{s}$.

    $$Re = \frac{G D}{\mu} = \frac{256.6 \times 0.2545}{1.25 \times 10^{-5}} = 5{,}224{,}000\quad (Re \approx 5.22 \times 10^6)$$

    Relative roughness:

    $$\frac{\varepsilon}{D} = \frac{0.0457}{254.5} = 0.0001796$$

    From Colebrook-White: $f_D \approx 0.0142$.

    Step 3: Calculate Pressure Drop using Compressible Flow Formulation

    $$P_1^2 - P_2^2 = \frac{f_D L}{D} \left(\frac{Z_{avg} R T}{M}\right) G^2$$ $$\frac{f_D L}{D} = \frac{0.0142 \times 12{,}000}{0.2545} = 669.5$$ $$\frac{Z_{avg} R T}{M} = \frac{0.885 \times 8314 \times 303.15}{18.83} = 118{,}424\,\text{J/kg}$$ $$G^2 = (256.6)^2 = 65{,}844\,\text{kg}^2\text{/m}^4\text{s}^2$$ $$P_1^2 - P_2^2 = 669.5 \times 118{,}424 \times 65{,}844 = 5.221 \times 10^{12}\,\text{Pa}^2 = 52.21\,\text{bar}^2$$

    Given $P_1 = 65.0\,\text{bar a} \implies P_1^2 = 4225\,\text{bar}^2$:

    $$P_2^2 = 4225 - 52.21 = 4172.79\,\text{bar}^2 \implies P_2 = \sqrt{4172.79} = 64.59\,\text{bar a}$$ $$\Delta P = 65.0 - 64.59 = 0.41\,\text{bar}\quad (\text{Friction loss is tiny, 10-inch pipe is oversized!})$$

    Step 4: Optimize to Smaller Diameter ($6^{\prime\prime}$ Sch 40)

    Testing $6^{\prime\prime}$ Sch 40 ($D = 154.05\,\text{mm} = 0.15405\,\text{m}$):

    $$A = 0.01864\,\text{m}^2 \implies G = \frac{13.053}{0.01864} = 700.3\,\text{kg/m}^2\text{s}$$ $$Re = \frac{700.3 \times 0.15405}{1.25 \times 10^{-5}} = 8{,}630{,}000 \implies f_D \approx 0.0152$$ $$\frac{f_D L}{D} = \frac{0.0152 \times 12{,}000}{0.15405} = 1184.0$$ $$P_1^2 - P_2^2 = 1184.0 \times 118{,}424 \times (700.3)^2 = 6.874 \times 10^{13}\,\text{Pa}^2 = 687.4\,\text{bar}^2$$ $$P_2^2 = 4225 - 687.4 = 3537.6\,\text{bar}^2 \implies P_2 = \sqrt{3537.6} = 59.48\,\text{bar a}$$ $$\Delta P = 65.0 - 59.48 = 5.52\,\text{bar}\quad (\text{Comfortably meets } P_2 \ge 45\,\text{bar requirement!})$$

    Step 5: Verify Gas Velocity & Mach Number

    Discharge gas density at $P_2 = 59.48\,\text{bar a}$ ($Z \approx 0.88$):

    $$\rho_2 = \frac{5948 \times 18.83}{0.88 \times 8.314 \times 303.15} = 50.45\,\text{kg/m}^3$$

    Discharge velocity:

    $$v_2 = \frac{\dot{m}}{\rho_2 A} = \frac{13.053}{50.45 \times 0.01864} = 13.88\,\text{m/s}$$

    Speed of sound at discharge:

    $$c = \sqrt{\frac{k Z R T}{M}} = \sqrt{\frac{1.30 \times 0.88 \times 8314 \times 303.15}{18.83}} = \sqrt{152{,}996} = 391.1\,\text{m/s}$$

    Mach number:

    $$Ma = \frac{13.88}{391.1} = 0.0355 \ll 0.20\quad (\text{Extremely safe, quiet acoustic operation!})$$

    Selection: A 6-inch Sch 40 pipeline saves millions of dollars in material costs over a 10-inch line while satisfying all delivery pressure, velocity, and acoustic criteria.

    6. ChemProCal Integration

    Perform rigorous compressible gas line calculations using ChemProCal tools:

    
    Apply This Fundamental

    Gas Line Sizing

    Apply this methodology directly in the ChemProCal calculator.

    Open Calculator →
    ⚡ Interactive Estimator

    Live Gas Pipeline Velocity & Momentum Flux Estimator

    Adjust parameters below to test the methodology equations in real time before running full simulations:

    Actual Gas Velocity ($v$) 8.2 m/s
    Momentum Flux ($\rho v^2$) 975 Pa
    Operating Density ($\rho$) 14.5 kg/m³
    ✓ Velocity & kinetic momentum within acceptable continuous gas limits.