Numerical Method

Numerical Method

OpenFOAM contains a suite of numerical tools to solve a range of problems in engineering and science. It includes methods to solve problems where matter is represented as a continuum and where it is represented by discrete particles. To solve equations for a continuum, OpenFOAM uses a numerical approach with the following features:

  • Segregated, iterative solution: For the system of equations governing our problem of interest, separate matrix equations are created for each equation, and are solved within an iterative sequence (as opposed to created one, big matrix equation for the entire system of equations).
  • Finite volume method: Matrix equations are constructed using the finite volume method applied to arbitrary shaped cells (any number of faces, any number of edges).
  • Colocated variables: The solution variable for each matrix equation is defined at cell centres.
  • Equation coupling: The coupling between equations, particularly pressure and velocity is performed using adapted versions of well-known algorithms such as e.g. PISO and SIMPLE.

Programming in OpenFOAM

OpenFOAM has its own programming language for writing solution algorithms for complex physics. It includes set of functions that describe standard differential operators (∇2   \relax \special {t4ht=, ∇ ∙ \relax \special {t4ht=, ∇ \relax \special {t4ht=, ∇ × \relax \special {t4ht=,∂∕∂t  \relax \special {t4ht=,∂2 ∕∂t2   \relax \special {t4ht=) which perform the discretisation to create matrix equations. Top level code then contains little more than a representation of the equations being solved. Existing solvers contain a large number of examples of equation implementations, within the underlying algorithms, that users can adapt for their specific needs.

Run-time Selection

The choice of discretisation schemes is selected by the user at run time through the fvSchemes file of the case being simulated. OpenFOAM has a comprehensive range of discretisation schemes, allowing full control over accuracy, boundedness and conservation. The schemes are generally limited to second-order to enable reliable simulation on real engineering geometries with cells of arbitrary shape. The fvSchemes file also contains controls for the coupling algorithms to provide complete control to optimise simulations.