*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 main_entity_type secondary_entity_type property_option contact_property_id static_friction_value contact_material_id contact_main_sensor_id contact_secondary_sensor_id skip_preview ?consider_self? thickness_type thickness_value friction_direction set_name_prefix csurf_name_prefix include_whole_components ?copy_tolerance_to_contact?

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, Nastran (MSC), and ADVC.

Inputs

csurf_name_prefix
The optional prefix string for the created contact surface entities.
This is only relevant for OptiStruct, Radioss, Abaqus, and LS-DYNA.
friction_direction
The value of parameter friction on the created $CONTACT cards.
This is only relevant for Permas.
include_whole_components
0 - Only the elements detected during the proximity check are included in the created contact surfaces (default).
1 - The contact surfaces will include entire components even if only a few elements of the component are detected during the proximity check.
This is only relevant for Abaqus.
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.
set_name_prefix
The optional prefix string for created Set entities.
This is only relevant for OptiStruct, Radioss, LS-DYNA, Nastran, Permas, Samcef, and ADVC.
thickness_type
The parameter defining the interpretation of thickness_value.
0 - thickness_value will be added to the thicknesses of shell elements (default).
1 - thickness_value specifies a multiplication factor for shell elements.
thickness_value
Based on the thickness_type value, this is either an add-on value or a multiplication factor for shell thicknesses during proximity detection.
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
Nastran (NX) 0 BCTSET
1 BGSET
ADVC 0 Not specified
1 Tying
2 ShearTying
3 SmallSliding
4 FiniteSliding
5 NotSliding
main_entity_type
The main entity type. The following values are supported:
Solver Value Type
OptiStruct 0 (default) SET_ELEM
1 SURF
secondary_entity_type
The secondary 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, Nastran (NX), and OptiStruct.
For the ADVC interface, a contact pair can be assigned with friction ID. When this argument is specified with friction ID (as an integer), and if it exists, it is attached to the generated contact pair.
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_main_sensor_id
On creation of contact pairs, some of the interfaces have attributes to select main 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_secondary_sensor_id
On creation of contact pairs, some of the interfaces have attributes to select secondary 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, when specified as 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 or 2. 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.
copy_tolerance_to_contact
Copies the tolerance value specified by the user to a relevant search distance parameter on the created group entity. By default (0), no value is copied to the createdgroup entity. When specified as 1, the specified tolerance value is copied to the following parameter on the created group entity:
Solver Group Parameter
OptiStruct SRCHDIS

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), main (3) and secondary 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 main entity type as SURF(1) and secondary 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 main entity type as SET OF ELEMENTS(0) and secondary 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, thickness_type, and thickness_value.

2020 - Added new options friction_direction, set_name_prefix, csurf_name_prefix, and include_whole_components.

2020.1 - Added new optional argument copy_tolerance_to_contact.

2021.1 - Added Nastran (NX) support.

2021.2 - Added ADVC interface support.