Kinetic Theory
An ideal gas in a box. Particles collide elastically, trading momentum and energy. From this chaos, the Maxwell-Boltzmann speed distribution emerges — statistical mechanics made visible.
About this lab
The Maxwell-Boltzmann distribution
In 1860, James Clerk Maxwell derived the probability distribution for particle speeds
in an ideal gas at thermal equilibrium. Ludwig Boltzmann later provided the statistical
mechanical foundation. The distribution is not uniform — particles cluster around
a most probable speed, with a long tail of faster particles. The probability density for
speed v at temperature T is:
f(v) = 4π (m / 2πkT)^(3/2) · v² · exp(-mv² / 2kT)
The factor v² comes from the volume of a thin spherical shell in
velocity space: there are more ways to have a high speed (many directions) than a low
one. The exponential decay comes from the Boltzmann factor — high-energy states
are exponentially unlikely. The balance between these two effects determines the peak.
Elastic collisions and energy exchange
When two hard spheres collide elastically, they conserve both kinetic energy and momentum. After many collisions, any initial speed distribution relaxes toward the Maxwell-Boltzmann form. Try the “Equalise speeds” button to give all particles the same speed, then watch the histogram evolve. The distribution broadens and assumes its characteristic skewed shape within seconds — entropy increases as the system explores phase space.
The equipartition theorem
Each quadratic degree of freedom (e.g., ½mv⊂x;²) contributes
½kT of energy on average. In 2D, each particle has two translational degrees of
freedom, so the mean kinetic energy is kT. This connects microscopic
motion to the macroscopic quantity we call temperature: temperature is average kinetic
energy per degree of freedom, nothing more.
Pressure from momentum transfer
The gas exerts pressure on the walls by particles bouncing off them. Each bounce transfers
momentum 2mv. Summing over all particles hitting a wall per unit time gives
the ideal gas law: PV = NkT. This lab measures “pressure” by
tracking the total momentum transferred to the walls per frame, giving you a real-time
observable that fluctuates around its mean exactly as statistical mechanics predicts.