Real gases depart from the ideal gas law, especially when the pressure is high or the temperature is low. This gas compressibility factor calculator finds the compressibility factor Z of five common gases from the temperature and the pressure, with the Pitzer virial correlation. It gives the real gas density, the ideal gas density, the error of the ideal law and the reduced conditions.
How the calculation works
- Choose the gas and enter its temperature and absolute pressure.
- The calculator divides them by the critical temperature and critical pressure of the gas to get the reduced values Tr and Pr.
- It applies the Pitzer virial correlation: Z = 1 + (B⁰ + ω B¹) Pr / Tr, where B⁰ = 0.083 − 0.422 / Tr¹·⁶, B¹ = 0.139 − 0.172 / Tr⁴·² and ω is the acentric factor.
- It gives Z, the real density (ρ = P M / (Z R T)) and the density that the ideal gas law would give.
Example
Methane at 68 °F and 500 psia has Tr = 293.15 / 190.56 = 1.538 and Pr = 34.47 / 45.99 = 0.750. The correlation gives Z = 0.938. The real density is 1.51 lb/ft³ (24.2 kg/m³), against 1.42 lb/ft³ for an ideal gas, so the ideal gas law is 6.2 % too low on the density.
Why it matters
The compressibility factor is a correction that engineers apply to gas volumes in storage, metering, compressors and pipelines. A quick estimate of Z shows whether the ideal gas law is good enough or whether a detailed equation of state is needed, and it gives a better mass of gas in a tank at high pressure.
Good to know
The correlation is for pure gases and does not apply to mixtures such as natural gas without mixing rules. It is a two-term virial equation, so it loses accuracy at high density, near the critical point and for polar gases. The critical constants are standard handbook values for the five gases in the list. The pressure is absolute, so add the local atmospheric pressure to a gauge reading.
Related tools
The van der Waals equation calculator is another real-gas model, the ideal gas law calculator gives the reference case, the air density calculator covers the atmosphere, and the Clausius–Clapeyron calculator covers the vapor pressure of liquids.