Gas Laws Simulator

A gas in a sealed piston has three knobs: pressure, volume and temperature — and they are locked together by the ideal gas law. In this simulator you heat or cool the gas, move the piston, and choose which variable to hold constant, rediscovering Boyle's, Charles's and Gay-Lussac's laws yourself.

T = 300 KP = 101.3 kPaV = 24.6 L
Hold constant:
Volume grows with temperature: V ∝ Tn = 1 mol, R = 8.314

Controls

  • Temperature: The gas temperature in kelvin. Heating makes molecules move faster and hit the walls harder.
  • Hold-constant mode: Choose which variable stays fixed while you change the others: temperature (isothermal), pressure (isobaric), or volume (isochoric).

The physics

Assumptions

  • The gas is ideal (point molecules, no attractions)
  • The container is sealed — amount of gas n is constant
  • Changes are slow enough to stay near equilibrium
  • No gas escapes past the piston

Guided activity

  1. Hold temperature constant. Halve the volume with the piston — what happens to the pressure? This is Boyle's law.

  2. Hold pressure constant. Double the temperature in kelvin (e.g. 300 K → 600 K) — what happens to the volume? This is Charles's law.

  3. Hold volume constant and heat the gas. Watch the pressure climb — Gay-Lussac's law. Why does the pressure rise at the molecular level?

  4. Repeat the Charles's law test using Celsius doubling (e.g. 20 °C → 40 °C). Why does the volume NOT double? What does this prove about temperature scales?

Challenge questions

  1. Predict the final pressure if you both halve the volume AND double the kelvin temperature. Then test it in the simulator.

  2. Absolute zero is unreachable — but extrapolate: if volume shrinks linearly with kelvin temperature at constant pressure, at what temperature would the volume hit zero?

  3. Real gases deviate from PV = nRT at high pressure. Which assumption of the ideal gas model breaks down when molecules are squeezed close together?