Defining the Interface Model

The interface model describes the interface regions and fields that interact in a coupled simulation.

This page discusses:

The SIMULIA Co-Simulation Services uses the concept of mesh and fields to define the interface model. The interface model consists of one or more interface regions on which one or more fields are exchanged.

Creating and Registering Interface Regions

An interface region defines a physics domain being coupled. The domains are required to be co-located. For a two-way co-simulation, the source and target regions must have the same extent for proper spatial mapping. For one-way co-simulation or a sequential simulation, the source region can be larger than the target region.

You can couple domains as follows:

  • through discrete locations,
  • through a common interface surface adjoining two non-overlapping domains, and
  • over the entire domain if the physics domain overlap.
The interface regions can be of different region types; however, you can couple common region types only (for example, point-to-point, surface-to-surface, and volume-to-volume regions).

At the API level, a mesh defines an interface region. A mesh has a reference name; it contains one or more node collections and zero or more element collections. Here, the term “element” refers to either a surface facet for a surface region or an element for a volume region. Element collections are used to group different element classes. Generally, a mesh has a single node collection and one or more element collections. It can have zero element collections when the interface region consists of discrete points only.

To define an interface region, you must do the following:

  • create a mesh object;
  • add one or more node collections;
  • add element collections, if required; and
  • register the mesh.

Creating a Mesh Object

Use the SMACseCreateMesh function to create a mesh object. The SMACseCreateMesh function takes the following argument:

iReferenceName
Interface mesh reference name.

The name is case sensitive and must correspond to the region name specified in the Co-Simulation Configuration file.

SMACseCreateMesh returns an opaque handle to the mesh object. The mesh object handle is used to add node and element collections and to register the mesh object.

When you embed the SIMULIA Co-Simulation Services in parallel mode, call SMACseCreateMesh on any compute rank that contains part of the interface region.

Adding Node Collections

A mesh typically has at least one node collection. However, you can define multiple node collections to provide further grouping (for example, grouping nodes per numerical domains present on a compute rank). Do not register any node collection when importing a remote mesh (see Importing a Remote Client's Mesh).

A node collection has a reference name and is associated with a spatial dimensionality. It also contains a list of node labels and coordinates. The node labels must be unique across all compute ranks.

Use the SMACseAddNodeCollection function to add a node collection. The SMACseAddNodeCollection function takes the following arguments:

iMesh
Mesh handle.
iCollectionRefName
Node collection reference name.

The reference name must be unique name within the region.

iRegionDim

SMACseDim_2d for a two-dimensional mesh, SMACseDim_3d for a three-dimensional mesh, or SMACseDim_Axi for an axisymmetric mesh.

iNNodes
Number of nodes in the collection.
iLabels
Vector containing the node labels.
iCoordinates
Vector containing the nodal coordinates. The coordinates are listed consecutively for every node in the collection given the spatial dimensionality.

Node labels can start with zero and can be any unsigned integer value. You can provide the node labels in any order; they do not need to be defined consecutively. However, the node labels must be unique for the entire model. Nodal fields are exchanged in the order in which the nodes are defined in the collection.

When you embed the SIMULIA Co-Simulation Services in parallel mode, call SMACseAddNodeCollection if the compute rank contains nodes belonging to the mesh. You should register only the nodes belonging to the compute rank.

Adding Element Collections

A mesh consists of zero or more element collections. If no element collections are specified, the mesh definition consists purely of nodes without element topology information; this represents discrete points. For surface coupling, each surface facet is represented as an element. Do not register any element collections when importing a remote mesh (see Importing a Remote Client's Mesh).

An element collection has a reference name; it is associated with an element class and refers to a node collection. It also contains a list of element labels and connectivity data. The connectivity data is in terms of the node labels provided in the node collection. In most cases, multiple element collections might refer to a single node collection. The element labels must be unique across all compute ranks.

Use the SMACseAddElemCollection function to add an element collection. The SMACseAddElemCollection function takes the following arguments:

iMesh
Mesh handle.
iElemCollectionRefName
Element collection reference name.
iNodeCollectionRefName
Node collection reference name associated with the element collection.
iElemClass
String defining the element class/type defined in Table 1.

Table 1. Element class.
String Description

SMACseSurfTopo_Line2

2D Surface facet, 2-node line
SMACseSurfTopo_Line3 2D Surface facet, 3-node quadratic line
SMACseSurfTopo_Tri3 3D Surface facet, 3-node linear triangle
SMACseSurfTopo_Tri6 3D Surface facet, 6-node quadratic triangle
SMACseSurfTopo_Quad4 3D Surface facet, 4-node linear quadrilateral
SMACseSurfTopo_Quad8 3D Surface facet, 8-node quadratic quadrilateral
SMACseVolTopo_Tri3 2D Volume element, 3-node linear triangle
SMACseVolTopo_Tri6 2D Volume element, 6-node quadratic triangle
SMACseVolTopo_Quad4 2D Volume element, 4-node linear quadrilateral
SMACseVolTopo_Quad8 2D Volume element, 8-node quadratic quadrilateral
SMACseVolTopo_Tet4 3D Volume element, 4-node linear tetrahedron
SMACseVolTopo_Tet10 3D Volume element, 10-node quadratic tetrahedron
SMACseVolTopo_Pyr5 3D Volume element, 5-node pyramid
SMACseVolTopo_Wedge6 3D Volume element, 6-node linear wedge
SMACseVolTopo_Wedge15 3D Volume element, 15-node quadratic wedge
SMACseVolTopo_Hex8 3D Volume element, 8-node linear hexahedron
SMACseVolTopo_Hex20 3D Volume element, 20-node quadratic hexahedron

iNElems
Number of elements in the collection.
iLabels
Vector containing the element labels.

The element labels must be unique across a compute domain.

iConnectivity
Vector containing the nodal connectivity data for each element in the collection.

Specify one element collection for each element class.

To provide further grouping to access field data, you can define multiple element collections for the same element class. The element class name identifies the number of nodes per element. Element connectivity data is specified by the node labels; it is provided as the connectivity data for the first element, followed by the second element, etc. For each element, the node labels are provided in the order illustrated in Figure 1, Figure 2, and Figure 3. For surface elements (facets) the connectivity defines the outward normal according to the right-hand rule convention. The outward normals of each subsystem model must point toward each other for the mapper to distinguish between the top and bottom faces of membrane and shell elements.

Figure 1. 2D and 3D surface element topology.

Figure 2. 2D volume element topology.

Figure 3. 3D volume element topology.

When you embed the SIMULIA Co-Simulation Services in parallel mode, each element is unique to a compute domain; therefore, each element can exist only on one compute domain. Call the SMACseAddElemCollection function if the interface region contains elements on the compute rank.

Registering the Mesh Object

When all node and element collections are added to the mesh object, use the SMACseRegisterMesh function to register the mesh. The SMACseRegisterMesh function takes the following argument:

iRegion
The name of the region.

At this stage, you cannot modify the mesh object anymore. However, you can define and register additional interface regions.

When you embed the SIMULIA Co-Simulation Services in parallel mode, register the mesh on each compute domain that processes part of the interface.

Example

The following example illustrates how to create and register an interface region:

//
// Create a mesh object with name “Mesh A”
//
SMACseMesh* mesh = SMACseCreateMesh("Mesh A");

//
// Add a node collection with nodes numbered sequentially between 1 - 9.
// Node labels do not need to be defined in any particular order.
//
unsigned int numNodes = 9;
unsigned int labels[ ] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
double coords[ ] = { 0., 0., 0.,
                     1., 0., 0.,
                     2., 0., 0.,
                     2., 1., 0.,
                     0., 2., 0.,
                     1., 2., 0.,
                     2., 2., 0. };
                                                                                               
SMACseAddNodeCollection( mesh, "myNodeCollection", SMACseDim_3d, numNodes, labels, coords);
//
// Add element collections with 2 quads and 4 triangles
// Element labels do not have to be defined in any particular order.
unsigned int elemLabels_1 [ ] = { 1, 5 };
unsigned int elemLabels_2 [ ] = { 3, 4, 10, 7 };
   
unsigned int connectivity_1[ ] = { 2, 5, 4, 1,
                                   5, 8, 7, 4 };
                    
unsigned int connectivity_2[ ] = { 2, 3, 5,
                                   3, 6, 5,
                                   5, 6, 8,
                                   6, 9, 8 };

SMACseAddElemCollection( mesh, "MyQuads",     "MyNodeCollection", 
   "SMACseSurfTopo_Quad4", 2, elemLabels_1, connectivity_1); 
SMACseAddElemCollection( mesh, "MyTriangles", "MyNodeCollection", 
   "SMACseSurfTopo_Tri3",  4, elemLabels_2, connectivity_2);                               

//
// Register Mesh
//
SMACseRegisterMesh( mesh );

Creating Field Types and Registering Fields

A field is a field type (for example, displacement, temperature, heat flux, etc.) spanning a region. A field has a causality; it can be incoming or outgoing. Incoming fields are required by the application to advance its solution, while outgoing fields are computed and are sent to the remote applications.

At the client level, a field type is associated with a physics property, a unit dimensionality, a position, an algebraic type, and a data type.

A field has either intensive or extensive physics properties:

  • Extensive fields are integrated values over the surface or volume of the body, where the amount of matter within the body determines the field values.

    Examples of extensive fields include force, concentrated heat flux, and mass that define a total quantity.

  • Intensive fields are fields where the amount of matter within the body does not influence the field values.

    Examples of intensive fields include pressure, surface heat flux density, and mass density, which are quantities defined per unit area or volume. Displacement, velocity, and temperature are also examples of intensive fields because these fields do not depend on the amount of matter within the body.

The position defines the mesh location where the field is evaluated. For example, velocity is evaluated at nodes for structural finite element solvers, while velocities are typically evaluated at element centroids for computational fluid dynamics finite volume solvers.

The data type specifies whether the field is single or double precision. Only double precision is supported.

At the API level, a field is an association between a field type and a region. You must register the field as either incoming or outgoing. To define fields:

  • create a field type definition,
  • associate the field type with a region, and
  • declare the field causality.

Creating a Field Type

The SIMULIA Co-Simulation Services provides two methods for creating field types: a general method where you can define any field type, and a predefined field method where the physics property and unit dimensionality of commonly used field types is registered.

The field reference name is case sensitive and must match the field type name used in the Co-Simulation Configuration file. The field type names between clients do not have to be the same (for example, a structural solver might declare a velocity field with the reference name “V,” while a CFD solver might declare it as “velocity”). An association is made when defining the connection in the Co-Simulation Configuration file (see <connection> Element).

Creating a General Field Definition

Use the SMACseCreateGeneralFieldDefinition function to create a general field definition. The SMACseCreateGeneralFieldDefinition function takes the following arguments:

iFieldType
Field type reference name.

This name is case sensitive and must match the field type name in the Co-Simulation Configuration file.

iProperty

Field type physics property.

Set to SMACseFieldProperty_IntensiveFlux if the field has intensive physics properties, and set to SMACseFieldProperty_ExtensiveFlux if the field has extensive physics properties.

iPosition

Position where the field is evaluated on the mesh.

Set to SMACseFieldPos_atNode for fields evaluated at nodes, and set to SMACseFieldPos_atElemCentroid for fields evaluated at the element centroid.

iAlgebraicType

Algebraic type of the field. Set to:

  • SMACseFieldAlgType_Scalar for scalar quantities
  • SMACseFieldAlgType_Vector2d for 2D vector quantities
  • SMACseFieldAlgType_Vector3d for 3D vector quantities
  • SMACseFieldAlgType_Tensor2d for 2D tensor quantities
  • SMACseFieldAlgType_Tensor3d for 3D tensor quantities

iDataType

Defines the field data type. Set this argument to SMACseFieldDataType_Double for double precision.

iUnitDim
Unit dimensionality of the field.

Set to a character string specifying the unit dimensionality in terms of the fundamental units; for example, velocity is defined as “LT-1,” where the base fundamental and supplementary unit designators are outlined in Table 2.

Table 2. Field dimensionality designator.
Symbol Unit
T time
L length
M mass
E electric current
K temperature
A amount substance
C candela
R angle

Creating a Predefined Field Definition

Use the SMACseCreateFieldDefinition to define a predefined field type as listed in Appendix: Predefined Field Types. The SMACseCreateFieldDefinition function takes the following arguments:

iFieldType
Field type reference name.

This name is case sensitive and must match the field type name in the Co-Simulation Configuration file.

iPosition

Position where the field is evaluated on the mesh.

Set to SMACseFieldPos_atNode for fields evaluated at nodes, and set to SMACseFieldPos_atElemCentroid for fields evaluated at the element centroid.

iAlgebraicType

Algebraic type of the field. Set to:

  • SMACseFieldAlgType_Scalar for scalar quantities
  • SMACseFieldAlgType_Vector2d for 2D vector quantities
  • SMACseFieldAlgType_Vector3d for 3D vector quantities
  • SMACseFieldAlgType_Tensor2d for 2D tensor quantities
  • SMACseFieldAlgType_Tensor3d for 3D tensor quantities

iDataType

Field data type.

Set to SMACseFieldDataType_Double for double precision.

When you embed the SIMULIA Co-Simulation Services in parallel mode, you must register the fields on all compute domains associated with the field.

Associating the Field Type with a Mesh, and Declaring Its Causality

To declare a field, you must assign a field type to a region and then declare its causality, whether it is incoming or outgoing.

When you embed the SIMULIA Co-Simulation Services in parallel mode, you must associate the field type with a mesh on all compute domains associated with the field.

Incoming Fields

Use the SMACseRegisterIncomingField function to register an incoming field. The SMACseRegisterIncomingField function takes the following arguments:

iFieldType
Field type reference name.
iRegion
Interface region reference name.

Outgoing Fields

Use the SMACseRegisterOutgoingField function to register an outgoing field. TheSMACseRegisterOutgoingField function takes the following arguments:

iFieldType
Field type reference name.
iRegion
Interface region reference name.

Example

The following example illustrates how to define fields:

//
// Field definitions for pressure and displacement  
//
SMACseCreateFieldDefinition( "traction_vector",     
                             SMACseFieldPos_atElemCentroid, 
                             SMACseFieldAlgType_Vector3d   
                             SMACseFieldDataType_Double );
SMACseCreateFieldDefinition( "displacement", 
                             SMACseFieldPos_atNode,         
                             SMACseFieldAlgType_Vector3d, 
                             SMACseFieldDataType_Double );

//
// Register Incoming and Outgoing Fields
//
SMACseRegisterIncomingField( "displacement",   "Mesh A" );
SMACseRegisterOutgoingField( "traction_vector","Mesh A" );

//Register the co-simulation model
SMACseRegisterModel( );

Registering the Interface Model

Once all the interface regions and fields are registered, you need to register the co-simulation model with the SIMULIA Co-Simulation Services. At this point the interface model is finalized, and you can proceed to the computation phase.

Use the SMACseRegisterModel function to register the interface model. The SMACseRegisterModel function takes no arguments.

When you embed the SIMULIA Co-Simulation Services in parallel mode, you must call SMACseRegisterModel collectively on all compute ranks, whether or not it contains an interface region.