5.1 Boundary Conditions

Setting appropriate boundary conditions is vital for a successful simulation. Ill-posed boundary conditions will lead to physically incorrect predictions, and in many cases solver failure. Users must specify the boundary conditions for each solved field. The tutorials provided with OpenFOAM show examples of good practice in terms of selection and application for various cases.

Boundary conditions are organised into categories for easier navigation, comprising:

basic
basic types
  • fixedValue
  • fixedGradient
  • mixed
constraint
geometrical constraints
  • symmetry
  • wedge
  • empty
  • cyclic
derived
specialised conditions
  • fixedProfile: to specify a profile of a variable
  • swirlFlowRateInletVelocity: to specify velocity inlet for a swirling flow providing flow rate
  • inletOutlet: outlet condition with handling of reverse flow
  • codedFixedValue: fixed value set by user coding

In all there are more than 70 boundary conditions. The list of all available boundary conditions divided into categories based of the use can be found in section A.4

An example pressure field file is shown below

17dimensions      [1 -1 -2 0 0 0 0];
18
19internalField   uniform 1;
20
21boundaryField
22{
23    inlet
24    {
25        type            fixedValue;
26        value           uniform 1;
27    }
28
29    outlet
30    {
31        type            waveTransmissive;
32        field           p;
33        psi             thermo:psi;
34        gamma           1.4;
35        fieldInf        1;
36        lInf            3;
37        value           uniform 1;
38    }
39
40    bottom
41    {
42        type            symmetryPlane;
43    }
44
45    top
46    {
47        type            symmetryPlane;
48    }
49
50    obstacle
51    {
52        type            zeroGradient;
53    }
54
55    defaultFaces
56    {
57        type            empty;
58    }
59}
60
61// ************************************************************************* //