*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, Nastran (MSC), and ADVC.
Inputs
- csurf_name_prefix
- The optional prefix string for the created contact surface entities.
- friction_direction
- The value of parameter friction on the created $CONTACT cards.
- include_whole_components
- 0 - Only the elements detected during the proximity check are included in the created contact surfaces (default).
- 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.
- thickness_type
- The parameter defining the interpretation of thickness_value.
- 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.
- contact_type
- The type of contact to create. The following values are supported:
Solver Value Type OptiStruct 0 Contact 1 Tie 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 - 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.
- 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.
- 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.
- 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.
- 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.
- 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
*detectandcreateface2facecontacts components 1 0 15.0 1
*detectandcreateface2facecontacts components 1 1.0 15.0 0 0 1 0 0 0 0 1 0 2 3 4
*detectandcreateface2facecontacts components 1 5 15 0 1 1 0 1 2 0 0 0.18
*detectandcreateface2facecontacts components 1 5 15 0 1 1 0 0 1 1
Errors
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.