Diffusion equation (source code)

= Diffusion equation
{title2=$u_t=\nabla\cdot(D\nabla u)$}
{wiki}

A diffusion equation models the redistribution of a density by transport down its spatial <gradient>. If $u$ is a <concentration>, local <conservation of mass> and a <diffusive flux> $J$ give $u_t+\nabla\cdot J=0$. Combining this with <Fick's first law>, $J=-D\nabla u$, gives
$$
u_t=\nabla\cdot(D\nabla u).
$$
A constant scalar <diffusion coefficient> $D>0$ reduces this to the <heat equation> $u_t=D\Delta u$. A variable <diffusion coefficient> must remain inside the <divergence>; a density-dependent coefficient leads to a <nonlinear diffusion equation>.

For a <Fourier mode> $u(x,t)=a(t)\cos(kx)$, the constant-coefficient equation gives $a(t)=a(0)e^{-Dk^2t}$. Fine spatial oscillations decay faster than broad ones, explaining the smoothing action. Spreading across a length $L$ takes a <diffusive time scale> of order $L^2/D$. In a closed system with zero boundary <diffusive flux>, the spatial <integral> of $u$ is conserved even while its profile changes.

The <heat kernel> describes the spreading of an initially concentrated source. It is positive at every distance for every positive time, giving <infinite propagation speed> in this continuum model. The <porous medium equation> changes that behavior because its effective <diffusivity> vanishes at zero density, allowing finite moving fronts. Initial and <boundary conditions> select the particular solution of either equation.