Example b2144: Multiple directly assembled ventricles

This example demonstrates how to couple multiple ventriclar regions by direct assembly.

The comfile run by this example is as follows:

#Example b2144
# This example demonstrates how to couple multiple ventriclar
#  regions by direct assembly.

# Problem classes

# Problem regions

# Define problem geometry
fem define para;r;minimal;example
fem define regi;r;torsoslice;example
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;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;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;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;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 ventricle normal reversals
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;LV;example reg $LVENTL class $LVECLS
fem define solv;r;RV;example reg $RVENTL class $RVECLS

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

# Solve the bidomain problem for 5ms
fem solve activ coupled to 5 reg $GRIDHT,$LVENTL,$RVENTL class $GRDCLS,$EXTCLS,$LVECLS,$RVECLS grid endocardium cptype 4

Additional testing commands:

#Testing example b2144
fem list node sol reg 1 cl 1 
fem list node sol reg 2 cl 2

Files used by this example are:

Name               Modified     Size

example_b2144.com 06-Jun-2001 2.9k 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 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 83 torsoslice.ipbase 06-Jun-2001 2.6k torsoslice.ipregi 06-Jun-2001 93 ventcl.ipnorm 06-Jun-2001 418

Download the entire example:

Name                                 Modified     Size

examples_b_b2_b21_b214_b2144.tar.gz 14-Apr-2007 482k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:03:11 20163
cm-debugSuccessSat Mar 5 00:14:57 20166
cmSuccessSun Aug 19 02:01:15 200732
cm-debugSuccessWed Aug 15 02:08:50 2007107
cm-debug-clear-mallocSuccessSat Aug 18 02:25:55 2007112
cm-debug-clear-malloc7SuccessMon Aug 20 02:23:52 2007112
cm64SuccessSun Aug 19 02:01:34 200732
cm64-debugSuccessTue Aug 21 02:09:56 2007105
cm64-debug-clear-mallocSuccessThu Apr 1 11:21:38 200446
cmSuccessWed Mar 4 01:09:57 20093
cm-debugSuccessMon Mar 2 01:13:17 200918
cm64SuccessWed Mar 4 01:09:51 20094
cm64-debugSuccessTue Mar 3 01:17:25 200918
cmSuccessSun Mar 6 00:01:08 20161
cm-debugSuccessSat Mar 5 00:01:55 20162

Testing status by file:

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

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

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