Example b2124: 2d heart-full torso coupled bidomain

Example b2124 - coupled bidomain - torso This example solves the bidomain equation through to a point where an activation wave is well established and then iterates between the extracellular and the boundary element problem to get the epicardial fluxes to match. The heart is a FE mesh. The torso is made up of a BE torso cavity, two BE lungs and a FE outer layer. The heart has been refined twice in xi 1 and the torso is unrefined.


The comfile run by this example is as follows:

#Define region numbers

# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable INNER 1
$INNER = 1


# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable LLUNG 2
$LLUNG = 2


# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable RLUNG 3
$RLUNG = 3


# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable OUTER 4
$OUTER = 4


# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable HEART 5
$HEART = 5


#Define problem types

# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable GLAPLACE 1
$GLAPLACE = 1


# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable TMEMBRNE 2
$TMEMBRNE = 2


# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable EXTCELLR 3
$EXTCELLR = 3


# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: assign variable EXUPDATE 4
$EXUPDATE = 4


#Define problem parameter set
fem define para;r;torsoslice;example


#Define problem geometry
fem define regi;r;torsoslice;example
fem define node;r;hrefx2;example reg all
fem define base;r;torsoslice;example
fem define elem;r;hrefx2;example reg all
fem define fibr;r;heart;example reg $HEART
fem define elem;r;heart;example fibre reg $HEART

#Define finite difference grid
fem define grid;r;heart;example reg $HEART
fem update grid geometry reg $HEART
fem update grid metric reg $HEART
fem group grid external as boundary reg 5

#Define governing equations
fem define equa;r;inner;example reg $INNER class $GLAPLACE lock
fem define equa;r;llung;example reg $LLUNG class $GLAPLACE
fem define equa;r;rlung;example reg $RLUNG class $GLAPLACE
fem define equa;r;outer;example reg $OUTER class $GLAPLACE
fem define equa;r;heart;example reg $HEART class $TMEMBRNE,$EXTCELLR,$EXUPDATE lock

#Define material parameters
fem define mate;r;inner;example reg $INNER class $GLAPLACE
fem define mate;r;llung;example reg $LLUNG class $GLAPLACE
fem define mate;r;rlung;example reg $RLUNG class $GLAPLACE
fem define mate;r;outer;example reg $OUTER class $GLAPLACE
fem define mate;r;heart;example reg $HEART class $TMEMBRNE
fem define cell;r;heart;example reg $HEART class $TMEMBRNE
fem update grid material reg $HEART class $TMEMBRNE

#Define initial conditions
fem define init;r;heart;example reg $HEART class $TMEMBRNE,$EXTCELLR
fem define init;r;inner;example reg $INNER class $GLAPLACE
fem define init;r;outer;example reg $OUTER class $GLAPLACE

#Define region coupling
fem define coup;r;torsoslice;example

#Define solution parametres
fem define solv;r;heart_t;example reg $HEART class $TMEMBRNE
fem define solv;r;heart_e;example reg $HEART class $EXTCELLR
fem define solv;r;heart_u;example reg $HEART class $EXUPDATE
fem define solv;r;torsoslice;example coupled reg $INNER,$LLUNG,$RLUNG,$OUTER class $GLAPLACE

#Solve the activation problem
fem solve to 7 reg $HEART class $TMEMBRNE,$EXTCELLR,$EXUPDATE
fem update node potential reg $INNER,$HEART

#Solve the laplace problem
fem solve coupled class $GLAPLACE reg $INNER,$LLUNG,$RLUNG,$OUTER
fem update node potential reg $INNER,$HEART check

#Iterate to match the epicardial potentials & flux

# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: DO A=1..4
for $A ( 1..4 ) 
{

fem solve iterate 1 reg $HEART,$INNER class $TMEMBRNE,$EXTCELLR,$EXUPDATE,$GLAPLACE
fem update node potential reg $INNER,$HEART
fem solve coupled class $GLAPLACE reg $INNER,$LLUNG,$RLUNG,$OUTER
fem update node potential reg $INNER,$HEART check

# Command updated by fixcom.sh on Wed Aug 23 17:50:03 NZT 2000
# Old command: ENDDO
}



#Display the results
fem define wind;c
fem draw field grid 1 zmin=-22 zmax=1 noscale reg $HEART class $EXTCELLR
fem draw field zmin=-22 zmax=1 noscale reg $LLUNG class $GLAPLACE
fem draw field zmin=-22 zmax=1 noscale reg $RLUNG class $GLAPLACE
fem draw field zmin=-22 zmax=1 noscale reg $OUTER class $GLAPLACE

Files used by this example are:

Name                   Modified     Size

example_b2124.com 20-Nov-2001 4.0k heart.ipcell 10-Apr-2000 3.4k heart.ipelfb 10-Apr-2000 5.7k heart.ipequa 26-May-2003 4.5k heart.ipfibr 30-Jan-2001 9.7k heart.ipgrid 06-Mar-2003 4.4k heart.ipinit 10-Apr-2000 863 heart.ipmate 10-Apr-2000 1.7k heart.ipmate_cell_old 10-Apr-2000 5.2k heart_e.ipsolv 13-Apr-2007 1.9k heart_e.ipsolv.old 10-Apr-2000 1.5k heart_t.ipsolv 13-Apr-2007 1.9k heart_t.ipsolv.old 10-Apr-2000 1.5k heart_u.ipsolv 13-Apr-2007 1.9k heart_u.ipsolv.old 10-Apr-2000 1.5k hrefx2.irelem 10-Apr-2000 33k hrefx2.irnode 10-Apr-2000 50k hrefx2_old.irelem 10-Apr-2000 33k inner.ipcell 10-Apr-2000 633 inner.ipequa 26-May-2003 1.3k inner.ipinit 10-Apr-2000 939 inner.ipmate 10-Apr-2000 633 inner.ipmate_cell_old 10-Apr-2000 633 llung.ipcell 10-Apr-2000 633 llung.ipequa 26-May-2003 1.3k llung.ipmate 10-Apr-2000 633 llung.ipmate_cell_old 10-Apr-2000 633 outer.ipcell 10-Apr-2000 633 outer.ipequa 26-May-2003 1.4k outer.ipinit 10-Apr-2000 507 outer.ipmate 10-Apr-2000 633 outer.ipmate_cell_old 10-Apr-2000 633 output.com 10-Apr-2000 116 rlung.ipcell 10-Apr-2000 633 rlung.ipequa 26-May-2003 1.3k rlung.ipmate 10-Apr-2000 633 rlung.ipmate_cell_old 10-Apr-2000 633 torsoslice.ipbase 10-Apr-2000 2.6k torsoslice.ipcoup 21-Aug-2002 464 torsoslice.ipcoup.old 10-Apr-2000 438 torsoslice.ippara 12-Nov-2002 5.9k torsoslice.ipregi 10-Apr-2000 93 torsoslice.irsolv 13-Apr-2007 1.6k

Download the entire example:

Name                                 Modified     Size

examples_b_b2_b21_b212_b2124.tar.gz 14-Apr-2007 30k

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

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


CMISS Help / Examples / b / b2 / b21 / b212 / b2124