Interaction Pair

Overview

This class manages pairs of interacting surfaces, co-simulation or cyclic surfaces. The term “surface” is used loosely here in that a surface can be set of nodes or element faces or element edges or an analytic surface. The interaction surfaces are termed a master or a slave surface. Master surfaces may only be defined as element faces or edges or analytic surfaces. Slave surfaces may be defined as nodes or element faces or edges. In addition to the surface entities a set of properties may also be associated with an interaction pair.

The functions associated with a InteractionPair object are the following.

Set the master and slave surface entity types using define(). By default, the InteractionPair type is contact surface. Use setType() to set the type to a cyclic or co-simulation surface. At this point a GridFun object must be set as an attribute object using setMeshInterface() so that the InteractionPair object can access finite element model information and verify element entity specifications. The master surface entity type must be element face or edge. The slave surface entity type may be node or element face or edge. Master element entities are specified using setMasterElement(). Slave node entities are specified using setSlaveNode(), and slave element entities are specified using setSlaveElement(). Slave node entities may have an effective area associated with each node.

For the special case of self-contact set the slave entity type to NONE and define only the master surface. The slave surface is assumed to be the master surface.

Generate a face list of master or slave surface entities using getListOfFaces(). Generate an edge list of master or slave surface entities using getListOfEdges(). Generate a node list of all nodes on a slave surface using getListOfSlaveNodes().

A set of property types is supported for an interaction pair. Each property type is identified by a defined enum. See IntegerProperty and DoubleProperty Specify integer valued properties using setPropertyIntegerValue. Specify real valued properties using setPropertyDoubleValue(). All real values are stored internally in double precision. Each property type is identified by a defined constant. The data type and number of components associated with a property type is queried using getPropertyInformation(). A long descriptive name which is hard-wired to each property type may be queried using getPropertyName(). Finally, the property values themselves may be recovered using getPropertyDoubleValue() or getPropertyIntegerValue. The function getPropertyFlag() is used to determine how a property has been defined, if at all.

Class Members Descriptions

The currently available InteractionPair enumerations and functions are described in detail in this section.

class InteractionPair

Interaction pair class for managing contact pairs and surface interactions.

Public Types

enum class Type

Interaction pair type.

Values:

enumerator CONTACT

Contact surface interaction.

enumerator COSIMULATION

Co-simulation surface.

enumerator CYCLIC

Cyclic surface.

enumerator TIE

Tie constraint.

enum class SurfaceType

Surface designation in interaction pair.

Values:

enumerator MASTER

Master surface.

enumerator SLAVE

Slave surface.

enum class IntegerProperty

Integer property type for interaction pair attributes.

Values:

enumerator PROPERTY_ID

Property ID.

enumerator SMALL_SLIDING

Small sliding flag.

enumerator SYMMETRIC

Symmetric contact.

enumerator SURFACE_TO_SURFACE

Surface to surface contact.

enumerator SLAVE_TO_MASTER_PROJECTION

Slave to master projection.

enumerator CYCLIC_SECTOR_COUNT

Cyclic sector count.

enumerator CYCLIC_COORD_SYSTEM_ID

Cyclic coordinate system ID.

enumerator MASTER_SET

Master set ID.

enumerator SLAVE_SET

Slave set ID.

enumerator CONTACT_BEHAVIOR

Contact behavior type.

enumerator SEPARATION_THRESHOLD_TYPE

Separation threshold type.

enumerator ID

Interaction pair ID.

enumerator CYCLIC_MATCHING

Cyclic matching flag.

enumerator MATERIAL_ID

Material ID.

enum class DoubleProperty

Double property type for interaction pair attributes.

Values:

enumerator ADJUST_ZONE_DISTANCE

Adjust zone distance.

enumerator SMOOTH_FACTOR

Smoothing factor.

enumerator CRITICAL_PENETRATION_DISTANCE

Critical penetration distance.

enumerator EXTENSION_ZONE_FACTOR

Extension zone factor.

enumerator POSITION_TOLERANCE

Position tolerance.

enumerator CYCLIC_TOLERANCE

Cyclic tolerance.

enumerator MIN_POSITION_TOLERANCE

Minimum position tolerance.

enumerator SEPARATION_THRESHOLD

Separation threshold value.

enumerator BIAS_POSITION_TOLERANCE

Bias position tolerance.

enum class PropertyFlag

Property definition status flag.

Values:

enumerator UNDEFINED

Property not defined.

enumerator VALUE

Property defined as value.

enumerator CURVE

Property defined as curve.

enum class ContactBehavior

Contact behavior type.

Values:

enumerator STANDARD

Standard contact behavior.

enumerator ROUGH

Rough contact behavior.

enumerator NO_SEPARATION

No separation with sliding permitted.

enumerator BONDED

Bonded contact.

enum class SeparationThresholdType

Separation threshold criterion type.

Values:

enumerator FORCE

Force-based separation.

enumerator STRESS

Stress-based separation.

enumerator STRESS_EXTRAPOLATED

Extrapolated stress-based separation.

enumerator STRESS_NODAL

Nodal stress-based separation.

enumerator STRESS_RELATIVE

Relative stress-based separation.

Public Functions

ErrorCode getErrorCode()

Return the current ErrorCode of the InteractionPair object.

Returns: ErrorCode - The current error code, or NONE if no error.
Status define(EntityType masterEntityType, EntityType slaveEntityType)

Set the master and slave surface entity types. The master entity type may be an element edge or face or an analytic surface. Master element entities are specified using setMasterElement() . Master analytic surface entities are specified using setMasterAnalyticSurface() . The slave entity type may be node or element edge or face. If the slave entity type is NODE then slave node entities are specified using setSlaveNode() otherwise slave element entities are defined using setSlaveElement() . For the special case of self-contact set the slave entity type to NONE and define only the master surface. The slave surface is assumed to be the master surface.

See Also inquire() .

Parameters:
Returns:

Status

Status inquire(EntityType *masterEntityType, EntityType *slaveEntityType)

Inquire of defined masterEntityType and slaveEntityType as output arguments.

See Also define() .

Parameters:
Returns:

Status

Status setType(Type type)

Set contact, cyclic or co-simulation surface type. By default the surface type is CONTACT .

See Also getType() .

Parameters:type Type
Returns:Status
Status getType(Type *type)

Get contact or co-simulation type.

See Also setType() .

Returns:Status
Status setMeshInterface(MeshInterface *functions)

Set a pointer to an attribute object ( MeshInterface).

Parameters:functions – Pointer to the MeshInterface object to be set.
Returns:Status
Status setName(const char *name)

Set a name string. The name string can contain up to 81 characters including the terminating NULL. If the name is not specified it is returned as a single NULL character using getName() .

Parameters:name – Name string
Returns:Status
Status getName(char name[])

Get name string.

See Also setName() .

Returns:Status
Status setSlaveNode(int index, double area)

Set slave node index and area.

Errors
VALUE is generated if an improper index is specified.

Parameters:
  • index – Node index
  • area – Node area
Returns:

Status

Status setSlaveElement(int index, int entityNumber)

Set slave element index and face or edge number, entityNumber.

Errors
VALUE is generated if an improper index or entityNumber is specified.

Parameters:
  • index – Element index
  • entityNumber – Element edge or face number
Returns:

Status

Status setMasterElement(int index, int entityNumber)

Set master element index and face or edge number, entityNumber.

Errors
VALUE is generated if an improper index or entityNumber is specified.

Parameters:
  • index – Element index
  • entityNumber – Element edge or face number
Returns:

Status

Status initializeSlaveElementEntityIterator()

Initialize the successive return of each slave entity index.

See Also nextSlaveElementEntityItem() .

Returns:Status
Status nextSlaveElementEntityItem(int *index)

Sequential access to each slave entity index.

See Also initializeSlaveElementEntityIterator() .

Returns:Status
Status initializeSlaveNodeIterator()

Initialize the successive return of each slave node index.

See Also nextSlaveNodeItem() .

Returns:Status
Status nextSlaveNodeItem(int *index)

Sequential access to each slave node index.

See Also initializeSlaveNodeIterator() .

Returns:Status
Status getSlaveCount(int *indexCount, int *entityCount)

Query the number of slave nodes or slave element edges or faces.

See Also initializeSlaveNodeIterator() .

Parameters:
  • indexCount[out] Number of slave nodes or slave elements.
  • entityCount[out] Number of slave element edges or faces.
Returns:

Status

Status isSlaveEntityDefined(int index, int *flag)

Query if slave entity is defined. If the slave entity type is node then index must be a node index, otherwise it is an element index. If it is a node index, then flag will be returned set to 1 if the node has been specified as a slave node, otherwise it is returned as 0. If it is an element index then flag is set to the edge or face flags.

Errors
VALUE is generated if an improper index is specified.

Parameters:
  • index – Node or element number.
  • flag[out] Node or element edge or face flag.
Returns:

Status

Status getSlaveElementEntity(int index, int *entityNumberCount, int entityNumbers[])

Return element edge or face numbers given an element index. If no element or node entities have been specified for the given index then entityNumberCount is returned as zero. This function is functionally equivalent to isSlaveEntityDefined() except the flag argument is parsed.

Errors
VALUE is generated if an improper index is specified.

Parameters:
  • index – Element number
  • entityNumberCount[out] Number of element edges or faces or 1 if node entity
  • entityNumbers[out] Array of element edges or faces or entityNumbers[0] = 1 if node entity
Returns:

Status

Status getSlaveNode(int index, double *area)

Return slave node area. If the slave node has not been specified then area is returned as zero.

Errors
VALUE is generated if an improper index is specified.

Parameters:
  • index – Node index
  • area[out] Node area
Returns:

Status

Status initializeMasterEntityIterator()

Initialize the successive return of each master entity index.

See Also nextMasterEntityItem() .

Returns:Status
Status nextMasterEntityItem(int *index)

Sequential access to each master entity index.

See Also initializeMasterEntityIterator() .

Returns:Status
Status getMasterElementCount(int *indexCount, int *entityCount)

Query the number of master nodes or slave element edges or faces.

See Also initializeSlaveNodeIterator() .

Parameters:
  • indexCount[out] Number of master nodes or slave elements.
  • entityCount[out] Number of master element edges or faces.
Returns:

Status

Status isMasterEntityDefined(int index, int *flag)

Return element edge or face flags given an element index. If no element entities have been specified for the given index then flag is returned as zero.

Errors
VALUE is generated if an improper index is specified.

Parameters:
  • index – Element number
  • flag[out] Element edge or face flags
Returns:

Status

Status getMasterElementEntity(int index, int *entityNumberCount, int entityNumbers[])

Return element edge or face numbers given an element index. If no element entities have been specified for the given index then entityNumberCount is returned as zero. This function is functionally equivalent to a isMasterEntityDefined() except the flag argument is parsed.

Errors
VALUE is generated if an improper index is specified

Parameters:
  • index – Element number
  • entityNumberCount[out] Number of element edges or faces
  • entityNumbers[out] Array of element edges or faces
Returns:

Status

Status hasInteractionPairSpecified(int *flag)

Query if any master or slave specifications of any type have been made. The return value, flag, will be zero only if no masters or slaves have been specified of any type.

Parameters:flag[out] Flag indicating if any master or slave set
Returns:Status
Status setPropertyDoubleValue(DoubleProperty type, double value)

Set a real valued property. Use getPropertyDoubleValue() to return real valued properties.

Parameters:
Returns:

Status

Status getPropertyFlag(IntegerProperty type, PropertyFlag *flag)

Query for integer valued property definition. If a property value is not defined, UNDEFINED is returned, if the property has been defined by value then VALUE is returned.

Parameters:
Returns:

Status

Status getPropertyFlag(DoubleProperty type, PropertyFlag *flag)

Query for real valued property definition. If a property value is not defined, UNDEFINED is returned, if the property has been defined by value then VALUE is returned.

Parameters:
Returns:

Status

Status getPropertyInformation(IntegerProperty type, int *componentCount)

Query for the number of components associated with an integer valued property type.

Parameters:
Returns:

Status

Status getPropertyInformation(DoubleProperty type, int *componentCount)

Query for the number of components associated with a real valued property type.

Parameters:
  • type DoubleProperty
  • componentCount[out] Number of components
Returns:

Status

Status getPropertyName(IntegerProperty type, char name[])

Query for the built-in name associated with an integer valued property type. The character string will not exceed 64 characters including the terminating NULL character.

Parameters:
Returns:

Status

Status getPropertyName(DoubleProperty type, char name[])

Query for the built-in name associated with a real valued property type. The character string will not exceed 64 characters including the terminating NULL character.

Parameters:
Returns:

Status

Status getPropertyDoubleValue(DoubleProperty type, double values[])

Return a defined real valued property as double. The number of values returned is equal to the number of components associated with the specified type. If the value has not been defined or the value type is not real, nothing is returned.

Parameters:
Returns:

Status

Status getListOfSlaveNodes(IdTranslator *idTranslator)

Derive a list of nodes which have been defined as a slave surface. Note that idtran is not cleared by this function, the derived node entities are added to any existing node in the output idtran.

Parameters:idtran[out] Pointer to derived IdTranslator object of nodes
Returns:Status
Status getListOfFaces(SurfaceType type, IdTranslator *idTranslator)

Derive a list of element faces which have been defined as a master or slave surface. Note that idtran is not cleared by this function, the derived element face entities are added to any existing element faces in the output idtran.

Parameters:
Returns:

Status

Status getListOfEdges(SurfaceType type, IdTranslator *idTranslator)

Derive a list of element edges which have been defined as a master or slave surface. Note that idtran is not cleared by this function, the derived element edge entities are added to any existing element edges in the output idtran.

Parameters:
Returns:

Status

Status getMasterEntitySlaveNode(int slaveNodeIndex, int *elementIndex, int *entityNumber)

Return the master element contacting the slave node slaveNodeIndex. If no master element is found, then elementIndex and entityNumber are set to zero. The POSITION_TOLERANCE is queried and if specified, it is used to filter out any master element which is greater than the specified distance from the slave node. Otherwise the closest master element to the slave node is returned.

Errors
VALUE is generated if an improper slaveNodeIndex is specified.

Parameters:
  • slaveNodeIndex – Node index
  • elementIndex[out] Element number
  • entityNumber[out] Element face or edge number
Returns:

Status

Status print()

Print the contents of the InteractionPair object to standard output.

Returns:Status
Status setMasterAnalyticSurface(int id)

Set master analytic surface id.

See Also getMasterAnalyticSurface() .

Errors
VALUE is generated if an improper id is specified.

Parameters:id – Analytic surface index
Returns:Status
Status getMasterAnalyticSurface(int *id)

Inquire of master analytic surface id as an output argument.

See Also setMasterAnalyticSurface() .

Returns:Status
template<auto IntegerPropertyType, typename PropertyValue>
Status setPropertyIntegerValue(PropertyValue value)

Set an integer valued property. The integer valued property type is specified as a template parameter to ensure type safety. Use getPropertyIntegerValue()

to return integer valued properties. Note that setCoordinates() sets a default node type.

Example usage:

InteractionPair->setPropertyIntegerValue<IntegerProperty::SLAVE_SET>(slaveSetId);
InteractionPair->setPropertyIntegerValue<IntegerProperty::CONTACT_BEHAVIOR>(ContactBehavior::CPAIR_CONTACT_BEHAVIOR_BONDED);

Template Parameters:
 
Parameters:

value – integer property value

Returns:

Status

template<auto IntegerPropertyType, typename PropertyValue>
Status getPropertyIntegerValue(PropertyValue values[])

Return a defined integer valued property. If the value has not been defined or the value type is not integer, nothing is returned.

Template Parameters:
 
Parameters:

values[out] Integer property values

Returns:

Status