Changes in the State of an Ideal Gas

By |

This simulation shows an ideal gas (1 mol, diatomic) in a cylinder with a movable piston. A process selector lets you explore the four idealised changes of state – isothermal, isobaric, isochoric and adiabatic – as well as a free relaxation towards ambient equilibrium. The state is displayed simultaneously in the p-V diagram, as a time series, and in the T-S diagram.

Links

Description of the Animation

The gas is enclosed by a weight-loaded piston. Depending on the selected process, the state is changed either mechanically (by dragging the piston) or thermally (by adding or removing heat in three levels). The colour of the gas indicates its temperature qualitatively: from cool blue to warm orange.

All calculations are based on the thermal equation of state of the ideal gas:

\[ p \cdot V = n \cdot R \cdot T \]

  • p: pressure in pascals (Pa)
  • V: volume in cubic metres (m³)
  • n: amount of substance in moles (mol); the simulation uses n = 1 mol
  • R: universal gas constant, R = 8.314 J/(mol·K)
  • T: absolute temperature in kelvin (K)

The Four Changes of State

In each change of state one quantity is held constant. The equation of state then yields the familiar relationships:

Isothermal (T = const, Boyle’s law). The gas is in contact with a heat bath. When the piston is drawn slowly, the temperature is preserved, and a hyperbola appears in the p-V diagram:

\[ p \cdot V = \text{const} \quad \Rightarrow \quad p_1 V_1 = p_2 V_2 \]

Isobaric (p = const, Charles’s law). The pressure is fixed by the constant piston load. Added heat raises temperature and volume in proportion:

\[ \frac{V}{T} = \text{const} \quad \Rightarrow \quad \frac{V_1}{T_1} = \frac{V_2}{T_2} \]

Isochoric (V = const, Gay-Lussac’s law). The piston is clamped. Added heat raises only pressure and temperature; no volume work is done:

\[ \frac{p}{T} = \text{const} \quad \Rightarrow \quad \frac{p_1}{T_1} = \frac{p_2}{T_2} \]

Adiabatic (Q = 0). The gas is thermally insulated; no heat is exchanged. The temperature changes solely through volume work (compression heats, expansion cools). The Poisson equations apply, with the adiabatic index \( \gamma \):

\[ p \cdot V^{\gamma} = \text{const} \qquad T \cdot V^{\gamma – 1} = \text{const} \]

For a diatomic gas (f = 5 degrees of freedom) the adiabatic index is \( \gamma = \frac{C_p}{C_V} = \frac{7}{5} = 1.4 \). Since the adiabat is steeper than the isotherm, it always lies below or above it in the p-V diagram from the same starting point.

First Law and Molar Heat Capacities

All processes obey the first law of thermodynamics – the conservation of energy for thermodynamic systems. The change in internal energy equals the heat supplied minus the volume work the gas does on its surroundings:

\[ \mathrm{d}U = \delta Q – p \, \mathrm{d}V \]

For an ideal gas the internal energy depends only on temperature: \( \Delta U = C_V \cdot \Delta T \). The heat capacities differ according to whether heat is added at constant volume or at constant pressure:

  • Isochoric: \( Q = C_V \cdot \Delta T \) with \( C_V = \frac{5}{2} n R \approx 20.8 \) J/K – all of the heat raises the internal energy.
  • Isobaric: \( Q = C_p \cdot \Delta T \) with \( C_p = \frac{7}{2} n R \approx 29.1 \) J/K – part of the heat is released as volume work, so more heat is needed for the same temperature rise.
  • Isothermal: \( \Delta U = 0 \); the heat supplied is converted entirely into work.
  • Adiabatic: \( Q = 0 \), hence \( \Delta U = -p\,\Delta V \) – the work is done entirely at the expense of the internal energy.

The Three Representations

  • p-V diagram: shows the state path in the pressure–volume plane. The area under a curve corresponds to the volume work done. Reference curves (isotherms and the isobar of the ambient load) can optionally be shown.
  • Time series: plots pressure, temperature and volume separately over time, making dynamic processes such as the settling in free mode visible.
  • T-S diagram: plots temperature against entropy. Here the area under a reversible curve corresponds to the heat exchanged. For the ideal gas (relative to the ambient equilibrium as the zero point):

\[ \Delta S = C_V \ln\!\left(\frac{T_2}{T_1}\right) + n R \ln\!\left(\frac{V_2}{V_1}\right) \]

The T-S diagram makes the processes especially intuitive: the isochor and the isobar appear as curves of different slope, the isotherm as a horizontal line, and the reversible adiabat (isentrope) as a vertical line.

Interactive Controls

  • Select process: Isothermal, Adiabatic, Isobaric, Isochoric or Free. Depending on the choice, either the piston or the heating/cooling buttons are active.
  • Drag piston (isothermal, adiabatic, free): changes the volume directly.
  • Heat / cool (isobaric, isochoric, free): adds or removes heat in three levels.
  • Switch view: p-V diagram, time series or T-S diagram.
  • Reference curves: shows or hides comparison curves in the p-V and T-S diagrams.
  • Pause / Reset: pauses the simulation or resets it to the ambient equilibrium (T = 300 K, p ≈ 100 kPa).

Physical Background

The idealised changes of state are the building blocks from which thermodynamic cycles are assembled. They are a model concept: real processes are never exactly isothermal or adiabatic but lie between these limiting cases. The quasi-static, reversible limit is ideal because it proceeds infinitely slowly and generates no entropy. By contrast, the “Free (relaxation)” mode shows an analogy model for an irreversible equilibration process, in which the piston settles into a new equilibrium under the ambient load.

Note: The simulation models 1 mol of an ideal, diatomic gas in SI units. The mechanics of the free mode (inertia, damping) are a didactic surrogate model and not to scale; they serve only to illustrate the settling behaviour.

Practical Applications

  • Internal combustion engines: the Otto and Diesel cycles combine isochoric, isobaric and adiabatic steps
  • Stirling engine: works with isothermal and isochoric changes of state
  • Refrigerators and heat pumps: use the adiabatic compression and expansion of a working fluid
  • Compressors and pneumatics: rapid compression is approximately adiabatic and heats the gas noticeably

Overview

TitleIdeal Gas – Changes of State at a Piston
Target audienceTeachers and lecturers
FeaturesFullscreen mode
lossless magnification
large screens and projection supported
LicenseMIT