Schemes

Introduction

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

\[ \underbrace{\ddt{\left(\rho \phi \right)}}_{\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{\left(\rho \phi \right)} 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

\[ \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 contribute to the \(\mat{A}\) matrix and \( \vec{b}\) vector, described in the following sections. Choice of schemes are set in the fvSchemes dictionary.

Temporal schemes

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

Spatial schemes

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.

Wall distance calculation method

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

Further information