Example i54: 3D Duodenum - Body Surface Potential and Magnetic Field

This example takes the dipole source per element (from example i53) in a 3D duodenum 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.



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;

# Read in geometry of the torso
fem define para;r;$example/torso
fem de coor 3,1
fem define nodes;r;$example/skin
fem de base;r;$example/torso
fem define ele;r;$example/skin

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

# Define the laplace problem in the torso
fem define eq;r;$example/skin 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 and multiply -1 to correct the dipole direction
fem define sour;r;$example/dipoles_elem reg $torso scale -1

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

for $M (0..5)
# 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_i54.com 02-Nov-2005 1.7k dipoles_elem.ipsour 02-Nov-2005 1.0M skin.ipelem 02-Nov-2005 102k skin.ipequa 02-Nov-2005 1.4k skin.ipinit 02-Nov-2005 665 skin.ipmate 02-Nov-2005 54 skin.ipnode 02-Nov-2005 263k skin.ipsolv 13-Apr-2007 1.3k squid_19.ipdata 02-Nov-2005 2.1k torso.ipbase 02-Nov-2005 12k torso.ippara 02-Nov-2005 5.9k

Download the entire example:

Name                      Modified     Size

examples_i_i5_i54.tar.gz 18-Jan-2011 295k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:13:06 201618
cm-debugSuccessSat Mar 5 01:08:25 201656
cmSuccessSun Aug 19 03:31:42 2007127
cm-debugSuccessWed Aug 15 03:20:34 2007536
cm-debug-clear-mallocSuccessSat Aug 11 04:06:14 2007545
cm-debug-clear-malloc7SuccessMon Aug 13 06:01:32 2007544
cm64SuccessSun Aug 19 03:38:58 2007135
cm64-debugSuccessTue Aug 21 05:30:36 2007590
cmSuccessWed Mar 4 01:16:08 200914
cm-debugSuccessMon Mar 2 01:42:40 2009163
cm64SuccessWed Mar 4 01:16:14 200913
cm64-debugSuccessTue Mar 3 01:43:49 2009161
cmSuccessSun Mar 6 00:01:49 201610
cm-debugSuccessSat Mar 5 00:05:18 201628

Testing status by file:

Graphical output from this problem is given here.

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

Input last modified: Mon Jan 17 14:11:45 2011

CMISS Help / Examples / i / i5 / i54