Navier-Stokes flow with OpenFoam
Theoretical background
The dynamics of fluids is described by the Navier-Stokes equation. It is based on mass and momentum conservation in a moving fluid.
For simplified incompressible case, these equations take the following form:
Solution strategies - the SIMPLE algorithm
The 3-D Navier-Stokes equation has four unknowns (three velocity components and one pressure) but the standard formulation does not include an explicit “pressure equation”, which complicated solving the system of equations.
Tip
There is a very nice youtube video by FluidDynamics101 (Aidan Winshurst) that explains the SIMPLE algorithm. We are here following his derivation and notation.
There are different solution strategies implemented in OpenFoam. The simplest one is the SIMPLE algorithm for the steady-state form of the incompressible Navier-Stokes equation.
The SIMPLE algorithm solves these equations by deriving a pressure equation by combining the momentum and continuity equations and by formulating a corrector equation to make the velocity field satisfy the continuity equation.
Step 1 is to formulate the momentum balance as general matrix equation:
Next we split the matrix \(M\) into a diagonal part and remaining part.
The nice thing about diagonal matrices is that they are easy to invert.
Step 2 is to solve for \(\vec U\) using an initial guess for the pressure field.
and plug it into the continuity equation:
to get
Equations equation (9) and equation (14) form a set of equations that are solved in sequence.
The actual solution sequence in the SIMPLE algorithm is this. First, we solve the momentum balance using an initial guess for pressure:
The we update pressure by solving the pressure equation equation (14)
Finally, the pressure is used to “correct” the velocity solution, so that it fulfills the continuity equation equation (6).
This is the SIMPLE algorithm for the steady-state incompressible Navier-Stokes equation. Later we will also learn about other algorithms for more general forms of the N-S stokes like the PISO and PIMPLE algorithms.