LAST SEEN ONLINE:
NOV 22, 2026 11:36 UTC
LOCAL_TIME_SYNC:
--:--:-- | -- _
← Digital notebook
Boundary Conditions 44 min read

CFD Boundary Conditions: The Physics, Mathematics and Numerical Implementation

Understand the physical principles, mathematical foundations and numerical implementation of CFD boundary conditions, including Dirichlet, Neumann and Robin conditions, inlet and outlet treatments, wall conditions, symmetry, periodicity, thermal boundaries, turbulence inputs, and practical OpenFOAM examples.

CFD Boundary Conditions: The Physics, Mathematics and Numerical Implementation

1. Introduction: Why Boundary Conditions Matter in CFD

Imagine that you want to simulate water flowing through a pipe.

You know the pipe diameter, its length, the fluid properties and perhaps the average inlet velocity. You create a computational mesh, select a turbulence model and choose a numerical solver.

But one important question remains:

How does the fluid enter the pipe, what happens when it leaves, and how does it interact with the pipe walls?

These questions describe the boundary conditions of the problem.

Boundary conditions (BCs) specify how the physical quantities being solved behave at the boundaries of a computational domain. They tell the numerical solver what information is known at the boundaries and how the solution should interact with the surrounding physical environment.

In Computational Fluid Dynamics (CFD), the governing equations describe the behaviour of fluid inside the computational domain. However, those equations alone are generally insufficient to obtain a unique solution.

The mathematical problem also requires appropriate initial conditions, boundary conditions and, in some cases, reference conditions.

Consider a simple pipe-flow simulation:

  • At the inlet, fluid enters with a known velocity.
  • At the outlet, the fluid discharges into an environment with a known pressure.
  • At the pipe walls, the fluid cannot penetrate the solid surface.
  • At the walls, viscosity causes the fluid velocity to match the wall velocity under the conventional no-slip assumption.

Each of these physical observations must be translated into mathematical and numerical instructions.

A CFD simulation can have an excellent mesh, a suitable turbulence model and a well-converged numerical solution, yet still predict the wrong physical behaviour if its boundary conditions are inappropriate.

This is why boundary-condition selection is not simply a software configuration task. It is an essential part of physical modelling.

Learning objectives

After reading this article, you should be able to:

  1. Understand why boundary conditions are necessary in mathematical and numerical modelling.
  2. Distinguish between Dirichlet, Neumann and Robin boundary conditions.
  3. Understand the physical meaning of inlet, outlet, wall, symmetry and periodic conditions.
  4. Select appropriate boundary conditions for velocity, pressure, temperature and turbulence variables.
  5. Understand the relationship between boundary conditions and numerical stability.
  6. Identify common boundary-condition mistakes.
  7. Implement basic boundary conditions in OpenFOAM.
  8. Develop a systematic approach to defining and checking boundary conditions in CFD.

2. What Is a Computational Domain?

Before discussing boundary conditions, it is useful to understand the computational domain.

A computational domain is the region of physical space in which the governing equations are solved numerically.

For example, consider fluid flowing through a straight pipe.

The actual physical pipe may be several metres long. However, the CFD model only needs to represent the region relevant to the engineering question.

The computational domain might contain:

  • An inlet section.
  • A straight pipe section.
  • An outlet section.
  • The pipe walls.

The boundaries of this domain are divided into different patches.

Each patch represents a physical or mathematical boundary where specific information must be supplied.

Example: Flow through a pipe

Velocity profile of laminar flow developing inside a pipe

Laminar pipe-flow velocity profile by Ryan Toomey, University of South Florida, licensed under CC BY-SA 4.0 via Wikimedia Commons.

For a simplified pipe-flow model, we can identify three important boundary types:

BoundaryPhysical meaningTypical information
InletFluid enters the domainVelocity or mass flow rate
OutletFluid leaves the domainStatic pressure or another suitable outflow condition
WallFluid interacts with the solid pipeWall velocity and thermal condition

The boundary conditions are applied to the corresponding patches of the computational mesh.

An important distinction is that the boundary of the computational domain does not always correspond to a physical wall.

An inlet and an outlet are often artificial boundaries introduced because the actual physical system extends beyond the region being simulated.

This distinction becomes important when choosing boundary conditions.

For example, a pipe wall is a physical surface. A computational outlet, on the other hand, is often an artificial surface placed somewhere downstream of the region of interest.

The artificial outlet should be located where its imposed condition does not significantly distort the physical flow being investigated.


3. The Mathematical Foundations of Boundary Conditions

Most CFD problems involve partial differential equations (PDEs).

A PDE describes how a physical quantity changes with respect to multiple independent variables, such as spatial coordinates and time.

For example, temperature may vary with position and time:

T=T(x,y,z,t)T = T(x,y,z,t)

Here:

  • TT is temperature.
  • x,y,zx,y,z are spatial coordinates.
  • tt is time.

A governing equation describes how this temperature field evolves inside the computational domain.

However, we also need to specify what happens at the boundaries.

Three fundamental mathematical categories are particularly important:

  1. Dirichlet boundary conditions.
  2. Neumann boundary conditions.
  3. Robin boundary conditions.

Understanding these three types provides a foundation for interpreting many practical CFD boundary conditions.

3.1 Dirichlet boundary condition: Specify the value

A Dirichlet boundary condition specifies the value of a variable directly at a boundary.

Mathematically:

ϕ=ϕb\phi = \phi_b

where:

  • ϕ\phi is the physical variable being solved.
  • ϕb\phi_b is its prescribed boundary value.

For example, consider water entering a pipe at a uniform velocity of 2 m/s2\ \mathrm{m/s}.

At the inlet:

U=[200]m/s\mathbf{U} = \begin{bmatrix} 2\\ 0\\ 0 \end{bmatrix} \mathrm{m/s}

This is a Dirichlet condition for the velocity field.

Similarly, if a metal surface is maintained at a constant temperature of 350 K350\ \mathrm{K}, its temperature boundary condition is:

T=350 KT = 350\ \mathrm{K}

Physical interpretation:

You are telling the solver exactly what value the variable must have at that boundary.

Examples include:

  • Specified inlet velocity.
  • Specified inlet temperature.
  • Fixed wall temperature.
  • Prescribed pressure at an outlet.
  • Specified concentration at an inlet.

In OpenFOAM, a common implementation is:

type    fixedValue;
value   uniform 2;

The actual value must have the correct dimensions and match the field being solved.

3.2 Neumann boundary condition: Specify the gradient

A Neumann boundary condition specifies the spatial derivative of a variable normal to the boundary.

Mathematically:

∂ϕ∂n=g\frac{\partial \phi}{\partial n}=g

Here, gg is the prescribed normal gradient.

To understand this equation, we need to understand the mathematical operator involved.

What does the gradient operator mean?

The gradient of a scalar quantity is represented by:

∇ϕ=[∂ϕ∂x∂ϕ∂y∂ϕ∂z]\nabla \phi = \begin{bmatrix} \frac{\partial \phi}{\partial x}\\ \frac{\partial \phi}{\partial y}\\ \frac{\partial \phi}{\partial z} \end{bmatrix}

The symbol ∇\nabla, called the del or nabla operator, describes how a scalar field changes in space.

For example, if temperature increases rapidly along the x-direction, then the x-component of its gradient is large.

The gradient points in the direction of the greatest increase of the scalar field.

The normal derivative is obtained by taking the dot product of the gradient with the outward unit normal vector:

∂ϕ∂n=∇ϕ⋅n\frac{\partial \phi}{\partial n} = \nabla\phi\cdot\mathbf{n}

Here:

  • ∇ϕ\nabla\phi describes the spatial variation of the field.
  • n\mathbf{n} is a unit vector perpendicular to the boundary.
  • The dot product extracts the component of the gradient normal to the boundary.

This means that a Neumann condition controls how a variable changes as we move across the boundary.

Example: Insulated wall

Consider heat transfer through a solid wall.

If the wall is perfectly insulated, no heat can pass through it.

Fourier’s law gives the conductive heat flux:

q=−k∇T\mathbf{q}=-k\nabla T

where:

  • q\mathbf{q} is heat flux in W/m2\mathrm{W/m^2}.
  • kk is thermal conductivity in W/(m K)\mathrm{W/(m\,K)}.
  • ∇T\nabla T is the temperature gradient.

The heat flux normal to a surface is:

qn=−k∂T∂nq_n=-k\frac{\partial T}{\partial n}

For a perfectly insulated wall:

qn=0q_n=0

Therefore:

∂T∂n=0\frac{\partial T}{\partial n}=0

This is a zero-gradient Neumann boundary condition.

Physical interpretation:

The temperature is not necessarily constant along the wall. Instead, it does not change in the direction normal to the insulated surface.

For example, the temperature may vary from one location to another along the wall while no heat passes through the wall.

In OpenFOAM, a common zero-gradient condition is:

type    zeroGradient;

3.3 Robin boundary condition: Combine value and gradient

A Robin boundary condition combines the value of a variable and its normal gradient.

A general mathematical form is:

aϕ+b∂ϕ∂n=ca\phi+b\frac{\partial\phi}{\partial n}=c

where aa, bb and cc are specified coefficients or functions.

A familiar physical example is convective heat transfer between a solid surface and a surrounding fluid.

Newton’s law of cooling gives:

q′′=h(Ts−T∞)q''=h(T_s-T_\infty)

where:

  • q′′q'' is the heat flux from the surface.
  • hh is the convective heat-transfer coefficient.
  • TsT_s is the surface temperature.
  • T∞T_\infty is the ambient fluid temperature.

Combining this with Fourier’s law gives:

−k∂T∂n=h(Ts−T∞)-k\frac{\partial T}{\partial n} = h(T_s-T_\infty)

The precise sign depends on the direction chosen for the surface normal and heat flux.

This is a Robin-type thermal boundary condition.

Physical interpretation:

The heat transfer depends on both the surface temperature and the temperature difference between the surface and its surroundings.

This is more realistic than simply fixing the wall temperature when the wall exchanges heat with an environment through convection.

3.4 Comparing the three fundamental types

TypeWhat is specified?Physical example
DirichletVariable valueFixed inlet velocity
NeumannNormal gradientInsulated wall
RobinCombination of value and gradientConvective heat transfer

These three mathematical types form the foundation of many practical boundary conditions used in CFD software.

However, a software boundary condition such as a pressure outlet or a symmetry plane may combine several mathematical requirements and solver-specific treatments.

It is therefore important not to assume that every practical CFD boundary condition is simply a direct one-to-one equivalent of one mathematical type.


4. Understanding Mathematical Operators Used in CFD Boundary Conditions

Boundary-condition equations frequently use mathematical operators. Understanding their physical meaning helps prevent the equations from becoming just symbolic expressions.

Consider the following operators.

4.1 Gradient operator: ∇\nabla

As discussed earlier, the gradient describes the spatial rate and direction of change of a scalar field.

For temperature:

∇T=[∂T∂x∂T∂y∂T∂z]\nabla T = \begin{bmatrix} \frac{\partial T}{\partial x}\\ \frac{\partial T}{\partial y}\\ \frac{\partial T}{\partial z} \end{bmatrix}

Physical meaning:

It tells us how quickly temperature changes in each spatial direction.

4.2 Divergence operator: ∇⋅\nabla\cdot

The divergence measures the net outward flow of a vector field per unit volume.

For velocity:

∇⋅U=∂u∂x+∂v∂y+∂w∂z\nabla\cdot\mathbf{U} = \frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} + \frac{\partial w}{\partial z}

where uu, vv and ww are the velocity components.

For incompressible flow:

∇⋅U=0\nabla\cdot\mathbf{U}=0

Physical meaning:

For a small fluid volume, the amount of fluid entering must balance the amount leaving.

There is no local accumulation of mass for constant-density incompressible flow.

The divergence operator is particularly important when defining velocity and mass conservation at boundaries.

4.3 Laplacian operator: ∇2\nabla^2

The Laplacian is the divergence of the gradient:

∇2ϕ=∇⋅(∇ϕ)\nabla^2\phi=\nabla\cdot(\nabla\phi)

For a three-dimensional scalar field:

∇2ϕ=∂2ϕ∂x2+∂2ϕ∂y2+∂2ϕ∂z2\nabla^2\phi = \frac{\partial^2\phi}{\partial x^2} + \frac{\partial^2\phi}{\partial y^2} + \frac{\partial^2\phi}{\partial z^2}

Physical meaning:

It describes how the gradient itself changes in space.

The Laplacian appears in diffusion processes, including heat conduction and viscous momentum transport.

For example, the heat-conduction equation contains:

∇2T\nabla^2T

because temperature differences drive heat diffusion.

4.4 Dot product: a⋅b\mathbf{a}\cdot\mathbf{b}

The dot product extracts the component of one vector along another.

For a boundary normal vector:

U⋅n\mathbf{U}\cdot\mathbf{n}

This represents the velocity component normal to the boundary.

It is important because fluid can cross a boundary only through its normal velocity component.

The tangential velocity describes motion along the boundary.

4.5 Boundary-normal derivative

The derivative normal to a surface is:

∂ϕ∂n=n⋅∇ϕ\frac{\partial \phi}{\partial n} = \mathbf{n}\cdot\nabla\phi

This is particularly important for walls.

For example, at an impermeable wall, the normal velocity must satisfy:

U⋅n=0\mathbf{U}\cdot\mathbf{n}=0

At an insulated thermal wall:

n⋅∇T=0\mathbf{n}\cdot\nabla T=0

The first condition restricts fluid movement through the wall. The second restricts conductive heat transfer through the wall.

They describe two different physical phenomena.


5. Boundary Conditions for Fluid Flow

The Navier-Stokes equations describe the conservation of mass and momentum in fluid flow.

For incompressible Newtonian flow with constant properties, the continuity equation is:

∇⋅U=0\nabla\cdot\mathbf{U}=0

The momentum equation can be written as:

∂U∂t+(U⋅∇)U=−1ρ∇p+ν∇2U+f\frac{\partial\mathbf{U}}{\partial t} + (\mathbf{U}\cdot\nabla)\mathbf{U} = -\frac{1}{\rho}\nabla p + \nu\nabla^2\mathbf{U} + \mathbf{f}

where:

  • U\mathbf{U} is the velocity vector.
  • tt is time.
  • ρ\rho is fluid density.
  • pp is pressure.
  • ν\nu is kinematic viscosity.
  • f\mathbf{f} represents body forces per unit mass.

Let’s interpret the important terms.

Local acceleration:

∂U∂t\frac{\partial\mathbf{U}}{\partial t}

This describes how velocity changes with time at a fixed location.

Convective acceleration:

(U⋅∇)U(\mathbf{U}\cdot\nabla)\mathbf{U}

This describes velocity changes experienced by a moving fluid particle as it travels through spatially varying velocity fields.

Pressure-gradient force:

−1ρ∇p-\frac{1}{\rho}\nabla p

This represents the acceleration caused by spatial pressure differences.

Viscous diffusion:

ν∇2U\nu\nabla^2\mathbf{U}

This represents the diffusion of momentum due to viscosity.

Boundary conditions must be specified so that these governing equations can be solved for the velocity and pressure fields.

The appropriate conditions depend on the physical situation and the numerical formulation.


6. Inlet Boundary Conditions

An inlet boundary represents a location where fluid enters the computational domain.

The inlet condition should describe the incoming flow as realistically as possible.

Depending on the problem, the available information may include:

  • Uniform velocity.
  • Fully developed velocity profile.
  • Mass flow rate.
  • Volumetric flow rate.
  • Total pressure.
  • Temperature.
  • Turbulence intensity and length scale.
  • Species concentrations.

6.1 Uniform velocity inlet

This is one of the simplest inlet conditions.

Consider water entering a straight pipe with an average velocity of:

Uin=2 m/sU_{\mathrm{in}}=2\ \mathrm{m/s}

A uniform inlet condition assumes that velocity is constant across the inlet surface.

For flow along the x-direction:

Uin=[200]m/s\mathbf{U}_{\mathrm{in}} = \begin{bmatrix} 2\\ 0\\ 0 \end{bmatrix} \mathrm{m/s}

This can be appropriate when:

  • The inlet flow is approximately uniform.
  • The upstream flow is not being modelled.
  • The inlet is sufficiently far from the region of interest.
  • A simple initial simulation is being developed.

However, real pipe flow is not always uniform across its cross-section.

For example, fully developed laminar pipe flow has a parabolic velocity profile.

A uniform inlet may therefore introduce an artificial development region.

6.2 Fully developed laminar pipe-flow inlet

For fully developed laminar flow in a circular pipe, the velocity distribution is:

u(r)=2Uavg[1−(rR)2]u(r)=2U_{\mathrm{avg}} \left[ 1-\left(\frac{r}{R}\right)^2 \right]

where:

  • u(r)u(r) is the axial velocity at radial position rr.
  • UavgU_{\mathrm{avg}} is the average velocity.
  • RR is the pipe radius.

At the pipe centreline:

u(0)=2Uavgu(0)=2U_{\mathrm{avg}}

At the wall:

u(R)=0u(R)=0

The profile is parabolic because of viscous momentum transport and the no-slip wall condition.

Using this profile at the inlet can avoid simulating the entire hydrodynamic development region when fully developed laminar flow is already known to exist upstream.

6.3 Mass-flow inlet

Sometimes the flow rate is known more accurately than the velocity profile.

The mass flow rate is:

m˙=ρAUavg\dot{m}=\rho AU_{\mathrm{avg}}

where:

  • m˙\dot{m} is mass flow rate in kg/s\mathrm{kg/s}.
  • ρ\rho is density.
  • AA is inlet area.
  • UavgU_{\mathrm{avg}} is average normal velocity.

Therefore:

Uavg=m˙ρAU_{\mathrm{avg}}= \frac{\dot{m}}{\rho A}

Practical example

Consider water entering a pipe with:

  • Diameter: D=0.1 mD=0.1\ \mathrm{m}
  • Mass flow rate: m˙=15 kg/s\dot{m}=15\ \mathrm{kg/s}
  • Density: ρ=1000 kg/m3\rho=1000\ \mathrm{kg/m^3}

The pipe area is:

A=πD24A=\frac{\pi D^2}{4} A=π(0.1)24=0.007854 m2A=\frac{\pi(0.1)^2}{4} =0.007854\ \mathrm{m^2}

The average inlet velocity is:

Uavg=151000(0.007854)U_{\mathrm{avg}} = \frac{15}{1000(0.007854)} Uavg≈1.91 m/s\boxed{U_{\mathrm{avg}}\approx1.91\ \mathrm{m/s}}

This is a useful example of how physical operating information can be converted into a CFD boundary condition.

6.4 Turbulent inlet profiles

For turbulent flow, the inlet velocity distribution may be more complicated.

A fully developed turbulent pipe flow has a relatively flatter velocity profile than fully developed laminar flow, with a steep velocity gradient near the wall.

Depending on the engineering application, the inlet can be specified using:

  • A measured velocity profile.
  • A synthetic turbulent velocity field.
  • A prescribed mean velocity profile with turbulence quantities.
  • A precursor simulation.
  • A suitable turbulence-development section.

The choice depends on the required accuracy and the distance between the inlet and the region of interest.

For a turbulence-modelled simulation, specifying only the mean velocity may not be sufficient. Turbulence quantities must also be initialized or prescribed consistently with the selected model.


7. Outlet Boundary Conditions

An outlet represents the location where fluid leaves the computational domain.

This boundary is often more difficult to define than it first appears.

A common mistake is to assume that every outlet can simply be assigned zero pressure and zero velocity gradient.

The correct treatment depends on the physical problem, the flow regime and the location of the outlet.

7.1 Pressure outlet

A common condition for incompressible flow is a specified static pressure at the outlet.

For example:

pout=0 Pap_{\mathrm{out}}=0\ \mathrm{Pa}

This value often represents gauge pressure relative to an arbitrary reference.

It does not necessarily mean that the absolute pressure is zero.

For an incompressible solver, the pressure field often acts as a kinematic pressure or a pressure relative to a reference state, depending on the formulation.

The exact dimensions and interpretation must be checked for the solver being used.

7.2 Zero-gradient velocity at an outlet

A common velocity outlet condition is:

∂U∂n=0\frac{\partial\mathbf{U}}{\partial n}=0

This means that the normal gradient of the velocity components is set to zero at the boundary.

In simple terms, the solver extrapolates the velocity field from the nearby internal cells rather than imposing an independent velocity value.

This is often appropriate when the flow is predominantly leaving the domain and the outlet is located sufficiently far downstream.

7.3 Why outlet location matters

Consider a cylinder placed in a uniform flow.

The flow separates behind the cylinder, creating a wake with vortices and recirculation.

If the computational outlet is placed immediately behind the cylinder, the outlet boundary may interfere with the wake development.

This can distort:

  • Vortex shedding.
  • Pressure distribution.
  • Drag coefficient.
  • Velocity fluctuations.
  • Wake recovery.

Moving the outlet farther downstream can reduce these artificial influences.

However, the required distance is problem-dependent. It should be checked through domain-size sensitivity studies.

7.4 Backflow at the outlet

An outlet boundary is often assumed to have flow leaving everywhere.

But in separated or unsteady flows, local reverse flow may occur.

For example, a large recirculation region may extend to the outlet boundary.

In that case, fluid may enter the computational domain through part of the outlet.

This creates a problem if the boundary condition does not define the incoming properties appropriately.

The solver may require values for incoming:

  • Velocity.
  • Temperature.
  • Turbulence quantities.
  • Species concentration.
  • Other transported scalars.

Some CFD solvers provide inlet-outlet or opening-type conditions that switch behaviour depending on the direction of local flow.

However, these conditions do not eliminate the need to understand the physical origin of backflow.

If backflow is persistent, the outlet may be too close to the region of interest or the computational domain may need to be redesigned.

The OECD Nuclear Energy Agency’s guidance discusses outlet backflow and recommends careful treatment of the incoming properties when reverse flow occurs.

Reference: https://www.oecd-nea.org/nsd/docs/2020/csni-r2020-3.pdf

7.5 Pressure outlet versus mass-flow outlet

These two conditions represent different physical information.

A pressure outlet specifies the pressure environment into which the fluid discharges.

A mass-flow outlet specifies the amount of fluid leaving the domain.

For example:

  • A pipe discharging into a large reservoir may be modelled using a suitable pressure condition.
  • A system with a prescribed downstream pump or flow-control requirement may need a flow-rate condition.

They should not be selected interchangeably without considering the actual physical system.


8. Wall Boundary Conditions

Walls represent solid surfaces in contact with the fluid.

For conventional viscous fluid-flow simulations, the most common wall assumption is the no-slip condition.

8.1 No-slip wall condition

The no-slip condition states that the fluid velocity at the wall equals the wall velocity:

Ufluid=Uwall\mathbf{U}_{\mathrm{fluid}} = \mathbf{U}_{\mathrm{wall}}

For a stationary wall:

U=0\mathbf{U}=0

This means that the fluid velocity at the wall is zero relative to the stationary wall.

Why does this happen?

Viscosity causes momentum exchange between adjacent fluid layers. At a conventional solid-fluid interface, the fluid is assumed to move with the solid surface.

The velocity changes from the wall value to the velocity of the outer flow over a finite distance.

Blasius laminar boundary-layer velocity profile rising from zero at the wall to the free-stream velocity.

Idealized Blasius boundary-layer profile. Source: Olivier Cleynen via Wikimedia Commons (CC0 1.0).

This creates a velocity gradient and wall shear stress.

For a Newtonian fluid:

τw=μ(∂Ut∂n)w\tau_w= \mu \left( \frac{\partial U_t}{\partial n} \right)_w

where:

  • τw\tau_w is wall shear stress.
  • μ\mu is dynamic viscosity.
  • UtU_t is the tangential velocity component.
  • nn is the wall-normal direction.

The exact sign depends on the orientation of the normal and the definition of shear stress.

Physical interpretation:

The velocity gradient near the wall determines the viscous force exerted by the fluid on the wall.

This is important for:

  • Pressure losses in pipes.
  • Aerodynamic drag.
  • Skin friction.
  • Heat transfer.
  • Boundary-layer development.
  • Turbomachinery performance.

8.2 Slip wall condition

A slip wall allows the fluid to move tangentially along the surface while preventing penetration through it.

The impermeability condition is:

U⋅n=0\mathbf{U}\cdot\mathbf{n}=0

The tangential shear stress is generally constrained to vanish for an ideal free-slip boundary.

This is different from a no-slip wall.

A slip condition can be useful when modelling:

  • Idealized inviscid flow.
  • Symmetry-like surfaces.
  • Certain far-field or simplified boundaries.

It should not normally be used to represent an ordinary viscous solid wall when wall friction is important.

8.3 Moving wall condition

Consider a conveyor belt moving at 3 m/s3\ \mathrm{m/s}.

The fluid touching the belt moves with the belt under the no-slip assumption.

Therefore:

Uwall=[300]m/s\mathbf{U}_{\mathrm{wall}} = \begin{bmatrix} 3\\ 0\\ 0 \end{bmatrix} \mathrm{m/s}

This is a moving-wall boundary condition.

Applications include:

  • Rotating machinery.
  • Moving belts.
  • Sliding surfaces.
  • Lubrication systems.
  • Rotating cylinders.
  • Wind-tunnel moving-ground simulations.

8.4 Rough wall condition

Real engineering surfaces are not perfectly smooth.

Pipe roughness, surface coatings, manufacturing tolerances and erosion can influence the near-wall velocity distribution and friction losses.

In turbulent CFD, roughness is often represented through wall functions or specialized rough-wall models.

The correct approach depends on:

  • Physical roughness height.
  • Roughness distribution.
  • Flow Reynolds number.
  • Selected turbulence model.
  • Near-wall mesh strategy.

It is important to distinguish between explicitly resolved surface geometry and a modelled roughness correction.

They are not equivalent approaches.


9. Symmetry Boundary Conditions

Symmetry allows us to reduce the size of a computational domain when the physical problem and its solution are symmetric.

Consider flow through a straight pipe with symmetric geometry and symmetric inlet conditions.

Instead of modelling the entire domain, we may be able to simulate only half of it.

The cut surface becomes a symmetry plane.

For velocity, the normal component must vanish:

U⋅n=0\mathbf{U}\cdot\mathbf{n}=0

The normal gradients of scalar variables are generally zero:

∂ϕ∂n=0\frac{\partial\phi}{\partial n}=0

The tangential velocity components are not forced to zero.

This is an important difference between symmetry and a no-slip wall.

Physical interpretation

Imagine looking at a mirror.

The flow on one side of the symmetry plane should be a mirror image of the flow on the other side.

There should be no net flow through the symmetry plane.

For a symmetry condition to be valid, the geometry, boundary conditions and expected solution must all support the assumed symmetry.

It should not be used merely to reduce computational cost if the real flow can develop asymmetric structures.

For example, a nominally symmetric geometry may develop asymmetric vortex shedding or other unstable flow structures.

In such cases, a symmetry restriction may prevent the physically relevant behaviour from developing.


10. Periodic Boundary Conditions

Periodic boundary conditions are used when the flow repeats spatially.

Instead of modelling the entire physical system, a smaller representative section can be simulated.

Consider fully developed flow in a long straight pipe.

If the geometry and flow conditions repeat along the pipe, a periodic computational section may be sufficient.

For a pair of corresponding periodic boundaries:

ϕ(x+L)=ϕ(x)\phi(\mathbf{x}+\mathbf{L})=\phi(\mathbf{x})

where L\mathbf{L} is the translation vector connecting the periodic boundaries.

For velocity:

U(x+L)=U(x)\mathbf{U}(\mathbf{x}+\mathbf{L}) = \mathbf{U}(\mathbf{x})

In a pressure-driven periodic pipe-flow calculation, the mean pressure gradient or an equivalent driving force may need to be specified separately.

A periodic pressure field does not automatically provide the pressure drop needed to drive the flow.

Applications

  • Fully developed pipe flow.
  • Repeating heat-exchanger passages.
  • Turbine blade passages.
  • Periodic channel flow.
  • Repeating lattice structures.
  • Representative sections of repeated geometries.

Important distinction

A symmetry boundary mirrors the solution.

A periodic boundary connects one boundary to another through a specified spatial transformation.

They represent different physical assumptions.


11. Boundary Conditions for Heat Transfer

Boundary conditions are equally important in thermal CFD.

The energy equation describes how temperature changes due to convection, conduction and potentially other physical processes.

For a simplified constant-property incompressible fluid:

∂T∂t+U⋅∇T=α∇2T+ST\frac{\partial T}{\partial t} + \mathbf{U}\cdot\nabla T = \alpha\nabla^2T + S_T

where:

  • TT is temperature.
  • U\mathbf{U} is velocity.
  • α\alpha is thermal diffusivity.
  • STS_T represents thermal sources per unit temperature per unit time in this simplified formulation.

The left-hand side represents local and convective temperature transport.

The right-hand side contains thermal diffusion and sources.

Different thermal boundary conditions describe different physical heating and cooling situations.

11.1 Fixed temperature boundary

A fixed-temperature boundary prescribes the wall temperature.

For example:

Tw=350 KT_w=350\ \mathrm{K}

This may represent:

  • A surface maintained by a temperature-control system.
  • A heated plate with nearly constant surface temperature.
  • An idealized thermal reservoir.

In OpenFOAM:

type    fixedValue;
value   uniform 350;

11.2 Fixed heat-flux boundary

Sometimes the heat supplied to a surface is known, rather than its temperature.

The conductive heat flux is:

q′′=−k∂T∂nq''=-k\frac{\partial T}{\partial n}

For a specified heat flux:

−k∂T∂n=qw′′-k\frac{\partial T}{\partial n}=q''_w

For example, an electrical heater may supply:

qw′′=5000 W/m2q''_w=5000\ \mathrm{W/m^2}

This represents a specified thermal input.

The resulting wall temperature is calculated by the simulation.

11.3 Adiabatic wall

An adiabatic wall does not exchange heat with its surroundings.

Therefore:

qw′′=0q''_w=0

For conduction:

∂T∂n=0\frac{\partial T}{\partial n}=0

This is a zero-gradient temperature condition for a stationary, non-conducting boundary in the idealized model.

11.4 Convective heat-transfer boundary

A real surface may exchange heat with surrounding air.

For example, a hot electronic component is cooled by air moving over its surface.

Natural-convection cells in a fluid, showing warm fluid rising and cooler fluid sinking.

Schematic of natural-convection cells. Diagram by Eyrian and Con-struct via Wikimedia Commons, licensed under CC BY-SA 3.0.

Newton’s law of cooling gives:

q′′=h(Ts−T∞)q''=h(T_s-T_\infty)

where:

  • hh is the heat-transfer coefficient.
  • TsT_s is surface temperature.
  • T∞T_\infty is ambient temperature.

The surface temperature is not known in advance.

Instead, it depends on the balance between conduction inside the solid and convection at the external surface.

This is a Robin-type boundary condition.

11.5 Conjugate heat transfer

Conjugate heat transfer (CHT) involves solving heat transfer in both a solid and a fluid.

For example, consider a hot metal plate cooled by flowing air.

The simulation must represent:

  1. Heat conduction inside the solid.
  2. Heat transfer at the solid-fluid interface.
  3. Heat transport by the fluid.
  4. The temperature field in both regions.

At an ideal solid-fluid interface, temperature continuity is:

Ts=TfT_s=T_f

Heat-flux continuity is:

−ks∇Ts⋅n=−kf∇Tf⋅n-k_s\nabla T_s\cdot\mathbf{n} = -k_f\nabla T_f\cdot\mathbf{n}

when the normals and sign conventions are chosen consistently.

Here:

  • ksk_s is solid thermal conductivity.
  • kfk_f is fluid thermal conductivity.
  • TsT_s is solid temperature.
  • TfT_f is fluid temperature.

Physical interpretation:

Heat leaving one side of the interface must enter the other side, assuming there is no interfacial heat generation or contact resistance.

This is a central principle in conjugate heat-transfer modelling.

Applications include:

  • Data-centre cooling.
  • Electronics cooling.
  • Heat exchangers.
  • Battery thermal management.
  • Turbine blade cooling.
  • Engine thermal analysis.

12. Boundary Conditions for Turbulence Models

Turbulence modelling introduces additional transported variables.

For example, the standard kk-ϵ\epsilon model solves equations for:

  • Turbulent kinetic energy, kk.
  • Turbulent dissipation rate, ϵ\epsilon.

The kk-ω\omega family solves equations for:

  • Turbulent kinetic energy, kk.
  • Specific dissipation rate, ω\omega.

These quantities also require appropriate boundary conditions.

12.1 Turbulence intensity

Turbulence intensity is commonly defined as:

I=urms′UrefI=\frac{u'_{\mathrm{rms}}}{U_{\mathrm{ref}}}

where:

  • urms′u'_{\mathrm{rms}} is the root-mean-square velocity fluctuation.
  • UrefU_{\mathrm{ref}} is a representative mean velocity.

For approximately isotropic turbulence:

k=32(UI)2k=\frac{3}{2}(UI)^2

where UU is the representative mean velocity magnitude.

This relationship is often used to estimate inlet turbulent kinetic energy from turbulence intensity.

Example

Suppose the inlet mean velocity is:

U=10 m/sU=10\ \mathrm{m/s}

and the estimated turbulence intensity is:

I=5%=0.05I=5\%=0.05

Then:

k=32(10×0.05)2k=\frac{3}{2}(10\times0.05)^2 k=0.375 m2/s2\boxed{k=0.375\ \mathrm{m^2/s^2}}

This gives an approximate inlet value for turbulent kinetic energy.

It is an estimate based on the isotropic-fluctuation assumption, not a universal relationship for every turbulent flow.

12.2 Turbulence length scale

The turbulence length scale, LtL_t, represents a characteristic size of energy-containing turbulent structures.

A common engineering estimate is:

Lt=Cμ3/4k3/2ϵL_t=C_\mu^{3/4}\frac{k^{3/2}}{\epsilon}

where:

  • CμC_\mu is a model coefficient.
  • kk is turbulent kinetic energy.
  • ϵ\epsilon is turbulent dissipation rate.

Rearranging:

ϵ=Cμ3/4k3/2Lt\epsilon=C_\mu^{3/4}\frac{k^{3/2}}{L_t}

This allows an approximate inlet dissipation rate to be estimated when the turbulence length scale is known.

For internal flows, a length scale related to the hydraulic diameter is sometimes used as an engineering approximation.

However, the appropriate turbulence length scale depends on the physical inlet and the turbulence model.

12.3 Estimating specific dissipation rate

For a common kk-ω\omega formulation, an approximate inlet estimate is:

ω≈kCμ1/4Lt\omega\approx\frac{\sqrt{k}}{C_\mu^{1/4}L_t}

This is a common engineering conversion, but exact relationships depend on the selected model and its coefficient definitions.

Always consult the turbulence-model documentation.

12.4 Wall treatment and turbulence conditions

Turbulence quantities near walls require special attention.

Depending on the turbulence model and wall treatment, the solver may use:

  • Wall functions.
  • Low-Reynolds-number near-wall modelling.
  • Blended wall treatment.
  • Model-specific wall conditions.

The mesh resolution must be consistent with the selected treatment.

For example, a wall-resolved kk-ω\omega SST simulation may require a first-cell-centre location corresponding to approximately:

y+≈1y^+\approx1

A wall-function approach may instead target a different near-wall range, depending on the model and implementation.

The exact requirement must be checked in the relevant solver documentation.

A turbulence inlet condition should also be physically reasonable.

Arbitrarily selecting turbulence intensity and length scale can influence pressure drop, separation, heat transfer and downstream turbulence development.


13. Initial Conditions Versus Boundary Conditions

Initial conditions and boundary conditions are related, but they describe different things.

Initial conditions

Initial conditions specify the starting state of the computational domain.

For example:

U(x,0)=0\mathbf{U}(\mathbf{x},0)=0

This means that the fluid initially has zero velocity everywhere in the domain.

Similarly:

T(x,0)=300 KT(\mathbf{x},0)=300\ \mathrm{K}

means that the initial temperature is uniformly 300 K.

Boundary conditions

Boundary conditions specify how variables behave at the boundaries during the simulation.

For example:

Uin=2 m/s\mathbf{U}_{\mathrm{in}}=2\ \mathrm{m/s}

and:

pout=0p_{\mathrm{out}}=0

These conditions continue to influence the solution as the simulation progresses.

Physical example

Imagine starting a simulation of water flowing through an initially stationary pipe.

At time zero:

  • Velocity inside the pipe is zero.
  • Temperature is initially 300 K.

During the simulation:

  • Water enters through the inlet.
  • Pressure is controlled at the outlet.
  • The pipe wall remains stationary.

The initial conditions describe the starting state.

The boundary conditions describe the continuing interaction with the environment.

A simulation can converge to the wrong physical solution even when the initial conditions are reasonable if the boundary conditions are incorrect.


14. Boundary Conditions and Well-Posedness

A mathematical problem should be sufficiently constrained to obtain a meaningful solution.

This is often discussed through the concept of a well-posed problem.

In a simplified sense, a well-posed problem should have:

  1. A solution.
  2. A unique solution.
  3. A solution that changes continuously when the input data change slightly.

Boundary conditions are essential to achieving this.

14.1 Under-specified problems

Imagine a one-dimensional heat-conduction problem:

d2Tdx2=0\frac{d^2T}{dx^2}=0

Its general solution is:

T(x)=C1x+C2T(x)=C_1x+C_2

There are two unknown constants.

Therefore, two independent boundary constraints are required to determine the solution uniquely.

For example:

T(0)=300 KT(0)=300\ \mathrm{K} T(L)=350 KT(L)=350\ \mathrm{K}

These two conditions determine the temperature distribution.

If only one condition is provided, the solution is not uniquely determined.

14.2 Over-constrained problems

The opposite problem occurs when too much or conflicting information is imposed.

For example, consider a simple incompressible pipe-flow problem.

Suppose the inlet velocity and outlet pressure are prescribed.

If additional independent velocity constraints are imposed at the outlet without a physical reason, the problem may become over-constrained or numerically inconsistent.

The exact compatibility depends on the governing equations and solver formulation.

14.3 Pressure reference in incompressible flow

In many incompressible-flow formulations, pressure is determined through a pressure-Poisson equation or a pressure-correction procedure.

Only pressure differences may affect the velocity solution.

Consequently, the absolute pressure level may be undetermined.

A reference pressure is then needed to remove this mathematical ambiguity.

This is why an outlet pressure of zero gauge pressure is common in many incompressible simulations.

It establishes a reference level; it does not imply that the physical fluid has zero absolute pressure.

14.4 A practical principle

Specify the physical information that is known, rather than imposing arbitrary values simply because the software requests them.

The NAFEMS guidance on CFD convergence identifies inappropriate and conflicting boundary conditions as common causes of convergence problems and incorrect predictions.

Reference:

https://www.nafems.org/publications/guidelines-for-good-convergence-in-cfd/boundary-conditions/


15. Boundary Conditions and the Direction of Information Propagation

Boundary-condition requirements are also influenced by the flow regime.

This is especially important in compressible flow.

For example, the number and type of conditions required at an inlet or outlet depend on whether the flow is subsonic or supersonic.

The Mach number is:

Ma=UaMa=\frac{U}{a}

where:

  • UU is flow speed.
  • aa is the local speed of sound.

Subsonic flow

For subsonic flow:

Ma<1Ma<1

Pressure disturbances can propagate upstream and downstream.

Therefore, downstream pressure information can influence the upstream flow.

Supersonic flow

For supersonic flow:

Ma>1Ma>1

Disturbances cannot propagate upstream through the flow in the same way.

At a supersonic inlet, more flow properties generally need to be specified than at a subsonic inlet.

At a supersonic outlet, imposing a downstream static pressure may be inappropriate because the flow is not able to communicate that information upstream through the supersonic region.

This is why compressible CFD requires special attention to characteristic-based boundary conditions.

The general lesson is that boundary conditions are linked to the mathematical nature of the governing equations and the direction in which information can propagate.


16. Practical Boundary-Condition Selection for Common CFD Problems

The following table provides conceptual starting points. These are not universal prescriptions; the exact settings depend on the solver, flow regime and physical problem.

ApplicationInletOutletWalls
Internal pipe flowVelocity or mass flowStatic pressureNo-slip
External aerodynamicsFreestream velocityPressure/far-fieldNo-slip
Natural convectionSuitable thermal and flow conditionsOpen/far-fieldThermal wall condition
Heat exchangerMass flow or velocity, temperaturePressureThermal/CHT interface
TurbomachineryTotal pressure/temperature or flow specificationSuitable pressure/flow conditionMoving or rotating walls
Periodic channel flowPeriodic driving conditionPeriodicNo-slip
Fully developed pipe sectionPeriodicPeriodicNo-slip

A useful habit is to write down the physical meaning of each boundary before opening the CFD software.

For example:

PatchPhysical descriptionInformation known
InletWater enters the pipeMass flow rate
OutletPipe discharges to a reservoirReservoir pressure
WallStationary pipe wallNo-slip and heat-flux condition

This physical description can then be translated into the mathematical and software conditions.


17. Implementing Boundary Conditions in OpenFOAM

OpenFOAM represents boundary conditions through patch-field dictionaries in the field files.

These files are generally located in the initial time directory, commonly named 0.

For example:

0/
├── U
├── p
├── T
├── k
├── epsilon
└── omega

The mesh boundary names must match the patch names used in these files.

A typical field file contains:

boundaryField
{
    inlet
    {
        type    fixedValue;
        value   uniform (2 0 0);
    }

    outlet
    {
        type    zeroGradient;
    }

    walls
    {
        type    noSlip;
    }
}

The exact boundary-condition names and their availability depend on the OpenFOAM version, solver and field type.

17.1 Velocity field: U

For a simple incompressible pipe-flow case:

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    inlet
    {
        type    fixedValue;
        value   uniform (2 0 0);
    }

    outlet
    {
        type    zeroGradient;
    }

    walls
    {
        type    noSlip;
    }
}

Interpretation:

  • The internal velocity is initially zero.
  • The inlet velocity is fixed at 2 m/s in the x-direction.
  • The outlet velocity is extrapolated using a zero-gradient condition.
  • The stationary walls use the no-slip condition.

The dimensions entry represents the physical dimensions of velocity.

17.2 Pressure field: p

For a typical incompressible pressure-velocity formulation:

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type    zeroGradient;
    }

    outlet
    {
        type    fixedValue;
        value   uniform 0;
    }

    walls
    {
        type    zeroGradient;
    }
}

This is a common conceptual pairing for an incompressible velocity-inlet and pressure-outlet problem.

However, pressure conditions in OpenFOAM are solver-dependent.

For example, some solvers and configurations require fixedFluxPressure or other specialized conditions to ensure consistency between pressure gradients and the prescribed flux.

Do not blindly copy this configuration into every solver.

17.3 Temperature field: T

For a heated pipe with a prescribed wall temperature:

dimensions      [0 0 0 1 0 0 0];

internalField   uniform 300;

boundaryField
{
    inlet
    {
        type    fixedValue;
        value   uniform 300;
    }

    outlet
    {
        type    zeroGradient;
    }

    walls
    {
        type    fixedValue;
        value   uniform 350;
    }
}

Interpretation:

  • Fluid enters at 300 K.
  • Temperature is allowed to develop naturally at the outlet.
  • The pipe wall is maintained at 350 K.

This is a simplified thermal-flow example.

A real CHT simulation would instead solve the temperature field in the fluid and solid regions and couple their interface conditions.

17.4 Turbulence field: k

A simplified example is:

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0.375;

boundaryField
{
    inlet
    {
        type    fixedValue;
        value   uniform 0.375;
    }

    outlet
    {
        type    zeroGradient;
    }

    walls
    {
        type    kqRWallFunction;
        value   uniform 0.375;
    }
}

This example illustrates the structure of a turbulence-field dictionary.

It should not be treated as a universally valid wall setup. The correct wall condition depends on the turbulence model, near-wall treatment and OpenFOAM implementation.

17.5 Understanding fixedValue, zeroGradient and noSlip

OpenFOAM conditionGeneral meaning
fixedValuePrescribes a field value
zeroGradientPrescribes zero normal gradient
fixedGradientPrescribes a normal gradient
noSlipSets velocity equal to stationary wall velocity
slipEnforces an ideal slip condition
symmetryPlaneApplies symmetry constraints
cyclicCouples periodic patches
inletOutletHandles outflow and reverse-flow behaviour using specified inlet values

OpenFOAM has many specialized conditions beyond these basic examples.

The official documentation provides a categorized list and explains the implementation details.

References:


18. Practical Case Study: Turbulent Flow Through a Circular Pipe

Let’s combine the concepts into a practical CFD problem.

Problem description

Consider turbulent water flow through a straight circular pipe.

Assume:

ParameterValue
Pipe diameter0.1 m
Pipe length5 m
Mean inlet velocity2 m/s
Fluid density1000 kg/m³
Dynamic viscosity0.001 Pa·s
Kinematic viscosity1.0×10−6 m2/s1.0\times10^{-6}\ \mathrm{m^2/s}
Inlet temperature300 K
Wall temperature350 K

The purpose is to study the velocity, pressure and temperature distributions.

Step 1: Calculate the Reynolds number

The Reynolds number is:

Re=ρUDμRe=\frac{\rho U D}{\mu}

Substituting:

Re=1000(2)(0.1)0.001Re=\frac{1000(2)(0.1)}{0.001} Re=200000\boxed{Re=200000}

This indicates turbulent flow in a conventional straight-pipe context.

Step 2: Define the physical boundaries

We identify three primary boundaries:

  1. Inlet.
  2. Outlet.
  3. Pipe wall.

Step 3: Select boundary conditions

VariableInletOutletWall
VelocityPrescribed inlet profileSuitable outflow conditionNo-slip
PressureConsistent with velocity/flux specificationReference static pressureSuitable wall pressure condition
Temperature300 KSuitable outflow condition350 K
TurbulenceEstimated from inlet turbulence dataSuitable outflow conditionModel-specific wall treatment

Step 4: Estimate the inlet turbulence kinetic energy

Assume an inlet turbulence intensity of 5%.

k=32(UI)2k=\frac{3}{2}(UI)^2 k=32(2×0.05)2k=\frac{3}{2}(2\times0.05)^2 k=0.015 m2/s2\boxed{k=0.015\ \mathrm{m^2/s^2}}

This gives an approximate inlet turbulence kinetic energy.

The turbulence length scale and corresponding dissipation variables should be estimated using a physically justified model-specific approach.

Step 5: Consider the outlet position

The outlet should be placed far enough downstream that the velocity and pressure fields near the region of interest are not artificially influenced by the outlet boundary.

A domain-length sensitivity study can be used to check whether the predicted pressure drop and velocity profile change when the outlet is moved farther away.

Step 6: Verify the mass flow rate

The mass flow rate at the inlet is:

m˙=ρAU\dot{m}=\rho AU

For the pipe:

A=π(0.1)24A=\frac{\pi(0.1)^2}{4}

Therefore:

m˙=1000(0.007854)(2)\dot{m}=1000(0.007854)(2) m˙≈15.71 kg/s\boxed{\dot{m}\approx15.71\ \mathrm{kg/s}}

The mass flow entering and leaving the domain should be consistent for a steady incompressible calculation.

For a transient calculation, temporary mass accumulation within the domain must also be considered.

Step 7: Check physical and numerical consistency

Before accepting the simulation, check:

  • Does the inlet velocity correspond to the intended mass flow rate?
  • Are the pressure and velocity boundary conditions compatible with the solver?
  • Is the outlet sufficiently far from the region of interest?
  • Are the turbulence inputs physically justified?
  • Is the near-wall mesh compatible with the wall treatment?
  • Is the temperature boundary condition representative of the physical heating arrangement?
  • Is mass conservation satisfied?

The simulation should not be considered credible merely because the residuals have decreased.


19. Common Boundary-Condition Mistakes in CFD

Boundary-condition errors can produce incorrect results even when the numerical solver converges.

The following mistakes are particularly common.

Mistake 1: Using a uniform inlet profile for every problem

A uniform inlet may be suitable for a simple external-flow case, but it may not represent a fully developed internal flow.

An unrealistic inlet profile can create artificial flow development and influence the region being investigated.

Better approach: Use measured, calculated or appropriately developed inlet profiles when the upstream flow structure matters.

Mistake 2: Placing the outlet too close to the region of interest

A nearby outlet may interfere with recirculation, vortex shedding, pressure recovery or other flow structures.

Better approach: Extend the domain downstream and perform an outlet-location sensitivity study.

Mistake 3: Ignoring reverse flow

If flow enters through a boundary that was intended only for outflow, incoming properties may be undefined or unrealistic.

Better approach: Investigate why reverse flow occurs. Move the boundary if appropriate, or use a suitable inflow/outflow condition with physically justified incoming values.

Mistake 4: Assigning arbitrary turbulence quantities

Turbulence intensity and length scale strongly influence the inlet turbulence fields.

Better approach: Use experimental information, upstream calculations, physical estimates or sensitivity studies.

Mistake 5: Confusing zero pressure with zero absolute pressure

A zero pressure condition in an incompressible solver often represents a gauge or reference pressure.

Better approach: Understand the pressure variable and its reference convention.

Mistake 6: Using slip walls for ordinary viscous solid surfaces

A slip condition removes the conventional wall shear constraint.

This can significantly change drag and pressure-loss predictions.

Better approach: Use no-slip walls when modelling ordinary viscous fluid-solid interfaces unless the physics supports another assumption.

Mistake 7: Using symmetry without verifying physical symmetry

A symmetry condition prevents certain asymmetric behaviours from developing.

Better approach: Confirm that the geometry, forcing and expected flow structures support symmetry.

Mistake 8: Applying a fixed temperature when the physical condition is a heat flux

A prescribed wall temperature and prescribed wall heat flux represent different physical problems.

Better approach: Use the available experimental or engineering information to select the thermal condition.

Mistake 9: Ignoring dimensional consistency

Boundary values must have the correct physical dimensions.

For example:

  • Velocity: m/s\mathrm{m/s}.
  • Pressure: Pa\mathrm{Pa}, or the solver’s specified pressure convention.
  • Temperature: K\mathrm{K}.
  • Heat flux: W/m2\mathrm{W/m^2}.
  • Turbulent kinetic energy: m2/s2\mathrm{m^2/s^2}.

Better approach: Check the dimensions of every prescribed field and the conventions of the selected solver.

Mistake 10: Treating convergence as proof of correctness

A numerically converged simulation can still represent the wrong physical problem.

Better approach: Check conservation, physical plausibility, boundary sensitivity and validation data.


20. How to Develop a Systematic Boundary-Condition Strategy

A good CFD workflow should begin with physical reasoning, not software menus.

The following process is useful for most engineering simulations.

Step 1: Understand the physical system

Ask:

  • What is entering the domain?
  • What is leaving the domain?
  • What solid surfaces are present?
  • Is the system open or closed?
  • Is the flow steady or transient?
  • Is heat transfer important?
  • Are chemical species or multiple phases involved?

Step 2: Identify the available information

Determine which quantities are known from:

  • Experimental measurements.
  • Design specifications.
  • Operating conditions.
  • Analytical solutions.
  • Upstream simulations.
  • Manufacturer data.

Do not prescribe values that have no physical basis without clearly identifying them as modelling assumptions.

Step 3: Identify the mathematical requirements

For every solved variable, determine whether the physical information is best represented through:

  • A prescribed value.
  • A prescribed gradient or flux.
  • A mixed condition.
  • A coupled condition.
  • A specialized inflow/outflow treatment.

Step 4: Check compatibility with the governing equations

Consider:

  • Mass conservation.
  • Momentum conservation.
  • Energy conservation.
  • Compressibility.
  • Pressure-velocity coupling.
  • Turbulence-model requirements.

Step 5: Select the numerical implementation

Only after the physical and mathematical conditions are understood should you select the corresponding software boundary conditions.

Step 6: Perform sensitivity studies

Change uncertain inputs and boundary locations to determine whether the main results are sensitive to them.

For example:

  • Increase the downstream domain length.
  • Change the assumed inlet turbulence intensity.
  • Compare uniform and developed inlet profiles.
  • Compare plausible outlet treatments.
  • Investigate the influence of wall roughness.

Step 7: Verify the final solution

Check:

  • Mass conservation.
  • Momentum and energy balances.
  • Pressure distribution.
  • Velocity profiles.
  • Wall shear stress.
  • Heat transfer.
  • Sensitivity to boundary assumptions.

A well-defined boundary-condition strategy makes the entire CFD simulation more physically meaningful.


The following resources provide useful explanations of mathematical boundary conditions, practical CFD implementation and engineering best practices.

1. OpenFOAM Official Documentation – Boundary Conditions

https://doc.openfoam.com/2306/tools/processing/boundary-conditions/

A useful reference for understanding how OpenFOAM organizes boundary conditions and applies them to field patches.

2. OpenFOAM User Guide – Boundary Conditions

https://www.openfoam.com/documentation/user-guide/5-models-and-physical-properties/5.1-boundary-conditions

Explains common boundary conditions, including fixed-value, gradient, symmetry, inlet, outlet and wall treatments.

3. OpenFOAM Standard Boundary Conditions

https://www.openfoam.com/documentation/user-guide/a-reference/a.4-standard-boundary-conditions

A useful technical reference when translating physical requirements into OpenFOAM dictionary settings.

4. NAFEMS – Boundary Conditions

https://www.nafems.org/publications/guidelines-for-good-convergence-in-cfd/boundary-conditions/

Discusses the influence of boundary-condition selection on convergence and physical accuracy.

5. CFD University – How to Implement Boundary Conditions in CFD

https://cfd.university/learn/10-key-concepts-everyone-must-understand-in-cfd/how-to-implement-boundary-conditions-in-cfd/

Provides an educational explanation of mathematical boundary-condition types and their practical implementation in CFD.

6. OECD Nuclear Energy Agency – CFD-Grade Experiments for Nuclear Reactor Thermal Hydraulics

https://www.oecd-nea.org/nsd/docs/2020/csni-r2020-3.pdf

A more advanced reference discussing experimental requirements, boundary-condition uncertainties and outlet treatment in thermal-hydraulic CFD.


22. Suggested Practical Learning Exercises

The best way to understand boundary conditions is to change them in a controlled numerical experiment and observe how the solution responds.

Here are five exercises suitable for students and new CFD researchers.

Exercise 1: Uniform versus developed inlet profile

Simulate laminar flow through a circular pipe.

Compare:

  • Uniform velocity at the inlet.
  • Fully developed parabolic velocity at the inlet.

Observe:

  • Velocity development.
  • Pressure drop.
  • Wall shear stress.
  • Length required for the flow to become fully developed.

Learning objective: Understand how inlet conditions influence the development of an internal flow.

Exercise 2: Outlet location sensitivity

Simulate flow past a circular cylinder.

Create several computational domains with different downstream lengths.

Compare:

  • Drag coefficient.
  • Lift coefficient.
  • Vortex shedding frequency.
  • Wake velocity distribution.

Learning objective: Understand how an artificial outlet can influence the predicted physical flow.

Exercise 3: No-slip versus slip wall

Simulate flow in a simple channel.

Compare a no-slip wall with a slip wall.

Observe:

  • Velocity distribution.
  • Wall shear stress.
  • Pressure drop.

Learning objective: Understand the physical significance of wall momentum transfer.

Exercise 4: Fixed temperature versus fixed heat flux

Simulate a heated channel.

Perform two separate calculations:

  1. Prescribe a fixed wall temperature.
  2. Prescribe a fixed wall heat flux.

Compare:

  • Wall temperature.
  • Fluid temperature.
  • Total heat transferred.
  • Temperature distribution along the channel.

Learning objective: Understand the difference between prescribing a thermal state and prescribing a thermal input.

Exercise 5: Turbulence inlet sensitivity

Simulate turbulent pipe flow using different inlet turbulence intensities.

For example:

  • 1%.
  • 3%.
  • 5%.
  • 10%.

Keep the other modelling assumptions consistent.

Compare:

  • Turbulent kinetic energy.
  • Velocity development.
  • Pressure drop.
  • Wall shear stress.

Learning objective: Understand why turbulence boundary conditions are an important source of modelling uncertainty.


23. Final Thoughts

Boundary conditions are among the most fundamental aspects of Computational Fluid Dynamics.

They connect the mathematical equations inside a computational domain to the physical world outside it.

A velocity inlet represents incoming momentum. A pressure outlet represents the pressure environment. A no-slip wall represents momentum exchange between fluid and solid. A fixed-temperature or heat-flux condition represents a particular thermal interaction.

These are not simply settings selected from a software interface. Each one represents a physical assumption that can influence the entire numerical solution.

One of the most important habits for a CFD researcher is to ask three questions before defining any boundary condition:

  1. What is happening physically at this boundary?
  2. What mathematical information does the governing equation require here?
  3. How does the selected numerical condition represent that physical information?

When these three questions are answered carefully, CFD simulations become more than numerical calculations. They become meaningful representations of real engineering systems.

Remember: A converged simulation is not necessarily a correct simulation. The quality of the physical assumptions, including the boundary conditions, determines how meaningful the results can be.


Article prepared as a standalone educational resource for students, early-career researchers and engineers learning Computational Fluid Dynamics.