Example i41: Computing Magnetic and Potential fields from a Time Dependent Dipole

Computes magnetic fields at squid sensors and potential fields at torso surface electrodes from a time dependent moving dipole.

The comfile run by this example is as follows:




if(!defined $example) 
    $example='.' ;
} else{

fem def para;r;$example/torso_dipole
fem def coor 3,1;
fem def base;r;$example/bicubic_bilinear;

fem def node;r;$example/skin;
fem def elem;r;$example/skin_lin;

    fem export node;$OUT/torso as torso;
    fem export elem;$OUT/skin  as skin;

# Group nodes for boundary conditions
fem group node 29      as FIXEDNODE;
fem group node 1,290   as SURFENDS;
fem group node 2..289  as SURFNORM;

fem def equa;r;$example/laplace_nr1 reg all;
fem def mate;r;$example/mate_nr1    reg all;
fem def init;r;$example/noflux_nr1  reg all;
fem def sour;r;$example/dipole_known reg $DIPOLE;

    fem exp sour;$OUT/dipole_known as dipole_known;

fem def solv;r;$example/static_nr1 reg all;

# Electrodes and sensors
fem def data;r;$example/electrodes_mag field num_field 3;
fem def xi;c close;
fem exp data;$OUT/electrodes_mag as electrodes_mag offset $MAGOFFSET;

Additional testing commands:


  printf("*** Dipole solve at time= $TIME\n")
  fem up sour reg $DIPOLE time $TIME
  fem solve at $TIME
  fem up phi tstart $TIME tend $TIME from data phi #data electrodes

  printf("*** Magnetic solve at time= $TIME\n")
  fem eval solu mag from MFI nss 1 time $TIME frequency $FREQ 
  fem up data field from MFI nss 1 time $TIME frequency $FREQ
  fem export data;$OUT/mfi_known_$TIME as mfi_known field_num 1..3 field_name mag offset $MAGOFFSET

# store matrices of potential/magnetic fields
fem write matr;$OUT/mfi matri MFI ascii
fem write matr;$OUT/phi matri PHI ascii # data points

Files used by this example are:

Name                     Modified     Size

example_i41.com 05-Dec-2002 1.1k bicubic_bilinear.ipbase 05-Dec-2002 7.8k dipole_known.ipsour 05-Dec-2002 1.2k electrodes_mag.ipdata 05-Dec-2002 522 laplace_nr1.ipequa 26-May-2003 1.3k mate_nr1.ipmate 05-Dec-2002 859 noflux_nr1.ipinit 05-Dec-2002 575 skin.ipnode 05-Dec-2002 258k skin_lin.ipelem 05-Dec-2002 118k static_nr1.ipsolv 13-Apr-2007 1.2k test_output.com 14-Feb-2003 801 torso_dipole.ippara 21-Feb-2003 5.9k

Download the entire example:

Name                      Modified     Size

examples_i_i4_i41.tar.gz 18-Jan-2011 73k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:03:57 20162
cm-debugSuccessSat Mar 5 00:19:25 201610
cmSuccessSun Aug 19 01:57:40 200728
cm-debugSuccessWed Aug 15 02:32:54 2007142
cm-debug-clear-mallocSuccessSat Aug 18 02:53:35 2007161
cm-debug-clear-malloc7SuccessMon Aug 20 02:50:47 2007161
cm64SuccessSun Aug 19 02:00:21 200730
cm64-debugSuccessTue Aug 21 02:36:01 2007154
cm64-debug-clear-mallocSuccessThu Apr 1 12:36:34 200460
cmSuccessWed Mar 4 01:10:06 20093
cm-debugSuccessMon Mar 2 01:15:04 200932
cm64SuccessWed Mar 4 01:10:08 20093
cm64-debugSuccessTue Mar 3 01:21:57 200935
cmSuccessSun Mar 6 00:01:12 20161
cm-debugSuccessSat Mar 5 00:02:03 20165

Testing status by file:

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

Input last modified: Mon Jan 17 17:06:30 2011

CMISS Help / Examples / i / i4 / i41