Helmholtz-Hodge Decomposition

Helmholtz-Hodge Decomposition Theorem

Generally, this theorem tells us that it is possible to split any arbitrary vector field into two component vector fields, such that one component is divergence free and the other component is curl free:

u=v+w{where  v=0where  ×w=0\vec{u} = \vec{v} + \vec{w} \begin{cases} \text{where} \; \nabla \cdot \vec{v} = 0 \\ \text{where} \; \nabla \times \vec{w} = 0 \end{cases}

There is one additional detail from vector calculus that is useful to know here, which is that the curl-free component of the decomposition $\vec{w}$ can also be expressed as the gradient of some scalar function. The curl of some scalar gradient always equals zero.

But… what does that actually mean? It’s saying that if the curl of some arbitrary vector field (let’s call that vector field $\vec{w}$) is zero, then there must exist some scalar function (let’s call that scalar function $\phi$) such that the vector field equals $\nabla \phi$ (i.e. $\vec{w} = \nabla \phi$).

Let’s look at an example so that this makes more sense:

Take for example the following vector field:

w(x,y)=(2x,2y)\vec{w}(x,y) = (2x,2y)

Let us check that this vector field is curl-free:

×w=wyxwxy=(2y)x(2x)y=00=0\nabla \times \vec{w} = \frac{\partial w_y}{\partial x} - \frac{\partial w_x}{\partial y} = \frac{\partial (2y)}{\partial x} - \frac{\partial (2x)}{\partial y} = 0 - 0 = 0 ×w=0curl-free\therefore \nabla \times \vec{w} = 0 \rightarrow \text{curl-free}

The vector-field $\vec{w}$ is curl-free, which means that there must exist a scalar function $\phi$ such that $\vec{w} = \nabla \phi$.

We can then infer that:

ϕx=2x(1)\tag{1} \frac{\partial \phi}{\partial x} = 2x ϕy=2y(2)\tag{2} \frac{\partial \phi}{\partial y} = 2y

I’m sure everybody reading this is very familiar with solving PDEs

Integrate Equation 1 with respect to $x$:

ϕ(x,y)=x2+f(y)(3)\tag{3} \phi(x,y) = x^2 + f(y)

Differentiate Equation 3 with respect to $y$:

ϕy=y(x2+f(y))=f(y)\frac{\partial \phi}{\partial y} = \frac{\partial}{\partial y} (x^2 + f(y)) = f'(y)

But we already know from Equation 2 that $\frac{\partial \phi}{\partial y} = 2y$, therefore:

f(y)=2y(4)\tag{4} f'(y) = 2y

Integrate Equation 4:

f(y)=f(y)  dy=(2y)  dy=y2(5)\tag{5} f(y) = \int f'(y) \; dy = \int (2y) \; dy = y^2

Substitute Equation 5 into Equation 3:

ϕ(x,y)=x2+y2\phi(x,y) = x^2 + y^2

Indeed there does exist a scalar function $\phi$! We can check that $\nabla \phi = \vec{w}$:

ϕ=[ϕxϕy]=[(x2+y2)x(x2+y2)y]=[2x2y]\nabla \phi = \begin{bmatrix} \Large\frac{\partial \phi}{\partial x} \\[2ex] \Large\frac{\partial \phi}{\partial y} \end{bmatrix} = \begin{bmatrix} \Large\frac{\partial (x^2 + y^2)}{\partial x} \\[2ex] \Large\frac{\partial (x^2 + y^2)}{\partial y} \end{bmatrix} = \begin{bmatrix} 2x \\ 2y \end{bmatrix} ϕ=w\therefore \nabla \phi = \vec{w}

Application to Navier-Stokes

Let’s jump back to our Navier-Stokes equations. How can we use the Helmholtz-Hodge Decomposition to solve for our divergence free velocity field?

Assuming we have already made changes to the velocity field for our next update step, we now need to correct the velocity field to remove any divergence.

Recall our governing equation:

ut=(u)u1ρp+ν2u+F\frac{\partial \vec{u}}{\partial t} = -(\vec{u}\cdot\nabla)\vec{u} - \frac{1}{\rho}\nabla p + \nu \nabla^2 \vec{u} + \vec{F}

You might notice that the pressure component of our equation already contains a gradient of a scalar function $\nabla p$:

ut=(u)u1ρp+ν2u+F\frac{\partial \vec{u}}{\partial t} = -(\vec{u}\cdot\nabla)\vec{u} - \frac{1}{\rho}\fcolorbox{#0A174E}{#F5D042}{$\nabla p$} + \nu \nabla^2 \vec{u} + \vec{F}

Recall earlier that we said “the curl of some scalar gradient always equals zero”. We can use this information to write our Helmholtz-Hodge Decomposition as:

w=uDivergence-Free+pCurl-Free\vec{w} = \underbrace{\vec{u}}_{\text{Divergence-Free}} + \underbrace{\nabla p}_{\text{Curl-Free}}

where:

  • $\vec{w}$ is some non-zero divergence velocity field
  • $\vec{u}$ is a divergence-free velocity field (what we want to find)

Rearranging this to make $\vec{u}$ the subject gives us:

u=wp\vec{u} = \vec{w} - \nabla p

So in order to calculate our velocity field on the next step, we need to:

  1. Calculate some non-zero divergence velocity vector field (this will happen when we apply our advection, diffusion, and external forces steps)
  2. Calculate the pressure scalar field (we will explore how to do this in coming chapters)
  3. Subtract the gradient of the pressure field from the non-zero divergence velocity field

Here is a simplified flowchart overview of these steps:

flowchart LR id1["Calculate $$\vec{w}$$"] id2["Calculate $$p$$"] id3["Calculate $$\nabla p$$"] id4["Set $$\vec{u} = \vec{w} - \nabla p$$"] id1 e1@==> id2 id2 e2@==> id3 id3 e3@==> id4 e1@{ animate: true, animation: fast } e2@{ animate: true, animation: fast } e3@{ animate: true, animation: fast }