In some simulations, it may be desirable to drive the flow by fixing a value of the volumetric flux through a boundary surface. A common use case for this is a channel flow, where the inflow and outflow are treated using periodic boundary conditions, requiring a use of either a body force or a flowrate condition to drive the flow. Often, the use of a body force is sufficient, but in some cases (e.g. transitional or turbulent simulations), it may be difficult to determine the correct body force to use in order to attain a specific Reynolds number. The incompressible solver supports the use of an alternative forcing whereby the volumetric flux,
through a user-defined surface R of area μ(R) is kept constant. This is supported for standard two- and three-dimensional simulations, where R is a boundary region, as well as three-dimensional homogeneous simulations. In the latter case, the forcing can be imposed either in the homogeneous direction (in the x - y plane) or perpendicular to it (in the z direction).
The flowrate correction works by taking each timestep’s velocity field un, and computing a scalar α so that the corrected flow
has the desired flowrate. Here, us is a linear Stokes solution that is calculated once at the start of the simulation, so that the condition is not expensive to implement.
To enable flowrate corrections, three things must be defined in the session file:
Flowrate
parameter in the parameters section, which defines the desired value of
the volumetric flux Q(u) through the reference region. To set a flux per unit surface of
Q = 1 we would therefore define:
Flowrate
user-defined type to define the
reference region R. For example, a 2D channel flow with periodic boundary conditions
might use the following arrangement:
FlowrateForce
function with components ForceX
, ForceY
and ForceZ
that defines
the direction in which the forcing will be applied. This should be a unit vector (i.e. of
magnitude 1) and constant (i.e. not dependent on x, y, z or t). As an example, to impose
a force in the x-direction we specify:
Importantly, note that in homogeneous simulations where the forcing is in the z-direction only
the Flowrate
parameter should be specified, and the reference area R is taken to be the
homogeneous plane.
Optionally, the IO_FlowSteps
parameter can be defined. If set to a non-zero integer, this
produces a file session.prs
which records the value of α used in the flowrate correction, every
IO_FlowSteps
steps.