HomeThermodynamicsBoltzmann's H-Theorem 2D: A Toy Universe's Arrow of Time

Boltzmann's H-Theorem 2D: A Toy Universe's Arrow of Time

A closed 2D box of colliding disks conserves total energy exactly while its Boltzmann entropy climbs from an ordered start toward equilibrium — watch the live speed histogram converge on the theoretical 2D (Rayleigh) equilibrium curve, with an optional self-gravity mode showing emergent clustering. Drag to pan, scroll to zoom the box.

Thermodynamics2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-universal-life ↗ Open standalone

A sealed 2D box of colliding disks is the smallest possible "universe" that still obeys real statistical mechanics: total energy is exactly conserved by every elastic collision, yet the Boltzmann entropy of the speed distribution climbs from an ordered starting condition toward its equilibrium maximum and stays there. This simulation runs that system for real — real 2D elastic scattering between equal masses, a live Gibbs/Boltzmann entropy computed from the actual speed histogram every frame, and a theoretical Rayleigh equilibrium curve (the correct 2D analogue of the Maxwell–Boltzmann distribution) drawn alongside it so you can watch the gas converge. An optional self-gravity mode adds a softened pairwise attraction so you can also see how local structure (clusters) can emerge from chaotic motion without breaking the second law, since it is the entropy of the whole system, not any one region, that must never decrease. Drag to pan and scroll to zoom the box view; every slider changes the physics live.

⚙ Under the hood

A closed 2D box of colliding disks conserves total energy exactly while its Boltzmann entropy climbs from an ordered start toward equilibrium — watch the live speed histogram converge on the theoretical 2D (Rayleigh) equilibrium curve, with an optional self-gravity mode showing emergent clustering. Drag to pan, scroll to zoom the box.

thermodynamicsentropystatistical-mechanicssecond-lawn-body2D

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)