Home/Laboratories/Entropy Lab
Interactive experiment — complete Chapter 6 · Heat and Thermodynamics

Entropy Lab

Watch two gases mix and never unmix: count the microstates and feel the second law. Open the partition and 200 random-walking particles (100 red, 100 blue) slide irreversibly toward the mixed macrostate while the counter tracks W and S = k ln W — with a clearly-labelled time-reversal demonstration showing why “never” is statistics, not law.

Learn the physics first

The second law can be stated several equivalent ways, each forbidding something intuition might allow. Clausius: heat never flows spontaneously from a colder to a hotter body — you can move it uphill, but only by paying work. Kelvin–Planck: no cyclic device converts heat entirely into work. Both are symptoms of one deeper statement: for the universe as a whole, ΔS ≥ 0, with equality only for perfectly reversible processes.

Entropy change is defined through a reversible path as ΔS = Qrev/T, in joules per kelvin. Melt 0.1 kg of ice at 273 K: the reversible heat input is Q = mLf = 0.1 × 3.34 × 10⁵ = 33,400 J, delivered at a constant 273 K, so ΔS = 33,400/273 = 122 J/K — the melting is everyday-irreversible, but because the heat is exchanged at one fixed temperature the reversible formula applies exactly.

Boltzmann’s bridge, carved on his gravestone, is S = k ln W: the entropy of a macrostate is the Boltzmann constant times the natural logarithm of W, the number of microscopic arrangements that realise it. This lab counts W for its 200-particle lattice gas live. The separated start has relatively few arrangements; the mixed state has astronomically more — roughly 10⁸⁰ times as many here — so a random walk finds the mixed macrostate and essentially never stumbles back. The time-reversal demonstration proves the point honestly: every individual microscopic step is perfectly reversible, and by deliberately replaying them backward you can unmix the gases — but only by steering. Nobody steers nature; that asymmetry, not any force, is time’s arrow.

Entropy change (reversible path)ΔS = Qrev/T  (J/K)
Melting at constant TΔS = m Lf / T
Boltzmann’s relationS = k ln W,   k = 1.381 × 10⁻²³ J/K
Second lawΔSuniverse ≥ 0  (= 0 only for reversible processes)

Model assumptions. A lattice gas: at most one particle per cell, one attempted random move per particle per round, no forces between particles — a statistical model of mixing, not a molecular dynamics simulation. W is counted combinatorially for the current macrostate (arrangements of each species over the cells of both chambers); the “reverse time” button replays recorded history and is a demonstration, not a simulation of any natural process.

Experiment

—

Reversible-step calculator

ΔS = Qrev/T
ΔS for your Q at your T
—
ΔS to melt your ice at 273 K
—

Q and T are set on the sliders at the right; the melt row uses Lf = 3.34 × 10⁵ J/kg. Freeze the same ice and you get the same magnitude with a minus sign — the surroundings must gain at least that much for the universe to come out even.

Controls

Run starts the random walk (open the partition first, or the walls just hold). Reverse time replays the recorded walk backward — watch W and S unwind — and is clearly labelled because it is a demonstration of microscopic reversibility, not something a gas ever does on its own.

Microstate counter

S = k ln W, live
Red on the left
—
Blue on the left
—
Microstates W
—
Entropy S = k ln W
—
ΔS since the start
—
Odds of the start state
—
Rounds walked
—

Calculator sliders

for the ΔS panel

Try this. Open the partition, press Run, and let the gases mix for half a minute — watch W grow and the odds of the start state collapse past 1-in-10⁸⁰. Now press Reverse time: the walk retraces itself, S slides back down, and the gases unmix — because you steered every step. Then reverse it again partway, resume forward time, and try to catch nature unmixing on her own. The unmix counter will stay at zero for the lifetime of the universe.

Understand

Predict before you melt

Melting 0.1 kg of ice at 273 K (Lf = 3.34 × 10⁵ J/kg) changes the ice’s entropy by ΔS = mLf/T. Predict the value, then check.

J/K

Experiment completion

Mix the gases, read the microstate counter, run the time-reversal demonstration both ways, and melt some ice with the calculator — then pass the quiz.

Where to go next