*detectandcreateface2facecontacts

Detects if the specified components are within the contact distance specified and creates contact entities relevant to the solver interface.

Syntax

*detectandcreateface2facecontacts input_entity_type mark_id tolerance reverse_angle use_shell_thickness consolidate_surfaces run_intersection_check contact_type master_entity_type slave_entity_type property_option contact_property_id static_friction_value contact_material_id contact_master_sensor_id contact_slave_sensor_id skip_preview ?consider_self?

Type

HyperMesh Tcl Modify Command

Description

Detects if the specified components are within the contact distance specified and creates contact entities relevant to the solver interface.

The current solver template is used as an implicit input.

The output contact entities are created specific to a supported solver. For example, in ANSYS it will create contact surfaces and groups whereas in OptiStruct it will create groups with card images.

This is supported for ANSYS, OptiStruct, Samcef and Nastran (MSC).

Inputs

input_entity_type
The input entity type. Must be set to comps or elems.
mark_id
The ID of the mark containing the input entities. Valid values are 1 and 2.
tolerance
A non-zero search distance specified as the vicinity within which the contact is to be detected by executing the penetration collision logic. Components spaced greater than the vicinity tolerance are not considered to be in contact.
reverse_angle
The angle value used to compute the extent of the contact surface. This parameter is used in detecting the span of a convex contact surface on non-planar surfaces.
use_shell_thickness
A flag to use element thickness values specified on shell elements as the search distance. When this flag is specified as 1, then tolerance is ignored or can be 0.
consolidate_surfaces
After the contact is detected, contact surfaces are created. Those contact surfaces can be on different topological locations (discontinuous) on the base component that is in contact with that particular target component. When set as 0, a contact surface for each discontinuous patch is created and updated in the contact group. If set as 1, then only 1 contact surface is created for all the discontinuous patches.
run_intersection_check
Before a contact is detected and established using the penetration algorithm, the user has the option to execute the intersection check between any two components for the same input parameters of tolerance and reverse_angle by setting this as 1. Intersection is detected even if one element on the source component physically intersects an element on the target component. In such cases the contact surface normal is not uniquely defined for those intersecting elements.
When this is 0, the intersection check is not executed. However, the contact will be detected and contact surfaces will be created, but the resulting contact surface normal may not be desirable.
contact_type
The type of contact to create. The following values are supported:
Solver Value Type
OptiStruct 0 Contact
1 Tie
Samcef 0 MCT
1 STI
master_entity_type
The master entity type. The following values are supported:
Solver Value Type
OptiStruct 0 (default) SET_ELEM
1 SURF
slave_entity_type
The slave entity type. The following values are supported:
Solver contact_type Value Type
OptiStruct all 0 SET_GRID
1 SET_ELEM
2 SURF
Samcef 0 (MCT) 0 SET of elements (2D)

CONTACT SURFACE (3D)

1 SET of nodes (2D)

SET of face nodes (3D)

property_option
The property option. The following values are supported:
Solver contact_type Value Type
ANSYS N/A 0 Existing property ID is used
1 Infer sensors and auto-generate properties
OptiStruct 0 (Contact) 0 SLIDE
1 STICK
2 FREEZE
Nastran (MSC) N/A <prop_id> Geometric contact property ID (BCGPIC)
contact_property_id
On creation of contact pairs, some of the interfaces have attributes to select property ID as the input. When this argument is specified with an ID, and if it exists, it is attached to the contact pair. For non-relevant interfaces this will be ignored.
Note that this argument supersedes property_option and static_friction_value, except for ANSYS. In ANSYS, if property_option is specified, then contact_property_id is ignored.
In Nastran (MSC) this is the physical contact property (BCPPID).
This is relevant for ANSYS, Nastran and OptiStruct.
static_friction_value
The value for the static friction coefficient. This is superseded by contact_property_id and property_option arguments. If contact_property_id, property_option and static_friction_value are all specified, contact_property_id takes precedence. If property_option and static_friction_value are both specified, property_option takes precedence. In both cases, the friction value is adjusted internally to a negative number to establish precedence and thus will be ignored.
This is only relevant for OptiStruct.
contact_material_id
On creation of contact pairs, some of the interfaces have attributes to select material ID as the input. When this argument is specified with such an ID, and if it exists, it is attached to the contact pair. For non-relevant interfaces this will be ignored.
This is only relevant for ANSYS.
contact_master_sensor_id
On creation of contact pairs, some of the interfaces have attributes to select master sensor ID as the input. When this argument is specified with such an ID, and if it exists, it is attached to the contact pair. For non-relevant interfaces this will be ignored. In ANSYS, property_option is ignored when specified along with this option.
This is only relevant for ANSYS.
contact_slave_sensor_id
On creation of contact pairs, some of the interfaces have attributes to select slave sensor ID as the input. When this argument is specified with such an ID, and if it exists, it is attached to the contact pair. For non-relevant interfaces this will be ignored. In ANSYS, property_option is ignored when specified along with this option.
This is only relevant for ANSYS.
skip_preview
After creation of contact entities, by default (0), all the newly created contact entities are considered to be "under review" and their export flag is turned off. If you choose to confirm all the auto-contact created entities and have their export flag turned on, this should be 1. When specified as 1, a confirmation dialog box with the entities list is also skipped.
consider_self
Consider elements in the same component for creation of contacts. By default (0), elements within the same components are not considered for the creation of contacts. If a single component is selected as input, this should be set to 1.

Examples

To detect contacts between all components in the model:

hm_createmark comps 1 "advanced" "all"
*detectandcreateface2facecontacts components 1 1.0 15.0
To create contacts between components by using shell thickness and consolidating surfaces:
*detectandcreateface2facecontacts components 1 0 15.0 1
To create contacts in ANSYS with property (1), material (2), master (3) and slave sensor (4) specified:
*detectandcreateface2facecontacts components 1 1.0 15.0 0 0 1 0 0 0 0 1 0 2 3 4
To run an intersection check and create contact entities in OptiStruct with master entity type as SURF(1) and slave entity type as SURF(2) with static friction coefficient as 0.18:
*detectandcreateface2facecontacts components 1 5 15 0 1 1 0 1 2 0 0 0.18
To run intersection check and create contact entities in OptiStruct with master entity type as SET OF ELEMENTS(0) and slave entity type as SET OF NODES(1) with property option as STICK(1):
*detectandcreateface2facecontacts components 1 5 15 0 1 1 0 0 1 1

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

14.0.130

2017.1 - Added support for Nastran (MSC) groups to contactgroups conversion.

2019.1 - Added support for elems input_entity_type and new optional argument consider_self.