One major reason many people reject APDL is its operational autonomy. Take contact creation as an example: in Mechanical, the program intelligently identifies contact regions when importing models, helping users quickly create contacts. However, in APDL, this import-and-create operation is basically impossible. In most cases, contacts must be created manually, which for complex geometric models requires considerable effort.
In APDL, there are currently two ways to create contacts, which Shuige refers to as:
1. Traditional Contact Creation
2. General Contact Creation
The so-called traditional contact creation method is the same as our usual contact creation approach: first define contact elements and target elements, select nodes in the contact region, then use the ESURF command to generate contact elements and target elements. Contact element calculation characteristics such as contact stiffness, contact algorithm, and contact type are set through contact element key options, and friction coefficients are determined by specifying material numbers.
Traditional contact creation is very suitable for parametric operations requiring precise control of contact behavior, but this method is relatively cumbersome. Facing geometrically complex models, sometimes the effort is truly overwhelming.
Compared to traditional contact creation, general contact creation has an automated flavor—the software automatically generates contact elements based on the model’s geometric construction. Users no longer need to manually specify contact regions; they only need to master these two commands: GCGEN and GCDEF.
Below, Shuige briefly introduces these two commands with a small case study.
GCGEN: Main function is to generate general contacts. Command format:
GCGEN, Option, FeatureANGLE, EdgeKEY, SplitKey, SelOpt
Option: Mainly determines the specific operation of this command, including generate, update, delete, list, etc.
FeatureANGLE: Feature recognition angle, i.e., the angle used by the software when determining contact regions during general contact generation.
EdgeKEY: Whether to exclude point and line contacts. By default, only surface-to-surface contact is considered. If users need to consider line-to-surface, point-to-surface contacts, etc., detailed settings are required.
SplitKey: Determines whether generated contact element numbers are expressed separately according to geometric features.
Selopt: Determines the method for identifying parent elements where contacts are located.
GCDEF: Main function is to set general contact calculation characteristics. Command format:
GCDEF, Option, SECT1, SECT2, MATID, REALID, SECT1END, SECT2END
Option: Mainly determines the specific operation
SECT1~SECT2: Section IDs for contact and target elements
MATID, REALID: Contact specific characteristic number input
SECT1END~SECT2END: End section IDs in some cases
Generally, users should first use the GCGEN command to generate general contacts, then use the GCDEF command to specify calculation characteristics. The GCDEF command can be used repeatedly with multiple entries. If duplicate characteristics are specified, the last GCDEF command overrides the previous one.
For detailed usage of these two commands, please carefully review the software help documentation.
Below is a simple case study. The geometric model is shown below. The two parts have bonded contact, the bottom end is fixed, and the top is subjected to uniform load. Comparative analysis is performed using general contact and traditional manual contact creation:

General contact overall command stream:
finish
/clear
/prep7
et,1,solid185
mp,ex,1,2.1e5
mp,dens,1,7850e-12
mp,prxy,1,0.3
blc4,,,500,500,100
blc4,-250,-250,1000,1000,-100
esize,30
vsweep,all
!Create contact
gcgen,new,0,0,part
!Bonded
tb,inter,2,,,bonded
gcdef,auto,all,all,2
allsel,all
nsel,s,loc,x,-250
d,all,all
asel,s,loc,z,100
sfa,all,1,pres,-0.1
allsel,all
/solu
solve
Traditional contact creation command stream:
finish
/clear
/prep7
et,1,solid185
et,2,174
et,3,170
!Bonded
keyopt,2,12,5
mp,ex,1,2.1e5
mp,dens,1,7850e-12
mp,prxy,1,0.3
r,11
blc4,,,500,500,100
blc4,-250,-250,1000,1000,-100
esize,30
vsweep,all
!Create contact
vsel,s,,,1
nslv,s,1
nsel,r,loc,z,0
type,2
real,11
esurf
allsel,all
vsel,s,,,2
nslv,s,1
nsel,r,loc,z,0
type,3
real,11
esurf
allsel,all
nsel,s,loc,x,-250
d,all,all
asel,s,loc,z,100
sfa,all,1,pres,-0.1
allsel,all
/solu
solve
/post1
set,last
plnsol,u,sum
Results comparison:
General contact displacement contour:

Traditional contact displacement contour:

General contact stress contour:

Traditional contact stress contour:

Comparison shows that both have small errors, but modeling efficiency with general contact is much faster than traditional modeling methods!
In practical applications, you don’t necessarily have to choose a single modeling method. You can combine both methods—for parts that are not particularly important, use GCGEN for quick creation, while for areas of interest, use manual refined modeling. This balances both efficiency and quality!
Interested students should check the help documentation for these two commands GCDEF and GCGEN in detail.








No comments yet