Real Gas Density Deviation Calculator — Compressibility Factor Impact on Density and Flow
Calculate real gas density using pressure, temperature, compressibility factor, and specific gas constant.
Enter the known values and review the calculated result
Input parameters
Use consistent values and select the intended engineering units.
Thermodynamic state
Flow conditions
Results
Engineering Pro Save, document and continue this calculation
Turn this result into a reusable engineering record with saving, PDF export and reporting workflows.
Method, application and limitations
Review the calculation method, intended application and engineering assumptions before using the result in a design decision.
Formula and calculation method
Real gas density formula:
ρideal = p / (R · T)
ρreal = ρideal / Z
ε = ((ρreal − ρideal) / ρideal) · 100%
where:
- ρreal — real gas density (kg/m³)
- ρideal — ideal gas density (kg/m³)
- ε — density deviation (%)
- p — pressure (Pa)
- T — temperature (K)
- Z — compressibility factor (−)
- R — specific gas constant (J/(kg·K))
When to use this calculator
When to use this calculator:
- Compare real gas density against ideal gas density for a specified pressure, temperature, compressibility factor, and gas constant.
- Evaluate the density deviation caused by compressibility factor before using ideal-gas density in flow calculations.
- Calculate real and ideal volumetric flow from the same mass flow rate.
- Check whether compressibility correction changes density enough to require non-ideal gas treatment.
- Convert a selected compressibility factor into density correction factor and flow ratio.
How to interpret the result
Real gas density is defined as ideal gas density corrected by compressibility factor.
Density deviation is defined as the percentage difference between real gas density and ideal gas density. It depends directly on the compressibility factor correction.
- Safe — absolute density deviation is below 5%.
- Warning — absolute density deviation is from 5% to 15%.
- Unsafe — absolute density deviation is above 15%.
- Invalid — one or more required inputs violate the validation limits from the calculator.
Increasing pressure increases both ideal and real density. Increasing temperature or specific gas constant decreases both ideal and real density. Increasing compressibility factor decreases real gas density and reduces the density correction factor.
Calculation example
Example:
A user wants to check how much the selected compressibility factor changes gas density and volumetric flow compared with the ideal-gas assumption.
- p — Pressure = 500000 Pa
- T — Temperature = 300 K
- Z — Compressibility factor = 0.90
- R — Specific gas constant = 287 J/(kg·K)
- ṁ — Mass flow rate = 1 kg/s
ρideal = 5.807 kg/m³, ρreal = 6.452 kg/m³, ε = 11.111%.
Assumptions and limitations
- Ideal gas density is calculated from pressure, specific gas constant, and temperature.
- Real gas density is calculated by applying compressibility factor to ideal gas density.
- Density deviation is evaluated relative to ideal gas density.
- Volumetric flow is calculated from mass flow rate divided by density.
- The compressibility factor must remain between 0.2 and 5.
- Temperature must remain between 50 K and 2000 K.
- Pressure must not exceed 100000000 Pa.
- Specific gas constant must remain between 50 and 1000 J/(kg·K).
