Example b33: Coupled bidomain-mechanics example

Example b33 - coupled bidomain electromechanics. This example solves the bidomain equations on a 2d domain which is coupled to a mechanical deformation from the release of intracellular calcium. The VanCapelle Durer ionic current model is used. The mesh is 4*4 elements with 9*9 grid points per element. An analytic solution is used to get the extracellular boundary conditions. Solution is by sparse LU factorisation.


The comfile run by this example is as follows:

#Example_b33 4*4 small coupled bidomain-electromechanics with solution. 
#
# Set up problem type definitions
$MECHANICS = 1
$ELECTRICS = 2
$EXTRACELL = 3
 
# Set up the geometry 4x4 elem 32*32mm bilinear basis
fem define para;r;emech;example

fem define node;r;emech-4x4;example
fem define base;r;emech;example
fem define elem;r;emech-4x4;example
fem define fibr;r;emech-0;example
fem define elem;r;emech-4x4;example fibre
fem define window;c

# Set up the mechanics
fem define equa;r;mech;example class $MECHANICS lock
fem define mate;r;mech;example
fem group node external as bdy_nodes
fem define init;r;mech;example
fem define solv;r;mech;example
fem define acti;r;mech;example

# Set up the electrical activation
fem define grid;r;elec-9x9;example class $ELECTRICS
fem update grid geometry
fem update grid metric
fem group grid external as boundary
fem define equa;r;elec-vcd;example class $ELECTRICS,$EXTRACELL
fem define mate;r;elec-vcd;example class $ELECTRICS
fem define cell;r;elec-vcd;example class $ELECTRICS
fem update grid material class $ELECTRICS,$EXTRACELL
fem group grid xi1=0 oneoff as lhs_line
fem define init;r;elec-lhs_line;example class $ELECTRICS,$EXTRACELL
fem define solv;r;elec;example class $ELECTRICS
fem define solv;r;elec2;example class $EXTRACELL
fem solve class $ELECTRICS,$EXTRACELL to 0

# Solve the coupled equations
for $time ( 0..19 ) 
{
  fem solve class $ELECTRICS,$EXTRACELL restart to $time
  fem update gauss calcium from_class $ELECTRICS
  fem solve class $MECHANICS incr 0. iter 99
  fem update grid geom deformed class $ELECTRICS from_class $MECHANICS
  fem update grid metric deformed class $ELECTRICS from_class $MECHANICS
  fem update grid material class $ELECTRICS,$EXTRACELL
  fem draw field grid 1 class $ELECTRICS zmin=-120 zmax=20 noscale
  fem draw lines deformed rgb=white
  fem draw fibre deformed rgb=black
  refresh graphics
}

Additional testing commands:

fem list grid geometry grid 1..50
fem list grid yq index v grid 1..50 class 2
fem list grid yq index v grid 1..50 class 3

Files used by this example are:

Name                      Modified     Size

example_b33.com 21-Feb-2003 1.8k elec-9x9.ipgrid 06-Mar-2003 1.8k elec-lhs_line.ipinit 20-Nov-2001 836 elec-vcd.ipcell 20-Nov-2001 2.3k elec-vcd.ipequa 26-May-2003 1.4k elec-vcd.ipmate 10-Apr-2000 1.7k elec-vcd.ipmate_cell_old 10-Apr-2000 4.0k elec.ipsolv 13-Apr-2007 1.8k elec.ipsolv.old 12-Jun-2001 1.4k elec2.ipsolv 13-Apr-2007 1.8k elec2.ipsolv.old 12-Jun-2001 1.4k emech-0.ipfibr 30-Jan-2001 2.0k emech-4x4.ipelem 10-Apr-2000 4.3k emech-4x4.ipelfb 10-Apr-2000 2.3k emech-4x4.ipnode 10-Apr-2000 4.2k emech.ipbase 10-Apr-2000 1.1k emech.ippara 21-Feb-2003 5.9k mech.ipacti 03-Mar-2004 735 mech.ipequa 02-May-2004 1.8k mech.ipinit 12-Dec-2002 995 mech.ipmate 12-Dec-2002 6.4k mech.ipsolv 16-Aug-2010 2.7k mech.ipsolv.old 13-Apr-2007 2.5k quadbasis.ipbase 10-Apr-2000 1.2k test_output.com 19-Apr-2001 122

Download the entire example:

Name                      Modified     Size

examples_b_b3_b33.tar.gz 17-Aug-2010 13k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmFailureSun Mar 6 00:16:23 20163
last breakTue Aug 12 00:33:00 201410
last successSun Apr 17 00:54:00 20119
cm-debugFailureSun Mar 6 00:28:50 201618
last breakTue Aug 12 00:33:00 201424
last successSat Apr 16 00:40:00 201126
mips-irix
cmSuccessSun Aug 19 02:32:55 200765
cm-debugSuccessWed Aug 15 03:26:11 2007279
cm-debug-clear-mallocSuccessSat Aug 18 03:38:23 2007295
cm-debug-clear-malloc7SuccessMon Aug 20 03:40:41 2007288
cm64SuccessSun Aug 19 02:31:48 200766
cm64-debugSuccessTue Aug 21 04:59:17 2007312
cm64-debug-clear-mallocSuccessThu Apr 1 11:26:15 2004129
rs6000-aix
cmSuccessWed Mar 4 01:11:57 20095
cm-debugSuccessMon Mar 2 01:25:51 200959
cm64SuccessWed Mar 4 01:12:04 20095
cm64-debugSuccessTue Mar 3 01:26:35 200958
x86_64-linux
cmFailureSun Mar 6 00:01:51 20162
last breakTue Aug 12 00:21:00 20143
last successSun Apr 17 00:27:00 20115
cm-debugFailureSun Mar 6 00:02:18 20167
last breakTue Aug 12 00:21:00 201410
last successSat Apr 16 00:18:00 201110

Testing status by file:


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

Input last modified: Mon Aug 16 11:26:29 2010


CMISS Help / Examples / b / b3 / b33