Example 5j4: Compression of a volunteer's breast using a mixed contact (frictionless & tied contact) approach

This example demonstrates the compression modelling of a volunteer's left breast. The contact between the breast and the compression plates is defined as frictionless contact. The contact between the breast and the rib is defined as tied contact. The tied contact is a modifed version of frictional contact, and it does not involve computation of the slip function (i.e. only stick condition). The elastic slip is controlled by the tied stiffness value (higher the value, more the stick condition is enforced). No fixed displacement B.C. is necessary as the breast is 'attached' to the rib through tied contact. The compression plates and the rib are all defined in region 2. Like example 5J2, this example does not solve for the entire load steps, but only solves for the last load step, by reading in previous load step solution (ipinit) and its contact pressure data file (ipdata).


The comfile run by this example is as follows:

if (!defined $example)
{
    $example ='.';
}

set echo

$RUN_LOAD=10; # Simulation starts from load step 10 (=1 if solving from the beginning)            
$CONT_PTS_1=4; 
$CONT_PTS_2=4; 
$load_step=10; # total number of load step
$load_step_size=2;
$BREAST=1;
$PLATE=2;

fem def para;r;contact;example
fem def coord 3,1
fem def region;r;region;example
                                
fem def base;r;Base;example # need to define all basis functions in one file, otherwise gives error

fem def node;r;Initial_xi3;example reg $BREAST
fem def elem;r;Initial_xi3;example reg $BREAST
fem def fibr;r;Initial_xi3;example reg $BREAST
fem def elem;r;Initial_xi3;example fib reg $BREAST

#fem export node;Initial as Initial reg $BREAST
#fem export elem;Initial as Initial reg $BREAST

fem def node;r;Pad;example reg $PLATE
fem def elem;r;Pad;example reg $PLATE
fem def fibr;r;Pad;example reg $PLATE
fem def elem;r;Pad;example fib reg $PLATE

#fem export node;Pad as Pad reg $PLATE
#fem export elem;Pad as Pad reg $PLATE

# Breast node, elem & face grouping #
fem group elem all external s1=0 as XXX_1
fem group elem all external s3=0 as XXX_3
fem group node xi1=0 elem XXX_1 as FIX # skin & rib
fem group face all xi3 low external elem XXX_3 as RIB_FACE 
fem group face 145,149,152,155,158,162,179,196,200,203,206,209,212,214,216,218 as BREAST_FACE

fem group node 1001..1016 as MASTER_MOVE reg $PLATE
fem group node 1113..1120 as MASTER_IMMOBILE reg $PLATE
fem group node 1005..1006,1011..1016,1113..1116,1218,1230,1298,1306 as MASTER_FIX reg $PLATE
fem group elem 1001..1004 as PLATE_ELEM reg $PLATE
fem group face all xi3 low external elem PLATE_ELEM as PLATE_FACE reg $PLATE
fem group elem 1005 as RIB_ELEM reg $PLATE
fem group face all xi3 high external elem RIB_ELEM as RIB_MASTER_FACE reg $PLATE

# Compression plate alignment
fem change nodes translate by -3,0,0 node MASTER_IMMOBILE reg $PLATE
fem change nodes translate by 0,10,0 node MASTER_IMMOBILE reg $PLATE # align
fem change nodes translate by -9,6,0 node MASTER_MOVE reg $PLATE # align
fem change nodes translate by 0,3,0 node MASTER_MOVE reg $PLATE # align to match with comp2 data (don't need this for comp1)

fem def equa;r;slave;example reg $BREAST
fem def mate;r;slave;example reg $BREAST
if($RUN_LOAD==1){
  # if starting from the very beginning
  fem def init;r;slave;example reg $BREAST
} else {
  # if starting from an intermediate solution
  $temp=$RUN_LOAD-1;
  $name=sprintf("Compression.Load.%02d", $temp);
  fem def init;r;$name;example
  
  # Update YP(ny,3) with XP
  fem update solution geom YP_index 3 reg $BREAST
  
  # Read in contact pressure data from the previous load step
  fem def data;r;$name;example contact
}

fem def equa;r;master;example reg $PLATE
fem def mate;r;master;example reg $PLATE
fem def init;r;master;example reg $PLATE

fem def contact;r;contact;example

fem def solv;r;LU;example reg $BREAST

# load steps
for ($i=1;$i<=$load_step;$i++){

    fem change nodes translate by $load_step_size,0,0 node MASTER_MOVE reg $PLATE

    $name=sprintf("plate_LoadStep_%02d",$i);
#    fem export node;$name as Pad_LoadStep reg $PLATE
#    fem export elem;$name as Pad_LoadStep reg $PLATE

    if($i>=$RUN_LOAD){

      $j=1;
      $CONVERGED=0;
      while ($CONVERGED==0){ 

	######################################Projection
	# Update XP from YP
	fem up geom from sol to 1..3 reg $BREAST

	# Set contact Xi points on specified faces
	fem def xi;c contact_point faces BREAST_FACE points $CONT_PTS_1 by $CONT_PTS_2 boundary # define frictionless contact between breast and compression plates
	fem def xi;c contact_tied faces RIB_FACE points $CONT_PTS_1 by $CONT_PTS_2 add          # define tied contact between breast and rib

	# 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 search_start 1000 faces PLATE_FACE,RIB_MASTER_FACE reg $PLATE

	# Store projection gap in data fields
	fem update data field from gap reg $PLATE

	# 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 $BREAST

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

	# Solve finite elasticity/contact problem
	fem solve error 1.0D-08 iterate 150 reg 1

	print " \n"
	print " ==================== \n"
	print "    Load step = $i \n"
	print " ==================== \n"
	print " \n"

	$j++; 

      }#CONVERGED

      # SAVE EACH LOAD STEP SOLUTIONS
      if($RUN_LOAD==1){
        $name=sprintf("Compression.Load.%02d", $i);
      } else {
        $name=sprintf("Compression.Test.Load.%02d", $i);
      }
      fem def init;w;$name reg $BREAST  
      fem def data;w;$name contact 
 
      # Export final deformed meshes for current load step
#      fem export node;$name as $name field reg $BREAST
#      fem export elem;$name as $name field reg $BREAST
    }  
}              

Files used by this example are:

Name                             Modified     Size

example_5j4.com 14-Oct-2008 4.8k Base.ipbase 13-Oct-2008 6.6k Compression.Load.01.ipdata 13-Oct-2008 76k Compression.Load.01.ipinit 13-Oct-2008 528k Compression.Load.02.ipdata 13-Oct-2008 76k Compression.Load.02.ipinit 13-Oct-2008 528k Compression.Load.03.ipdata 13-Oct-2008 76k Compression.Load.03.ipinit 13-Oct-2008 528k Compression.Load.04.ipdata 13-Oct-2008 76k Compression.Load.04.ipinit 13-Oct-2008 528k Compression.Load.05.ipdata 13-Oct-2008 76k Compression.Load.05.ipinit 13-Oct-2008 528k Compression.Load.06.ipdata 13-Oct-2008 76k Compression.Load.06.ipinit 13-Oct-2008 528k Compression.Load.07.ipdata 13-Oct-2008 76k Compression.Load.07.ipinit 13-Oct-2008 528k Compression.Load.08.ipdata 13-Oct-2008 76k Compression.Load.08.ipinit 13-Oct-2008 528k Compression.Load.09.ipdata 13-Oct-2008 76k Compression.Load.09.ipinit 13-Oct-2008 528k Compression.Load.10.ipdata 13-Oct-2008 76k Compression.Load.10.ipinit 13-Oct-2008 528k Compression.Test.Load.10.ipdata 13-Oct-2008 76k Compression.Test.Load.10.ipinit 13-Oct-2008 528k Initial.exelem 13-Oct-2008 143k Initial.exnode 13-Oct-2008 84k Initial_xi3.ipelem 13-Oct-2008 24k Initial_xi3.ipelfb 13-Oct-2008 16k Initial_xi3.ipfibr 13-Oct-2008 22k Initial_xi3.ipnode 13-Oct-2008 216k LU.ipsolv 16-Aug-2010 2.2k LU.ipsolv.old 13-Oct-2008 2.0k Pad.exelem 13-Oct-2008 19k Pad.exnode 13-Oct-2008 22k Pad.ipelem 13-Oct-2008 2.2k Pad.ipelfb 13-Oct-2008 1.5k Pad.ipfibr 13-Oct-2008 6.3k Pad.ipnode 13-Oct-2008 58k contact.ipcont 13-Oct-2008 628 contact.ippara 13-Oct-2008 5.8k master.ipequa 13-Oct-2008 2.1k master.ipinit 13-Oct-2008 2.9k master.ipmate 13-Oct-2008 2.2k region.ipregi 13-Oct-2008 93 slave.ipequa 13-Oct-2008 2.1k slave.ipinit 13-Oct-2008 2.5k slave.ipmate 13-Oct-2008 2.2k

Download the entire example:

Name                      Modified     Size

examples_5_5j_5j4.tar.gz 17-Aug-2010 900k

Testing status by version:

StatusTestedReal time (s)
rs6000-aix
cm64SuccessWed Mar 4 01:40:21 2009259
cm64-debugSuccessTue Mar 3 04:22:06 20093954
x86_64-linux
cmSuccessSun Mar 6 00:10:46 2016335
cm-debugSuccessSat Mar 5 00:28:02 20161097

Testing status by file:


Html last generated: Sun Mar 6 05:50:29 2016

Input last modified: Mon Aug 16 11:19:19 2010


CMISS Help / Examples / 5 / 5j / 5j4