Convection–diffusion

We now look at the advection equation with diffusion (also known as the convection–diffusion equation, or sometimes the damped one-way wave equation). This takes the form

\[\pd{u}{t}=D \nabla^2 u-\v{v}\cdot \vnabla u,\]

where we consider two forms of the advection/drift velocity $\v{v}$:

\[\begin{align} \v{v} &= V(y,-x),\\ \text{or} \quad \v{v} &= V(\cos(\theta),\sin(\theta)), \end{align}\]

where $\theta$ is a parameter

The first of these expressions is a rotational velocity field about the centre of the domain, whereas the second is linear (unidirectional) advection in the direction $\theta$.

Numerical notes

First-order derivatives are in general harder to deal with numerically for a variety of reasons, and in particular models involving them can depend more subtly on details such as smoothness of initial conditions. In this example, we are using a different form of the brush, which can be found under → Brush This adds some smoothing to the boundaries of the bump each time the screen is clicked. This is important to reduce spurious oscillations due to the first derivative terms.