Fluids via the vorticity equation

We consider a 2D form of the vorticity equation of fluid dynamics given by

\[\begin{aligned} \begin{aligned} \pd{\omega}{t} &= \nu \nabla^2 \omega - \pd{\psi}{y} \pd{\omega}{x} + \pd{\psi}{x} \pd{\omega}{y},\\ 0 &= \nabla^2 \psi + \omega,\\ \pd{S}{t} &= D \nabla^2 S -\left( \pd{\psi}{y} \pd{S}{x} - \pd{\psi}{x} \pd{S}{y}\right). \end{aligned} \end{aligned}\]

Here, $\nu$ is a viscosity parameter, $\omega$ is the magnitude of the vorticity (pointing out of the screen when positive), and $\psi$ is a stream function. We also include a passive scalar field, $S$, which diffuses at a rate $D$ and is advected by the fluid flow (i.e. this is exactly a convection-diffusion equation but now for a flow that we are solving for).

Numerical Details

The Poisson equation for $\psi$ is elliptic and VisualPDE cannot directly solve such equations (as they are in some sense non-local). Instead, we solve the parabolic relaxation of this equation given by

\[\begin{aligned} \begin{aligned} \epsilon \pd{\psi}{t} = \nabla^2 \psi + \omega, \end{aligned} \end{aligned}\]

where $\epsilon$ is a small parameter.

  1. Unfortunately, this is not currently supported on touch devices.