# MESH_BOUNDARY_CONDITION

Specifies element and nodal boundary conditions for mesh displacement for a set of element faces.

AcuSolve Command

## Syntax

MESH_BOUNDARY_CONDITION("name") { parameters...}

User-given name.

## Parameters

shape (enumerated) [no default]
Shape of the surfaces in this set.
three_node_triangle or tri3
Three-node triangle.
six_node_triangle or tri6
Six-node triangle.
element_set or elem_set (string) [no default]
User-given name of the parent element set.
surfaces (array) [no default]
List of element surfaces.
surface_sets (list) [={}]
List of surface set names (strings) to use in this command. When using this option, the connectivity, shape, and parent element of the surfaces are provided by the surface set container and it is unnecessary to specify the shape, element_set and surfaces parameters directly to the MESH_BOUNDARY_CONDITION command. This option is used in place of directly specifying these parameters. In the event that both of the surface_sets and surfaces parameters are provided, the full collection of surface elements is read and a warning message is issued. The surface_sets option is the preferred method to specify the surface elements. This option provides support for mixed element topologies and simplifies pre-processing and post-processing.
type (enumerated) [=fixed]
Type of displacement for the mesh on this surface..
fixed
Mesh fixed to the wall.
planar_slip
Mesh slips tangentially along the wall of a planar surface. An error is issued if the surface is not planar.
free_surface
Free surface.
mesh_motion
Mesh follows a mesh motion. Requires mesh_motion.
guide_surface
Mesh follows a guide surface. Requires guide_surface.
flexible_body
Mesh follows a flexible body. Requires flexible_body.
external_code
Mesh follows the coupled external code surface.
surface_tension_model (string) [=none]
User-given name of the surface tension model. If none, surface tension is not modeled. Used with type = free_surface.
contact_angle_model (string) [=none]
User-given name of the contact angle model. If none, default contact angle is used. Used with type = free_surface.
flexible_body (string) [=none]
User-given name of the FLEXIBLE_BODY command. Used with type = flexible_body.
nodal_x_modes (array) [no default]
Array of node number (first column) and x-component eigenvector values (last num_modes columns, where num_modes is given by the FLEXIBLE_BODY command referenced by flexible_body). Nodes must match those referenced in the surfaces. Used with type = flexible_body.
nodal_y_modes (array) [no default]
Array of node number (first column) and y-component eigenvectors values (last num_modes columns, where num_modes is given FLEXIBLE_BODY command referenced by flexible_body). Nodes must match those referenced in the surfaces. Used with type = flexible_body.
nodal_z_modes (array) [no default]
Array of node number (first column) and z-component eigenvectors values (last num_modes columns, where num_modes is given FLEXIBLE_BODY command referenced by flexible_body). Nodes must match those referenced in the surfaces. Used with type = flexible_body.
guide_surfaces (list) [={}]
List of user-given names of the GUIDE_SURFACE commands that the nodes of this MESH_BOUNDARY_CONDTION will be forced to track along. Used with type = guide_surface.
mesh_motion (string) [=none]
User-given name of the MESH_MOTION command for determining mesh displacement. Used with type = mesh_motion and type = flexible_body.
coupling_type (enumerated) [=structural]
Manner in which AcuSolve surfaces are coupled with the external code. Used with type = external_code.
structural
AcuSolve surface is coupled with either a line or surface element set in the external code. This option requires mesh_coupling_type = tied when coupling to line elements.
line
AcuSolve surface is coupled with a line element set in the external code. This option requires mesh_coupling_type = tied.
surface
AcuSolve surface is coupled with a surface element set in the external code.
rigid_body
AcuSolve surface is coupled with a rigid body in the external code.
coupling_direction (enumerated) [=both]
External code coupling direction for the surface. Used with type = external_code.
both
Exchanges information with the external code object in both directions. AcuSolve sends loading information to the external code and the external code sends displacements back to AcuSolve.
to_external_code
AcuSolve sends loading information to the external code, but no displacement information is returned.
from_external_code
AcuSolve does not send loading information to the external code, but displacement information is provided to AcuSolve at each step.
mesh_coupling_type (enumerated) [= tied]
Type of the mesh displacement boundary condition. Used with type = external_code.
tied
Fluid mesh tied to the solid.
slip
Fluid mesh slides on the solid.
external_code_tags (list) [={}]
Array of strings used to associate this fluid surface to a given solid surface. The null list matches to all solid surface and beams. Used with type = external_code.
rigid_body_name (string) [no default]
Name of the rigid body the external code surface is coupled with. Used with coupling_type = rigid_body and type = external_code.
gap_factor (real) >=0 [=1]
Non-dimensional (with respect to the length of an element face) maximum gap allowed for two element faces to be in contact. No maximum if zero.
gap (real) >= 0 [=]
Dimensional maximum gap allowed for two element faces to be in contact. No maximum if zero.
precedence (integer) [1]
Precedence of the nodal boundary condition defined here with respect to others elsewhere. Highest value has precedence on a per-variable basis.

## Description

This command specifies the appropriate nodal and element boundary conditions for mesh displacement on a set of surfaces (element faces) for the given type of boundary. "Nodal boundary conditions on a surface" is shorthand for "nodal boundary conditions on all the nodes that comprise the surface." The surfaces of an element boundary condition are defined with respect to the elements of an element set. For example,
ELEMENT_SET( "flow elements" ) {
shape          = four_node_tet
elements       = { ...
4, 2, 5, 6, 8 ;
5, 2, 6, 3, 5 ;
... }
...
}
MESH_BOUNDARY_CONDITION( "slip wall" ) {
shape          = three_node_triangle
element_set    = "flow elements"
surfaces       = { 4, 41, 2, 5, 6 ;
5, 51, 5, 6, 3 ; }
type = planar_slip
}

defines all the necessary boundary conditions for mesh displacement such that the nodes are allowed to slip tangentially along two surfaces of the element set "flow elements".

There are two main forms of this command. The legacy version (or single topology version) of the command relies on the use of the surfaces parameter to define the surfaces. When using this form of the command, all surfaces within a given set must have the same shape, and it is necessary to include both the element_set and shape parameters in the command. shape specifies the shape of the surface. This shape must be compatible with the shape of the "parent" element set whose user-given name is provided by element_set. The element set shape is specified by the shape parameter of the ELEMENT_SET command. The compatible shapes are:
Element Shape
Surface Shape
four_node_tet
three_node_triangle
five_node_pyramid
three_node_triangle
five_node_pyramid
six_node_wedge
three_node_triangle
six_node_wedge
eight_node_brick
ten_node_tet
six_node_triangle

The surfaces parameter contains the faces of the element set. This parameter is a multi-column array. The number of columns depends on the shape of the surface. For three_node_triangle, this parameter has five columns, corresponding to the element number (of the parent element set), a unique (within this set) surface number, and the three nodes of the element face. For four_node_quad, surfaces has six columns, corresponding to the element number, a surface number, and the four nodes of the element face. For six_node_triangle, surfaces has eight columns, corresponding to the element number, a surface number, and the six nodes of the element face. One row per surface must be given. The three, four, or six nodes of the surface may be in any arbitrary order, since they are reordered internally based on the parent element definition.

The surfaces may be read from a file. For the above example, the surfaces may be placed in a file, such as lower_wall.srf:
4 41 2 5 6
5 51 5 6 3
MESH_BOUNDARY_CONDITION( "slip wall" ) {
shape        = three_node_triangle
element_set  = "flow elements"
type         = planar_slip
}
The mixed topology form of the MESH_BOUNDARY_CONDITION command provides a more powerful and flexible mechanism for defining the surfaces. Using this form of the command, it is possible to define a collection of surfaces that contains different element shapes. This is accomplished through the use of the surface_sets parameter. The element faces are first created in the input file using the SURFACE_SET command, and are then referred to by the MESH_BOUNDARY_CONDITION command. For example, a collection of triangular and quadrilateral element faces can be defined using the following SURFACE_SET commands.
SURFACE_SET( "tri faces" ) {
surfaces       = { 1, 1, 1, 2, 4 ;
2, 2, 3, 4, 6 ;
3, 3, 5, 6, 8 ; }
shape          = three_node_triangle
volume_set     = "tetrahedra"
}
surfaces       = { 1, 1, 1, 2, 4, 9 ;
2, 2, 3, 4, 6, 12 ;
3, 3, 5, 6, 8, 15 ; }
volume_set     = "prisms"
Then, a single MESH_BOUNDARY_CONDITION command is defined that contains the tri and quad faces as follows:
MESH_BOUNDARY_CONDITION ( "slip wall" ) {
...
}
The list of surface sets can also be placed in a file, such as surface_sets.srfst:
tri faces
quad faces
MESH_BOUNDARY_CONDITION ( "slip wall" ) {
...
}

The mixed topology version of the MESH_BOUNDARY_CONDITION command is preferred. This version provides support for multiple element topologies within a single instance of the command and simplifies pre-processing and post-processing. In the event that both the surface_sets and surfaces parameters are provided in the same instance of the command, the full collection of surface elements is read and a warning message is issued. Although the single and mixed topology formats of the commands can be combined, it is strongly recommended that they are not.

The MESH_BOUNDARY_CONDITION command centralizes the options associated with mesh movement from the SIMPLE_BOUNDARY_CONDITION, FREE_SURFACE, and EXTERNAL_CODE commands. This command is intended to act as the primary mechanism for specifying control of the mesh movement. For backward compatibility, the mesh movement related options from the SIMPLE_BOUNDARY_CONDITION, FREE_SURFACE, and EXTERNAL_CODE commands are still supported. AcuPrep internally creates a table of constraints for each element face/node on the boundaries and identifies conflicts within the mesh motion boundary conditions. These conflicts may arise due to by the combinations of MESH_BOUNDARY_CONDITION and the legacy commands that provide similar functionality. In the case of conflicting constraints that have equal precedence values, the MESH_BOUNDARY_CONDITION is given priority. If the precedence values are not equal, then the higher precedence constraint is enforced. AcuPrep also checks for compatibility of the mesh motion boundary conditions on each node with the boundary conditions applied for the physics through the SIMPLE_BOUNDARY_CONDITION command. The following table is used when checking these compatibilities:
SIMPLE_BOUNDARY_CONDITION type MESH_BOUNDARY_CONDITION type
- fixed planar_slip mesh_motion free_surface guide_surface flexible_body external_code
wall OK OK OK Error OK OK OK
inflow OK OK OK Error OK Warning Warning
outflow OK OK OK Error OK Warning Warning
slip OK OK OK Error OK OK OK
symmetry OK OK Error Error Error Error Error
far_field OK OK OK Error OK Warning Warning
free_surface Error Error Error OK Error Error Error
The type parameter of the MESH_BOUNDARY_CONDITION determines the behavior of mesh on the given surface. To prevent any motion of the mesh on the surface, type = fixed is used. Other behaviors may be obtained by setting type to free_surface, guide_surface, flexible_body, mesh_motion or external_code. The behavior of a free surface wave, including surface tension and a contact angle model, can be simulated by using the type = free_surface as follows:
MESH_BOUNDARY_CONDITION( "water surface" ) {
type                  = free_surface
surface_tension_model = "water/air"
contact_angle_model   = "water/air @ smooth aluminum"
}
For the case of a simulation involving free surface waves impinging against the moving hull of a ship, it is necessary to ensure that the water touching the ship follows the profile of the ship's hull as it moves in the ocean. This requires the use of type = guide_surface. When using this option, the nodes slip along the guide surfaces given by the guide_surfaces parameter. The movement of the guide surface itself is then controlled by a MESH_MOTION command of type = rigid_body. For example:
MESH_MOTION( "boat motion" ) {
type               = rigid_body_dynamic
rigid_body_mass    = 100
...
}
GUIDE_SURFACE( "ship hull" ) {
type               = faceted
mesh_motion        = "boat motion"
}
MESH_BOUNDARY_CONDITION( "water/ship hull" ) {
...
type               = guide_surface
guide_surfaces     = {"ship hull"}
}
A mesh_displacement_type = flexible_body is used to specify mesh motion of a deforming surface as part of a Practical Fluid-Structure Interaction (P-FSI) problem. For example, the FLEXIBLE_BODY command can be used to define the parameters of a structure undergoing linear deformation. The deformation of the structure is then transferred to the wetted surfaces of the fluid using MESH_BOUNDARY_CONDITION. This is illustrated in the following example:
FLEXIBLE_BODY( "flexible body" ) {
equation      = mesh_displacement
num_modes     = 5
...
}
MESH_BOUNDARY_CONDITION( "flexible surface" ) {
...
type          = flexible_body
flexible_body = "flexible body"
}

where the files channel.wet_surf.xmd, channel.wet_surf.ymd, and channel.wet_surf.zmd correspond to the nodal modes in the x, y, and z-directions. The format of these files is the same as nodal_modes in the NODAL_BOUNDARY_CONDITION command. See also the FLEXIBLE_BODY command for details. The nodes in these files must match those referenced in the MESH_BOUNDARY_CONDITION. If the problem has a deforming mesh (that is, mesh is set to arbitrary_lagrangian_eulerian or specified in the EQUATION command), and type = flexible_body and wall_velocity_type = match_mesh_velocity on a given set of nodes (the default), then the given velocity conditions are ignored. Instead, the velocity is set to match the velocity of the mesh. Note that AcuPev may be used to obtain the nodal mode files.

Mesh displacement boundary conditions may also be specified with type = mesh_motion. The value of this parameter refers to the user-given name of a MESH_MOTION command in the input file. This command is evaluated, resulting in a mesh displacement vector. The mesh_motion parameter has an effect only if there is an active mesh equation and type is set to mesh_motion or flexible_body . The same parameter may be specified in the parent ELEMENT_SET command, but the one here takes precedence unless precedence is set to a value less than zero. For example,
MESH_MOTION( "moving body" ) {
type        = rigid_body
...
}
MESH_BOUNDARY_CONDITION( "moving wall" ) {
...
type        = mesh_motion
mesh_motion = "moving body"
}
A flexible body may be combined with a rotating mesh. To model a deformable impeller with sliding interfaces (for example a wind turbine) the following commands may be used:
FLEXIBLE_BODY( "Blade A" ) {
equation          = mesh_displacement
...
surface_outputs   = { "Blade A" }
}
MESH_MOTION( "Rotation" ) {
type              = rotation
...
rotation_variable = time
}
...
type = flexible_body
mesh_motion       = "Rotation"
}
The type = external_code option allows AcuSolve to extract the displacement of the surface from an external code. For example, to model a flexible surface that is part of a directly couple Fluid-Structure Interaction problem (DC-FSI), the following commands would be applied:
EXTERNAL_CODE{
communication      = socket
socket_initiate    = off
socket_host        = "localhost"
socket_port        = 10000
coupling_type      = structural
}
MESH_BOUNDARY_CONDITION( "Deforming wall" ) {
...
type               = external_code
coupling_type      = structural
gap                = 0
gap_factor         = 0
external_code_tags = {}
}
The fluid forces, moments, and heat fluxes are communicated from all of the surfaces defined in the MESH_BOUNDARY_CONDITION commands to an external solid/structural code defined by the EXTERNAL_CODE command. Mesh displacements and temperatures are returned from the external code to the same surfaces. For each quadrature point of each external code surface element face, a search is made over all appropriate solid model faces in the external code. The surfaces are assumed to be in contact if the following conditions are met:
• The distance between the point and the face is less than gap; and
• The distance between the point and the face, normalized by the length of the face, is less than gap_factor.

The gap/gap_factor constraint is ignored if the corresponding parameter is zero. If both parameters are zero, then there are no constraints and each quadrature point is guaranteed to be in contact with another face. Fluid forces are actually applied to the solid model only if the fluid quadrature point is determined to be in contact with a solid face. Similarly, nodal boundary conditions from the solid model are applied only if the solid model node is in contact with the external code surface.

The search over solid surfaces may be constrained through the use of tags. For example,
MESH_BOUNDARY_CONDITION( "Riser" ) {
...
type               = external_code
coupling_type      = structural
gap                = 0
gap_factor         = 0
external_code_tags = {"Riser outer wall"}
}
MESH_BOUNDARY_CONDITION( "Drill" ) {
...
type               = external_code
coupling_type      = structural
gap                = 0
gap_factor         = 0
external_code_tags = {}
}

In this case, the "Riser" surface will only be matched to solid surfaces tagged with "Riser outer wall" while the "Drill" surface can be matched with anything.

A coupling_type = structural indicates that all of the surfaces participating in the exchange between AcuSolve and the external code are of a single, consistent element type (that is line/beam elements or surface elements). For example, if a simulation contains five MESH_BOUNDARY_CONDITION, type = external_code commands, they must all be coupled to line elements or surface elements in the structural model. Prior to the release of AcuSolve 13.0, it was only possible to couple with a single type and this option is therefore supplied for backward compatibility. Starting in AcuSolve 13.0, it is possible to couple with surface elements, line elements and rigid body surfaces within a single simulation. This is accomplished by explicitly defining the coupling_type parameter for each MESH_BOUNDARY_CONDITION of type = external_code command that is issued. Note that if a coupling_type = structural is used in the same simulation in which a coupling_type = line, coupling_type = structural or coupling_type = rigid_body is specified, an assertion will be issued and the code will exit.

This type = external_code option determines all of the boundary conditions on the wetted surface (that is, all the points that are determined to be in contact) if precedence is sufficiently high. The parameter mesh_displacement_type may be either slip, allowing the mesh to slide against the solid (such as in a half-filled tank); or tied, where the fluid mesh displacement is tied to the solid. For slip, the solid surface acts just like a guide surface; see the description of guide_surface type in the NODAL_BOUNDARY_CONDITION command for details about the algorithm used.