QiLing Tools

🎲Entropy & Microstates - S = k ln Ω, Einstein Solids, Boltzmann Distribution

Entropy is not a vague word for disorder: it is something you can count. S = k ln Ω, where Ω is the number of microstates that look the same from the outside. This tool counts them for you with five hands-on models: coins, two Einstein solids trading energy quanta, a gas expanding into vacuum, particles spread over energy levels at a given temperature, and Maxwell's demon, who supposedly beats the second law. Everything runs in your browser.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use Entropy & microstates

  1. 1On the Coins tab, set the number of coins N, start from all heads and press Play to watch the fraction of heads drift to one half and the fluctuations shrink as N grows
  2. 2On the Einstein solids tab, choose the oscillator counts and total quanta, put all the energy in A, and play the random exchange to see heat flow from hot to cold and settle at the most probable split
  3. 3On the Free expansion tab, remove the partition and compare ΔS = Nk ln 2 with the 2⁻ᴺ chance of every molecule returning
  4. 4On the Boltzmann distribution tab, pick a level scheme and drag the temperature to read the partition function, mean energy, entropy and heat-capacity curve
  5. 5On the Maxwell's demon tab, switch the door mode, watch a temperature difference appear, and read how Landauer's principle rescues the second law

FAQ

What exactly is Ω in S = k ln Ω?
Ω is the number of microstates consistent with a macroscopic description such as “50 of 100 coins are heads” or “solid A holds 60 quanta”. The macrostate only cares about totals, while a microstate specifies every coin or oscillator. 100 coins have 2¹⁰⁰ microstates; C(100,50) ≈ 1.01×10²⁹ of them have 50 heads, but only one is all heads. Boltzmann's constant k = 1.380649×10⁻²³ J/K converts the count into thermodynamic units; most of the tool shows ln Ω directly in reduced units with k = 1.
Why does entropy always increase if the laws of motion are reversible?
Each molecule's motion is indeed reversible. The second law is not a ban written into the dynamics, it is a statement about counting. A system wanders randomly among microstates, and the macrostates that look uniform contain overwhelmingly more of them, so that is almost always where you find it. With N = 10 on the Coins tab you will see big swings and occasionally even all heads again; with N = 1000 the fraction of heads stays pinned near 50%. Real gases have N ~ 10²³, and the chance of returning to a low-entropy state is too small to see in the lifetime of the universe.
How are temperature and entropy related?
In statistical mechanics temperature is defined by 1/T = ∂S/∂U: the more entropy rises when you add a bit of energy, the colder the system. When two solids touch, energy flows from the one with the smaller slope ∂S/∂U (hotter) to the one with the larger slope (colder), because that raises the total entropy. When the slopes match, the temperatures are equal, Ω_A·Ω_B is at its maximum, and the solids are in thermal equilibrium. The entropy chart on the Einstein solids tab shows exactly this.
What is the Schottky anomaly?
A system with just two levels a gap ε apart sits almost entirely in the ground state when cold, so adding heat barely excites anything and the heat capacity is near zero. When hot, the two levels are nearly equally filled, so more heat can hardly raise the energy and the heat capacity drops to zero again. In between there is a peak at kT ≈ 0.417ε with a height of about 0.439k. It is measured in the low-temperature heat capacity of paramagnetic salts and nuclear spins, and it is quite unlike a harmonic oscillator, whose heat capacity tends to k when hot.
Why can't Maxwell's demon break the second law?
To open or close the door the demon has to measure each molecule's speed and remember it. Szilard showed that one bit of information can buy at most kT ln 2 of work. Landauer and Bennett then showed that the measurement itself can be free, but the demon's memory is finite and must keep being erased, and erasing one bit releases at least kT ln 2 of heat. Count the demon and its memory together and total entropy does not go down. At room temperature that cost is about 2.87×10⁻²¹ J, still far below what today's chips spend per bit operation.

Features

  • Two-state system: exact Ω(n), macrostate probability histogram, Ehrenfest coin-flip animation and 1/√N fluctuations
  • Two Einstein solids: Ω_A·Ω_B table, entropy curves, temperatures from 1/T = ∂S/∂U and the direction of heat flow
  • Free-expansion animation with left/right counts over time, ideal-gas ΔS and coarse-grained entropy side by side
  • Boltzmann distribution for two-level, three-level, degenerate, harmonic-oscillator and rigid-rotor systems, with the Schottky peak
  • Maxwell's demon animation that sorts molecules by speed and tracks both chamber temperatures, plus Szilard and Landauer notes
  • Works on phones and touch screens; large N uses a Stirling series for ln N!, so nothing overflows