# Variable Height Inlet

Source: https://help.sim-flow.com/boundary-conditions/variable-height-inlet
Last updated: 2026-10-01

## Description

The Variable Height Inlet boundary condition is designed to specify an inlet velocity based on a prescribed volumetric flow rate that is adjusted for changes in the inlet patch area, proportionally to the changes of phase fraction \(\alpha\).

This boundary condition is used in multiphase simulations where the inlet area may change over time or as a result of a change in fluid level, for example, due to the oscillation of water level. However, the boundary condition keeps the mass flow rate constant.

## Understanding Variable Height Inlet

The calculation of the inlet velocity is based on the following formula:

\[U_{avg} = - \frac{F}{\sum (\alpha \cdot S)}\]

where:

- \(F\) – volumetric flow rate \([\frac{m^{3}}{s}]\)
- \(S\) – area of the cell
- \(\alpha\) – phase fraction

Therefore, the average velocity is simply the volumetric flow rate divided by the cross-sectional area. The area of all cells at the boundary is taken into account. The minus sign results from the fact that we want the flow to be into the domain, and the face normal vectors are pointed out of the domain.

The expression above is a scalar value. Therefore, it must be converted to a vector field. To do so, it is enough just to multiply it by the normal vector \(\vec n\).

\(\vec U = \frac{F}{\sum (\alpha \cdot S)} \cdot \vec n\)

## Application & Physical Interpretation

The Variable Height Inlet is used in CFD simulations to specify a time-dependent flow rate at an inlet, where the flow rate changes with the fluid’s height or level. This boundary condition is particularly useful in simulations involving free surface flows or open channel flows, where the fluid surface elevation can vary over time due to external forces or internal dynamics. Physically, this represents scenarios like filling or emptying tanks, channels, or basins where the inflow depends on the current water level.

### Variable Height Inlet in Multiphase Flow applications

**Example applications**: weir overflow, river flow, open channel flows

These types of simulations can be solved using the [interFoam (solver)](https://help.sim-flow.com/solvers/inter-foam). The Variable Height Inlet can be applied to the domain inlet to represent a volumetric flow, which will adjust according to the water level.

Example Boundary Conditions set for Multiphase Flow applications

| Physics | Modified Pressure \(p_{\rho g h}\) | Velocity | Phase fraction \(\alpha_{water}\) |
| --- | --- | --- | --- |
| Inlet | Zero Gradient | **Variable Height Inlet** | Variable Height |
| Outlet | Zero Gradient | Zero Gradient | Zero Gradient |

## Variable Height Inlet in SimFlow

The boundary condition can be applied for the velocity field. To define the boundary condition, the proper option must be selected from the drop-down menu - [Figure 1](https://help.sim-flow.com/boundary-conditions/variable-height-inlet#fig-sketch-01).

![Variable Height Inlet Boundary Condition in SimFlow](https://help.sim-flow.com/boundary-conditions/images/variable-height-inlet/variable-height-inlet-bc-01.png)

Figure 1. Variable Height Inlet Boundary Condition in SimFlow

The user needs to define the volumetric flow rate \([m^{3}/s]\). The volumetric flow rate can be defined as constant or time-dependent in the form of a table.

## Variable Height Inlet - Alternatives

In this section, we propose boundary conditions that are alternative to Variable Height Inlet. While they may fulfill similar purposes, they might be better suited for a specific application and provide a better approximation of physical world conditions.

| Boundary Condition | Description |
| --- | --- |
| [Fixed Value](https://help.sim-flow.com/boundary-conditions/fixed-value) | fixed value on the patch |
| [Flow Rate Inlet Velocity](https://help.sim-flow.com/boundary-conditions/flow-rate-inlet-velocity) | adjusts velocity to match a specified mass or volumetric flow rate |
