Real Gas Compressibility Factor Simulator Back
Thermodynamics

Real Gas Compressibility Factor Simulator

The ideal-gas law PV = nRT is convenient, but real gases drift away from it at high pressure or low temperature. This tool uses the Lee-Kesler / Pitzer corresponding-states correlation to compute the compressibility factor Z in real time from pressure, temperature, critical constants and acentric factor. The departure from ideal-gas behaviour is obvious at a glance, building intuition for compressor, pipeline and storage-tank design.

Parameters
Pressure P
MPa
System absolute pressure. Used in Pitzer's P_r = P / P_c
Temperature T
K
System absolute temperature. Used in the reduced temperature T_r = T / T_c
Critical pressure Pc
MPa
Substance-specific critical pressure. Methane 4.6, N₂ 3.40, CO₂ 7.38, water 22.06 MPa
Critical temperature Tc
K
Substance-specific critical temperature. Methane 190.6, N₂ 126.2, CO₂ 304.1, water 647.1 K
Acentric factor ω
Molecular-shape correction. Ar 0.000, CH₄ 0.011, C₂H₆ 0.099, CO₂ 0.225, H₂O 0.344
Results
Reduced temp. Tr
Reduced press. Pr
Z⁽⁰⁾ simple-fluid term
Z⁽¹⁾ acentric correction
Compressibility factor Z
Real molar volume (cm³/mol)
Molecular motion — attractive vs repulsive regimes

At moderate pressure (Z<1) the intermolecular attraction wins and the molecules cluster together a little. At very high pressure (Z>1) the repulsion from finite molecular size wins and the molecules push each other apart. The colour shows the current Z: green (≈1) → orange → red.

Z vs Pr — compressibility factor against reduced pressure
Z vs Tr — compressibility factor against reduced temperature
Theory & Key Formulas

$$Z=\frac{PV}{nRT}=Z^{(0)}+\omega\,Z^{(1)}$$

Z = 1 is the ideal gas. Z < 1 is the moderate-pressure regime near the saturation line (attraction dominates); Z > 1 is the very-high-pressure regime (repulsion from molecular size dominates). ω is Pitzer's acentric factor that corrects for molecular shape.

$$Z^{(0)}=1+\left(0.083-\frac{0.422}{T_r^{1.6}}\right)\frac{P_r}{T_r},\quad Z^{(1)}=\left(0.139-\frac{0.172}{T_r^{4.2}}\right)\frac{P_r}{T_r}$$

The compact form of the Pitzer two-term correlation due to Vogel-Schlosser. Uses the reduced coordinates T_r = T/T_c and P_r = P/P_c. Accurate for single-phase vapour at low to moderate pressure (P_r < 2).

$$V_{\text{ideal}}=\frac{RT}{P},\qquad V_{\text{real}}=Z\cdot V_{\text{ideal}}$$

Ideal and real molar volumes (R = 8.314 J/(mol·K)). Z is literally the factor by which the real-gas molar volume differs from the ideal-gas value.

What is the compressibility factor Z?

🙋
A "real gas" basically means a gas where PV = nRT no longer works, right? But why do we wrap all of that up into a single number "Z"?
🎓
Good question. PV = nRT secretly assumes "molecules have zero size" and "no intermolecular forces". At room temperature and low pressure that holds within 0.5%, but once you push beyond a few MPa or approach the critical point it starts to drift. The compressibility factor Z = PV/(nRT) packs all of that drift into one number: Z = 1 is ideal, and Z ≠ 1 is a meter showing "how far you are from ideal". One number is enough, so in both textbooks and design work the first thing you compute is Z.
🙋
I see! So is Z usually greater than 1, or smaller than 1?
🎓
Both, which is the interesting part. At intermediate pressures (a few MPa to a dozen or so MPa) the "slight pull" between molecules wins and Z drops below 1 — typically 0.6 to 0.95. Push the pressure further so the molecules really start to crowd, and the molecular volume itself starts to matter, sending Z above 1. As an extreme, raising hydrogen to 100 MPa pushes Z up to about 1.7. At the defaults here (methane, 5 MPa, 350 K) Z ≈ 0.955, meaning the real gas occupies 4.5% less volume than the ideal gas.
🙋
Drawing a chart for every substance sounds awful. How do you actually compute Z?
🎓
That is where the "principle of corresponding states" and "Pitzer's acentric factor" come in. If you plot in reduced coordinates (T_r, P_r) — temperature divided by T_c, pressure divided by P_c — many substances collapse onto almost the same Z curve. That is the corresponding-states principle. Non-spherical molecules drift slightly off that curve, so Pitzer adds the correction parameter ω and writes Z = Z⁽⁰⁾ + ω·Z⁽¹⁾. With that one formula you can handle everything from methane to n-octane. This tool uses the compact form (Vogel-Schlosser), which is good to within 2% at low to moderate pressure.
🙋
What kinds of real-world failures happen when you get Z wrong? I would like a concrete example.
🎓
A classic one is natural-gas pipeline design. Treating methane at 5 MPa as an ideal gas overestimates the actual flow rate by 4-5%. People save one compressor stage on paper and pay for it in the field. A flashier example is CCS (CO₂ storage): CO₂ transported at 10 MPa at room temperature has Z dropping to 0.4-0.6. Use the ideal-gas equation and you under-size the vessel by nearly a factor of two. Refrigerant calculations for R-410A and the 70 MPa hydrogen-station tank sizing also rely on the Z correction. It really is "the first number that lands on the compressor selection sheet".
🙋
So in what range is it safe to assume Z = 1?
🎓
A rule of thumb is T_r > 2 and P_r < 0.5. For example, treating air at room temperature and atmospheric pressure (T_r ≈ 2.3, P_r ≈ 0.027) gives Z = 0.9997 — essentially 1. Conversely, once you enter T_r < 1.5 or P_r > 1 you absolutely have to apply the Z correction. And if T_r < 1 you may even enter the saturated-vapour region, where the simplified Pitzer correlation is no longer in its sweet spot. Near the critical point or in the liquid phase, the standard move is to switch to a full equation of state such as SRK, Peng-Robinson or the full Lee-Kesler correlation.

Frequently Asked Questions

The compressibility factor Z is a dimensionless number that measures how far a real gas departs from ideal-gas behaviour, defined as Z = PV/(nRT). For an ideal gas Z = 1, but a real gas has finite molecular size and intermolecular attractions, so Z ≠ 1. At moderate pressures the attractive forces dominate and Z < 1 (typically 0.6 to 0.95); at very high pressures the molecular volume dominates and Z > 1. Treating real gases as ideal in compressor sizing, pipeline design or refrigeration cycle calculations can introduce errors of tens of percent, so evaluating Z is essential in practice.
The Pitzer two-term correlation extends the corresponding-states principle with the acentric factor ω in the form Z = Z⁽⁰⁾(T_r, P_r) + ω·Z⁽¹⁾(T_r, P_r). This tool uses the Vogel-Schlosser approximation Z⁽⁰⁾ = 1 + (0.083 − 0.422/T_r^1.6)·P_r/T_r and Z⁽¹⁾ = (0.139 − 0.172/T_r^4.2)·P_r/T_r, which is accurate to within about 2% for single-phase vapour at low to moderate pressure (roughly P_r < 2 and T_r > 0.8). Near the critical point, in the two-phase region or in the liquid phase the error grows, so a full EOS such as SRK, PR or the full Lee-Kesler correlation is required.
The acentric factor ω is a molecular-shape correction introduced by Pitzer, defined from the reduced saturation pressure at T_r = 0.7 as ω = -log10(P_r,sat) - 1. For a perfectly spherical, non-polar simple fluid (Ar, Kr, Xe) ω ≈ 0; for methane it is 0.011, ethane 0.099, n-heptane 0.349 and water 0.344. Standard chemical-engineering handbooks (Reid-Prausnitz-Poling and the like) tabulate values for many substances. The default value 0.011 in this tool corresponds to methane.
It depends on the conditions, but at low pressure and high temperature (T_r > 2, P_r < 0.5) the error is below 1% and the ideal-gas equation is fine in practice. On the other hand, natural gas (mostly methane) carried at 5 MPa and 350 K gives Z ≈ 0.955, an error of about 5%, while CO₂ transported at 10 MPa in a CCS pipeline reaches Z ≈ 0.4 to 0.6 — a 40-60% deviation. Because this directly affects compressor staging and storage-tank sizing, the Z correction is essential in supercritical and high-pressure service. The right-hand card shows ideal molar volume against real molar volume, and their ratio (= Z) makes the magnitude of the error obvious.

Real-World Applications

Natural-gas pipelines and compressor design: When methane-rich natural gas is moved long-distance at 5-10 MPa, Z lies in the range 0.85-0.95. If you omit Z from the gas-capacity, velocity and friction-loss calculations, you mis-estimate the annual transport volume by several percent — leading to compressor-staging mistakes and missed contracted volumes. North American and European long-distance pipelines use AGA-8 or GERG-2008 as the standard EOS; the Pitzer correlation in this tool corresponds to a quick pre-check version.

CO₂ capture and storage (CCS) and supercritical transport: In CCS, CO₂ from power plants and steelworks is liquefied or sent in the supercritical state to underground storage, typically transported at 7-15 MPa near room temperature. CO₂ has T_c = 304 K and P_c = 7.38 MPa, which sits right around the critical point, so Z swings between 0.2 and 0.6. Treating it as ideal gas leads to pipeline diameters and pump specifications that are off by a factor of two, making the Z correction the first step in CCS design.

High-pressure hydrogen storage tanks and refuelling stations: Hydrogen for fuel-cell vehicles (FCVs) is stored at 35 MPa or 70 MPa. Hydrogen has T_c = 33 K, so at room temperature T_r is very large and Z exceeds 1, reaching Z ≈ 1.4-1.5 at 70 MPa. That means the same-volume tank holds 30-40% less hydrogen than the ideal-gas estimate. Setting Z = 1 in FCV driving-range calculations gives an overestimate that translates into fatal miscalculations at the station and in vehicle development.

Refrigeration cycles and refrigerant selection: HFC (R-134a, R-410A) and next-generation HFO refrigerants (R-1234yf) operate in the evaporator/condenser temperature range with T_r between 0.7 and 0.95 and Z in the 0.7-0.9 region. Computing COP (coefficient of performance) and condenser sizing requires Z evaluation by Pitzer or PR/SRK EOS, and it is at the heart of air-conditioner and heat-pump efficiency design.

Common Misconceptions and Pitfalls

The biggest trap is letting "Z = 1 at room temperature and atmospheric pressure" carry over into the high-pressure regime. Move the sliders in this tool and you will see that methane at 10 MPa drops below Z = 0.85. Treating it as an ideal gas overestimates the pipeline flow by 15% — straight into compressor under-capacity. The rule of thumb is "apply the Z correction once P_r > 0.3, and definitely once P_r > 1". The "Z ≈ 1 at room conditions" line is genuinely only for low pressure, and must not be carried over as a design assumption for equipment.

Next, "the Pitzer correlation is not universal". The Vogel-Schlosser compact Pitzer used here is accurate within 2% for single-phase vapour at T_r > 0.8 and P_r < 2, but near the critical point (T_r ≈ 1) intermolecular correlations vary explosively, so you must switch to the full Lee-Kesler correlation or the Peng-Robinson EOS. In the two-phase region (where saturated vapour and saturated liquid coexist), Z takes two different values at the same point and the formulas in this tool cannot be used at all. For strongly polar substances such as water (ω = 0.344) and ammonia, more advanced correlations (SRK, PRSV, SAFT) are preferable.

Finally, "Z is not just about gases". Z is also defined for the liquid phase, where it is typically very small — 0.01 to 0.3 — because the liquid molar volume is two to three orders of magnitude smaller than the vapour. This tool targets the vapour side, but in chemical engineering the same EOS (PR or SRK) is used to compute both vapour and liquid Z, and the difference yields the saturation pressure and the vapour-liquid equilibrium. The Z concept itself is a powerful tool for handling vapour, liquid and supercritical phases in a unified way.

How to Use

  1. Enter absolute pressure (bar or atm) and critical pressure for your gas in the pressure fields.
  2. Input absolute temperature (K) and critical temperature to compute reduced parameters Tr and Pr.
  3. The simulator calculates Z⁽⁰⁾ (two-term virial expansion) and Z⁽¹⁾ (acentric-factor correction), then outputs total compressibility Z and real molar volume in cm³/mol.

Worked Example

For CO₂ at 50 bar and 300 K: Pc=73.8 bar, Tc=304.13 K gives Pr=0.677, Tr=0.986. The simulator returns Z≈0.924 (vs. ideal Z=1.0), and real molar volume≈458 cm³/mol instead of ideal 494 cm³/mol. At 150 bar, the same CO₂ shows Z≈0.765, demonstrating molecular repulsion and intermolecular attraction effects excluded by PV=nRT.

Practical Notes

  1. Use reduced parameters: gases behave similarly when Pr and Tr match, regardless of chemical identity—crucial for correlating methane, nitrogen, or propane compressibility across process conditions.
  2. Z < 1 indicates attractive forces dominate (typical at moderate pressures); Z > 1 signals repulsion (high density, near-critical regions).
  3. Always supply critical constants from reliable databases; errors in Pc or Tc propagate directly into Z and volume predictions used in pipeline sizing and compressor design.