Chemistry · Simulator 024
Two kinds of particles start on opposite sides of a box. Lift the barrier and watch them mix through random collisions. Change the temperature, particle count and mass, and track how far particles wander: the mean squared displacement grows in proportion to time.
No particle is “trying” to mix. Each one moves in a straight line until it collides, then heads off in a new direction. The resulting random walk spreads particles out because there are vastly more mixed arrangements than separated ones.
For a random walk in two dimensions, the mean squared displacement grows linearly with time:
⟨r²⟩ = 4 D t
where D is the diffusion coefficient. Faster particles diffuse quicker: in this model the typical speed is v ∝ √(T/m), so heavier or colder particles spread more slowly (Graham's law).
The simulator moves particles with hard-disc collisions between them and elastic wall bounces. It measures ⟨r²⟩ directly from the particles' unwrapped displacements and fits D from the slope. A fixed seed makes each run reproducible.
2-D hard-disc model in arbitrary units; speeds are scaled for viewing. Real gas diffusion coefficients depend on pressure and molecular size as well.
If a particle's mean squared displacement is 1 cm² after 10 s, how long until it reaches 2 cm² and 10 cm²? Why does diffusion feel slow over long distances?
⟨r²⟩ ∝ t, so 2 cm² takes 20 s and 10 cm² takes 100 s. Typical distance grows only as √t: to go 10 times as far takes 100 times as long. That is why perfume spreads across a room mainly by air currents, while diffusion handles the last millimetres.