Example d51: Anatomically based lower limb nerve model

This example uses an anatomically based lower limb nerve tree created from Visible Man dataset. The nerve tree is activated at a node by an extracellular stimulus and the CRRSS mammalian nerve model is solved on the nerve mesh using a finite difference method. As a result, the conduction velocity of about 90m/s is obtained for a 15 micrometre diameter nerve fiber.


The comfile run by this example is as follows:

# Set the example path if it is not already set
if( !$example ) {
  $example = ".";
}

#Read the geometry of the nerves
fem define para;r;$example/nerve
fem define coor 3,1
fem define node;r;$example/nerve
fem define base;r;$example/nerve 
fem define elem;r;$example/nerve

#Generate the finite difference grid over the nerves
fem define grid;r;$example/nerve
fem update grid geometry 
fem update grid metric 
fem group grid external as boundary

#Define the problem 
fem define equa;r;$example/nerve class 1,2
fem define cell;r;$example/nerve class 1,2
fem define mate;r;$example/nerve cell class 1,2
fem define mate;r;$example/nerve class 1,2

fem update grid material class 1,2

fem define time;r;$example/nerve
fem define init;r;$example/nerve class 1,2
fem define solv;r;$example/lsoda class 1
fem define solv;r;$example/lsoda_2 class 2

# Create a history file to hold the membrane potential at all grid points through time
#fem open history;nerve_model write variables yqs niqslist 1..16 binary

#Perform an initial solve
fem solve to 0 class 1,2

$dt =1; #for the testing purpose. We used 0.1 in our simulation.
#Loop over time
for ($time=0;$time<10;$time+=$dt) {
   fem solve restart to $time class 1,2
   
   # Write the solution to the history file
   #fem write history time $time variables yqs binary
   
   # Export the potential field
   #fem export elem;MemPot$time class 1 field as nerve 
}

# Close the history file
#fem close history binary;

#Create a CMISS signal file from the history file
#fem evaluate electrode;nerve_model3 grid_points 3 history nerve_model from grid yqs iy 1..16 binary;
#fem evaluate electrode;nerve_model20 grid_points 20 history nerve_model from grid yqs iy 1..16 binary;
#fem evaluate electrode;nerve_model238 grid_points 238 history nerve_model from grid yqs iy 1..16 binary;
#fem evaluate electrode;nerve_model486 grid_points 486 history nerve_model from grid yqs iy 1..16 binary;
#fem evaluate electrode;nerve_model760 grid_points 760 history nerve_model from grid yqs iy 1..16 binary;

# Export the membrane potential at all grid points to a UnEMAP signal file
#fem define export;r;$example/nerve
#fem export signal;nerve_model3 electrodes signal nerve_model3 names cell
#fem export signal;nerve_model20 electrodes signal nerve_model20 names cell
#fem export signal;nerve_model238 electrodes signal nerve_model238 names cell
#fem export signal;nerve_model486 electrodes signal nerve_model486 names cell
#fem export signal;nerve_model760 electrodes signal nerve_model760 names cell






Additional testing commands:

fem export elem;MemPot9 class 1 field as nerve

Files used by this example are:

Name             Modified     Size

example_d51.com 21-Feb-2008 2.5k animate.com 21-Feb-2008 73 crrss.xml 21-Feb-2008 17k draw.com 21-Feb-2008 1.5k lsoda.ipsolv 21-Feb-2008 2.0k lsoda_2.ipsolv 21-Feb-2008 2.0k nerve.exelem 21-Feb-2008 634k nerve.exnode 21-Feb-2008 165k nerve.ipbase 21-Feb-2008 2.0k nerve.ipcell 21-Feb-2008 3.8k nerve.ipelem 21-Feb-2008 485k nerve.ipequa 21-Feb-2008 1.5k nerve.ipexpo 21-Feb-2008 709 nerve.ipgrid 21-Feb-2008 12k nerve.ipinit 21-Feb-2008 956 nerve.ipmatc 21-Feb-2008 559 nerve.ipmate 21-Feb-2008 1.7k nerve.ipnode 21-Feb-2008 598k nerve.ippara 21-Feb-2008 5.9k nerve.iptime 21-Feb-2008 733 test_output.com 21-Feb-2008 47

Download the entire example:

Name                      Modified     Size

examples_d_d5_d51.tar.gz 28-Feb-2008 141k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:45:48 2016199
cm-debugSuccessSat Mar 5 02:57:42 2016441
rs6000-aix
cmSuccessWed Mar 4 01:43:11 2009290
cm-debugSuccessMon Mar 2 03:08:32 20092202
cm64SuccessWed Mar 4 01:45:33 2009312
cm64-debugSuccessTue Mar 3 03:13:27 20092171
x86_64-linux
cmSuccessSun Mar 6 00:06:53 2016161
cm-debugSuccessSat Mar 5 00:13:30 2016317

Testing status by file:


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

Input last modified: Thu Feb 21 12:02:46 2008


CMISS Help / Examples / d / d5 / d51