Skip to content
Saha Hesap

Gas Compression and Expansion Calculator

Final pressure, volume and temperature, work done, heat added and change in internal energy for isothermal, adiabatic, isobaric, isochoric and polytropic processes of an ideal gas.

What happens when a gas is compressed or expands?

The pressure, volume and temperature of a gas in a closed container change together, and the outcome depends on how the process is carried out. This calculator solves the five basic processes for an ideal gas and gives the work done by the gas, the heat it takes in and the change in its internal energy.

The processes

  • Isothermal (constant temperature): P₁ × V₁ = P₂ × V₂. In slow compression the gas gives its heat to the surroundings. Work: W = P₁ × V₁ × ln(V₂ / V₁).
  • Adiabatic (no heat exchange): P × V^γ is constant. The gas heats up when compressed quickly and cools when it expands quickly. Work: W = (P₁V₁ − P₂V₂) / (γ − 1).
  • Isobaric (constant pressure): V / T is constant. Work: W = P × (V₂ − V₁).
  • Isochoric (constant volume): P / T is constant. No work is done and all the heat goes into internal energy.
  • Polytropic: P × V^n is constant. The process in a real compressor usually lies between isothermal and adiabatic.

γ is the heat capacity ratio: 5/3 for monatomic gases such as helium and argon, 7/5 for diatomic gases such as air.

Example

In an engine cylinder, 240 cm³ of air and fuel mixture at 100 kPa and 20 °C is quickly compressed to 40 cm³. Treating the process as adiabatic with γ = 1.4, the pressure becomes 100 × 6^1.4 = 1229 kPa and the temperature rises from 293 K to 600 K. The work done on the gas is 63 J. Had the same compression been isothermal, the pressure would have reached only 600 kPa.

Sign convention

Here work means the work done by the gas. It is positive in expansion and negative in compression. The first law is applied as ΔU = Q − W.

Limits

The gas is taken as ideal, the process as reversible and γ as constant. In real machines friction and heat leaks change the result. Pressure must be entered as absolute pressure. Pressure vessel and compressor design is not what this tool is for.

Related calculators

Found a mistake or something missing?

If a value looks wrong, a size is missing or you need a feature, write to us and we will fix it.

Send an email