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.
- Define and query interaction pair type
define()- Define master and slave entity typesinquire()- Inquire master and slave entity typessetType()- Set interaction or co-simulation typegetType()- Get interaction or co-simulation typesetMeshInterface()- Set pointers to attribute objects
- Master surface operations
isMasterEntityDefined()- Query master entity definedgetMasterElementEntity()- Query master entitysetMasterElement()- Set master element entitysetMasterAnalyticSurface()- Set master analytic surfacegetMasterAnalyticSurface()- Get master analytic surfaceinitializeMasterEntityIterator()- Prepare to visit each master entitynextMasterEntityItem()- Return next master entitygetMasterElementCount()- Return number of mastere entities
- Slave surface operations
isSlaveEntityDefined()- Query slave entity definedgetSlaveElementEntity()- Query slave entitygetSlaveNode()- Query slave node areasetSlaveElement()- Set slave element entitysetSlaveNode()- Set slave node entity and areainitializeSlaveElementEntityIterator()- Prepare to visit each slave entitynextSlaveElementEntityItem()- Return next slave entityinitializeSlaveNodeIterator()- Prepare to visit each slave nodenextSlaveNodeItem()- Return next slave nodegetSlaveCount()- Return number of slave entitiesgetMasterEntitySlaveNode()- Query the master entity contacting a slave node
- Property operations
setPropertyIntegerValue- Set integer propertysetPropertyDoubleValue()- Set real valued propertygetPropertyFlag()- Query property type definedgetPropertyInformation()- Query property parametersgetPropertyName()- Query property namegetPropertyDoubleValue()- Query property double valuegetPropertyIntegerValue- Query property integer value
- List generation operations
getListOfEdges()- Edge list of master or slave elementsgetListOfFaces()- Face list of master or slave elementsgetListOfSlaveNodes()- Node list of slave nodes
- General functions
hasInteractionPairSpecified()- Query any master or slave specificationssetName()- Set name stringgetName()- Get name stringgetErrorCode()- Get error codeprint()- Print object contents
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.
-
enumerator
-
enum class
SurfaceType Surface designation in interaction pair.
Values:
-
enumerator
MASTER Master surface.
-
enumerator
SLAVE Slave surface.
-
enumerator
-
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.
-
enumerator
-
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.
-
enumerator
-
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.
-
enumerator
-
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.
-
enumerator
-
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.
-
enumerator
Public Functions
-
ErrorCode
getErrorCode() Return the current
ErrorCodeof the InteractionPair object.Returns: ErrorCode- The current error code, orNONEif 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 usingsetMasterAnalyticSurface(). The slave entity type may be node or element edge or face. If the slave entity type isNODEthen slave node entities are specified usingsetSlaveNode()otherwise slave element entities are defined usingsetSlaveElement(). For the special case of self-contact set the slave entity type toNONEand define only the master surface. The slave surface is assumed to be the master surface.See Also
inquire().Parameters: - masterEntityType – Master
EntityType - slaveEntityType – Slave
EntityType
Returns: - masterEntityType – Master
-
Status
inquire(EntityType *masterEntityType, EntityType *slaveEntityType) Inquire of defined masterEntityType and slaveEntityType as output arguments.
See Also
define().Parameters: - masterEntityType – Master
EntityType - slaveEntityType – Slave
EntityType
Returns: - masterEntityType – Master
-
Status
setType(Type type) Set contact, cyclic or co-simulation surface type. By default the surface type is
CONTACT.See Also
getType().Parameters: type – TypeReturns: 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
setSlaveNode(int index, double area) Set slave node index and area.
- Errors
-
VALUEis generated if an improper index is specified.
Parameters: - index – Node index
- area – Node area
Returns:
-
Status
setSlaveElement(int index, int entityNumber) Set slave element index and face or edge number, entityNumber.
- Errors
-
VALUEis generated if an improper index or entityNumber is specified.
Parameters: - index – Element index
- entityNumber – Element edge or face number
Returns:
-
Status
setMasterElement(int index, int entityNumber) Set master element index and face or edge number, entityNumber.
- Errors
-
VALUEis generated if an improper index or entityNumber is specified.
Parameters: - index – Element index
- entityNumber – Element edge or face number
Returns:
-
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
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
-
VALUEis generated if an improper index is specified.
Parameters: - index – Node or element number.
- flag – [out] Node or element edge or face flag.
Returns:
-
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
-
VALUEis 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
getSlaveNode(int index, double *area) Return slave node area. If the slave node has not been specified then area is returned as zero.
- Errors
-
VALUEis generated if an improper index is specified.
Parameters: - index – Node index
- area – [out] Node area
Returns:
-
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
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
-
VALUEis generated if an improper index is specified.
Parameters: - index – Element number
- flag – [out] Element edge or face flags
Returns:
-
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
-
VALUEis 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
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: - type –
DoubleProperty - value – Real property value
Returns: - type –
-
Status
getPropertyFlag(IntegerProperty type, PropertyFlag *flag) Query for integer valued property definition. If a property value is not defined,
UNDEFINEDis returned, if the property has been defined by value thenVALUEis returned.Parameters: - type –
IntegerProperty - flag – [out] Flag indicating if property type defined or not.
PropertyFlag
Returns: - type –
-
Status
getPropertyFlag(DoubleProperty type, PropertyFlag *flag) Query for real valued property definition. If a property value is not defined,
UNDEFINEDis returned, if the property has been defined by value thenVALUEis returned.Parameters: - type –
DoubleProperty - flag – [out] Flag indicating if property type defined or not.
PropertyFlag
Returns: - type –
-
Status
getPropertyInformation(IntegerProperty type, int *componentCount) Query for the number of components associated with an integer valued property type.
Parameters: - type –
IntegerProperty - componentCount – [out] Number of components
Returns: - type –
-
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: - type –
-
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: - type –
IntegerProperty - name – [out] Property name
Returns: - type –
-
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: - type –
DoubleProperty - name – [out] Property name
Returns: - type –
-
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: - type –
DoubleProperty - values – [out] Double property values.
Returns: - type –
-
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: - type –
SurfaceType - idtran – [out] Pointer to derived IdTranslator object of element faces.
Returns: - type –
-
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: - type –
SurfaceType - idtran – [out] Pointer to derived IdTranslator object of element edges.
Returns: - type –
-
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_TOLERANCEis 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
-
VALUEis generated if an improper slaveNodeIndex is specified.
Parameters: - slaveNodeIndex – Node index
- elementIndex – [out] Element number
- entityNumber – [out] Element face or edge number
Returns:
-
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
-
VALUEis 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, typenamePropertyValue>
StatussetPropertyIntegerValue(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: - IntegerPropertyType –
IntegerProperty - PropertyValue – Type of the property value
Parameters: value – integer property value
Returns: - IntegerPropertyType –
-
template<auto
IntegerPropertyType, typenamePropertyValue>
StatusgetPropertyIntegerValue(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: - type – from
IntegerProperty - PropertyValue – Type of the property value (int,
ShellWallType, etc.: seesetPropertyIntegerValue())
Parameters: values – [out] Integer property values
Returns: - type – from
-
enum class