Skip to content

Physics

Thermodynamics

Heat flow, gases and statistical energy distributions.

Interactive visual
01 · advanced

Boltzmann Energy Distribution

high energy is possible, just exponentially rare

At temperature T a state of energy E is weighted by e^(−E/kT). Metropolis sampling reproduces the distribution with a simple accept/reject rule.

Interactive visual
02 · common

Heat Diffusion

each cell drifts toward the average of its neighbours

Heat flows down temperature gradients at a rate set by the Laplacian. The explicit grid update is four lines of code, and is stable only if αΔt/Δx² ≤ ¼.

Interactive visual
03 · core

Ideal Gas Kinetics

pressure is just particles bouncing off walls

Temperature is average kinetic energy and pressure is momentum delivered to the walls. Bounce point particles in a box and PV = NkT falls out.