Example b31: Small coupled 2-D electro-mechanics example

Example b31 - coupled electromechanics. This example solves a coupled electromechanics problem on a 2d square made up from 4*4 elements. There are 9*9 grid points in each element and an ischemic VanCapelle Durer ionic current equation is used. All boundaries are fixed to have zero displacements and a pole-zero constitutive law is used. The explicit grid solver is used to solve the monodomain equation.

The comfile run by this example is as follows:

#Example_b31 4*4 small coupled electromechanics with solution. 
# Set up problem type definitions


# 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-109010;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 define equa;r;elec-vcd;example class $ELECTRICS
fem define mate;r;elec-vcd;example class $ELECTRICS
fem define cell;r;elec-vcd;example class $ELECTRICS
fem update grid material class $ELECTRICS
fem group grid xi1=0 oneoff as lhs_line
fem define init;r;elec-lhs_line;example class $ELECTRICS
fem define solv;r;elec;example class $ELECTRICS
fem solve class $ELECTRICS to 0

# Solve the coupled equations
foreach $time ( 0..29 ) 
  fem solve class $ELECTRICS 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
  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 600..650
fem list grid yq index v grid 600..650 class 2

Files used by this example are:

Name                      Modified     Size

example_b31.com 21-Feb-2003 1.7k elec-9x9.ipgrid 06-Mar-2003 1.8k elec-lhs_line.ipinit 20-Nov-2001 489 elec-vcd.ipcell 20-Nov-2001 2.3k elec-vcd.ipequa 26-May-2003 1.4k elec-vcd.ipmate 12-Dec-2002 1.7k elec-vcd.ipmate_cell_old 10-Apr-2000 4.0k elec.ipsolv 03-Oct-2001 991 elec.ipsolv.old 10-Apr-2000 945 emech-109010.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 84

Download the entire example:

Name                      Modified     Size

examples_b_b3_b31.tar.gz 17-Aug-2010 12k

Testing status by version:

StatusTestedReal time (s)
cmFailureSun Mar 6 00:12:03 20163
last breakTue Aug 12 00:32:00 20147
last successSun Apr 17 00:53:00 20117
cm-debugFailureSun Mar 6 00:26:18 201610
last breakTue Aug 12 00:32:00 201418
last successSat Apr 16 00:36:00 201119
cmSuccessSun Aug 19 02:09:53 200739
cm-debugSuccessWed Aug 15 02:39:01 2007178
cm-debug-clear-mallocSuccessSat Aug 18 02:58:58 2007180
cm-debug-clear-malloc7SuccessMon Aug 20 02:55:49 2007184
cm64SuccessSun Aug 19 02:09:08 200741
cm64-debugSuccessTue Aug 21 02:42:14 2007180
cm64-debug-clear-mallocSuccessThu Apr 1 11:24:41 200478
cmSuccessWed Mar 4 01:10:10 20094
cm-debugSuccessMon Mar 2 01:19:05 200944
cm64SuccessWed Mar 4 01:11:22 20094
cm64-debugSuccessTue Mar 3 01:24:19 200943
cmFailureSun Mar 6 00:01:39 20161
last breakTue Aug 12 00:21:00 20142
last successSun Apr 17 00:27:00 20113
cm-debugFailureSun Mar 6 00:02:09 20165
last breakTue Aug 12 00:21:00 20147
last successSat Apr 16 00:17:00 20117

Testing status by file:

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

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

CMISS Help / Examples / b / b3 / b31