programmer's documentation
Examples of boundary conditions ale

Local variables

Initialization and finalization

The following initialization block needs to be added for the following examples:

At the end of the subroutine, it is recommended to deallocate the work array:

In theory Fortran 95 deallocates locally-allocated arrays automatically, but deallocating arrays in a symetric manner to their allocation is good pratice, and avoids using a different logic C and Fortran.

Assign boundary conditions to boundary faces

One may use selection criteria to filter boundary case subsets.
Loop on faces from a subset.
Set the boundary condition for each face.

Calculation of displacement at current time step

Example 1

Example : For boundary faces of color 4 assign a fixed velocity

Example 2

Example: For boundary face of color 5 assign a fixed displacement on nodes

Example 3

Example : For boundary faces of color 6 assign a sliding boundary

Example 4

Example : Prescribe elsewhere a fixed boundary