Diffusion#
The diffusion equation is
In astrophysics, this can describe thermal diffusion, where \(\phi\) is temperature, diffusion of photons, where \(\phi\) is the photon energy density, or viscosity, where \(\phi\) is velocity.
Physically, diffusion takes a strongly-peaked concentration of \(\phi\) and spreads it out. And initial discontinuities are quickly smeared out. We can derive this via Fick’s law which says that the diffusive flux is proportion to the gradient of the quantity diffusing:
where the \(-\) sign indicates that diffusion flows from high concentration to low concentration.
Note
More generally, the diffusion coefficient, \(k\), can depend on position (or even \(\phi\)), and we could write the diffusion equation as:
We’ll assume that \(k\) is constant here.
Solving the diffusion equation requires initial conditions and two boundary conditions.
(An) Analytic solution#
Testing a numerical solution of the diffusion equation is easier if we have an analytic solution. A nice property of the diffusion equation is that a Gaussian initial profile diffuses as a wider, lower amplitude Gaussian:
Here, \(t_0\) is a small time. In the limit that \(t_0 \rightarrow 0\), we get a delta-function for the initial condition.
Note
This is a solution of the 1D diffusion equation. For 2 and 3D, the solution is slightly different.
If we look at the evolution of this Gaussian, we see:
This shows the expected behavior—a strongly peaked concentration of \(\phi\) spreads out with time.