Example d22: Contact mechanics between two deformable bodies

This example illustrates contact between two deformable bodies

Initial setup After contact
Fig. 1 Initial setup Fig. 2 After contact


The comfile run by this example is as follows:


#######################################################
#
# This example illustrates contact between two deformable
# bodies (blue and red). The problem is solved over four
# load steps for stability
#
#######################################################

# Define parameters,regions,and coordinate system
fem def para;r;contact;example
fem def region;r;contact;example
fem def coord 3,1

# Read in deformable body
fem def nodes;r;rectus;example
fem def bases;r;collapsed;example
fem def elements;r;rectus;example

# Define fibre field (nj 4,5,6)
fem def fibre;r;rectus;example
fem def elements;r;rectus;example fibre

# Refine mesh
fem ref xi 1 at 0.5
fem ref xi 2 at 0.5
fem ref xi 3 at 0.5

# Export initial body
#fem exp nodes;rectus as rectus
#fem exp elements;rectus as rectus

# Read in target
fem def node;r;target;example region 2 
fem def element;r;target;example region 2

# Define target fibre field (nj 4,5,6)
fem def fibre;r;target;example reg 2 
fem def elements;r;target;example fibre reg 2

# Refine mesh
fem ref xi 1 at 0.5 reg 2
fem ref xi 2 at 0.5 reg 2
fem ref xi 3 at 0.5 reg 2

# Adjust for initial contact
fem change nodes rotate by -180 axis 0,0,1 reg 2
fem change nodes translate by 400,494,0 reg 2

# Export target body
#fem exp nodes;target as target region 2
#fem exp elem;target as target region 2 

# Setup node groups for initial conditions
fem group nodes 203..204,207..208,210,212,225..227 as FIXRALL reg 1
fem group nodes 201..202,205..206,209,211,213..224 as FIXR reg 1
fem group nodes 103..104,107..108,229,231,244..246 as FIXTALL reg 2
fem group nodes 101..102,105..106,228,230,232..243 as FIXT reg 2

# Method
fem def equa;r;rectus;example
fem def mate;r;rectus;example
fem def init;r;rectus;example
  
# Method (Target)
fem def equa;r;target;example reg 2
fem def mate;r;target;example reg 2 
fem def init;r;target;example reg 2

# define contact parameters
fem def contact;r;contact;example

# Define solve for coupled
fem def solve;r;rectus;example coupled reg 1,2

# Four load steps
for ($i=1;$i<5;$i++)
{
# prescribe load step and update
fem change nodes translate by 0,-6,0 node FIXRALL reg 1
fem update solution from geometry substitute reg 1
fem change nodes translate by 0,6,0 node FIXTALL reg 2
fem update solution from geometry substitute reg 2

$CONVERGED=0;
while ($CONVERGED==0) 
{
######################################Projection

# Set contact Xi points on specified faces as 6x6 points
fem def xi;c contact_points faces 23,27,3,8 points 6 reg 1

# Define data at xi positions 
fem def data;c from_xi

# Update slave info
fem update data field to slave

# Project onto target face
fem def xi;c closest_face faces 39,44,59,63 region 2

# Store projection gap in data fields
fem update data field from gap region 2  

# Update master info
fem update data field to master 

# Place initial geometry YP(ny,3) into XP
FEM up geom from sol YP_index 3 to 1..3 reg 1,2

#####################################Mechanics problem

# Solve finite elasticity/contact problem
fem solve error 0.01 iterate 15 coupled reg 1,2

# Update XP from YP
FEM up geom from sol to 1..3 reg 1,2

}

# Export final deformed meshes for current load step
#fem exp nodes;rectus_def$i as rectus
#fem exp nodes;target_def$i as target reg 2
}







Additional testing commands:



Files used by this example are:

Name               Modified     Size

example_d22.com 23-Apr-2008 3.2k collapsed.ipbase 21-Aug-2004 8.7k contact.ipcont 25-Sep-2008 628 contact.ippara 21-Feb-2008 6.0k contact.ipregi 21-Aug-2004 93 rectus.ipelem 21-Aug-2004 548 rectus.ipelfb 21-Aug-2004 400 rectus.ipequa 29-Sep-2004 2.2k rectus.ipfibr 21-Aug-2004 12k rectus.ipinit 21-Aug-2004 5.1k rectus.ipmate 21-Aug-2004 5.5k rectus.ipnode 21-Aug-2004 14k rectus.irsolv 16-Aug-2010 3.0k rectus.irsolv.old 13-Apr-2007 2.9k target.ipelem 21-Aug-2004 548 target.ipelfb 21-Aug-2004 411 target.ipequa 29-Sep-2004 2.2k target.ipfibr 21-Aug-2004 13k target.ipinit 21-Aug-2004 5.1k target.ipmate 21-Aug-2004 5.5k target.ipnode 21-Aug-2004 15k test_output.com 21-Aug-2004 0 view.com 21-Aug-2004 1.7k

Download the entire example:

Name                      Modified     Size

examples_d_d2_d22.tar.gz 17-Aug-2010 100k

Testing status by version:

StatusTestedReal time (s)
hpc_cm64_irixSuccessThu Apr 1 12:42:07 20042871
hpc_cm_irixSuccessFri Aug 20 03:04:33 20042519
hpc_cmo64_irixSuccessSun Jul 31 01:56:23 2005273
hpc_cmo_irixSuccessSun Aug 15 02:08:09 2004359
rs6000-aix
cmSuccessSun Aug 15 03:11:57 2004177
cm-debugSuccessSat Aug 21 09:08:59 200410568
cm64SuccessWed Mar 4 01:24:34 200946
cm64-debugSuccessThu Apr 1 11:34:54 20043388
x86_64-linux
cmSuccessSun Mar 6 00:02:18 201624

Testing status by file:


Html last generated: Sun Mar 6 05:51:25 2016

Input last modified: Mon Aug 16 11:35:04 2010


CMISS Help / Examples / d / d2 / d22