Diffusion and osmosis - 2D cross-section

Brownian particles cross a membrane; in osmosis only water can, and the standpipes show the pressure that builds up.

Switch to 3D

Presets

Playback

Mode

Particles

Model checks

The science

Diffusion

Each tracer takes independent random Gaussian steps with variance 2DΔt per axis (Brownian motion, Einstein 1905). In two dimensions the mean squared displacement is ⟨r²⟩ = 4Dt. The diffusion coefficient is proportional to temperature, D = D0 T. For a box of length L with reflecting walls and a tracer cloud released in the left half, the fraction on the left relaxes as p(t) = 1/2 + (2f0−1) Σn odd 4/(n²π²) e−D n²π² t/L² (Fick's second law), which is the dashed curve in the first graph.

Osmosis

Water crosses the semipermeable membrane, solute does not. Water moves towards the side with more solute until the hydrostatic head balances the osmotic push. The 3D lab uses a linear rule, kept here: dΔ/dt = 120 (k Δc − 0.006 Δ) with k = 0.00035 T, so the equilibrium head is Δeq = k Δc / 0.006. Real osmotic pressure follows van 't Hoff, Π = c R T.

Honest simplifications: point particles that do not collide with each other, a 2D slice instead of a 3D tank, an idealised membrane (no pores, no reflection coefficient), levels capped at the standpipe height, water particles are only a visual tracer of the water flow.

What to try
  • Run Diffusion 85/15 and compare the orange curve with the dashed Fick theory.
  • Raise the temperature: only the time scale changes, not the equilibrium.
  • Switch to Osmosis: the water follows the solute and the standpipe on the crowded side rises.
Share on the left against time
Standpipe level or mean square displacement
Particle profile along the tank