Hopefully upon finishing reading Know Thy Solver- PART I, we have consolidated the logic and motivation behind NSE solver segregated algorithms. Our task now is to present an important cornerstone which serves as a building block for ANSYS Fluent pressure-based algorithms as in most other commercial CFD codes – Projection Methods.

It is important to note that as most CFD today are conducted via commercial codes, the algorithms are constantly updated to achieve certain goals (e.g. robustness), by the same token, even on open source platforms (e.g. OpenFoam) most users use codes (libraries) written by others, therefore In what follows I shall provide a somewhat analytical albeit heuristic construction for an archetype for modern projection methods infrastructure (following P. M. Gresho – 1990) which serves only as a theoretical minimum for “whats going on under the hood” understanding.

### Analytical Heuristic Construction for Projection Methods

One of the most attractive features of projection methods is that at least as so far as the “whats going on under the hood” approach for the understanding of algorithms is the important notion, they are based on a sound mathematical infrastructure (even though what is necessary to produce implementations may involve many adjustments from an algorithmic standpoint).

We begin again with the incompressible Navier–Stokes equations:

The first step which sets off most basic projection methods and is formally termed *fractional step procedure* is to solve the momentum equations without pressure gradient terms, then subsequently supplement a simple equation including the pressure gradient.

A way to look at the above is as a simple operator splitting approach in which one considers the viscous forces (in the first half step) and the pressure forces (in the second half step) separately.

The first equation is solved for an intermediate velocity field which is **not** divergence free (note from a computational perspective we should not expect to start off with a divergence free field anyway).

The second equation shall be transformed to a Pressure-Poisson equation (PPE), whose solution shall allow the extraction of a divergence free velocity field through what is essentially the Leray projector (assisted by the notion of the Hodge decomposition) we saw in Part I.

The PPE is constructed by taking the divergence of the supplemented pressure equation. Remembering that it is not the actual pressure that appear in the equation I shall note it by Φ (this will also make the Hodge decomposition notion apparent) :

We approximate the time derivative on the right-hand side as (where h denotes the time step size):

If we require:

And we get the following:

It is important to note that it does not matter how the intermediate velocity field is obtained, by a φ satisfying the above PPE, the following construction:

is essentially a Leray projector on the intermediate velocity field achieving a divergence free velocity field as required, namely:

The above heuristic reasoning serves as the main idea behind projection methods of which algorithmic implementation (with some numerical considerations) could be may be summarized as such:

- Solve the intermediate velocity field form of the momentum equations:
- Define integration in time (e.g. generalized trapezoidal integration)
- Perform Newton iterations as means of solving a quasilinear set of equations (such as the momentum equation).
- Spatial discretization of the the intermediate momentum equation.
- Numerical solution of the time-dependent PDE with a time-splitting procedure such as Alternating direction implicit (ADI) or Douglas & Gunn (D-G) or Locally One-Dimensional Methods (LOD).
- Boundary condition treatment during iterations – Implementation of boundary conditions during iteration of nonlinear differential equations raises the question of the timing by which, during the iterations, boundary conditions should be imposed. Whether at the first iteration, at the last (converged) iteration, or on each and every iteration. The actual effectiveness of any of these choices will is influenced by many details of the overall iteration scheme, but it is enough to say that all are applicable depending on the specific scheme.

- Projection to Divergence-Free Velocity:

The intermediate velocity field does not satisfy the divergence-free condition and to achieve this we must construct and apply the Leray projector. This consists of the following steps:- Construction of the divergence of the intermediate velocity field.
- Solving the PPE for Φ.
- make use of the solution of the PPE to construct the Leray projector to be applied on the intermediate velocity to achieve a divergence free velocity field u.

in what follows, Know Thy Solver- PART III shall present a brief review (albeit with much more numerical insight) of what is typically the main algorithm in most commercial CFD

codes – Semi-Implicit Method for Pressure Linked Equations, or SIMPLE algorithm for short.