Compressible Gas Flow Calculator
Isothermal compressible flow through a pipe with a Mach number check, plus the Weymouth and Panhandle transmission equations for long gas lines.
When to use this calculator
Use when the gas expands enough along the line that incompressible pressure drop stops being valid — roughly once the drop exceeds 10% of the inlet pressure. Density falls as pressure falls, so velocity rises along the pipe, and the answer has to be marched rather than computed in one step. The tool solves the isothermal case with fittings included and reports the exit Mach number so choking is visible, and offers the Weymouth and Panhandle transmission forms for long cross-country lines.
Required inputs
- Method — isothermal marching, or a transmission equation
- Inlet and outlet pressure, or the flow to be passed
- Gas properties: molecular weight M, compressibility Z, specific heat ratio k, temperature
- Pipe inside diameter, length, roughness, and fitting K-values
Expected outputs
- Pressure drop along the pipe and the fitting contribution
- Exit velocity and exit Mach number, with a choking warning
- Flow capacity for a given pressure pair, or vice versa
Formula overview
SI: pressures absolute in Pa or bar a, T in K, M in kg/kmol, R = 8 314 J/(kmol·K), D and L in m, ṁ in kg/s. Transmission equations use their own base conditions Tb and Pb.
Isothermal compressible flow (Crane TP-410 / GPSA):
P1² − P2² = (ṁ/A)² · (Z·R·T/M) · ( f·L/D + 2·ln(P1/P2) )
Ma = v₂ / √( k·Z·R·T/M )
Transmission form — Weymouth and Panhandle:
Q = K·E·(Tb/Pb)^a · [ (P1² − P2²) / (G·Tf·L·Z) ]^b · D^c
The solver marches the pipe in 50 steps so density and velocity are
updated as the pressure falls, and adds ΣK·ρV²/2 for the fittings.Worked example
Natural gas, M = 18 kg/kmol, T = 288 K, k = 1.3, Z = 0.95,
exit velocity 40 m/s
Sonic velocity = √(k·Z·R·T/M)
= √(1.3 × 0.95 × 8 314 × 288 / 18)
= √164 300 = 405 m/s
Ma = 40 / 405 = 0.10
Comfortably subsonic, so the isothermal result is reliable. Once Ma
approaches about 0.3 the compressibility terms dominate, and at Ma = 1
the line is choked and no extra downstream drop increases flow.Common mistakes
- Using an incompressible pressure drop on a gas line. It is acceptable while the drop stays under about 10% of inlet pressure. Beyond that the density change is real and the incompressible answer is optimistic.
- Working in gauge pressure. Every compressible relation here is written in absolute pressure — the P1² − P2² term is meaningless on a gauge basis, and the error is largest exactly where gas lines run at low pressure.
- Ignoring the exit Mach number. A design that looks fine on pressure drop can be near choking at the outlet, where noise, vibration, and erosion appear long before the flow limit is actually reached.
FAQ
Learn
Related articles
Pipe Sizing Calculation คืออะไร
ทำความเข้าใจหลักการเลือกขนาดท่อจาก flow rate และ velocity พร้อมสมการพื้นฐานที่วิศวกรใช้จริง
Pressure Drop Calculation
คู่มือคำนวณการสูญเสียความดันในระบบท่อ (Pressure Drop) ด้วย Darcy–Weisbach Equation, Reynolds Number, Friction Factor และ Minor Losses พร้อมตัวอย่างคำนวณจริงสำหรับวิศวกร
วิธีคำนวณ Hydrotest Pressure
หลักการคำนวณความดันทดสอบ hydrostatic ตาม ASME B31.3 สำหรับงาน commissioning