From first principles
Recover the diffusion equation by counting random steps
Consider independent particles on a line with sites spaced by \(\ell\). Every time interval \(\tau\), each particle takes one step left or right with equal probability. With no creation, loss or imposed drift, the expected concentration \(c\) at a site after a step equals the average of the earlier concentrations at its two neighbours,
For a concentration changing slowly over one site and one step, expand both sides in Taylor series. The zeroth-order terms cancel and the two first spatial derivatives have opposite signs. The leading surviving change gives
The resulting diffusion equation is
Its coefficient has units of length squared per time. A constant concentration has zero curvature, so the mean concentration stays fixed even while individual particles keep moving. Unequal step probabilities would leave a first-derivative drift term; the model assumes the microscopic motion has no preferred direction.
Derivation and applications
Derive a penetration depth for periodically driven diffusion
A periodically varying concentration at a surface penetrates a diffusive medium with a measurable delay and amplitude loss. Treat the medium as a uniform half-space \(x>0\) with constant diffusivity \(D\), no advection and no reaction. At \(x=0\) impose \(c=c_0+C\cos(\omega t)\) with \(C<c_0\). Far inside the sample the perturbation vanishes. Wait until the start-up transient has decayed at the observation positions. The diffusion equation is linear, so one can look for the real part of a single complex harmonic with a spatial attenuation factor,
There are two complex square roots. The condition at large \(x\) selects the root with positive real part. Its real and imaginary parts have the same magnitude,
Taking the real part gives the decaying oscillation and directly connects two independent measurements to the same transport coefficient,
Here \(\Delta t\) is the delay of the corresponding peak, with the phase unwrapped across depth. Diffusion causes strong attenuation over a full phase cycle, so the apparent travel of a peak does not imply rigid translation of a material parcel. A reflecting far boundary would change this result once the sample thickness becomes comparable to \(\delta\).
Worked example
Determine diffusivity from an amplitude measurement
Change the inputs and investigate this derivation.
A surface concentration oscillates with period \(100\,\mathrm s\). At \(200\,\mathrm{\mu m}\) depth its amplitude is \(0.368\) times the boundary amplitude. This gives \(\delta\simeq200\,\mathrm{\mu m}\), hence
The model also predicts a lag of one radian, corresponding to \(100/(2\pi)=15.9\,\mathrm s\).
Second application
Check a transport coefficient with a phase measurement
Change the inputs and investigate this derivation.
For a second tracer the forcing period is \(80.0\,\mathrm s\). A peak at \(150\,\mathrm{\mu m}\) depth occurs \(10.0\,\mathrm s\) after the corresponding surface maximum. Its phase lag is \(\pi/4\), giving \(\delta=191\,\mathrm{\mu m}\) and \(D=1.43\times10^{-9}\,\mathrm{m^2/s}\). The independent amplitude prediction is \(e^{-\pi/4}=0.456\) of the surface signal. A calibrated amplitude far from this fraction would challenge the assumed diffusion-only dynamics.
Try it · Diffusion skin
Vary the physical parameters in the derived relation. Use the units and assumptions in the readout to connect the curves to the two worked examples. A parameter study can test the forward prediction; the same relation can then be inverted to infer a parameter from a measurement.
A spreading cloud without a mean velocity
Release a narrow band of neutral tracer particles into a stationary uniform medium. Repeated collisions erase velocity memory. At times long compared with the collision time, labelled particles can spread while the mean tracer velocity remains zero. Start with an ideal symmetric random walk on a line. During a time step \(\tau\) every particle moves a distance \(\ell\) left or right with equal probabilities, independently of previous steps.
The concentration in cell \(x\) after a step is the mean of the two neighbouring concentrations before that step. Expanding the left side in \(\tau\) and the right side in \(\ell\) cancels all odd spatial derivatives, leaving
After \(N=t/\tau\) independent steps the variance is \(N\ell^2=2Dt\), confirming the same coefficient without a continuum expansion. The exact prefactor depends on which microscopic step model is used. In an isotropic gas the directional velocity correlations and distribution of free-flight lengths matter; an order-of-magnitude estimate is \(D\sim\overline v\ell_{\rm mfp}/3\). Substituting a fixed one-dimensional step length into this three-dimensional estimate would mix incompatible models.
Why a gradient drives current
Consider the cell boundary between \(x\) and \(x+\ell\). The two crossing populations are proportional to the concentrations on their respective sides. Outgoing minus incoming probability current is therefore proportional to \(c(x)-c(x+\ell)\). Taylor expansion gives Fick's law \(j=-D\partial_xc\). Local conservation \(\partial_tc=-\partial_xj\) recovers diffusion for constant \(D\) and remains useful when the transport coefficient varies in space. The continuum model assumes concentration changes little over one microscopic step.
In an unbounded domain the response to a narrow initial band is Gaussian at late times with variance increasing by \(2Dt\). In a finite closed channel the final concentration is instead uniform. Reflecting ends impose zero gradient, so a prepared concentration modulation \(c(x,0)=c_0+a\cos(\pi x/L)\) relaxes through a single amplitude \(a(t)\). Substitution into diffusion gives
Spatial wavelength matters quadratically because a broad concentration feature supplies only a weak gradient for the mass that must move.
Measure a coefficient two ways
Suppose a dyed band in water broadens from variance \(0.250\) mm² to \(0.610\) mm² in 300 s, with negligible flow. Taking the difference removes the initial width and gives \(D=0.360/(600)=0.000600\) mm²/s, or \(6.00\times10^{-10}\) m²/s. In a 2.00 mm sealed channel, the longest nonuniform cosine mode then decays by \(1/e\) in \(L^2/(\pi^2D)=675\) s. The prediction connects an open-domain variance measurement to a finite-domain contrast decay.
Bulk drift shifts the measured band centroid and can be removed by centring each profile. Shear, by contrast, can spread the band even after centring. Independent checks of the variance law and of the finite-channel decay help distinguish molecular diffusion from unresolved fluid motion.
Over times short compared with a collision time, individual tracer trajectories are approximately straight and the displacement variance initially grows as the square of time. A fit to a diffusion coefficient should exclude this ballistic region. At long times finite walls can likewise limit the spread.
Add a weak force and recover the Einstein relation
A tracer concentration in a fluid can relax even when an external force produces a steady drift. Consider noninteracting overdamped particles at uniform temperature in one dimension. Define mobility \(b\) by the drift speed \(v_d=bF\) under a constant, sufficiently weak mechanical force \(F\). If concentration changes gently in space, the particle current combines a systematic drift and Fick transport:
The two contributions can cancel at equilibrium even though individual particles remain in motion.
For a conservative force \(F=-\partial_xU\), equilibrium concentration must have the Boltzmann form \(c_{\rm eq}\propto e^{-U/(k_BT)}\). Differentiating it gives
Requiring zero current for this equilibrium distribution for arbitrary weak potentials gives
This is the Einstein relation for a dilute thermal tracer. A fluctuation quantity measured without an imposed force, its diffusion coefficient, determines a response quantity measured by applying a force. It presumes local thermal equilibrium, linear mobility and the same degrees of freedom in both measurements. Self-propelled particles, crowded media or substantial hydrodynamic coupling may invalidate this simple one-particle relation.
Use a sedimentation profile to weigh a colloid
Set the upward coordinate to \(z\) and let \(m_b\) be the buoyant particle mass after subtracting displaced liquid mass. Its downward force is \(-m_bg\). Equilibrium then predicts \(c(z)=c(0)e^{-z/\ell_g}\) with gravitational length \(\ell_g=k_BT/(m_bg)\). Suppose an optical count at 298 K falls by a factor of four over 30.0 μm. The measured length is \(\ell_g=30.0/\ln4=21.6\) μm. Thus
This is a mass contrast with the solvent, so an independently known density difference is needed to infer particle volume.
An independent tracking experiment gives \(D=0.400\) μm²/s. The mobility is \(D/(k_BT)=9.72\times10^7\) m/(N s). The downward drift speed is \(b m_bg=D/\ell_g=0.0185\) μm/s. Without boundaries, a mean drift of one gravitational length would therefore take about 1170 s, while random displacement over that interval remains substantial for an individual particle. A large ensemble is needed to resolve the mean against diffusion. In the density-matched limit \(m_b\to0\), the sedimentation length diverges and the vertical profile becomes uniform even though measurements of diffusion and of mobility under a different externally applied force still yield finite values.
The mean-square displacement used in mobility inference should be computed after any steady drift has been removed. Over an interval \(\Delta t\), a downward drift gives mean displacement \(-v_d\Delta t\), while one-dimensional thermal variance is \(2D\Delta t\). The raw mean-square displacement about zero contains the extra term \(v_d^2\Delta t^2\). Fitting that quantity to a linear relation at long times can overestimate diffusion and consequently distort the mobility comparison. Independent sedimentation and tracking measurements become especially valuable when the drift is too small to resolve in a single trajectory but emerges reliably in an ensemble average.
The statistical precision of the variance estimate also depends on the number of independent trajectories.
Study the full derivation
Transport coefficients from equilibrium fluctuations · Statistical mechanics from microscopic counting to material response
How can a fluid in equilibrium reveal the diffusion constant that would govern a spreading drop, or the viscosity that would resist an applied shear? Derive an exact connection between displacements and velocity correlations, generalise it to stress and heat currents and test how a finite record can bias each number. The assumptions behind convergence matter as much as the prefactor.