Thermodynamics and statistical mechanics

See temperature, pressure and entropy emerge from particles. Watch an ideal gas settle into the Maxwell–Boltzmann distribution, entropy rise as order dissolves, a Carnot engine trace its cycle on a p–V diagram, and magnetic domains form in the Ising model as it cools.

This interactive simulation runs in your browser with WebGL. Free, no account needed.

What you can explore

Gas

Gas particles collide elastically in a box while a live histogram of their speeds settles onto the Maxwell–Boltzmann curve. Raise the temperature and the distribution broadens and shifts.

Entropy

Start with an ordered arrangement and watch it spread out. The entropy, computed from the number of accessible arrangements, rises and does not come back down.

Heat engine

A Carnot cycle traced on a p–V diagram: two isotherms and two adiabats. The enclosed area is the work done, and the efficiency follows 1 − T_C/T_H.

Ising model

A grid of magnetic spins that align with their neighbours. Cool it through the critical temperature and domains grow until the whole lattice magnetises.

Key equations

  • pV = NkT
  • S = k_B ln Ω
  • η = 1 − T_C / T_H
  • ½m⟨c²⟩ = (3/2)kT

Curriculum

AQA A-level physics 3.6.2, IB Physics B.1–B.4.

Common questions

Why does entropy increase?

There are vastly more disordered arrangements of particles than ordered ones, so random motion almost always carries a system towards more probable, higher-entropy states.

What limits the efficiency of a heat engine?

The Carnot limit 1 − T_C/T_H, set only by the temperatures of the hot and cold reservoirs. No real engine between those temperatures can do better.

More physics simulations