Example 5g3: LV inflation using incompressible pole-zero material law

An elliptically shaped mesh in rectangular Cartesian coordinates is inflated. The cellML code corresponds to the same code as is implemented in the back-end of cmiss and should thus give the same result. The next example (5g4) is exactly the same proplem as this example, but it does not use cellML, but the back-end version. These two examples should produce the same results and may be used as two independent tests of the pole-zero code.

Created by Espen Remme May 2004.
 


The comfile run by this example is as follows:

# Example 5g3

# If the example path is not set, default to current directory
if(!defined $example)
{
  $example = "./";
}

fem def param;r;emech;example
fem define coor;r;rcCoord;example
fem define base;r;basisfuncs;example
#
fem define nodes;r;rc3;example
fem define elements;r;rc;example
fem define fibre;r;simple;example
fem define element;r;simple;example fibre
  
# Material parameter groups
fem group elem 1..4 as apexElems
fem group elem 5..12 as betweenElems
fem group elem 13..16 as baseElems
fem group elem 5..16 as notApexElems

# Boundary Condition groups
fem group nodes 1,18 as fixedApexNodes
fem group nodes 14..17,31..34 as fixedBaseNodes
fem group nodes 14,16 as y_axisNodes
fem group nodes 15,17 as z_axisNodes

# Residual strains groups
fem group nodes 6..13 as nodes095
fem group nodes 1..5,14..22,31..34 as nodes100
fem group nodes 23..30 as nodes105

$name = "heartOriginal"
$file = $name
fem export nodes;$file as $name offset 1000
fem export elements;$file as $name offset_elem 1000

fem define equation;r;equation;example lock
fem define material;r;cellMLmaterial;example
fem define acti;r;calcium000;example
fem define initial;r;x_Base_node_restricted;example
fem define solve;r;solve;example

# cellML stuff
fem group elem 1..16 as ALL_ELEMENTS
fem def grid;r;grid;example gauss class 2 
fem update grid geometry #sets up the grid geometry
fem group grid element ALL_ELEMENTS as ALL_GRID_POINTS
fem def equa;r;cellmlEquation;example class 2 #defines a cellml equation - see cellml.ipequa
fem def mate;d class 2 # set up conductivities- defaulted
fem define cell;r;polezero;example class 2

fem group grid element apexElems as APEX_GRID_POINTS
fem group grid element betweenElems,baseElems as NOT_APEX_GRID_POINTS

fem group grid grid 1..3,10..12,19..21,28..30,37..39,46..48,55..57,64..66,73..75,82..84,91..93,100..102 as APEX_1_GRID_POINTS
fem group grid grid 4..6,13..15,22..24,31..33,40..42,49..51,58..60,67..69,76..78,85..87,94..96,103..105 as APEX_2_GRID_POINTS
fem group grid grid 7..9,16..18,25..27,34..36,43..45,52..54,61..63,70..72,79..81,88..90,97..99,106..108 as APEX_3_GRID_POINTS
fem group grid element betweenElems as BETWEEN_GRID_POINTS
fem group grid grid 325..327,334..336,343..345,352..354,361..363,370..372,379..381,388..390,397..399,406..408,415..417,424..426 as BASE_BOT_GRID_POINTS
fem group grid grid 328..330,337..339,346..348,355..357,364..366,373..375,382..384,391..393,400..402,409..411,418..420,427..429 as BASE_MID_GRID_POINTS
fem group grid grid 331..333,340..342,349..351,358..360,367..369,376..378,385..387,394..396,403..405,412..414,421..423,430..432 as BASE_TOP_GRID_POINTS

#fem def mate;r;mooney_rivlin;example cell class 2
fem def mate;r;inhomo;example cell class 2
fem def init;d class 2
fem def solv;r;cellMLsolve;example class 2 
fem solve class 2 to 0

fem list elements total

fem solve increment 1 iter 30 error 10e-8

fem list elements deformed total

$name = "heartInflated"
$file = $name
fem export nodes;$file field as $name offset 0000
fem export elements;$file field as $name offset_elem 0000

fem list strain;strain fibre
fem list stress;stress fibre total 

$file = "heartStress"
fem update gauss stress fibre total Cauchy
fem export gauss;$file yg as gauss_stress offset 0

$file = "heartStrain"
fem update gauss strain fibre extension_ratios
fem export gauss;$file yg as gauss_strain

fem update geometry from solution
$file = "heartInflated"
fem define nodes;w;$file

Files used by this example are:

Name                           Modified     Size

example_5g3.com 03-May-2004 3.4k basisfuncs.ipbase 03-May-2004 16k calcium000.ipacti 03-May-2004 758 cellMLmaterial.ipmate 03-May-2004 1.2k cellMLsolve.ipsolv 13-Apr-2007 2.6k cellmlEquation.ipequa 03-May-2004 1.5k emech.ippara 03-May-2004 5.9k equation.ipequa 03-May-2004 2.1k gaussDraw.com 03-May-2004 1.3k grid.ipgrid 03-May-2004 610 inhomo.ipmatc 03-May-2004 8.2k polezero.cml 03-May-2004 40k polezero.ipcell 04-May-2004 6.5k rc.ipelem 03-May-2004 15k rc3.ipnode 03-May-2004 75k rcCoord.ipcoor 03-May-2004 678 simple.ipelfb 03-May-2004 4.2k simple.ipfibr 03-May-2004 6.6k solve.ipsolv 16-Aug-2010 2.2k solve.ipsolv.old 13-Apr-2007 2.1k x_Base_node_restricted.ipinit 03-May-2004 9.8k

Download the entire example:

Name                      Modified     Size

examples_5_5g_5g3.tar.gz 14-Aug-2014 70k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:20:27 201635
cm-debugSuccessSat Mar 5 01:54:15 2016190
mips-irix
cmSuccessThu Aug 16 03:49:49 2007300
cm-debugSuccessWed Aug 8 05:48:48 20071669
cm-debug-clear-mallocSuccessSat Jul 28 06:04:30 20071821
cm-debug-clear-malloc7SuccessMon Aug 13 05:00:19 20071886
cm64SuccessThu Aug 16 04:00:19 2007313
cm64-debugSuccessFri Aug 17 04:51:35 20071865
cm64-debug-clear-mallocSuccessTue Feb 1 10:17:02 2005731
rs6000-aix
cmSuccessWed Mar 4 01:22:36 200940
cm-debugSuccessMon Mar 2 02:15:26 2009621
cm64SuccessWed Mar 4 01:23:25 200942
cm64-debugSuccessTue Mar 3 02:26:10 2009621
x86_64-linux
cmSuccessSun Mar 6 00:02:09 201619
cm-debugSuccessSat Mar 5 00:07:26 201691

Testing status by file:


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

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


CMISS Help / Examples / 5 / 5g / 5g3