aidoesscience
aidoesscience › Maxwell gas
Validating · validations

Maxwell–Boltzmann gas · the 2nd law simulation

Why does a gas of structureless colliding balls always arrange its speeds into the same fixed shape — and why never the reverse?

▶ Run the simulationSee the measured result

Measured by the lab
0.88707
Known value
0.88622693
Relative error
9.50e-4

Units: dimensionless (⟨v⟩/v_rms = √π/2 for the 2-D Maxwell–Boltzmann speed law; 3-D gives √(8/3π) = 0.9213 — the ratio counts dimensions)

How the lab tests it

Start N equal-mass hard disks all at the SAME speed v₀ (random directions — a delta spike, the lowest-entropy speed distribution at this energy) and let them collide elastically in a box (energy conserved to machine precision). Watch the speed histogram against the parameter-free 2-D Maxwell–Boltzmann curve f(v)=(v/s²)e^(−v²/2s²) (s² = ½⟨v²⟩, fixed by the energy), and track Boltzmann's H(t)=∫ f ln f d²v over time.

What it checks

the speed distribution relaxing onto Maxwell–Boltzmann (total-variation distance → 0, ⟨v⟩ → s√(π/2)) with no fitted parameter; and the H-theorem — H falling monotonically to a floor and only fluctuating after (entropy's arrow), while total kinetic energy stays flat

This simulation has a catalogued, oracle-checked result: Maxwell's 1860 speed law manufactured from collisions alone.