← Thermal
Statistical Mechanics

Kinetic Theory of Gases

Watch molecules collide, and see temperature, pressure and the Maxwell–Boltzmann distribution emerge.
Speed distribution (bars) vs the theoretical Maxwell–Boltzmann curve (line) — they match once the gas thermalizes.
slow → fast Colour shows each molecule's speed
Particles
140
Temperature
0arb.
Mean speed
0px/s
Pressure
0arb.
i About this experiment — click to learn the physics

What you're looking at

A gas is nothing but a swarm of tiny molecules in ceaseless, random motion, colliding with each other and the walls. The kinetic theory explains the everyday properties of a gas — temperature and pressure — purely from this molecular motion. Each dot is a molecule; collisions here are elastic, conserving energy and momentum.

Temperature is motion

Temperature is just a measure of the average kinetic energy of the molecules. In two dimensions:

½ m⟨v²⟩ = k_B · T average KE ∝ temperature

Turn up the temperature and every molecule speeds up; the colours (blue = slow, red = fast) shift warmer and the whole distribution slides to higher speeds.

Pressure is collisions

Pressure isn't a substance pushing on the walls — it's the combined drumbeat of molecules bouncing off them. Each impact delivers a tiny impulse; billions per second add up to a steady force. Squeeze the piston to shrink the volume and the molecules strike the walls more often, so the pressure rises — exactly the ideal gas law:

P · V = N · k_B · T pressure × volume = particles × temperature

The Maxwell–Boltzmann distribution

Even if every molecule starts at the same speed, collisions quickly randomize them: some get a lucky double-hit and speed up, others slow down. The result is a characteristic spread of speeds — the Maxwell–Boltzmann distribution. The histogram fills in as the gas thermalizes, and the smooth curve is the theoretical prediction for the current temperature. A few molecules are very slow, a few very fast, and most cluster near a typical speed.

Things to try

Watch the histogram right after a Reset: it starts as a single spike (all the same speed) and spreads into the smooth bell-like curve within a second or two. Raise the temperature and the whole curve shifts right and flattens. Shrink the volume and watch the pressure climb.