By default, the program automatically uses standard, frictionless interaction behavior among all general contact surfaces, including self-contact.
You can define a specific (non-default) interaction behavior for any surface that will potentially come into contact with another surface in the general contact definition. You can also exclude contact interaction, for example, where one surface will never contact with another surface during the analysis.
Use the GCDEF command to define specific interactions or exclusions:
GCDEF,Option
,SECT1
,SECT2
,MATID
,REALID
where:
Option
is typically an interface pairing option (AUTO, ASYM, SYMM, or EXCL). See Assigning Interface Pairing Options for details.SECT1
andSECT2
are section ID numbers that identify the two general contact surfaces for which the interaction is defined. Alternatively, you can input the name of a nodal component that contains multiple section IDs in theSECT1
and/orSECT2
fields. Other labels such as ALL and SELF are also valid input for these fields.MATID
andREALID
are material and real constant IDs used to specify contact interaction properties and other contact parameters at the interface.
The following GCDEF usage topics are available:
- 8.8.1. Specifying General Contact Interactions Between Surfaces
- 8.8.2. Specifying General Contact Interactions Between Nodal Components
- 8.8.3. Specifying General Contact Interactions for the Entire Model
- 8.8.4. Specifying Contact Exclusions
- 8.8.5. Assigning Interface Pairing Options
- 8.8.6. Deleting Specified General Contact Interactions
Each general contact surface is identified by a unique section ID, which is
typically generated by the GCGEN command. When defining a contact
interaction between specific surfaces, you input the section ID numbers
(SECT1
and SECT2
) on the
GCDEF command to indicate the two surfaces for which contact
can occur. You must input SECT1
and
SECT2
. There are no defaults.
Contact Between Two Surfaces
A general contact interaction defined between two surfaces (where
SECT1
≠ SECT2
, but
both are > 0) is the most specific type of general contact specification
(comparable to controlling a specific contact pair):
GCDEF,AUTO,SECT1
,SECT2
,MATID
,REALID
Self Contact
To control self-contact between different portions of a single general contact
surface, input the same section ID for both SECT1
and
SECT2
. In the following example, self contact is
defined for the general contact surface identified by section ID = 3:
GCDEF,AUTO,3,3,MATID
,REALID
Alternatively, you can set SECT1
or
SECT2
= SELF:
GCDEF,AUTO,3,SELF,MATID
,REALID
The two types of general contact specifications described above—contact defined between two specific surfaces and self-contact—are the most specific types of general contact interactions that you can define.
Instead of inputting a specific section ID in the SECT1
or SECT2
field of the GCDEF command,
you can specify the name of a nodal component that is currently defined within the
finite element model. The nodal component must have been previously defined via the
CM command and must contain exterior nodes of one or more
surfaces. Component names are valid input for SECT1
and
SECT2
when Option
=
(blank), ASYM, AUTO, SYMM, EXCL, DELETE, LIST, TABLE, or TABLESOL.
In the example below, the GCDEF command specifies contact between nodal components representing the pin and rod surfaces of the model discussed in Modeling General Contact - Basic Procedure.
NSEL,S,NODE,.... ! Select a set of nodes on pin surface CM,PIN,NODE ! Group selected nodes into component PIN NSEL,S,NODE,.... ! Select a set of nodes on rod surface CM,ROD,NODE ! Group selected nodes into component ROD ! GCDEF,ASYM,PIN,ROD,BondID,REALID ! Define asymmetric bonded contact between ! components PIN and ROD (BondID is a maerial ID)
The GCDEF command loops through all valid section IDs found in
each node component input for SECT1
and
SECT2
. The node component names are not stored or
listed, Instead, the interpreted section IDs are stored and listed as separate
GCDEF entries.
Thus, when the node components input for SECT1
and
SECT2
contain nodes from multiple general contact
surfaces having different section IDs, all possible combinations of
SECT1
/SECT2
interactions
are considered in the general contact definition. As an example, if component 1
(input for SECT1
) contains nodes from
N1
section IDs and component 2 (input for
SECT2
) contains nodes from
N2
section IDs, the GCDEF command
defines contact interactions for
N1
×N2
surface
combinations.
Contact can be defined between general contact surfaces using a combination of section IDs and defined components, as illustrated below:
GCDEF,AUTO,1,COMP2,MATID,REALID ! Define auto asymetric contact ! between SECT1 and component COMP2 GCDEF,AUTO,COMP1,SELF,MATID,REALID ! Define self contact for component COMP1
The scope of general contact section IDs from a node component can be limited by adding one of the following extensions onto the component name that you input:
_edge | Returns only section IDs of all CONTA177 general contact line elements (which may be on edges of 3D solid or shell base elements, or on beam base elements) |
_face | Returns only section IDs of general contact elements on faces of solid or shell base elements (includes contact elements on both the top and bottom of shell elements) |
_vert | Returns only section IDs of all CONTA175 general contact vertex elements (which may be on convex corners of 2D or 3D solid or shell base elements) |
_top | Returns only section IDs of general contact elements on top faces of shell base elements and on faces of solid base elements |
_bot | Returns only section IDs of general contact elements on bottom faces of shell base elements and on faces of solid base elements |
If none of these extensions is present, the given GCDEF specification is applied to all types of general contact elements.
The following example demonstrates use of the extensions:
GCDEF,EXCLUDE,7,COMP2_EDGE ! Exclude contact between SECT7 and component COMP2 edges GCDEF,SYMM,COMP1_TOP,SELF,MATID ! Define symmetric self contact for component COMP1 top faces
Be cautious when using GCDEF,EXCLUDE. If you do not specify an extension on the component name, both faces and edges are excluded by default.
To make global changes for general contact, you can input the label ALL instead of
a specific section ID in the SECT1
and
SECT2
fields of the GCDEF command.
For example, to override the default frictionless contact among all general contact surfaces with a different interface behavior or contact control, issue:
GCDEF,Option
,ALL,ALL,MATID
where MATID
corresponds to a behavior other than
standard frictionless behavior (for example, always bonded).
To define specifications for self contact for all general contact surfaces, issue:
GCDEF,Option
,ALL,SELF,MATID
,REALID
or
GCDEF,Option
,SELF,ALL,MATID
,REALID
Either of these command controls the general contact behavior for self contact for all surfaces (section 1 with section 1, section 2 with section 2, and so on).
To control general contact interaction between a specific surface and any general contact surface (another surface or itself), issue:
GCDEF,Option
,SECT1
,ALL,MATID
,REALID
or
GCDEF,Option
,ALL,SECT2
,MATID
,REALID
The above two commands are equivalent except when
Option
is set to ASYM (asymmetric contact). For
example, the following command treats SECT1
as the
contact surface with respect to all other surfaces, which will be target surfaces:
GCDEF,ASYM,SECT1
,ALL,MATID
,REALID
On the other hand, the following command treats SECT2
as the target surface with respect to all other surfaces, which will be contact
surfaces:
GCDEF,ASYM,ALL,SECT2
,MATID
,REALID
The labels ALL_EDGE, ALL_FACE, ALL_VERT, ALL_TOP, and
ALL_BOT are also valid input for SECT1
and
SECT2
. (See GCDEF for details of
the meaning of each label.) These labels apply to all defined general contact
element section IDs in the model without regard to the select status of the elements
or attached nodes. The labels are immediately converted to section ID numbers,
unlike the ALL label which is stored as ALL.
In some coarse mesh situations where there are no nodes internal to a surface, ALL_FACE, ALL_TOP, and ALL_BOT may pick up CONTA172 or CONTA174 section or type IDs that would be missed for a node component containing all defined nodes.
The GCDEF command allows you to exclude contact between
specified surfaces. Use Option
= EXCL and specify the
surfaces SECT1
and
SECT2
:
GCDEF,EXCL,SECT1
,SECT2
There are two possible reasons to define a contact exclusion:
To improve computational performance by excluding surfaces that are not likely to interact
To improve modeling robustness by avoiding physically unreasonable contact interactions (see Example 8.1: Excluding Spurious Contact)
To exclude self-contact within a surface, set SECT1
=
SECT2
. For example, the following command excludes
self contact for the surface identified by section ID number 4:
GCDEF,EXCL,4,4
To exclude self-contact for all general contact surfaces, issue:
GCDEF,EXCL,All,SELF
or
GCDEF,EXCL,SELF,ALL
For many assembly models, self-contact is unlikely to occur. Using one of the above commands to exclude self-contact prevents unreasonable interactions within each part, in particular for assemblies with very thin parts.
To exclude contact between a particular surface and all other general contact surfaces (partial general contact exclusion), issue:
GCDEF,EXCL,SECT1
,ALL
or
GCDEF,EXCL,ALL,SECT2
Alternatively, you may delete general contact elements on surfaces that should be excluded. This results in an even more efficient solution.
To exclude all general contact interactions, which completely overrides the default frictionless contact, issue:
GCDEF,EXCL,ALL,ALL
The labels ALL_EDGE, ALL_FACE, ALL_VERT, ALL_TOP, and
ALL_BOT are also valid input for SECT1
and
SECT2
. (See GCDEF for details of
the meaning of each label.) For example
GCDEF,EXCL,4,ALL_EDGE ! Exclude contact between section 4 and all edges
Example 8.1: Excluding Spurious Contact
Consider the model below in which one shell box (node component BI) is fitted inside another shell box (node component BE). For this shell-to-shell contact example, some of the shell elements of the inner and outer boxes overlap, and the general contact solution detects two possible contact interactions:
The exterior surface of the inner shell box contacting the interior surface of the outer shell box
The interior surface of the inner shell box contacting the exterior surface of the outer shell box
The second interaction is obviously spurious contact, and it should be excluded manually by issuing:
GCDEF,EXCL,BE_TOP,BI_BOT
Mechanical APDL automatically excludes general contact in the following situations:
Excludes general contact elements that overlap with existing contact pairs. For instance, if a pair-based interaction has been defined between surface 1 and surface 2, the program automatically excludes general contact interactions between these two surfaces so that only the contact pair definition is used. The surfaces involved could either be a subset of general contact surfaces or could overlap fully/partially over several general contact surfaces.
Excludes contact interaction between any two rigid surfaces, and self-contact within each rigid surface.
Keeps one side of the contact-target pairing if automatic asymmetric contact logic is used, while excluding the opposite side of the contact interaction.
Excludes contact interactions for portions of surfaces that largely penetrate each other (larger than one quarter of the pinball radius) in the initial configuration, except when you define an absolute pinball radius.
The Option
field on the GCDEF
command accepts four input labels that enable you to define the interface pairing
option for general contact surfaces identified by SECT1
and SECT2
.
Option
Label | Description | Command |
---|---|---|
AUTO | Automatic asymmetric contact between surfaces
SECT1 and
SECT2 . This is the default if
Option was not previously
specified |
GCDEF,AUTO, |
ASYM | Asymmetric contact with SECT1 as the
contact surface and SECT2 as the target
surface |
GCDEF,ASYM, |
SYMM | Symmetric contact between surfaces
SECT1 and
SECT2 |
GCDEF,SYMM, |
EXCL | Exclude contact interaction between surfaces
SECT1 and
SECT2 .
MATID and
REALID are ignored. |
GCDEF,EXCL, |
The automatic asymmetric pairing option (Option
= AUTO)
is based mainly on relative mesh refinement and material rigidity. This logic is
also used for self-contact within a surface (when SECT1
=
SECT2
). For example when a user-defined surface
overlays several unconnected parts, contact between parts having the same section ID
as well as contact of each part with itself are considered to be self-contact.
Self-contact within a physical part always uses symmetric contact.
The automatic asymmetric pairing logic, which is set by default for surface-to-surface contact (CONTA172 and CONTA174), works well in most cases.
For the asymmetric pairing option (Option
= ASYM), the
guidelines for assigning contact-target pairing rules for pair-based contact
discussed in Designating Contact and Target Surfaces are also applicable for situations in
which you manually define the asymmetric logic for the general contact.
The symmetric pairing option (Option
= SYMM) is often
used when the interface mesh from both sides is relatively coarse. Symmetric contact
enforces the contact constraint conditions at more surface locations than asymmetric
contact. The limitations of symmetric logic for pair-based contact discussed in
Asymmetric Contact vs. Symmetric Contact are also applicable for situations in which you
manually specify symmetric general contact.
The symmetric pairing logic is set by default for 3D beam-to-beam or edge-to-edge contact (CONTA177).
Examples: Self-Contact
The following table presents examples of how to use the contact pairing options for self-contact.
Self-Contact Pairing Example | Command | Notes |
---|---|---|
Automatic asymmetric contact for self-contact within a specific surface identified by Section ID = 5 |
GCDEF,AUTO,5,5, | Option = ASYM is not
valid for a self-contact definition. If input, it will be treated as
Option = AUTO. |
Symmetric contact for self-contact within a specific surface identified by Section ID = 6 |
GCDEF,SYMM,6,6, | |
Automatic asymmetric contact for self-contact within surfaces defined via nodal components |
GCDEF,AUTO,COMP1,COMP2, | |
Automatic asymmetric contact for self-contact within all surfaces |
GCDEF,AUTO,ALL,SELF, | |
Symmetric contact for self-contact within all surfaces |
GCDEF,SYMM,ALL,SELF, |
Examples: Contact Between One Surface and All Other General Contact Surfaces
The following table presents examples of how to use the contact pairing options to define interactions between one specific surface and all general contact surfaces.
Contact Pairing Example (One Surface to All Surfaces) | Command | Notes |
---|---|---|
Automatic asymmetric contact between one specific surface and all general contact surfaces | GCDEF,AUTO,or GCDEF,AUTO,ALL, |
In some cases, a conflict can arise between general contact
specifications for one surface to all surfaces. When this
occurs, the program determines the actual material ID
( As an example, consider the following general contact specifications: GCDEF,Option1,6,ALL,MATID1,REALID1 GCDEF,Option2,7,ALL,MATID2,REALID2 To avoid a conflict, you can add a specific entry for surfaces 6 and 7: GCDEF,Option,6,7, |
Symmetric contact between one specific surface and all general contact surfaces | GCDEF,SYMM,or GCDEF,SYMM,ALL, | |
Asymmetric contact between SECT1 and
all general contact surfaces, where SECT1
is the contact surface |
GCDEF,ASYM, | |
Asymmetric contact between SECT2 and
all general contact surfaces, where SECT2
is the target surface |
GCDEF,ASYM,ALL, | |
Automatic asymmetric contact between surface specified via nodal component COMP1 and all general contact surfaces |
GCDEF,AUTO,COMP1,ALL, |
Examples: Contact Among All General Contact Surfaces
The following table presents examples of how to use the contact pairing options to define contact among all general contact surfaces.
Contact Pairing Example (All Surfaces) | Command | Notes |
---|---|---|
Automatic asymmetric contact among all general contact surfaces |
GCDEF,AUTO,ALL,ALL, | Option = ASYM is not valid for all
general contact surfaces. If input, it will be treated as
Option = AUTO. |
Symmetric contact among all general contact surfaces |
GCDEF,SYMM,ALL,ALL, |
If you need to remove a particular general contact specification that was
previously defined, use Option
= DELETE on the
GCDEF command:
GCDEF,DELETE,SECT1
,SECT2
To remove general contact interactions previously defined by “ALL,ALL”, issue:
GCDEF,DELETE,ALL,ALL
Note that GCDEF,DELETE,ALL,ALL does not remove the entire GCDEF table. It merely removes any existing GCDEF,,ALL,ALL definitions, while leaving intact any existing GCDEF definitions that are more specific.
To remove the entire GCDEF table, issue:
GCDEF,DELETE,TOTAL
It is good practice to list all interactions (GCDEF,LIST) before and after a GCDEF,DELETE command.