← Thermal
Statistical Mechanics

Entropy & Diffusion

Two gases start separated. Lift the partition and watch them mix — and entropy climb.
Gas A Gas B The inset plots entropy S over time
Particles
300
Mixing
0%
Entropy S
0.00/ S_max
State
Separated
i About this experiment — click to learn the physics

What you're looking at

A box is split in two by a partition, with gas A on the left and gas B on the right. Each particle zips around and bounces off the walls. While the partition is in place, the two gases stay separate. Lift the partition and they gradually wander across, intermingling until the box is a uniform mixture — and they never sort themselves back out. That one-way behaviour is the second law of thermodynamics in action.

What is entropy?

Entropy S measures the number of microscopic arrangements (microstates) consistent with what we see. Boltzmann's famous relation is:

S = k_B · ln W W = number of microstates

There are vastly more ways for the particles to be spread out and mixed than to be neatly separated on two sides. So as the particles explore at random, they overwhelmingly end up in a mixed state simply because there are so many more of them. Entropy increases not by any force, but by sheer probability.

The arrow of time

Nothing in the particle motion prefers a direction — each collision is reversible. Yet the whole gas mixes and never un-mixes. Watching the S(t) curve in the inset, you'll see entropy rise and then plateau near its maximum, wobbling slightly with fluctuations. A spontaneous un-mixing isn't forbidden, just so staggeringly unlikely that we never see it. This statistical one-way street is what gives time its direction.

How the meters work

  • Mixing divides the box into a grid and, for each cell, measures how evenly the two gases share it. 0% means every cell is pure A or pure B (fully separated); 100% means every cell is an even blend (fully mixed).
  • Entropy S is that same information, expressed as S = −k_B Σ pᵢ ln pᵢ summed over cells and shown as a fraction of its maximum.

Things to try

Raise the temperature and the gases mix faster (more energetic particles diffuse quicker). Lift the partition, let it mix, then watch the S(t) curve sit near the top and never fall back — the hallmark of irreversibility.