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 Inlet setup

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

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.

Temporal Distribution – piecewise linear

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$

Temporal Distribution – polynomial

Time dependent boundary condition tutorial

Spatial Distribution

In the Velocity Inlet condition, you can select a CSV file 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.

The csv file should contain the values of (x, y, z, value) separated by comma(,). In the Velocity Inlet condition, the velocity would be in the following format: (x, y, z, Ux, Uy, Uz). The data must be in a single plane and not on a single straight line. If you have a distribution in only one direction, such as in a two-dimensional problem, at least one point must be outside the straight line.

0.0, 0.0, 0.0, 0.1, 0.2, 0.0
0.0, 0.7, 0.0, 0.1, 0.3, 0.0
0.0, 1.2, 0.0, 0.1, 0.4, 0.0
...

Flow Rate Inlet

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

Flow Rate Inlet setup

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.

Pressure Inlet setup

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.

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

ABL Inlet setup

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) : minimum z-coordinate of ground(height from the ground is calculated as z-d)

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

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.

Free Stream

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.

Open Channel Inlet setup

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

Farfield Riemann setup

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.

Subsonic Inlet setup

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.

Supersonic Inflow setup

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