The Gas Box
A gas is a crowd in motion, and this box lets you count what the crowd does. Inside are argon atoms at a temperature you set, flying in straight lines, bouncing off the walls and off each other. Nothing in the box knows about pressure. The pressure gauge at the top of the stage is not told the temperature: it counts. Every time an atom strikes a wall, the wall takes a small push, and the gauge adds the pushes up. Watch the counted pressure settle onto the value the ideal gas law predicts, P = NkT/V, a law the atoms were never given.
The one-speed start. Every reset deals every atom the same speed, the root-mean-square speed for the temperature, in a random direction. The speed histogram under the box opens as a single spike. Then the collisions go to work. Atoms trade speed in every meeting, fast ones slow and slow ones hurry, and within seconds the spike melts into the smooth bell of the Maxwell-Boltzmann distribution, drawn as the gold curve for comparison. The curve is not fitted to the bars. It is the theory, plotted from the temperature alone, and the bars climb onto it on their own.
What the sliders do. Temperature rescales every speed so the average kinetic energy per atom matches kT, with k the Boltzmann constant and the atom given the true mass of argon, 6.63×10-26 kg. Particle count rebuilds the box with more or fewer atoms. Box size changes the width and height of the box together: squeeze the box and the same crowd strikes the walls more often, and the counted pressure climbs, exactly as NkT/V says it must. Time is a plain speed control for the watching.
The honest edges. The box is drawn flat, as a slice. The pressure treats the slice as a box whose depth equals its height, so the volume is width times height times height, and the figures under the stage state the width in nanometres. Speeds are true argon speeds: at 300 K the root-mean-square speed is about 353 metres per second, and the box is crossed in a fraction of a nanosecond, which is why the sim clock reads in nanoseconds. Collisions between atoms are perfectly elastic, wall hits are perfectly elastic, and there is no gravity in the box. Real argon at these densities would forgive every one of those choices.