Navier-Stokes – Incompressible Navier-Stokes Pressure Solve in Simulations

fluid dynamicsnavier-stokes;numerical methodsimulations

I am a complete newcomer when it comes to fluid simulations. I'm currently working through some tutorials to understand the idea of of the discretized Navier-Stokes equations for numerical simulations.

My question is related to the pressure solve for incompressible NS.

The first source I found [1] uses: $$ \nabla^2 p = -\nabla \cdot \bf{u}$$

where $p$ is the pressure vector, and $\bf{u}$ is the velocity vector field.

However, when I tried to derive the Poisson pressure equation using notes from [2], I arrived at: $$ \nabla^2 p = -\rho\left( \frac{\partial u}{\partial x} \frac{\partial u}{\partial x} + 2 \frac{\partial u}{\partial y} \frac{\partial v}{\partial x} + \frac{\partial v}{\partial y} \frac{\partial v}{\partial y}\right)$$

where $u,v$ are the components of velocity, and $\rho$ is the (constant) density of the fluid.

Is one of these correct? Or are they both acceptable, since ultimately they will each be approximated?

Sources:

[1] https://github.com/tunabrain/incremental-fluids/blob/master/1-matrixless/Documentation.md

[2] http://lorenabarba.com/blog/cfd-python-12-steps-to-navier-stokes/ Step (xi), "cavity flow".

Best Answer

For an incompressible fluid $\dot\rho=0$. Then the continuity equation implies $$ \nabla\cdot u = 0 . $$ We can now take the divergence of the Navier-Stokes equation and get $$ -\nabla^2 P = \rho\nabla_j(u_i\nabla_i u_j). $$ This means that the pressure is instantaneously determined by the velocity field (the pressure is no longer an independent hydrodynamic variable). The easiest way to solve this constraint is to convert the NS equation into an equation for the vorticity $\omega=\nabla\times u$. This equation is $$ \frac{\partial}{\partial t} {\omega} + u\cdot\nabla {\omega} = \nu {\nabla}^2 {\omega} + \omega\cdot\nabla {u}, $$ where $\nu=\eta/\rho$ is the kinetic (shear) viscosity.

To answer your specific questions: 1) Your first equation is obviously wrong ($\nabla\cdot u=0$ for an incompressible fluid). 2) Your second equation is right (in 2d, it is the same as my second equation). 3) You can't just use an approximate Poisson equation. 4) In practice it is easiest to eliminate the pressure, by working with vorticity.

Related Question