Skip to main content

Boundary conditions

In the absence of sources and sinks, system behaviour is driven by its boundary conditions. These form a critical aspect of case specification where ill-posed combinations will lead to physically incorrect predictions, and in many cases, solver failure.

OpenFOAM offers a wide range of conditions, grouped according to:

  • Constraints: geometrical constraints, e.g. for 2-D, axisymmetric etc.
  • General: available to all patch types and fields
  • Inlet: inlet conditions
  • Outlet: outlet conditions
  • Wall: wall conditions
  • Coupled: coupled conditions, e.g. cyclic

Usage

Boundary conditions are assigned in the boundaryField section of the field files within each time directory for each mesh patch. The format follows:

boundaryField
{
<patch 1>
{
type <patch type>;
...
}
<patch 2>
{
type <patch type>;
...
}
...
<patch N>
{
type <patch type>;
...
}
}

Each condition is set in a dictionary given by the name of the underlying mesh patch, according to the type keyword.

Details

  • For 1-sided, e.g. external boundaries, the normal vector points out of the domain
  • Non-orthogonality not included

Boundary conditions schematic

Used when solving the general transport equation to provide:

  • value at boundary
  • gradient at boundary

Further information

Usage

  • Common combinations
  • Many conditions employ a Function1 type to describe a property as a function of another, typically time

Source code:

API:

See also: