What happens to a gas when it expands through a regulator, gets squeezed in a compressor, or sits in a cylinder in the sun? This calculator answers those questions with real-gas properties from CoolProp, an open-source library of thermodynamic data, running right here in your browser. Pick the gas (air, nitrox, trimix or a pure gas), the process and the start conditions, and it gives you the final temperature or pressure, side by side with what the ideal gas law would have predicted.
Which process do I need?
How cold does gas get when it expands in a regulator?
Use isenthalpic. The gas is throttled through the valve seat without doing any work and too quickly to exchange heat, so its enthalpy stays the same. Calculate the final temperature.
How hot does gas get when it is compressed?
Use isentropic. Compression happens too fast for heat to escape, so it is treated as adiabatic and free of losses. Real compressors run somewhat hotter because of their losses. Calculate the final temperature.
How does cylinder pressure change with temperature?
Use isochoric. The cylinder’s volume and the amount of gas inside it don’t change, so pressure simply follows temperature. Calculate the final pressure.
Background
Gauge and absolute pressure
The pressures you enter and read here are gauge pressures: what a pressure gauge shows, 0 at the surface. The formulas need absolute pressure, which counts from a vacuum, so the calculator adds the atmospheric pressure:
p_\text{abs} = p_\text{gauge} + p_0p_\text{abs}Absolute pressurep_\text{gauge}Gauge pressure: what the gauge showsp_0Atmospheric pressure, 1.01325 bar at sea levelIsentropic process
Entropy stays constant, which means the process is adiabatic (no heat transfer) and reversible (no losses from friction, turbulence or other irreversibilities). It is well suited for modelling compressions in scuba equipment.
Isenthalpic process
Enthalpy stays constant: no work is done and there is practically no heat transfer. This is throttling, as in a valve, orifice or regulator seat, where pressure drops without work being done. It is well suited for expansions of gas in scuba equipment. Throttling can only lower the pressure, never raise it.
Isochoric process
Volume stays constant. This is a closed cylinder that heats up or cools down: a hot fill cooling to water temperature, or a cylinder left in the sun. Mass and volume don’t change, so the density doesn’t either, and pressure follows temperature.
The ideal gas comparison
Next to every real-gas result the calculator shows what the ideal-gas relations give, with a constant heat capacity ratio \gamma taken at the start temperature. For an isentropic process that is:
T_2 = T_1 \cdot \left( \frac{p_2}{p_1} \right)^{\frac{\gamma - 1}{\gamma}}T_2Final temperature in kelvinT_1Start temperature in kelvinp_2Final pressure, absolute: the gauge reading plus atmospheric pressurep_1Start pressure, absolute: the gauge reading plus atmospheric pressure\gammaHeat capacity ratio at the start temperatureFor an isenthalpic process an ideal gas doesn’t change temperature at all: the cooling or warming you see is purely real-gas (Joule–Thomson) behaviour.
For a cylinder changing temperature (isochoric) the comparison is Gay-Lussac’s law, with temperatures in kelvin:
\frac{p_1}{T_1} = \frac{p_2}{T_2}p_1Start pressure, absolute: the gauge reading plus atmospheric pressureT_1Start temperature in kelvinp_2Final pressure, absolute: the gauge reading plus atmospheric pressureT_2Final temperature in kelvinIt is the rule of thumb most divers use, and at cylinder pressures it can be well off. A 232 bar air fill cooling from 45 °C to 15 °C loses about 30 bar, not the 22 bar Gay-Lussac predicts. Helium happens to follow it closely.
Polytropic process
A generalised process that covers both heat transfer and irreversibilities through the polytropic exponent n, using the ideal-gas relation:
p \cdot v^n = \text{const}pPressure, absolute: the gauge reading plus atmospheric pressurevSpecific volumenPolytropic exponentReasonable values at room temperature are 1.40 for air, oxygen and nitrogen, 1.41 for hydrogen and 1.66–1.67 for helium and argon. For any gas you choose, the calculator shows its ideal-gas γ under the exponent field.
Because it depends so heavily on an accurate exponent, which is hard to know for a real situation, it is a rather poor fit for scuba equipment. It is commonly used for engines and turbines, where conditions are better defined.