Skip to content
Draft. This manual is new and still being checked against the software as it is verified. Some pages will change. If something here does not match what you see, the software is right — tell us and we will fix the page.

Boundary condition types

Every patch type the application can assign, the parameters each one asks for, and the OpenFOAM entry it writes into every field.

A boundary condition here is one physical concept. The application fans it out across the whole field set, so you choose “Velocity inlet” once and it writes fixedValue into 0/U, zeroGradient into 0/p, turbulentIntensityKineticEnergyInlet into 0/k and so on. You never name a patch type per field.


Type For Mesh patch type
Velocity inlet A known speed entering the domain patch
Pressure inlet A known total pressure entering; the speed follows patch
Pressure outlet A known static pressure leaving patch
Outflow Everything leaves, nothing is specified patch
Wall A solid surface wall
Thermal wall A solid surface with a temperature condition wall
Symmetry A mirror plane symmetry
Periodic The flow leaving one face arrives at another cyclic
Far field A boundary far enough away to be undisturbed patch
Fan / screen A pressure jump across a face patch
Wave inlet A generated wave train patch
Empty (2D) A direction that is not solved empty
Wedge (axisymmetric) One side of an axisymmetric wedge wedge

A patch with no type assigned is an error. OpenFOAM decides whether a wall function may be constructed from the mesh patch type, not from the field entry, so the mesh patch type in the third column is written into blockMeshDict and applied to an existing mesh’s constant/polyMesh/boundary as well.

Outflow, Symmetry, Periodic, Empty (2D) and Wedge (axisymmetric) take no parameters. They are geometric statements applied identically to every field.


Which fields the patch editor shows, by type.

Parameter Shown for
Velocity Velocity inlet, Far field (labelled “Freestream speed”)
Gauge pressure (Pa) Pressure inlet, Pressure outlet, Far field
Turbulence intensity + length scale Velocity inlet, Pressure inlet, Far field
Wall motion, roughness Wall, Thermal wall
Temperature (K) Velocity inlet, Pressure inlet, Thermal wall, Far field — only when the energy equation is on
Pressure rise (Pa) Fan / screen
Phase fraction Velocity inlet, Pressure inlet, Pressure outlet, Far field — only on a two-phase VoF case
Stream (oxidiser / fuel) The same four — only on a reacting case

Intensity and length scale are converted to k, omega and epsilon and the derived values are shown live under the fields. You never type a turbulence quantity.


What each type writes into each field before any family-specific overlay. Fields the case does not carry are simply not written.

Type U p k omega epsilon nuTilda nut T
Velocity inlet fixedValue zeroGradient turbulentIntensityKineticEnergyInlet turbulentMixingLengthFrequencyInlet turbulentMixingLengthDissipationRateInlet fixedValue calculated fixedValue
Pressure inlet pressureInletVelocity totalPressure turbulentIntensityKineticEnergyInlet turbulentMixingLengthFrequencyInlet turbulentMixingLengthDissipationRateInlet fixedValue calculated inletOutletTotalTemperature
Pressure outlet inletOutlet fixedValue inletOutlet inletOutlet inletOutlet inletOutlet calculated inletOutlet
Outflow zeroGradient zeroGradient zeroGradient zeroGradient zeroGradient zeroGradient calculated zeroGradient
Wall noSlip zeroGradient kqRWallFunction omegaWallFunction epsilonWallFunction fixedValue nutkWallFunction zeroGradient
Thermal wall noSlip zeroGradient kqRWallFunction omegaWallFunction epsilonWallFunction fixedValue nutkWallFunction externalWallHeatFluxTemperature
Symmetry symmetry symmetry symmetry symmetry symmetry symmetry symmetry symmetry
Periodic cyclic cyclic cyclic cyclic cyclic cyclic cyclic cyclic
Far field freestreamVelocity freestreamPressure freestream freestream freestream freestream calculated freestream
Fan / screen pressureInletOutletVelocity fanPressure inletOutlet inletOutlet inletOutlet inletOutlet calculated inletOutlet
Wave inlet waveVelocity fixedFluxPressure inletOutlet inletOutlet inletOutlet inletOutlet calculated inletOutlet
Empty (2D) empty empty empty empty empty empty empty empty
Wedge (axisymmetric) wedge wedge wedge wedge wedge wedge wedge wedge

The This writes box on the patch pane shows this table for the case in front of you, one line per field actually present. That box, not this page, is the authority for a specific case.

Patch type Entries
fixedValue (inlet U) value uniform (…) from the velocity and flow direction
totalPressure p0
fanPressure jumpTable constant <Δp>, direction in
freestreamVelocity / freestreamPressure / freestream freestreamValue
turbulentIntensityKineticEnergyInlet intensity (as a fraction, not a percentage)
turbulentMixingLengthFrequencyInlet, turbulentMixingLengthDissipationRateInlet mixingLength
inletOutlet inletValue
inletOutletTotalTemperature inletValue, T0
externalWallHeatFluxTemperature mode fixedValue, Ta, kappaMethod fluidThermo
nutkRoughWallFunction Ks, Cs 0.5
rotatingWallVelocity origin, axis, omega
movingWallVelocity value from the wall speed and the flow direction
fixedFluxPressure rho rhok on a Boussinesq case only
alphatJayatillekeWallFunction, compressible::alphatWallFunction Prt
prghTotalPressure p0
prghPressure p
atmBoundaryLayerInlet* flowDir, zDir, Uref, Zref, z0, d 0, zGround
atmEpsilonWallFunction, atmOmegaWallFunction z0, lowReCorrection false
atmNutkWallFunction z0

Wall motion and roughness change the patch type, not only a value.

Wall motion U becomes nut becomes
Stationary (no-slip) noSlip as roughness below
Slip slip calculated
Moving wall movingWallVelocity as roughness below
Rotating wall rotatingWallVelocity as roughness below
Roughness nut
Smooth nutkWallFunction
Sand-grain roughness nutkRoughWallFunction, with the sand-grain height as Ks

Roughness is not offered on a slip wall — there is no boundary layer for it to roughen.


The base table is refined once the physics family is known. These are applied in order and each one only touches the fields it owns.

Two-phase VoF. p is derived from p_rgh and carries calculated rather than a condition of its own. alpha is inletOutlet at every opening — a fixedValue on an outlet would hold the free surface at a fixed height against the flow. A pressure outlet, an outflow or a far field gets p_rgh prghTotalPressure and U pressureInletOutletVelocity; a wall gets p_rgh fixedFluxPressure and alpha zeroGradient. Symmetry and periodic override everything and apply unchanged.

Euler-Euler. One U.<phase> per phase and an alpha.<phase> for the dispersed phase only. At a wall the dispersed phase gets slip rather than no-slip — holding it to no-slip puts a boundary layer on bubbles. p_rgh is prghPressure at a pressure outlet and fixedFluxPressure elsewhere.

Species and passive scalars. Mass fractions (reacting, spray) and the transported scalar behave identically: fixedValue at an inlet or far field, inletOutlet at a pressure outlet or fan, zeroGradient everywhere else.

Conduction. There is no flow, so every condition that switches on flow direction — inletOutlet, freestream — would look up a flux that does not exist and fail. T is reduced to fixedValue at an inlet, pressure inlet, far field or thermal wall and zeroGradient elsewhere. Nothing else is written.

Atmospheric. A velocity inlet or far field is replaced by the logarithmic profile: atmBoundaryLayerInletVelocity, atmBoundaryLayerInletK, atmBoundaryLayerInletEpsilon, atmBoundaryLayerInletOmega. A non-slip wall gets atmEpsilonWallFunction, atmOmegaWallFunction and atmNutkWallFunction. constant/turbulenceProperties is unchanged; only the boundary library differs, and libatmosphericModels.so is added to controlDict’s libs.

Compressible. alphat is added: compressible::alphatWallFunction at a wall, calculated elsewhere, and the geometric type on symmetry or periodic.

Buoyant. p becomes calculated and the pressure condition moves to p_rghfixedFluxPressure where p would have been zeroGradient. alphat is alphatJayatillekeWallFunction at a wall. A Boussinesq case registers no thermo model, so externalWallHeatFluxTemperature is downgraded to fixedValue — there is nothing for kappaMethod to look up.

Anything else. Any field none of the above names still gets a condition, or the case is written with NOT ASSIGNED in it and stops on the first read: fixedValue at an inlet, pressure inlet or far field; zeroGradient at a pressure outlet, outflow or fan; and at a wall fixedValue for a vector field, zeroGradient for a scalar.


These are checked and reported on the Problems tab.

A patch name becomes an OpenFOAM dictionary keyword, so:

Rule Message
Not empty “A patch needs a name.”
Cannot start with a digit “A patch name cannot start with a digit.”
Letters, digits and underscores only “Letters, digits and underscores only — a patch name is an OpenFOAM dictionary keyword.”
Unique within the case “There is already a patch called ‘…’.”

Renaming a patch here does not rename it in an already generated mesh.

A new patch added by name is given a starting type guessed from the name: a name containing inlet becomes a Velocity inlet, outlet a Pressure outlet, farfield/freestream/external a Far field, and wall/body/ground a Wall. Anything else is left unassigned.

OpenFOAM has no two-dimensional solver. A 2-D case is a three-dimensional mesh one cell thick whose side faces are declared empty, and the solver then drops that direction entirely.

  • A case marked two-dimensional needs at least one Empty (2D) patch. With none, the solver treats it as 3-D.
  • One empty patch is enough and is the usual arrangement: the application’s own blockMeshDict puts both thin faces into a single patch named frontAndBack, which is the standard OpenFOAM idiom.
  • Turning the two-dimensional switch on adds that patch; turning it off removes it.
  • The thin direction cannot be the flow direction — that is the direction the answer is in.
  • Exactly two Wedge (axisymmetric) patches, one each side of the axis. Not one, not three. One of a pair is the common mistake and OpenFOAM’s own error for it names a field rather than the patch.
  • A case cannot be both two-dimensional and axisymmetric. Empty and wedge are alternative ways of removing the same direction.
  • Every patch needs a condition, on every field, before the case can run.
  • The patch list must match the mesh. When a mesh has been generated and the names disagree, the boundary list says which patches the mesh actually has and offers “Use the mesh’s patches”. Left alone, the solver stops on the first field it reads with an error that names a keyword rather than the problem.
  • Something must fix the pressure level. With no Pressure outlet, Far field or Outflow anywhere on the boundary, only pressure differences are determined, and pRefCell 0 / pRefValue 0 are written into fvSolution to pin it. This is reported as information, not an error.
  • A Marine & Waves case needs a Wave inlet. Without one, constant/waveProperties names a patch that generates nothing.

The application writes type cyclic; into every field and type cyclic; into the mesh patch. It does not write a neighbourPatch entry, so the pairing between the two halves of a cyclic patch has to already exist in the mesh — from an imported mesh, or from a createPatch mesh operation.


The background block gives its faces fixed names, which is what the boundary list starts from on a case with no imported mesh.

Setting Patches
Default inlet, outlet, farfield
Split block faces xMin, xMax, yMin, yMax, zMin, zMax
Two-dimensional plus frontAndBack

snappyHexMesh adds the body: one patch named body, or one patch per part when the geometry has been split into parts.