Example b2147: Multiple ventricles and a torso directly assembled

This example demonstrates how to couple multiple ventricular regions and one torso cavity region by direct assembly.


The comfile run by this example is as follows:

#Example b2147
#
# This example demonstrates how to couple multiple ventricular
#  regions and one torso cavity region by direct assembly.
#

# Problem classes
$CAVITY=1 
$LVENTL=2 
$RVENTL=3 
$BEMHRT=4 
$GRIDHT=5 

# Problem regions
$TLAPLC=1 
$LVECLS=2 
$RVECLS=3 
$GRDCLS=4 
$EXTCLS=5 

# Define problem geometry
fem define para;r;minimal;example
fem define regi;r;torsoslice;example
fem define node;r;cavity4;example reg $CAVITY
fem define node;r;LV3;example reg $LVENTL
fem define node;r;RV3;example reg $RVENTL
fem define node;r;bemhrt3;example reg $BEMHRT
fem define node;r;gridhtr;example reg $GRIDHT
fem define base;r;linear;example
fem define elem;r;cavity4;example reg $CAVITY
fem define elem;r;LV3;example reg $LVENTL
fem define elem;r;RV3;example reg $RVENTL
fem define elem;r;bemhrt3;example reg $BEMHRT
fem define elem;r;gridhtr;example reg $GRIDHT
fem define fibr;r;gridhtr;example reg $GRIDHT
fem define elem;r;gridhtr;example reg $GRIDHT fibre

# Define finite difference grid
fem define grid;r;gridhtr;example reg $GRIDHT
fem update grid geomet reg $GRIDHT
fem update grid metric reg $GRIDHT
fem group grid xi2 0 elem 11..20,27,28 as LVendo reg $GRIDHT
fem group grid xi2 1 elem 11,13,19,20 as RVendo1 reg $GRIDHT
fem group grid xi2 0 elem 1,3,9,10,21,22,25,26 as RVendo2 reg $GRIDHT
fem group grid grid RVendo1,RVendo2 as RVendo reg $GRIDHT
fem group grid grid LVendo,RVendo as endocardium reg $GRIDHT
fem group grid xi2 1 elem 1..10,21..26 as epicardium  reg $GRIDHT
fem group grid external as boundary reg $GRIDHT
fem group grid line 1845 xidirn 2 as stimulus reg $GRIDHT

# Create node to grid mapping
fem update node grid grid_reg $GRIDHT bem_reg $BEMHRT exclude node 77,78
fem update node geomet from grid reg $BEMHRT except node 77,78

# Define equations
fem define equa;r;cavity;example reg $CAVITY class $TLAPLC lock
fem define equa;r;LV;example reg $LVENTL class $LVECLS lock
fem define equa;r;RV;example reg $RVENTL class $RVECLS lock
fem define equa;r;alto;example reg $GRIDHT class $GRDCLS,$EXTCLS lock

# Define material parameters
fem define mate;r;cavity;example reg $CAVITY class $TLAPLC
fem define mate;r;LV;example reg $LVENTL class $LVECLS
fem define mate;r;RV;example reg $RVENTL class $RVECLS
fem define mate;r;alto;example reg $GRIDHT class $GRDCLS,$EXTCLS
fem define cell;r;alto;example reg $GRIDHT class $GRDCLS,$EXTCLS
fem update grid materi reg $GRIDHT class $GRDCLS,$EXTCLS

# Define initial conditions
fem define init;r;cavity2;example reg $CAVITY class $TLAPLC
fem define init;r;LV;example reg $LVENTL class $LVECLS
fem define init;r;RV;example reg $RVENTL class $RVECLS
fem define init;r;alto;example reg $GRIDHT class $GRDCLS,$EXTCLS

# Define right ventricular normal reversal
fem define norm;r;ventcl;example

# Define solution parameters
fem define solv;r;alto;example reg $GRIDHT class $GRDCLS
fem define solv;r;alto;example reg $GRIDHT class $EXTCLS
fem define solv;r;cavity;example reg $CAVITY class $TLAPLC
fem define solv;r;LV;example reg $LVENTL class $LVECLS
fem define solv;r;RV;example reg $RVENTL class $RVECLS

# Solve the passive torso problems
fem solve reg $CAVITY class $TLAPLC
fem solve reg $LVENTL class $LVECLS
fem solve reg $RVENTL class $RVECLS

# Solve the bidomain problem for 10ms
fem solve activ coupled to 10 reg $GRIDHT,$LVENTL,$RVENTL,$CAVITY class $GRDCLS,$EXTCLS,$LVECLS,$RVECLS,$TLAPLC grid boundary cptype 7 fixed_node 49

Additional testing commands:

#Testing example b2147
fem list node sol reg 1 cl 1


Files used by this example are:

Name               Modified     Size

example_b2147.com 06-Jun-2001 3.3k LV.ipequa 26-May-2003 1.2k LV.ipinit 06-Jun-2001 1.2k LV.ipmate 06-Jun-2001 606 LV.ipsolv 13-Apr-2007 1.2k LV3.ipelem 06-Jun-2001 24k LV3.ipnode 06-Jun-2001 28k RV.ipequa 26-May-2003 1.2k RV.ipinit 06-Jun-2001 1.2k RV.ipmate 06-Jun-2001 606 RV.ipsolv 13-Apr-2007 1.2k RV3.ipelem 06-Jun-2001 24k RV3.ipnode 06-Jun-2001 28k alto.ipcell 06-Jun-2001 1.7k alto.ipequa 26-May-2003 1.4k alto.ipinit 06-Jun-2001 847 alto.ipmate 06-Jun-2001 1.8k alto.ipsolv 13-Apr-2007 1.8k alto.ipsolv.old 06-Jun-2001 1.4k bemhrt3.ipelem 06-Jun-2001 80k bemhrt3.ipnode 06-Jun-2001 94k cavity.ipequa 26-May-2003 1.3k cavity.ipmate 06-Jun-2001 606 cavity.ipsolv 13-Apr-2007 1.5k cavity2.ipinit 06-Jun-2001 1.3k cavity4.ipelem 06-Jun-2001 38k cavity4.ipnode 06-Jun-2001 45k gridhtr.ipelem 06-Jun-2001 7.5k gridhtr.ipelfb 06-Jun-2001 4.3k gridhtr.ipfibr 06-Jun-2001 7.0k gridhtr.ipgrid 06-Mar-2003 561 gridhtr.ipnode 06-Jun-2001 14k linear.ipbase 06-Jun-2001 2.2k minimal.ippara 12-Nov-2002 5.9k test_output.com 06-Jun-2001 53 torsoslice.ipregi 06-Jun-2001 93 ventcl.ipnorm 06-Jun-2001 418

Download the entire example:

Name                                 Modified     Size

examples_b_b2_b21_b214_b2147.tar.gz 14-Apr-2007 845k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:04:33 20164
cm-debugSuccessSat Mar 5 00:23:52 201618
mips-irix
cmSuccessSun Aug 19 02:39:27 200766
cm-debugSuccessWed Aug 15 03:07:13 2007248
cm-debug-clear-mallocSuccessSat Aug 18 03:21:49 2007271
cm-debug-clear-malloc7SuccessMon Jul 30 06:25:53 20072725
cm64SuccessSun Aug 19 02:40:23 200765
cm64-debugSuccessTue Aug 21 03:30:17 2007248
cm64-debug-clear-mallocSuccessThu Apr 1 11:23:38 2004105
rs6000-aix
cmSuccessWed Mar 4 01:11:34 20096
cm-debugSuccessMon Mar 2 01:20:14 200941
cm64SuccessWed Mar 4 01:11:57 20096
cm64-debugSuccessTue Mar 3 01:23:36 200943
x86_64-linux
cmSuccessSun Mar 6 00:01:16 20163
cm-debugSuccessSat Mar 5 00:02:22 20167

Testing status by file:


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

Input last modified: Fri Apr 13 10:39:38 2007


CMISS Help / Examples / b / b2 / b21 / b214 / b2147