Schemes

OpenFOAM applications are designed for use with unstructured meshes, offering up to second order accuracy, predominantly using collocated variable arrangements. Most focus on the Finite Volume Method, for which the conservative form of the general scalar transport equation for the property \( \phi \) takes the form:

\[ \underbrace{\ddt{\rho \phi}}_{\mathrm{unsteady}} + \underbrace{\div \left(\rho \phi \u \right)}_{\mathrm{convection}} = \underbrace{\div \left(\Gamma \grad \phi \right)}_{\mathrm{diffusion}} + \underbrace{S_\phi}_{\mathrm{source}} \]

The Finite Volume Method requires the integration over a 3-D control volume, such that:

\[ \int_V \ddt{\rho \phi} dV + \int_V \div \left(\rho \phi \u \right) dV = \int_V \div \left(\Gamma \grad \phi \right) dV + \int_V S_\phi dV \]

This equation is discretised to produce a system of algebraic equations of the form

\[ \begin{bmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & \dots & a_{nn} \end{bmatrix} \begin{bmatrix} x_{1} \\ x_{2} \\ \vdots \\ x_{n} \end{bmatrix} = \begin{bmatrix} b_{1} \\ b_{2} \\ \vdots \\ b_{n} \end{bmatrix} \]

or more concisely:

\[ \mat{A} \vec{x} = \vec{b} \]

where

\( \mat{A} \) | = | coefficient matrix |

\( \vec{x} \) | = | vector of unknowns |

\( \vec{b} \) | = | source vector |

The discretisation process employs user selected schemes to build the \(\mat{A}\) matrix and \( \vec{b}\) vector, described in the following sections. Choice of schemes are set in the fvSchemes dictionary.

OpenFOAM includes a variety of schemes to integrate fields with respect to time:

At their core, spatial schemes rely heavily on interpolation schemes to transform cell-based quantities to cell faces, in combination with Gauss Theorem to convert volume integrals to surface integrals.

Distance to the nearest wall is required, e.g. for a number of turbulence models. Several calculation methods are available:

- Examples
- Further guidance on scheme usage, refer to the User Guide.
- Source documentation