Previous | Next --- Slide 27 of 49
Back to Lecture Thumbnails
Arthas007

incompressible = divergence = 0?

Arthas007

vorticity sounds like curl

keenan

@Arthas007 Yes, incompressible means divergence free. Vorticity is indeed the curl of the fluid velocity.

There is an important theorem, the Helmholtz decomposition theorem, which says that (for a simply-connected domain) any vector field $X$ can be decomposed into the gradient of a scalar function $u$, and the curl of a vector potential $Y$, i.e.,

$$X = \nabla u + \nabla \times Y.$$

A common technique in fluid simulation is to take some given velocity field, and turn it into an incompressible velocity field by projecting it onto the nearest field satisfying the curl-free condition. I.e., we want

$$ 0 = \nabla \cdot X = \nabla \cdot \nabla u + \nabla \cdot \nabla \times Y.$$

Since the divergence of curl is always zero, we discover that the scalar potential $u$ can be recovered by solving a Poisson equation

$$ \Delta u = \nabla \cdot X$$,

where $\Delta = \nabla \cdot \nabla$ is the Laplace operator. After solving this PDE for $u$ (which you can essentially do using the techniques from this lecture!), you can recover the closest divergence-free field $X^\prime$ by evaluating

$$ X^\prime \gets X - \nabla u.$$

An alternative is to work directly with the curl of the field, $Z := \nabla \times X$. (And if you ever need to recover the velocity, e.g., for visualization, you can solve a similar equation to recover $X$ from $Z$.)

Here's a thesis summarizing some of the advantages of vorticity-based methods for computer graphics.