Example 52b: Shearing of a unit cube (2 elements in z direction) made of Mooney-Rivlin material.

This example was implemented to ensure that a converged solution was achievable for a tri-cubic hermite unit cube of 2 elements in the z-direction sheared in the xz plane.


The comfile run by this example is as follows:


# If the example path is not set, default to current directory
if (!defined $example) {
    $example = "./";
}
# Drop off the trailing / in the example path
$chopped = chop $example;
if ($chopped ne "/") {
    $example .= $chopped;
}

#Define livegraphics function
sub drawResult($liveGraphics)
{
  if($liveGraphics)
  {
     fem draw line def dot
     refresh graphics
  }
}
$liveGraphics=1
#**************************************************************
#Set up CMISS mechanics model
#
#
fem def para;r;emech;example 
fem def coor 3,1
# default nodes, elements and grids to get a single grid point
fem define bas;r;TriCubicHerm;example 
fem def;add base;r;BiCubicHerm;example 
fem def;add base;r;TriLinear;example 
fem def;add base;r;BiLinear;example 
fem define node;r;2Elem_unitCube;example 
fem define elem;r;2Elem_unitCube;example 
fem def fibre;r;2Elem_unitCube;example 
fem def elem;r;2Elem_unitCube;example  fibre
fem def equa;r;mechanics;example  lock
fem def mat;r;mooney_rivlin;example 
fem group node 1,2,3,4 as BOTTOMNODES
fem group node 9,10,11,12 as TOPNODES
#fem group node 5,6,7,8 as TOPNODES
fem group node 1,2,5,6,9,10 as FRONTNODES
fem group node 3,4,7,8,11,12 as BACKNODES
fem group node 1,3,5,7,9,11 as LEFTNODES
fem group node 2,4,6,8,10,12 as RIGHTNODES
fem def init;r;shear;example 
fem def solve;r;cubeherm;example 
fem def wind on xz;c
fem draw line
refresh graphics
fem export node;2Elem_unitCube as 2Elem_unitCube
fem export elem;2Elem_unitCube as 2Elem_unitCube
#In this example we define displacements
#**************************************************************
#
#**************************************************************
fem solv inc 0.0001 iter 5 error 0.0000001
&drawResult($liveGraphics);
fem solv inc 0.0009 iter 5 error 0.0000001
&drawResult($liveGraphics);
fem solv inc 0.009 iter 5 error 0.0000001
&drawResult($liveGraphics);
fem solv inc 0.09 iter 5 error 0.0000001
&drawResult($liveGraphics);
fem solv inc 0.4 iter 5 error 0.0000001
&drawResult($liveGraphics);
fem solv inc 0.5 iter 15 error 0.0000001
&drawResult($liveGraphics);

fem export node;sheared2Elem_unitCube as sheared2Elem_unitCube field offset=0
fem export elem;sheared2Elem_unitCube as sheared2Elem_unitCube field offset_elem=0
#view in cmgui if desired
#system "cmgui loadResult.com" 

Additional testing commands:

fem list stress

Files used by this example are:

Name                          Modified     Size

example_52b.com 21-Mar-2007 2.2k 2Elem_unitCube.ipelem 19-Feb-2004 1.0k 2Elem_unitCube.ipelfb 19-Feb-2004 649 2Elem_unitCube.ipfibr 19-Feb-2004 19k 2Elem_unitCube.ipnode 19-Feb-2004 21k BiCubicHerm.ipbase 19-Feb-2004 1.6k BiLinear.ipbase 19-Feb-2004 1.2k TriCubicHerm.ipbase 19-Feb-2004 1.9k TriLinear.ipbase 19-Feb-2004 1.4k TriLinearPress.ipbase 19-Feb-2004 1.9k cube.ipmesh 19-Feb-2004 1.2k cubeherm.ipsolv 16-Aug-2010 2.7k cubeherm.ipsolv.old 13-Apr-2007 2.5k emech.ippara 23-Feb-2004 5.9k loadResult.com 19-Feb-2004 1.1k mechanics.ipequa 02-May-2004 2.1k mooney_rivlin.ipmate 19-Feb-2004 2.3k shear.ipinit 19-Feb-2004 3.8k sheared2Elem_unitCube.exelem 19-Feb-2004 13k sheared2Elem_unitCube.exnode 19-Feb-2004 15k test_output.com 19-Feb-2004 16

Download the entire example:

Name                      Modified     Size

examples_5_52_52b.tar.gz 14-Aug-2014 25k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:07:44 201610
cm-debugSuccessSat Mar 5 01:16:53 201681
mips-irix
cmSuccessSun Aug 19 02:51:47 200773
cm-debugSuccessWed Aug 8 03:58:51 2007600
cm-debug-clear-mallocSuccessSat Aug 11 04:46:27 2007667
cm-debug-clear-malloc7SuccessMon Aug 20 04:20:15 2007658
cm64SuccessSun Aug 19 02:54:26 200778
cm64-debugSuccessFri Aug 17 06:01:54 2007699
cm64-debug-clear-mallocSuccessTue Feb 1 10:05:51 2005443
rs6000-aix
cmSuccessWed Mar 4 01:14:01 200910
cm-debugSuccessMon Mar 2 01:46:08 2009207
cm64SuccessWed Mar 4 01:14:27 200911
cm64-debugSuccessTue Mar 3 01:47:27 2009203
x86_64-linux
cmSuccessSun Mar 6 00:01:19 20165
cm-debugSuccessSat Mar 5 00:05:22 201632

Testing status by file:


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

Input last modified: Thu Aug 14 10:03:14 2014


CMISS Help / Examples / 5 / 52 / 52b