# Fluid Boundary Conditions¶

## Basic Concepts¶

Boundary conditions are openings in the outer geometry through which fluid, particles, species, and energy can enter or exit a system.

Boundary conditions may be defined in the following ways on the Inlet Setup Form:

On Bounding Box - Pick a point on the domain boundary

On Surfaces - Select existing surfaces

Constructed by Edges - Select edges to construct a new surface

**On Bounding Box**

On the outer domain boundary where a pipe or hole connects to the outer extents box

In this mode, users should design their models such that their geometry inlets and outlets are hollow and extend to the bounding box of their geometry. For example, a cylindrical tank must have hollow pipes defined in the CAD geometry going from the cylindrical tank wall to the outer flat bounding box wall. An example is shown in the image below.

Important

Users should allocate at least 10 lattice points to inlets and outlets.

A disagreement between the total mass flow into a system and total mass flow out of a system (e.g. a violation of mass conservation) are often due to excessively large Courant numbers.

**On Surfaces**

On surfaces inside the domain. For example if a pipe comes into the geometry, you may select the capped surface of that pipe to use as a boundary condition.

**Constructed by edges**

With this method, you may construct surfaces by selecting any number of connected edges. For example if a pipe comes into the geometry which does not have a solid cap, you may select the edges of the pipe to define the boundary condition geometry.

## Velocity¶

Used for inlets with specified velocities (Dirichlet velocity boundary, unconstrained pressure at inlet)

- Velocity Unit Vector
Inlet velocity vector. A muparser expression that may be a function of space and time. Variables x,y,z,t.

- Velocity Magnitude
Inlet velocity magnitude [m/s]. A muparser expression that may be a function of space and time. Variables x,y,z,t. For exampleThese expressions follow conventional (ternary) conditional operator logic. For example, to step change the velocity from 0 m/s to to 2 m/s after 0.5 s of simulation, define:

t < 0.5 ? 0 : 2

Additional examples of specifying time-varying inlet velocities are presented in - User Defined Expression Syntax

The velocity at an inlet our outlet is defined relative to the global reference frame.

## Pressure¶

Used for inlets with specified pressures (Dirichlet pressure boundary, unconstrained velocity at inlet)

- Pressure
Inlet/Outlet pressure [Pa] . A muparser expression that may be a function of time. Variables: t.

These expressions follow conventional (ternary) conditional operator logic. For example, to step change the pressure from 100,000 Pa to to 110,000 Pa after 0.5 s of simulation, define:

t < 0.5?100000:110000

## Outflow¶

Used for to model outlets (Neumann pressure boundary, unconstrained velocity)

## Recirculation Inlet¶

Recirculates fluid, particles, and scalar field from a linked outlet into the inlet following a user-defined time delay

- Velocity Unit Vector
Inlet velocity vector. A muparser expression that may be a function of space and time. Variables x,y,z,t.

- Recirc Link
Name of outlet boundary condition that connects to this recirculation inlet. Note that the opening feeding the recirculation loop should be defined as constant velocity boundary with a flow velocity pointing out of the system.

- Recirc Link Delay
Number of seconds of transit time the recirculation loop represents

## Poiseuille¶

An inlet boundary condition that defines a Poiseuille velocity profile across the inlet geometry.

- Velocity Unit Vector
Inlet velocity vector. A muparser expression that may be a function of space and time. Variables x,y,z,t.

- Velocity Magnitude
Inlet velocity magnitude [m/s]. A muparser expression that may be a function of space and time. Variables x,y,z,t.

## Volume Flow Rate¶

A specified velocity type boundary condition that defines a volume flow rate.

- Velocity Unit Vector
- Volume Flow Rate
Volume flow rate with cubic meters per second units. May be an expression as a function of time. Variables: t

## Mass Flow Rate¶

A specified velocity type boundary condition that defines a mass flow rate.

- Velocity Unit Vector
- Mass Flow Rate
Mass flow rate with kg/s units. May be an expression as a function of time. Variables: t

## Inlet Single Pulse¶

A boundary condition that pulses exactly one time for the specified duration. This is a basically a specifed velocity boundary condition.

- Velocity Unit Vector
- Pulse Velocity
Velocity pulse with m/s units.

- Pulse Time
The time at which to start the pulse

- Pulse Duration
Defines the pulse duration

## Inlet Multi Pulse¶

A boundary condition that pulses repeatedly throughout the simulation. Input variables are described in the below diagram.

- Velocity Unit Vector

## Boundary Condition Options¶

- Geometry Mode (READ ONLY)
Indicates if a boundary condition is considered “On Lattice” or “Off Lattice”.

On Lattice: The boundary condition is defined by specifying a seed point. Inlet orientation must be parallel to the world X, Y, or Z axis.

Off Lattice: May be defined using arbitrary geometry and orientation.

- Fill Orientation (READ ONLY)
Indicates fill direction for on lattice boundary conditions. This can be easily flipped by running the “Flip” command on the inlet.

- Point
Seed point for inlet/outlet

Inlet/outlet seed points are located on one of the six sides of the domain bounding box. This is consistent with the requirement that all inlets and outlets are required to intersect the bounding box.

The inlet/outlet seed point should be positioned inside the opening of the inlet/outlet. It does not need to be precisely centered inside the opening, but the point does need to be a “wet” point, as shown below.

- Characteristic Diameter
Equivalent hydraulic diameter [Template Units]

The hydraulic diameter characterizes the length scale off the inlet. This value is used for scaling in the solver, and does not strongly influence simulation precision. For cylindrical pipes, the hydraulic diameter is the inside diameter of the pipes. For other geometries, it is equal to the 4 times the area, divided by the perimeter.

Buffer Length Option

Auto: Buffer length is automatically set as the coarse dx spacing for the system

Specified Value: Allows you to specify your own value for the buffer length

- Buffer Length
Buffer length for inlet and outlet conditions

A buffer is a region near the inlet/outlet wherein the fluid viscosity is artificially inflated to decrease small-scale variations in the flow field. This smoothing of the flow field helps to maintain the stability of the boundary condition at larger timesteps.

For systems with inlet/outlet diameters that are small compared to the tank diameter, flow through the orifice will typically be one- dimensional and boundary conditions are generally stable. In systems with large openings, however, the flow field interacting with the opening may be more complex and a buffer may be required to maintain overall stability.

- Enabled
Enable or disable export of the boundary condition. This effectively turns the boundary condition on and off, therby sealing the orifice. Useful for multi-purpose models where a given outer boundary is used for different processes where inlets/outlets are used differently based on operating condition.

- Ramp Time
Ramp time for inlet [Seconds]

For constant velocity boundary conditions, the interval over which inlet velocity will be increased from zero to the user-defined constant velocity via a quarter sine wave.

For constant pressure boundary conditions, the interval over which the inlet pressure will be increased from the minimum system pressure (keep reading) to the user-defined constant inlet pressure via a quarter sine wave.

Note

The purpose of the ramp is to limit the propgation of “shock waves” throught the system, associated with a step-increase in boundary velocity or pressure.

The duration of the ramp time, in terms of time-steps, should be comparable to the number of lattice points across the system domain.

- Visible
Enable/disable the visibility of this component in the GUI