Nabla Logo programmer
  Advanced Search
  
  Send us a comment/query
 
  Back to main web site
 
  OpenFOAM guides
  - User guide
  - Programmer’s guide
 
  Index
 
  Changes from OpenFOAM 2.2 to 2.3
 
  Trademarks in the guides
  ©2000-2007 Nabla Ltd.

2.2 Overview of discretisation

The term discretisation means approximation of a problem into discrete quantities. The FV method and others, such as the finite element and finite difference methods, all discretise the problem as follows:

Spatial discretisation
Defining the solution domain by a set of points that fill and bound a region of space when connected;
Temporal discretisation
(For transient problems) dividing the time domain into into a finite number of time intervals, or steps;
Equation discretisation
Generating a system of algebraic equations in terms of discrete quantities defined at specific locations in the domain, from the PDEs that characterise the problem.

2.2.1 OpenFOAM lists and fields

OpenFOAM frequently needs to store sets of data and perform functions, such as mathematical operations, on the data. OpenFOAM therefore provides an array template class List<Type>, making it possible to create a list of any object of class Type that inherits the functions of the Type. For example a List of vector is List<vector>.

Lists of the tensor classes are defined as standard in OpenFOAM by the template class Field<Type>. For better code legibility, all instances of Field<Type>, e.g. Field<vector>, are renamed using typedef declarations as scalarField, vectorField, tensorField, symmTensorField, tensorThirdField and symmTensorThirdField. Algebraic operations can be performed between Fields subject to obvious restrictions such as the fields having the same number of elements. OpenFOAM also supports operations between a field and single tensor, e.g. all values of a Field U can be multiplied by the scalar 2 with the operation U = 2.0 * U.