Example d23: Tied contact between a muscle and bone

This example illustrates tied contact between a muscle and bone. A muscle is contracted and the tied bone is pulled.

Before contraction After contraction
Fig. 1 Before contraction Fig. 2 After contraction


The comfile run by this example is as follows:


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

$REG=1;
######################################################muscles
# muscle_list
@muscle_list = ('rectus');
foreach $component (@muscle_list)
{ 
#Read in muscle
fem def nodes;r;simulate_$component;example  reg $REG
fem def elements;r;simulate_$component;example  reg $REG

# Define muscle fibre field (nj 4,5,6)
fem def fibre;r;simulate_$component;example reg $REG
fem def elements;r;simulate_$component;example fibre reg $REG

if ($REG==1){fem group nodes 3005..3044 as RECTUSNODES reg $REG}
if ($REG==1){fem group nodes 3001..3004,3045 as RECTUSFIXED reg $REG}
if ($REG==1){fem group nodes 3036,3030,3027,3024,3019,3015,3011,3007,3003 as RECTUSFIXEDXY reg $REG}

# Muscle (active contraction + contact option)
fem def equa;r;simulate_$component;example reg $REG
fem def mate;r;simulate_$component;example reg $REG
fem def init;r;simulate_$component;example reg $REG
fem def acti;r;simulate_$component;example reg $REG 

# Export initial muscle
#fem exp nodes;init_simulate_$component as $component reg $REG
#fem exp elements;init_simulate_$component as $component reg $REG
$REG=$REG+1;
}

#######################################################bones
# bone_list
@bone_list = ('patella');
foreach $component(@bone_list)
{ 
# Read in bone
fem def node;r;simulate_$component;example region $REG 
fem def element;r;simulate_$component;example region $REG

# Define bone fibre field (nj 4,5,6)
fem def fibre;r;simulate_$component;example reg $REG 
fem def elements;r;simulate_$component;example fibre reg $REG

if ($REG==2){fem group nodes 2001..2047 as PATELLANODES reg $REG}

# bone (only contact option)
fem def equa;r;simulate_$component;example reg $REG
fem def mate;r;simulate_$component;example reg $REG
fem def init;r;simulate_$component;example reg $REG

# Export initial bone
#fem exp nodes;init_simulate_$component as $component region $REG
#fem exp elem;init_simulate_$component as $component region $REG
$REG=$REG+1;
}
#######################################################

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

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

$CONVERGED=0;
while($CONVERGED==0)
#for($j=1;$j<2;$j++)
{
# Set contact Xi points on specified faces as 8x8 points
fem def xi;c contact_tied faces 99,96,89,93 points 8 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 (master surface)
#fem group faces 218,220,200,203,215,235,236,223,225,227,229,231,233 as PATELLAFACES reg 2
#fem def xi;c closest_face faces PATELLAFACES region 2 
#fem def xi;w;target closest_face region 2 

fem def xi;r;target;example closest_face 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 1.0D-03 iterate 10 coupled reg 1,2

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

}

# Export final deformed mesh 
#$REG=1;
# solution_list
#@solution_list = ('rectus','patella');
#foreach $component(@solution_list)
#{
#fem exp nodes;def_$component as $component region $REG
#fem exp elem;def_$component as $component region $REG
#$REG=$REG+1;
#}

Additional testing commands:



Files used by this example are:

Name                     Modified     Size

example_d23.com 23-Apr-2008 3.5k collapsed.ipbase 22-Apr-2003 8.7k contact.ipcont 25-Sep-2008 625 contact.ippara 21-Feb-2008 5.9k contact.ipregi 17-Apr-2003 93 contact.irsolv 16-Aug-2010 2.6k contact.irsolv.old 13-Apr-2007 2.4k simulate_patella.ipelem 17-Apr-2003 27k simulate_patella.ipelfb 17-Apr-2003 13k simulate_patella.ipequa 29-Sep-2004 2.2k simulate_patella.ipfibr 17-Apr-2003 35k simulate_patella.ipinit 02-May-2003 9.4k simulate_patella.ipmate 17-Apr-2003 6.2k simulate_patella.ipnode 17-Apr-2003 60k simulate_rectus.ipacti 14-Nov-2004 806 simulate_rectus.ipelem 17-Apr-2003 13k simulate_rectus.ipelfb 17-Apr-2003 9.3k simulate_rectus.ipequa 29-Sep-2004 2.2k simulate_rectus.ipfibr 17-Apr-2003 34k simulate_rectus.ipinit 02-May-2003 3.0k simulate_rectus.ipmate 17-Apr-2003 6.2k simulate_rectus.ipnode 17-Apr-2003 41k target.ipxi 17-Apr-2003 22k test_output.com 19-Apr-2003 0

Download the entire example:

Name                      Modified     Size

examples_d_d2_d23.tar.gz 17-Aug-2010 52k

Testing status by version:

StatusTestedReal time (s)
hpc_cm64_irixSuccessThu Apr 1 12:07:39 2004791
hpc_cm_irixSuccessFri Aug 20 02:26:54 2004726
hpc_cmo64_irixSuccessSun Jul 31 01:43:16 200576
hpc_cmo_irixSuccessSun Aug 15 01:54:55 2004112
rs6000-aix
cmSuccessSun Aug 15 02:57:17 200455
cm-debugSuccessSat Aug 21 06:12:51 20043915
cm64SuccessWed Mar 4 01:27:01 200955
cm64-debugSuccessThu Apr 1 10:52:05 2004805
x86_64-linux
cmSuccessSun Mar 6 00:02:10 201619

Testing status by file:


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

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


CMISS Help / Examples / d / d2 / d23