Example i52: 1D Small Intestine - Body Surface Potential and Magnetic Field

This example takes the dipole source per element (from example i51) and then multiply by a factor of 100 as an input to compute the body surface potential and magnetic field external to the torso.

The corresponding body surface potential and magnetic fields are shown below at two different specific time. The magnetic field vectors have been translated to the left for visual purposes - in reality they are centred over the torso.

t=5s

t=160s


The comfile run by this example is as follows:

set Num_threads 1
# Set up a regions for the torso
$torso = 1;

# Set up a class for the laplace problem
$laplace = 1;

# Define the geometry of the torso
fem define para;r;$example/torso;
fem define coor 3,1
fem define nodes;r;$example/torso
fem de base;r;$example/torso;
fem define ele;r;$example/torso;
fem export no;torso as torso reg $torso
fem export ele;torso as torso reg $torso

# Group nodes to be applied for the .ipinit
fem group node 1009 as bottom 
fem group node 1262 as top
fem group node 1010..1261,1263..1298 as middle 

# Define the laplace problem in the torso
fem define eq;r;$example/skin lock reg $torso class $laplace
fem define mate;r;$example/skin reg $torso class $laplace
fem define ini;r;$example/skin reg $torso class $laplace
fem define solve;r;$example/skin reg $torso class $laplace

# Perform an initial solve
fem solve reg $torso class $laplace

# Magnetic field at 19 electrodes recording place for SQUID
fem def data;r;$example/squid_19 field num_fields 3 reg $torso

# Read in the dipole source
fem define sour;r;$example/dipole_elem reg $torso scale 100

# Change the location of the dipole
fem change source translate by 0,0,0
fem de sour;w;dipole_changed
fem export sour;dipole_changed as dipole

fem export elem;torso_pot reg $torso class $laplace field as torso

for $M (0..5)
{
$time=$M
# Apply the sources to the laplace problem
fem update sour reg $torso class $laplace time $time

# Solve the laplace problem
fem solve reg $torso class $laplace
fem export node;torso_pot_$time reg $torso class $laplace field as torso

# eval solu magnetic [data/mfi]
# both-primary/secondary
# squid-config 3- Z vectors @ 19 positions
fem eval solu mag from data both squid_config 3 time $time
fem export data;torso_mag_$time as torso_mag field_num 1..3 field_name mag
}

Files used by this example are:

Name                Modified     Size

example_i52.com 02-Nov-2005 1.8k dipole_elem.ipsour 02-Nov-2005 460k skin.ipequa 02-Nov-2005 1.4k skin.ipinit 02-Nov-2005 665 skin.ipmate 02-Nov-2005 852 skin.ipsolv 13-Apr-2007 1.3k squid_19.ipdata 02-Nov-2005 2.1k torso.ipbase 02-Nov-2005 5.6k torso.ipelem 02-Nov-2005 102k torso.ipnode 02-Nov-2005 263k torso.ippara 02-Nov-2005 5.9k

Download the entire example:

Name                      Modified     Size

examples_i_i5_i52.tar.gz 18-Jan-2011 259k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:09:25 201614
cm-debugSuccessSat Mar 5 01:02:33 201650
mips-irix
cmSuccessSun Aug 19 03:15:48 2007119
cm-debugSuccessWed Aug 15 05:55:32 2007473
cm-debug-clear-mallocSuccessSat Aug 18 06:05:48 2007481
cm-debug-clear-malloc7SuccessMon Aug 20 06:10:13 2007483
cm64SuccessSun Aug 19 03:20:15 2007114
cm64-debugSuccessTue Aug 21 04:53:01 2007534
rs6000-aix
cmSuccessWed Mar 4 01:15:08 200912
cm-debugSuccessMon Mar 2 01:37:44 2009149
cm64SuccessWed Mar 4 01:15:11 200913
cm64-debugSuccessTue Mar 3 01:41:08 2009147
x86_64-linux
cmSuccessSun Mar 6 00:01:29 20167
cm-debugSuccessSat Mar 5 00:04:50 201624

Testing status by file:


Graphical output from this problem is given here.


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

Input last modified: Mon Jan 17 16:53:27 2011


CMISS Help / Examples / i / i5 / i52