3.5 Forcing

An optional section of the file allows forcing functions to be defined. These are enclosed in the FORCING tag. The forcing type is enclosed within the FORCE tag and expressed in the file as:

1<FORCE TYPE="[NAME]"> 
2    ... 
3</FORCE>

The force type can be any one of the following.

3.5.1 Absorption

This force type allows the user to apply an absorption layer (essentially a porous region) anywhere in the domain. The user may also specify a velocity profile to be imposed at the start of this layer, and in the event of a time-dependent simulation, this profile can be modulated with a time-dependent function. These velocity functions and the function defining the region in which to apply the absorption layer are expressed in the CONDITIONS section, however the name of these functions are defined here by the COEFF tag for the layer, the REFFLOW tag for the velocity profile, and the REFFLOWTIME for the time-dependent function.

1<FORCE TYPE="Absorption"> 
2    <COEFF> [FUNCTION NAME] <COEFF/> 
3    <REFFLOW> [FUNCTION NAME] <REFFLOW/> 
4    <REFFLOWTIME> [FUNCTION NAME] <REFFLOWTIME/> 
5    <BOUNDARYREGIONS> 1,4 <BOUNDARYREGIONS/> 
6</FORCE>

If a list of BOUNDARYREGIONS is specified, the distance to these regions is available as additional variable r in the definition of the COEFF function:

1<FUNCTION NAME="AbsorptionCoefficient"> 
2    <E VAR="p" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" /> 
3    <E VAR="u" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" /> 
4    <E VAR="v" EVARS="r" VALUE="-5000 * exp(-0.5 * (3*r / 0.4)^2)" /> 
5</FUNCTION>

3.5.2 Body

This force type specifies the name of a body forcing function expressed in the CONDITIONS section.

1<FORCE TYPE="Body"> 
2    <BODYFORCE> [FUNCTION NAME] <BODYFORCE/> 
3</FORCE>

3.5.3 MovingReferenceFrame

This force type allows the user to solve the incompressible flow around a moving rigid body. In this method, the flow velocity and pressure are defined in an inertial reference frame, but the coordinates and basis vectors are in the reference frame fixed on the rigid body (body frame).

This force type specifies the name of a moving frame function expressed in the CONDITIONS section.

1<FORCE TYPE="MovingReferenceFrame"> 
2    <FRAMEVELOCITY> [FUNCTION NAME] <FRAMEVELOCITY/> 
3</FORCE>

The moving frame function defines the velocity of the body frame observed in the inertial reference frame

uframe = u0 + Ω × (x- x0 )

.

1<FUNCTION NAME="MovingReferenceFrame"> 
2    <E VAR="u" VALUE="1" /> 
3    <E VAR="v" VALUE="0" /> 
4    <E VAR="w" VALUE="0" /> 
5    <E VAR="Omega_x" VALUE="0" /> 
6    <E VAR="Omega_y" VALUE="0" /> 
7    <E VAR="Omega_z" VALUE="1" /> 
8    <E VAR="x0" VALUE="0" /> 
9    <E VAR="y0" VALUE="0" /> 
10    <E VAR="z0" VALUE="0" /> 
11</FUNCTION>

Here, u0 = (u, v, w) is the translational velocity, Ω = (Omega_x, Omega_y, Omega_z) is the angular velocity. x0 = (x0, y0, z0) is the rotation pivot and it is fixed in the body frame. Translational motion is allowed for all dimensions while rotational motion is restricted to z (omega_z) for 2D and 3DH1D and supported for all directions in full 3D.

When using MovingReferenceFrame force, variables x,y,z are the coordinates of the body frame and all vectors use the basis of the body frame. This situation includes body forces, boundary conditions, initial conditions, aerodynamic force and simulation results.

3.5.4 Programmatic

This force type allows a forcing function to be applied directly within the code, thus it has no associated function.

1<FORCE TYPE="Programmatic"> 
2</FORCE>

3.5.5 Noise

This force type allows the user to specify the magnitude of a white noise force. Optional arguments can also be used to define the frequency in time steps to recompute the noise (default is never) and the number of time steps to apply the noise (default is the entire simulation).

1<FORCE TYPE="Noise"> 
2    <WHITENOISE> [VALUE] <WHITENOISE/> 
3    <!-- Optional arguments --> 
4    <UPDATEFREQ> [VALUE] <UPDATEFREQ/> 
5    <NSTEPS> [VALUE] <NSTEPS/> 
6</FORCE>