The same hard discs that relax to the Maxwell–Boltzmann bell next door also drum on the walls. Each bounce flips one velocity component and hands the wall a kick of 2m|v⊥| — nothing more. Add up those kicks per unit wall, per unit time, and out falls a pressure. This bench measures that drumbeat live and shows it settling onto P·A = N·kT — the exact law the Carnot engine one wing over simply assumes. No law is plugged in; it is counted off the walls. Squeeze the box and watch the pressure climb to hold the line.
The walls flash on each hit, brighter for a harder kick (∝ 2|v⊥|). Colour is speed — slow to fast. Drag the right wall to squeeze the box into a rectangle.
The amber line is N·kT/A — the ideal-gas law for the temperature the gas
reads on itself. The teal trace is the running average of the wall drumbeat,
P = Σ 2|v⊥| / (perimeter · time),
scrolling and settling onto the line. Nothing is fitted: P is counted off the walls.
Try “½-count the kick”: a wall reflection flips the velocity and delivers 2m|v⊥|, not m|v⊥|. Count only one mirror and P falls to exactly half — the trace drops far below the amber line and the head-to-head flips red. That factor of two is the physics.
A disc hits a wall and bounces: its perpendicular velocity flips sign, v⊥ → −v⊥.
The wall absorbs the change in momentum, Δp = |(−v⊥) − v⊥| = 2|v⊥| (with mass
m=1). That is the whole atom of pressure — exact, no statistics. Sum these kicks
over every wall hit, divide by the perimeter you spread them over and the time you waited, and
you have a force per unit length: a 2-D pressure, P = Σ2|v⊥| / (perimeter·t).
The virial makes it exact in the idealization. Average the wall flux over a thermal
gas and the bookkeeping collapses to P·A = N·kT — the same ⟨½v²⟩=kT
equipartition the M–B bell next door is fitted to. The self-test proves it with zero sim
noise: on a synthetic thermal velocity set the virial identity P·A/N = kT
holds to machine precision. The live run then has only finite-time scatter to shed — which it
does, the residual shrinking toward ~1%.
The discs render as fine dust on purpose. The law P·A=N·kT is exact only in the
point limit; fatter discs would show the van der Waals excess — the wall is
shoved a little harder when discs take up room (excluded area). At the M–B page's 6% packing
the residual is a large, time-stable +15%; here at ~0.2% packing it falls to ≲1%,
genuinely dominated by finite-time scatter. The residual is biased slightly positive and never
hits zero — it is convergent, never perfect.
It is one law under one dictionary — particle count N ↔ moles n,
Boltzmann k_B ↔ gas constant R, with N·k_B = n·R
(R = N_A·k_B). Carnot ships a 3-D gas with the real
R = 8.314 baked into its pressure(n,T,V); this bench is the 2-D
ideal law with k_B ≡ 1 (so kT carries energy and A is an
area). A literal pressure(N,kT,A) would read off by exactly that factor of
R — so the cross is not a lucky meeting of two formulas. It is the single
dimensionless law PV/(NkT) = 1, asserted once on each side of the dictionary:
Z_carnot = 1 exactly (it is nRT/V over nRT/V), and
Z_sim → 1 off the wall count. Same law, twice.