# Velocity boundary conditions¶

## 2D empty¶

In 2D cases, this boundary condition should be assigned to boundaries which are normal to the reduced coordinate. It applies an empty condition on such boundaries to indicate a two-dimensional problem.

## Advective¶

This boundary condition is only applicable in **transient** simulations and provides an
advective outflow condition at the boundary.

## Cyclic¶

This boundary condition provides cyclic conditions between two boundaries. For example, it could be used in systems with transitional periodicity.

## Fixed gradient¶

This boundary condition applies a prescribed gradient value at the boundary. Depending on the variable, it requires a scalar or vector value to be provided as input. The value at the boundary is then calculated using the fixed gradient and internal field values.

## Fixed value boundary condition type¶

The *fixed value* boundary condition type prescribes the value of a field on a certain boundary of the domain.
This value could be constant or dependent on time and/or space coordinates.
Typical use cases are:

- Inlets and walls (of pipes etc.)
The flow velocity is normally set to a known value. At walls, the velocity is usually set to 0. Also, turbulent quantities such as turbulent kinetic energy and dissipation rate can be set to fixed values which have to be estimated first.

- Outlets (of pipes etc.)
The pressure is often set to a known value on outlets. In incompressible simulations, it is common to use a value of 0 for the Gauge pressure.

- Thermal walls and insulation
Temperature or heat transfer rate are often set to known values.

## Fixed value boundary condition for OPENFOAM®¶

The depicted boundary condition is a typical example for a wall which the fluid adheres to due to viscous effects. When converted to an OPENFOAM® input file, the relevant snippet will look similar to the following:

```
wall
{
type fixedValue;
value uniform (0 0 0);
}
```

Mathematically, the boundary condition can be formulated as

where \(\Gamma\) represents the boundary. Additionally, the *fixed value* boundary condition allows to define the known value in form of a function:

Alternatively, it is possible to set boundary values by uploading a CSV file. For this purpose, the user should choose *File Upload* as the *Input Type*.
Correct dependencies should be chosen. In this case, the uploaded file contains values that are dependent on X, Y, and Z.

A secondary menu will appear to facilitate the uploading process:

It is very important to choose the correct set of variables. In OPENFOAM® cases, three type of dependencies are included:

- time only,
- X, Y, and Z,
- all four (time, X, Y, and Z)

The *Column index of the value* identifies the column number of value in the CSV file. For vector quantities, it is assumed that this value points to the first
column (the rest of the columns are placed exactly after this column).

## Flow rate inlet velocity¶

This boundary condition calculates velocity at the boundary based on the flow rate provided as input. Flow direction is assumed normal to the boundary. A positive flow rate indicates flow entering the domain.

It is required to prescribe mass or volumetric flow rate as input. If case mass flow rate is provided, the user should additionally specify fluid density at the boundary. It both cases, it is possible to model time-dependent flow rate by uploading a CSV file that contains time and corresponding flow rate.

Important

It is recommended

notto use this boundary condition with Potential flow analysis type.

## Freestream¶

This boundary condition has two modes: when the flow at the boundary is leaving the domain, it applies a zero gradient condition. Otherwise, a fixed velocity is assigned. The user should provide this value as input.

## Inlet-outlet¶

Inlet-outlet is a generic outflow condition based on the flux: if flux points out of domain, Inlet-outlet applies a zero gradient condition at the boundary. Otherwise, i.e. flux into of domain, it applies the value prescribed as use input. Depending on the variable, this value could be scalar or vector.

## Interstitial inlet velocity¶

This boundary condition provides an inlet velocity condition by calculating the interstitial velocity at the boundary. Inlet velocity is corrected by dividing the user-specified velocity by the local phase-fraction. This boundary condition is especially useful in cases such as DPM analysis type where one phase, continuum, flows through a secondary phase, particles.

## Moving wall velocity¶

This boundary condition should be used to prescribe velocity condition at moving walls, e.g. in AMI cases. In contrast to the fixed value boundary condition, velocity value is defined relative to the boundary it is applied to.

## Outlet-inlet¶

Outlet-inlet is a generic inflow condition based on the flux: if flux points out of domain, it applies the value prescribed as user input at the boundary. Otherwise, i.e. flux into of domain, it applies a zero gradient condition. Depending on the variable, this value could be scalar or vector.

## Pressure-inlet velocity¶

This boundary condition could be used only at boundaries where pressure is known. It calculates inlet velocity value from the flux at the boundary.

## Pressure-inlet-outlet velocity¶

This boundary condition is based on flux sign and could be used only at boundaries where pressure is known. It has two working modes: if flux points out of domain, it applies a zero gradient condition to velocity. Otherwise, i.e. flux into of domain, inlet velocity value is obtained from internal cells.

## Rotating wall velocity¶

This boundary condition provides velocity condition on rotating boundaries. The user should specify the origin, axis of rotation, and angular velocity of the rotation. The latter could be specified as a constant, or by uploading a CSV file, as a time-dependent variable.

## Set gradient to zero¶

This boundary condition applies a zero gradient condition at the boundary using the internal cells. It is a special case of the fixed gradient boundary condition.

Typical use cases include, velocity outlets (and other transport quantities, such as turbulent kinetic energy and dissipation rate), walls (pressure gradient is often set to 0), and adiabatic walls (zero gradient for temperature).

## Slip¶

This boundary condition provides is slip velocity condition.

## Symmetry¶

This boundary condition is used to specify domain symmetry. It is used to reduce computational effort by replacing symmetric redundancies in the interior.

## Symmetry plane¶

This boundary condition is a special case of Symmetry boundary condition in that it is could be assigned to planes only.

## Wedge¶

This boundary condition operates in the same way as the Cyclic boundary condition. The difference is that is is applied to two-dimensional geometries.

## Disclaimer¶

This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. OPENFOAM® is a registered trade mark of OpenCFD Limited, producer and distributor of the OpenFOAM software.