Example eb: 2d torso slice (6 regions) solving x2-y2

This example solves Laplaces equation on a 6 region 2d slice though the torso at the mid-sternum level. A finite element heart is defined in region 7. Heart geometry (and fibre angle for region 7) are from an x=0 slice though the 3d prolate heart which has been rotated and then scaled up by 1.3x in each direction to fit into the human torso model. An x2-y2 essential boundary condition is applied to the torso surface. Two other subproblems containing only a subset of the regions are solved. The normal direction is reversed on the RV septal wall to keep consistent xi directions.


The comfile run by this example is as follows:


#=====================
#Assign region numbers
#=====================

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


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


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


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


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


# Command updated by fixcom.sh on Wed Aug 23 17:50:53 NZT 2000
# Old command: assign variable MUSCLE 6
$MUSCLE = 6


# Command updated by fixcom.sh on Wed Aug 23 17:50:53 NZT 2000
# Old command: assign variable GRIDHT 7
$GRIDHT = 7


#=========================
#Define problem parameters
#=========================

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

#PLAPLACE involves all regions except GRIDHT

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

#TLAPLACE involves only regions outside the HEART

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

#BLAPLACE involves only the VENTS region
 
#=========================
#Define problem parameters
#=========================
fem define para;r;torsoslice;example
fem reallocate
fem define regi;r;torsoslice;example
fem define base;r;torsoslice;example
 
#=======================
#Define problem geometry
#=======================
fem define node;r;cavity;example reg $CAVITY
fem define elem;r;cavity;example reg $CAVITY
fem define node;r;llung;example reg $LLUNG
fem define elem;r;llung;example reg $LLUNG
fem define node;r;rlung;example reg $RLUNG
fem define elem;r;rlung;example reg $RLUNG
fem define node;r;heartcomb;example reg $HEART
fem define elem;r;heartcomb;example reg $HEART
fem define node;r;vents;example reg $VENTS
fem define elem;r;vents;example reg $VENTS
fem define node;r;muscle;example reg $MUSCLE
fem define elem;r;muscle;example reg $MUSCLE
fem define node;r;heart-slice;example reg $GRIDHT
fem define elem;r;heart-slice;example reg $GRIDHT

#================================
#Define fibres in finite elements
#================================
fem define fibr;r;muscle;example reg $MUSCLE
fem define elem;r;muscle;example reg $MUSCLE fibre
fem define fibr;r;heart-slice;example reg $GRIDHT
fem define elem;r;heart-slice;example fibre reg $GRIDHT

#================
#Define equations
#================
fem define equa;r;bem;example reg $CAVITY,$LLUNG,$RLUNG,$VENTS,$HEART,$MUSCLE class $PLAPLACE lock
fem define equa;r;torso;example reg $CAVITY,$LLUNG,$RLUNG,$MUSCLE class $TLAPLACE lock
fem define equa;r;blood;example reg $VENTS class $BLAPLACE lock

#==========================
#Define material properties
#==========================
fem define mate;r;bem;example reg $CAVITY,$LLUNG,$RLUNG,$VENTS,$HEART,$MUSCLE class $PLAPLACE
fem define mate;r;torso;example reg $CAVITY,$LLUNG,$RLUNG,$MUSCLE class $TLAPLACE
fem define mate;r;blood;example reg $VENTS class $BLAPLACE

#=========================
#Define initial conditions
#=========================
fem define init;r;bem;example reg $CAVITY,$LLUNG,$RLUNG,$VENTS,$HEART,$MUSCLE class $PLAPLACE
fem define init;r;torso;example reg $CAVITY,$LLUNG,$RLUNG,$MUSCLE class $TLAPLACE
fem define init;r;blood;example reg $VENTS class $BLAPLACE

#====================================
#Define coupling and normal reversals
#====================================
fem define coup;r;heart-slice;example class $PLAPLACE
fem define coup;r;heart-slice;example class $TLAPLACE
fem define norm;r;ventricle_refx3;example

#=========================
#Define solution paramters
#=========================
fem define solv;r;bem;example coupled reg $CAVITY,$LLUNG,$RLUNG,$VENTS,$HEART,$MUSCLE class $PLAPLACE
fem define solv;r;torso;example coupled reg $CAVITY,$LLUNG,$RLUNG,$MUSCLE class $TLAPLACE
fem define solv;r;blood;example reg $VENTS class $BLAPLACE

#=================
#Solve the problem
#=================
fem solve coupled reg $CAVITY,$LLUNG,$RLUNG,$VENTS,$HEART,$MUSCLE class $PLAPLACE

#================================================================
#Update the solution to the other classes for boundary conditions
#================================================================
fem update solution dependent from_class $PLAPLACE to_class $TLAPLACE region $CAVITY
fem update solution dependent from_class $PLAPLACE to_class $BLAPLACE region $VENTS

#=========================
#Solve the two subproblems
#=========================
fem solve coupled reg $CAVITY,$LLUNG,$RLUNG,$MUSCLE class $TLAPLACE
fem solve reg $VENTS class $BLAPLACE

Additional testing commands:

fem list node solution reg 1 class 2
fem list node solution reg 4 class 3

fem list node flux reg 1 class 2
fem list node flux reg 4 class 3

Files used by this example are:

Name                    Modified     Size

example_eb.com 20-Nov-2001 4.8k bem.ipanal 10-Apr-2000 551 bem.irequa 26-May-2003 7.2k bem.irinit 10-Apr-2000 3.4k bem.irmate 10-Apr-2000 3.5k bem.irsolv 13-Apr-2007 1.6k blood.ipequa 26-May-2003 1.4k blood.ipinit 10-Apr-2000 32k blood.ipmate 10-Apr-2000 627 blood.ipsolv 13-Apr-2007 1.4k cavity.ipelem 10-Apr-2000 39k cavity.ipnode 10-Apr-2000 46k heart-slice.ipcoup 21-Aug-2002 437 heart-slice.ipcoup.old 10-Apr-2000 411 heart-slice.ipelem 10-Apr-2000 5.4k heart-slice.ipelfb 10-Apr-2000 3.1k heart-slice.ipfibr 30-Jan-2001 5.1k heart-slice.ipnode 10-Apr-2000 10k heartcomb.ipelem 10-Apr-2000 82k heartcomb.ipnode 10-Apr-2000 97k llung.ipelem 10-Apr-2000 2.1k llung.ipnode 10-Apr-2000 2.7k muscle.ipelem 10-Apr-2000 6.5k muscle.ipelfb 10-Apr-2000 3.7k muscle.ipfibr 30-Jan-2001 5.5k muscle.ipnode 10-Apr-2000 11k rlung.ipelem 10-Apr-2000 2.1k rlung.ipnode 10-Apr-2000 2.7k test_output.com 10-Apr-2000 141 torso.irequa 26-May-2003 4.9k torso.irinit 10-Apr-2000 23k torso.irmate 10-Apr-2000 2.3k torso.irsolv 13-Apr-2007 1.6k torsoslice.ipbase 10-Apr-2000 2.6k torsoslice.ippara 12-Nov-2002 5.9k torsoslice.ipregi 10-Apr-2000 93 ventricle_refx3.ipnorm 10-Apr-2000 2.9k vents.ipelem 10-Apr-2000 49k vents.ipnode 10-Apr-2000 59k

Download the entire example:

Name                  Modified     Size

examples_e_eb.tar.gz 14-Apr-2007 99k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:07:16 20167
cm-debugSuccessSat Mar 5 00:37:23 201625
mips-irix
cmSuccessSun Aug 19 02:51:59 200775
cm-debugSuccessWed Aug 15 03:03:02 2007246
cm-debug-clear-mallocSuccessSat Aug 18 03:26:04 2007252
cm-debug-clear-malloc7SuccessMon Aug 20 03:21:28 2007258
cm64SuccessSun Aug 19 02:53:04 200775
cm64-debugSuccessTue Aug 21 04:03:36 2007266
cm64-debug-clear-mallocSuccessThu Apr 1 12:29:27 2004112
rs6000-aix
cmSuccessWed Mar 4 01:13:22 20098
cm-debugSuccessMon Mar 2 01:26:22 200961
cm64SuccessWed Mar 4 01:14:15 20098
cm64-debugSuccessTue Mar 3 01:26:54 200959
x86_64-linux
cmSuccessSun Mar 6 00:01:25 20166
cm-debugSuccessSat Mar 5 00:04:13 201616

Testing status by file:


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

Input last modified: Fri Apr 13 10:43:09 2007


CMISS Help / Examples / e / eb