At a glance
Share a fixed amount of energy among many atoms by trading it at random, and the energy ends up spread in a definite, reproducible way. This sim lets you watch the sharing happen, then measure the result against the counting argument that predicts it.
What you'll learn
- How to count the arrangements of energy among atoms, and why equal weight on each one is a natural rule.
- How the distribution of energy among atoms follows from that counting.
- How the settled shape depends on the starting arrangement and on the energy per atom.
- How the sharing connects to temperature.
What's on screen
- Atom grid (left): each grey disc is one atom. Orange dots and the ×n label show how many quanta it holds; the steps counter sits at the bottom.
- Histogram (right): bars count how many atoms hold n quanta, with n along the bottom.
- Gold curve, "equilibrium N·P(n)": the counting prediction for the atoms at each n. The inquiry reveals it; Free Exploration shows it always.
- Dashed teal line, "fitted line": a straight-line fit to the bars on the log axis.
- Readouts: Total quanta q, Average energy ⟨n⟩ = q/N, and the Fitted slope.
The controls
Press ⌖ on a row to see where that control sits in the sim.
| Control | What it changes | Range | |
|---|---|---|---|
| Starting arrangement | How the quanta are dealt out before any trading: all on one atom, one each, or scattered at random. Choosing one re-deals the grid. | All on one / Spread evenly / Random opens at All on one | |
| Number of atoms | The grid size N. Total quanta follow from it: q = N × quanta per atom. | 3×3 = 9 to 20×20 = 400 opens at 10×10 = 100 | |
| Quanta per atom | The average energy per atom, ⟨n⟩ = q/N. | 1–6 opens at 1 | |
| Shuffle speed | Trades per second. Below about 60 /s you see each quantum hop; above it the bars update in bulk. It never restarts the run. | 20–100,000 /s opens at 20 /s; 3,000 /s once the inquiry starts the run | |
| Histogram vertical axis | Switches the bar heights between a linear and a log scale. The run is not restarted. | linear / log opens linear | |
| Readouts | Total quanta q, Average energy ⟨n⟩, and the Fitted slope with its prediction. | panel | |
| ▶ Play / ⏸ Pause | Runs or freezes the shuffle. | top bar | |
| Speed | Multiplies the Shuffle speed. | 0.25×–4× opens at 1× | |
| ↻ Reset | Deals the grid again with the current start and sliders, and pauses. | top bar |
Fixed: one trade picks a donor atom, then a different recipient atom, both at random, and moves one quantum if the donor has one. An empty pick still counts as a step. Energy is counted in quanta of size ε.
Why trading does not even things out
A microstate is the full ledger: which atom holds how many quanta. Each trade moves one quantum, and the reverse trade is exactly as likely as the forward one. That symmetry makes every microstate equally likely over a long run. The number of microstates is a count:
- At the defaults, N = 100 and q = 100, there are about 4.5 × 10⁵⁸ microstates, and exactly one has every atom holding one quantum.
- Nothing pulls the energy toward uneven arrangements. They are simply far more numerous than even ones.
- Trading conserves q and N, so the counting is over a fixed total energy (the microcanonical set).
The staircase it settles into
One atom holds n quanta when the other N − 1 atoms share the remaining q − n. Counting those cases gives the settled shape, and the ratio between neighbouring levels:
- The fullest bin is n = 0. At the defaults the levels n = 0, 1, 2, 3 hold about 50, 25, 13 and 6 atoms: each is about 0.50 of the one below.
- A constant factor per level is a straight line on a log axis. Switch the Histogram vertical axis to log to see it.
- The start is forgotten. Every start reaches the same curve; only the time differs. Measured here at N = 100, q = 100: about 1,000 trades from Spread evenly, about 30,000 from All on one.
What sets the slope
For many atoms the exact ratio simplifies to a single number x, and the populations fall as a geometric series:
These are the sim's own Number of atoms and Quanta per atom sliders; moving them re-deals the grid.
- Only ⟨n⟩ = q/N matters. At ⟨n⟩ = 1, growing the grid from 3×3 to 20×20 moves the predicted slope from −0.672 to −0.693. Raising ⟨n⟩ from 1 to 4 moves it to −0.223.
- The Fitted slope is only a snapshot. It is a fit to the bars as they are right now, so it jumps from frame to frame and reads flatter than the prediction: by roughly 10–20% at N = 100 and about 5% at N = 400. The prediction is the reference.
The slope is a temperature
The trading rule contains no energy scale and no temperature. Yet a constant factor per level is the Boltzmann factor. Give one quantum the energy ε:
- kT/ε = −1/slope = 1/ln(1 + 1/⟨n⟩). ⟨n⟩ = 1 gives kT = 1.44 ε, and ⟨n⟩ = 4 gives 4.48 ε. More energy per atom means a higher temperature and a flatter slope.
- ⟨E⟩ = kT only for ⟨n⟩ ≫ 1. The sim has no zero-point ε/2, so ⟨E⟩ falls short of kT by about ε/2. At the slider's maximum, ⟨n⟩ = 6, kT = 6.49 ε and ⟨E⟩ = 6 ε is 7.5% below it.
- One atom follows the Boltzmann law because the other N − 1 act as its reservoir. That reservoir is finite, so P(n) is only approximately geometric and ends at n = q.
Where it matters
- Einstein's 1907 solid. Each atom in a crystal is three harmonic oscillators, each with levels spaced by ε = ħω. One "atom" in the sim stands for one such oscillator.
- Hot crystals. When ⟨n⟩ ≫ 1, each oscillator carries ⟨E⟩ → kT, so a mole holds 3RT and the heat capacity is C = 3R ≈ 24.9 J mol⁻¹ K⁻¹, the Dulong–Petit value.
- Cold crystals. When ⟨n⟩ ≪ 1, nearly every oscillator sits at n = 0 and C falls toward zero. With ε/k ≈ 1300 K for diamond, Einstein's model gives about a quarter of 3R at 300 K.
- Photons. The same law, written as an occupancy, is Planck's: ⟨n⟩ = 1/(eε/kT − 1) for a mode of light in a cavity.
The sim's coldest setting, ⟨n⟩ = 1, is kT = 1.44 ε with C ≈ 0.96 × 3R, already close to classical. The freeze-out needs ⟨n⟩ ≪ 1, below the slider's range.
Go deeper: the same law at three temperatures
- As the temperature rises, the n = 0 level empties and the higher levels fill, but the geometric shape stays.
- C approaches 3R from below: 0.63 × 3R at ⟨n⟩ = 0.1, 0.96 at ⟨n⟩ = 1 and 1.00 at ⟨n⟩ = 4.
Summary
Key points
- There are Ω = C(N + q − 1, q) microstates, all equally likely.
- Populations fall from n = 0 by about q/(q + N) per level, whatever the start.
- That factor depends only on ⟨n⟩ = q/N, and kT = ε/ln(1 + 1/⟨n⟩).
Common mix-ups
- "Random sharing evens the energy out." The even arrangement is one microstate among 4.5 × 10⁵⁸, and uneven ones far outnumber it.
- "The average atom is the typical atom." At ⟨n⟩ = 1 the mean is one quantum, yet the most common value is zero and about half the atoms hold nothing.
- "Once settled, the bars stop moving." They keep fluctuating: at the defaults the n = 0 bar wanders by about ±4 atoms around 49.7. The gold curve is the average, not any one snapshot.
Things to try on your own
- At ⟨n⟩ = 1, run from All on one and from Spread evenly, and note the step count at which the n = 0 bar first reaches about 50.
- At ⟨n⟩ = 3 on the log axis, compare the Fitted slope with its prediction at 5×5 atoms, then at 20×20.
- Read the prediction at ⟨n⟩ = 2 and compute kT/ε = −1/slope. Check it against 1/ln(1.5) ≈ 2.47.