Physics

Ideal Gas

A few hundred molecules bouncing in a box, and nothing else. Pressure is the drumming of their impacts, temperature is how fast they are, and PV = NkT is not a law you have to be told, it is what the counting adds up to.

coldhot
squeezedroomy
Pressure, measured
Pressure, from NkT/V
Temperature
Volume
Root mean square speed
PV / NkT
Wall hits

A flat gas in a slab 10 nm thick, so every molecule has two directions to move in rather than three. Everything else is exactly the real thing.

What to observe

  1. Watch a single wall. Each flash is one molecule turning round, and each one delivers a tiny kick. Pressure is nothing but those kicks added up, and the measured number next to the box is literally the running total of momentum delivered, divided by the area and the time.
  2. The measured pressure and NkT/V agree to a few percent, and they were never made to. One is counted from impacts, the other is the gas law. Add molecules and both climb together, because twice as many molecules means twice as many kicks per second. The few percent left over has a name, and it is the next thing to look at.
  3. Push the piston in with the walls held at a temperature. The molecules keep the same speeds but hit a smaller box more often, so the pressure rises as 1/V. Boyle's law is a bookkeeping statement about how often something bounces.
  4. Now set the walls to Insulated and push the piston in quickly. The gasheats up with nothing heating it. Look closely at the moving wall: a molecule bouncing off an advancing piston comes back faster, exactly like a ball off a swung bat. That is all adiabatic heating has ever been.
  5. Pull the piston back out while insulated and the gas cools, for the mirror reason. On the P-V plot the path is steeper than the isotherm through the same point, which is the whole content of PVγ = constant.
  6. Start every molecule at the same speed with Reset, then watch the speed histogram. Collisions alone, with no rule about distributions anywhere in the code, smear it into the Maxwell-Boltzmann curve drawn over it, and it stays there. Equilibrium is not imposed, it is what shuffling does.
  7. Raise the wall temperature and watch the histogram slide right and flatten. There is no such thing as the speed of a molecule at 500 K, only a spread, and the tail of that spread is what boils, evaporates and reacts.
  8. Crowd the box: raise N and squeeze the piston at the same time. PV/NkT creeps above one and keeps climbing. Nothing broke, the law did: a real molecule takes up room, so the space left for the others is less than the volume you measured. That correction is the b in van der Waals, and it is the first thing that stops a gas from being ideal.
  9. Turn on the trace and follow one molecule for a while. It goes nowhere in particular, at hundreds of metres per second, changing direction constantly. The gas is calm because a few hundred of these average out, not because anything in it is calm.

Shortcuts: space run/pause · s step · r reset · f fullscreen