Inlet Boundary Conditions

The types of inlet boundary conditions include

Velocity Inlet

Velocity Inlet condition is condition that give velocity, turbulence, temperature, chemical species mass fraction values, etc. at the inlet of the flow.

Velocity can be given by the x, y, and z components(Component) or by the normal velocity boundary (Magnitude, Normal to Boundary).

When specifying velocity components, you can use either the Cartesian or Local Cylindrical coordinate systems. For the Cartesian system, enter Ux, Uy, and Uz. For the Local Cylindrical system, enter the origin of the axis, the direction of the axis, the axial velocity, the radial velocity, and the angular velocity.

Turbulence can be represented by the value of the turbulence field (k, epsilon, omega, nuTilda) and the turbulence intensity and viscosity ratio (intensity/viscosity ratio). The Spalart-Allmaras model only supports the method of giving the Modified Turbulent Viscosity $\tilde{\nu}$.

The temperature is given a constant value.

The species mass fraction should be given so that the sum of all chemical species is 1.

The openfoam boundary conditions used by each field are as follows

  • Velocity : fixedValue for Component, surfaceNoramlVelocity for Magnitude
  • Pressure : zeroGradient
  • Temperature : fixedValue
  • Turbulent kinetic energy(k) : turbulentIntensityInletOutletTKE
  • Turbulent dissipation rate($\epsilon$), specific dissipation rate($\omega$) : viscosityRatioInletOutletTDR
  • Modified kinematic viscosity($\tilde{\nu}$) : fixedValue
  • Species : fixedValue

Boundary profile

In the Velocity Inlet condition, the velocity and temperature can be specified as a temporal variation or a spatial distribution.

Temporal Distribution

If the velocity distribution (Profile Type) is selected as ‘Temporal Distribution’ for the Velocity Inelt condition, it can be specified using a piecewise linear function in the window of firgure below.

If the temperature distribution under the Velocity Inlet condition is selected as ‘Temporal Distribution’, it can be specified as a piecewise linear function and a polynomial. The polynomial specifies the coefficients $a_n$ of the expression in the window of figure below.


$S = a_0 \cdot t^0 + a_1 \cdot t^1 + a_2 \cdot t^2 + … + a_n \cdot t^n$

Time dependent boundary condition tutorial

Spatial Distribution

In the Velocity Inlet condition, you can set data table when you select the distribution of velocity or temperature as a spatial distribution. If Velocity specification method is ‘Magnitude, Normal to Boundary’, ‘Spatial Distribution’ is not applicable for velocity.

Enter the table data in rows labeled x, y, z, Ux, Uy, and Uz. The coordinates do not need to match those of the boundary grid points. The data must lie in a single plane and must not lie on a single straight line. Even if the data is distributed in only one direction, as in a two-dimensional problem, at least one point must lie outside the straight line.

Flow Rate Inlet

Flow Rate Inlet is condition that give flow rate, turbulence, and temperature values at the inlet of the flow.

The flow rate can be given a mass flow rate and a volume flow rate, and the turbulence and temperature are the same as for the ‘Velocity Inlet’ condition.

The openfoam boundary condition used by the velocity(U) is flowRateIneltVelocity, with the same pressure, turbulence, and temperature as the ‘Velocity Inlet’ condition.

Pressure Inlet

Pressure Inlet is a condition that gives the total pressure, turbulence, and temperature values at the inlet of the flow.

Total pressure can be given as a constant, and the turbulence and temperature are the same as for the ‘Velocity Inlet’ condition.

The boundary conditions for openfoam use totalPressure for the pressure and pressureInletOutletVelocity for the velocity.

Intake Fan

Use fan conditions at the inlet of the flow. Input the total pressure and fan performance curve.

Clicking the Show/Edit button on the FAN Curve displays a spreadsheet where you can input flow rate and pressure. You can enter values directly or copy and paste columns from spreadsheet programs like Excel. Once the data is entered, the performance curve graph is plotted.

ABL Inlet

ABL Inlet is the condition that gives the velocity and turbulence distribution of the atmospheric boundary layer at the inlet of the flow.

Atmospheric Boundary Layer tutorial

The inputs are as follows

  • Flow Direction
  • Ground-Normal Direction
  • Reference Height, $z_{ref}$
  • Reference Flow Speed, $U_{ref}$) : velocity at reference height
  • Surface Roughness Length, $z_0$
  • Minimum z-coordinate, d : Ground-normal displacement height(height from the ground is calculated as z-d)
  • Pasquill Stability

The velocity and turbulence distributions use the following equations


$u = \frac{u^*}{\kappa} ln \left(\frac{z – d + z_0}{z_0} \right)$


$k = \frac{(u^* )^2}{\sqrt{C_\mu}} \sqrt{C_1 ln \left( \frac{z – d + z_0}{z_0} \right) + C_2}$


$\epsilon = \frac{(u^* )^3}{\kappa (z – d + z_0)} \sqrt{C_1 ln \left( \frac{z – d + z_0}{z_0} \right) + C_2}$


$\omega = \frac{u^*}{\kappa \sqrt{C_\mu}} \frac{1}{z – d + z_0}$


$u^* = \frac{u_{ref} \kappa} {ln \left( \frac{z_{ref} + z_0}{z_0} \right)}$

  • $z$ : z-coordinate
  • $d$ : minimum z-coordinate of ground
  • $\kappa$ : Von Karman’s constant, 0.41
  • $C_\mu$ : constant, 0.09
  • $C_1$ : constant, 0
  • $C_2$ : constant, 1

The boundary conditions in openfoam used by each field are as follows

  • Velocity : atmBoundaryLayerInletVelocity
  • Tressure : zeroGradient
  • Turbulent kinetic energy(k) : atmBoundaryLayerInletK
  • Turbulent dissipation rate($\epsilon$), specific dissipation rate($\omega$) : atmBoundaryLayerInletEpsilon, atmBoundaryLayerInletOmega
  • Species : fixedValue

Pasquill Stability

The Pasquill class, which divides atmospheric stability into six levels, is used.

  • A : Extremely Unstable
  • B : Moderately Unstable
  • C : Slightly Unstable
  • D : Neutral
  • E : Slightly Stable
  • F : Moderately Stable

Enter the latitude of the region and the surface heat flux caused by solar radiation. Additionally, enter the reference values for density, temperature, and specific heat.

The boundary conditions in openfoam

Without Pasquill stability

  • U : atmBoundaryLayerInletVelocity
  • pressure : zeroGradient
  • k : atmBoundaryLayerInletK
  • epsilon, omega : atmBoundaryLayerInletEpsilon, atmBoundaryLayerInletOmega
  • species : fixedValue

With Pasquill stability

  • U : pasquillAtmBoundaryLayerInletVelocity
  • pressure : zeroGradient
  • k : pasquillAtmBoundaryLayerInletK
  • epsilon, omega : pasquillAtmBoundaryLayerInletEpsilon, pasquillAtmBoundaryLayerInle-
    tOmega
  • species : fixedValue

Free Stream

Free Stream is a condition where the flow has a constant velocity entering the domain and a zero velocity gradient leaving the domain. It is often used as a farfield boundary condition for incompressible external flows.

There are two ways to determine the direction of the flow: Direct and “AOA and AOS”. For Direct, enter the direction vector. For “AOA and AOS”, enter the direction of drag and lift when the AOA and AOS are zero, as well as the value of AOA and AOS.

Speed and pressure is a constant, and turbulence and temperature are the same as for the ‘Velocity Inlet’ condition.

The openfoam boundary conditions used by each field are as follows

  • Velocity : freestreamVelocity
  • Pressure : freestreamPressure
  • Temperature : freestream
  • Turbulence : freestream
  • Species : fixedValue

Open Channel Inlet

Open Channel Inlet is a condition where flow rate is constant and the water surface height can change accordingly when calculating the free surface.

Enter the volume flow rate as a constant, and give the turbulence the same as the ‘Velocity Inlet’ condition.

The openfoam boundary conditions used by each field are as follows

  • Velocity : variableHeightFlowRateInletVelocity
  • Pressure : zeroGradient
  • Volume fraction : variableHeightFlowRate
  • Turbulent kinetic energy(k) : turbulentIntensityInletOutletTKE
  • Turbulent dissipation rate($\epsilon$), specific dissipation rate($\omega$) : viscosityRatioInletOutletTDR
  • Modified kinematic viscosity($\tilde{\nu}$) : fixedValue

Far-field Riemann

Riemann boundary condition used for farfield of compressible flow.

Far-field Riemann tutorial : RAE2822 airfoil

Enter the direction vector of the flow, Mach number, static pressure and static temperature.

There are two ways to determine the direction of the flow: Direct and “AOA and AOS”. For Direct, enter the direction vector. For “AOA and AOS”, enter the direction of drag and lift when the AOA and AOS are zero, as well as the value of AOA and AOS.

The openfoam boundary conditions for velocity, pressure, and temperature are farfieldRiemann and the turbulence is the same as the ‘Velocity Inlet’ condition.

Subsonic Inlet

Subsonic Inlet is an inlet subsonic boundary condition for internal flows such as turbo-machinery in compressible flows. Enter the flow direction vector, total pressure, and total temperature.

The openfoam boundary condition for velocity, pressure, and temperature is subsonicInflow and the turbulence is the same as the ‘Velocity Inlet’ condition.

Supersonic Inflow

Supersonic Inflow is a boundary condition used when the inlet of the flow is supersonic. Enter a velocity vector, static pressure, and static temperature.

The openfoam boundary conditions for velocity, pressure, and temperature are fixedValue and the turbulence is the same as the ‘Velocity Inlet’ condition.