Ideal Gas (PV = nRT) Piston

Live interactive gas cylinder — set the amount of gas, then drag temperature and applied pressure and watch the piston respond in real time as PV=nRT holds exactly.

Preview — sign up free to change the numbers yourself

Requires Interstellar

What you can adjust

Heat source (temperature)
200 – 800 K

Sets the gas temperature. Higher temperature at fixed pressure means a bigger equilibrium volume.

Amount of gas (n)
0.1 – 5 mol

How much gas is sealed in the cylinder (only meaningful while the valve is closed).

Applied (load) pressure
50 – 300 kPa

External pressure/load pushing on the piston. 101.325 kPa is 1 atmosphere.

Valve
0 – 1

0 = sealed (gas amount fixed), 1 = vented to the atmosphere (gas pressure pinned to 1 atm).

About this simulation

What it shows

A cylinder of gas sealed by a movable piston. You change the temperature, the amount of gas and the pressure pushing on the piston, and the piston settles to a new volume.

The key idea

An ideal gas obeys PV = nRT. At a fixed pressure the volume grows in proportion to the temperature in kelvin, and at a fixed temperature the pressure goes down as the volume goes up.

Try this

Keep the applied pressure at 101.3 kPa and double the temperature control from 300 K to 600 K: the piston rises until the volume has doubled.

The gas is ideal, so there are no forces between molecules and the molecules take up no space. Real gases drift from this at high pressure or low temperature.