Example 5d2: The old (Gauss point based) approach to active tension modelling

This example uses the old, Gauss point based, approach to active tension modelling to simlate the active contraction and relaxation of a single element, tri-cubic Hermite, rectangular cartesian cube.

In this simulation, the initial geometry is deformed purely by the generation of active tension within the cardiac tissue. One face of the cube is fixed to move only within its plane (the y-z plane) and a node on the opposite face is constrained to slide along the x-axis.

The level of activation is controlled via the ipacti file, which sets the level of activation to use for the current solution. This animation shows the results from the model when the activation level rises from zero to 1.5 and then returns to zero. The 3 pairs of cones illustrate the principal strains, which can clearly be seen well aligned with the fibre, sheet, and sheet-normal axes, with red indicating extension and blue compression.

Cool animation

draw.com can be used to visualise the results of this simulation.


The comfile run by this example is as follows:

#
# This example uses the old approach to active tension modelling
# to simulate the active contraction and relaxation of a single 
# element, tri-cubic Hermite, rectangular cartesian cube.
#

set echo;

# 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;
}

# Set the directory to store results
$output = ".";
if (! -d $output) {
    mkdir $output,0700;
}

# Set up the geometry 1*1*1 element 4*4*4mm tri-cubic Hermite basis, 
# 0 fibre angle
fem define parameter;r;$example/minimal;
fem define coordinates;r;$example/emech;
fem define node;r;$example/emech-1x1x1-cubic;
# Need a tri-cubic Hermite for geometry (and bi-cubic Hermite for faces)
# and a tri-linear for fibres (and bi-linear for faces)
# and a auxilary basis for pressure
fem define base;r;$example/emech-cubic-linear;
fem define element;r;$example/emech-1x1x1-cubic;
# 0deg fibre angles everywhere, using a tri-linear interpolation, and
# need to define sheets etc...
fem define fibre;r;$example/emech-0deg;
fem define element;r;$example/emech-1x1x1-linear fibre;

# Need to calculate the undeformed nodal derivatives
fem update node derivative 1 linear;
fem update node derivative 2 linear;
fem update node derivative 3 linear;

# Node/element groups to set BC's
fem group node external as bdy_nodes;
fem group node 1,10,19,28 as left_end;
fem group node 2,11,20,29 as right_end;
fem group node left_end as corners;
fem group node 29 as wall_x;
fem group element 1 as ALL_ELEMENTS;

# Set up the mechanics
fem define equation;r;$example/mech-cubic;
fem define material;r;$example/mech-cubic;
# fix the corners group and allow wall_x group to slide in x-axis
fem define initial;r;$example/mech-cubic-fixed;
fem define solve;r;$example/newton;

# Export the undeformed geometry
fem export node;$output/slab as slab;
fem export element;$output/slab as slab;
# ... and define the deformed field ...
fem export node;$output/deformed_0 field as slab;
fem export element;$output/deformed field as slab;

# Loop through the activation levels desired, creating the ipacti
# file to set the current activation level and solve the finite
# elasticity model.
$counter = 0;
for $activation_level (0..4) {
    if ($activation_level > 2) {
	$counter++;
	$actn = 2 - $counter;
    } else {
	$actn = $activation_level;
    }
    $actn *= 0.1;
    # Create the IPACTI file
  CORE::open(IPACTI,">tmp_ipacti_file.ipacti") || die "Cannot open temporary ipacti file: $!\n";
    print IPACTI " CMISS Version 1.21 ipacti File Version 2\n";
    print IPACTI " Heading: Temp. ipacti file for activation level of $actn\n";
    print IPACTI " \n";
    print IPACTI " Specify type of contraction model [2]:\n";
    print IPACTI "   (1) SS tension-length-Ca relation (OLD)\n";
    print IPACTI "   (2) Hunter/McCulloch/ter Keurs (coupled to cell/grid model)\n";
    print IPACTI "   (3) Unused\n";
    print IPACTI "   (4) Outer hair cell stiffness\n";
    print IPACTI "    1\n";
    print IPACTI " Enter max isometric tension at ext.ratio=1 (Tref) [100kPa]: 0.10000D+03\n";
    print IPACTI " Enter non-dimensional slope parameter (beta) [1.45]: 0.14500D+01\n";
    print IPACTI " Enter c50 for [Ca]i saturation curve (0<c<1) [0.5]: 0.50000D+00\n";
    print IPACTI " Enter Hill coeff. for [Ca]i saturation curve (h) [3.0]: 0.30000D+01\n";
    print IPACTI " Enter max [Ca]i (Ca_max) [1]: 0.10000D+01\n";
    print IPACTI " Specify whether the initial calcium level [Ca]i is [1]:\n";
    print IPACTI "  (1) Constant spatially\n";
    print IPACTI "  (2) Piecewise constant (defined by elements)\n";
    print IPACTI "  (3) Defined by Gauss points\n";
    print IPACTI "   1\n";
    print IPACTI " Enter initial calcium level [Ca]i [0]: $actn\n";
    print "Calcium = $actn\n";
  CORE::close IPACTI;
    # Define the current level of activation
    fem define active;r;tmp_ipacti_file;
    unlink "tmp_ipacti_file.ipacti";
    # Solve the current step
    fem solve increment 0.0 iterate 20 error 0.001;
    # Export the strains
    fem update gauss strain fibre components;
    fem export gauss;$output/gauss_strain_$activation_level yg as slab;
    # and stresses
    fem update gauss stress fibre components;
    fem export gauss;$output/gauss_stress_$activation_level yg as slab;
    # and nodes
    fem export node;$output/deformed_$activation_level field as slab;
}

# Make sure that we have constant volume
fem list element total
fem list element deformed total

Files used by this example are:

Name                       Modified     Size

example_5d2.com 04-Mar-2004 4.5k emech-0deg.ipfibr 01-May-2001 6.9k emech-1x1x1-cubic.ipelem 01-May-2001 573 emech-1x1x1-cubic.ipnode 01-May-2001 15k emech-1x1x1-linear.ipelfb 01-May-2001 377 emech-cubic-linear.ipbase 01-May-2001 7.4k emech.ipcoor 01-May-2001 570 mech-cubic-fixed.ipinit 05-Dec-2002 4.0k mech-cubic.ipequa 02-May-2004 2.0k mech-cubic.ipmate 05-Dec-2002 6.2k minimal.ippara 12-Nov-2002 5.9k newton.ipsolv 16-Aug-2010 2.7k newton.ipsolv.old 13-Apr-2007 2.5k

Download the entire example:

Name                      Modified     Size

examples_5_5d_5d2.tar.gz 17-Aug-2010 304k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmFailureSun Mar 6 00:24:08 20168
last breakTue Sep 2 00:18:00 20149
last successSun Jun 26 01:42:00 200534
cm-debugFailureSun Mar 6 01:16:14 201660
last breakTue Sep 2 00:46:00 201464
last successWed May 16 02:54:00 2007133
mips-irix
cmFailureTue Aug 21 06:08:20 200786
last breakThu May 17 06:15:00 200787
last successSun Jun 26 01:35:00 200529
cm-debugFailureThu Sep 7 08:55:45 2006182353
last breakFri Sep 1 02:38:00 2006368205
last successThu Jun 30 01:40:00 2005213
cm-debug-clear-mallocFailureMon Aug 28 08:59:25 2006358739
last breakFri Aug 25 04:20:00 2006275807
last successSat Jun 25 01:42:00 2005217
cm-debug-clear-malloc7FailureMon Aug 28 08:58:42 2006355829
last breakThu Aug 24 06:08:00 2006355829
last successMon Jun 27 01:41:00 2005216
cm64FailureTue Aug 21 06:10:08 200791
last breakThu May 17 04:11:00 200792
last successFri May 20 10:33:00 200530
cm64-debugFailureTue Aug 14 05:03:32 2007705
last breakFri May 18 04:03:00 2007672
last successFri May 20 10:34:00 2005243
cm64-debug-clear-mallocSuccessFri May 20 10:39:49 2005242
rs6000-aix
cmFailureWed Mar 4 01:22:12 200913
last breakSat Feb 16 01:16:00 200813
last successWed Jun 29 02:35:00 200511
cm-debugFailureWed Mar 4 02:08:57 2009231
last breakSat Feb 16 02:00:00 2008230
last successMon Jun 27 03:22:00 2005201
cm64FailureWed Mar 4 01:22:26 200912
last breakSat Feb 16 01:16:00 200813
last successWed Jun 29 02:36:00 200511
cm64-debugFailureWed Mar 4 02:01:58 2009201
last breakSat Feb 16 01:55:00 2008200
last successThu Jun 30 03:18:00 2005182
x86_64-linux
cmFailureSun Mar 6 00:02:02 20164
last breakTue Aug 12 00:19:00 20145
cm-debugFailureSun Mar 6 00:04:50 201626
last breakTue Aug 12 00:03:00 201434

Testing status by file:


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

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


CMISS Help / Examples / 5 / 5d / 5d2