Contact Element Example

The ANSYS contact element CONTACT48 allows friction to be modelled as a normal force only or as a normal force and a shear force. In this model there are two blocks, one above top of the other, with a small separation. The top block is cantilevered while the bottom block is tied to ground. The top block experiences a load and comes into contact with the lower block.

This command file is also useful to demonstate the use of sets or selections to group nodes/keypoints or to select a single node/keypoint to which boundary conditions will be applied.

[Contact Element Example]


/title,Sample of CONTACT48 element type
/prep7
RECTNG,0,10,0,2     ! define rectangular areas
RECTNG,2.5,7.5,2,4
aplot

! define element type

ET,1,plane42,,,3,,2 ! element type 1, plane stress w/thick, nodal, strs out 
type,1              ! activate element type 1
R, 1, 0.01          ! thickness 0.01   

! define material properties

MP,EX,  1, 200e3    ! Young's modulus
MP,NUXY,1, 0.3      ! Poisson's ratio

MP,EX,  2, 20e3     ! Young's modulus (10 times less rigid!)
MP,NUXY,2, 0.3      ! Poisson's ratio

! meshing

esize,0.5           ! set meshing size
mat,1               ! turn on material set #1
real,1              ! real set #1
amesh,1             ! mesh area 1

esize,0.35
mat,2
amesh,2

/pnum,mat,1         ! turn on material color shading
eplot

ET,2,contac48,,1    ! defines second element type - 2D contact elements
keyo,2,7,1
r,2,20e3,,0.005,,10
TYPE,2              ! activates or sets this element type
real,2

! define contact nodes and elements

! first the contact nodes
asel,s,area,,2           ! select top area
nsla,s,1                 ! select the nodes within this area
nsel,r,loc,y,1.99,2.01   ! select bottom layer of nodes in this area  
cm,source,node           ! call this group of nodes 'source'

! then the target nodes
allsel                   ! relect everything
asel,s,area,,1           ! select bottom area
nsla,s,1                 ! select nodes in this area
nsel,r,loc,y,1.99,2.01   ! the top layer of nodes from this area  
cm,target,node           ! call this selection 'target'

gcgen,source,target,3    ! generate contact elements between defined nodes

finish
/solution
antype,stat,new 

!Ground upper left hand corner of top block
ksel,s,loc,x,2.5
ksel,r,loc,y,4
dk,all,all,0

! Ground bottom nodes on bottom block
allsel
nsel,s,loc,y,0   ! when vmin = vmax (0 here), a small tolerance is used
d,all,all,0 

! Give top right corner a vertical load
allsel
ksel,s,loc,x,7.5
ksel,r,loc,y,4
fk,all,fy,-100

allsel
time,1
nsubst,20,100
autots,on        ! auto time stepping
pred,on          ! predictor on
nropt,full,,on   ! Newton-Raphson on
solve   
finish