Example d11: Four muscle fibres in a cylinder

This example uses a mesh that contains four muscle fibres in a cylindrical domain. Each of the fibres is activated at a different time and a dipole source is created for each fibre. These sources are then used to calculate potentials on the surface of the cylinder.

The comfile run by this example is as follows:

if( !$example ) {
  $example = ".";

# Set up two problem regions, one for the cylinder
# and one for the fibres
$tissue = 1;
$muscle = 2;

# Set up two problem classes - laplace for the cylinder
# and activation for the fibres 
$laplace = 1;
$active = 2;
# Read in the geometry of the two regions
fem de para;r;$example/test
fem define coordinates;r;$example/eccentric_dipole
fem define regi;r;$example/eccentric_dipole
fem define node;r;$example/eccentric_dipole reg $tissue
fem define node;r;$example/fibres reg $muscle
fem define bases;r;$example/eccentric_dipole
fem define elem;r;$example/eccentric_dipole reg $tissue
fem define elem;r;$example/fibres reg $muscle

# Group the cylinder nodes to allow boundary conditions
# to be easily set
fem group node 1 as top reg $tissue      
fem group node 2..13,15..58 as middle reg $tissue  
fem group node 14 as bottom reg $tissue  

# Generate a finite difference grid over the fibres
fem define grid;r;$example/fibres reg $muscle
fem update grid geometry reg $muscle
fem update grid metric reg $muscle

# Define the laplace problem in the cylinder
fem define equation;r;$example/eccentric_dipole reg $tissue class $laplace lock 
fem define material;r;$example/eccentric_dipole reg $tissue class $laplace
fem define initial;r;$example/eccentric_dipole reg $tissue class $laplace
fem define solve;r;$example/eccentric_dipole reg $tissue class $laplace

# Define the activation problem in the fibres
fem define equation;r;$example/fibres reg $muscle class $active
fem define material;r;$example/fibres reg $muscle class $active
fem define cell;r;$example/fibres reg $muscle class $active
fem update grid material reg $muscle class $active
fem define initial;r;$example/fibres reg $muscle class $active
fem define solve;r;$example/fibres reg $muscle class $active

# Perform an initial solve
fem solve reg $tissue class $laplace
fem solve to 0 reg $muscle class $active

# Loop over time
foreach $step ( 0..30 ) {
  $time = $step/2
  # Solve the grid problem
  fem solve restart to $time reg $muscle class $active
  # Calculate the dipole sources
  fem define sour;c grid 
  # Apply the sources to the laplace problem
  fem update sour reg $tissue class $laplace
  # Solve the laplace problem
  fem solve reg $tissue class $laplace
#  Uncomment to output the solution fields over time
#    fem export elem;time$time reg $muscle class $active field as test2
#    fem export node;bemt$time reg $tissue class $laplace field as test

#fem export node;exfiles/test as test
#fem export elem;exfiles/test as test
#fem export elem;exfiles/bemt reg $tissue class $laplace field as test 
#fem export node;exfiles/test2 as test2 reg 2
#fem export elem;exfiles/test2 as test2 reg 2

Additional testing commands:

fem export elem;time15 reg $muscle class $active field as test2
fem export node;bemt15 reg $tissue class $laplace field as test

Files used by this example are:

Name                     Modified     Size

example_d11.com 13-Nov-2001 2.7k animate.com 13-Nov-2001 111 draw.com 13-Nov-2001 1.8k eccentric_dipole.ipbase 13-Nov-2001 8.4k eccentric_dipole.ipcoor 13-Nov-2001 570 eccentric_dipole.ipelem 13-Nov-2001 26k eccentric_dipole.ipequa 26-May-2003 1.4k eccentric_dipole.ipinit 13-Nov-2001 618 eccentric_dipole.ipmate 13-Nov-2001 54 eccentric_dipole.ipnode 13-Nov-2001 51k eccentric_dipole.ipregi 13-Nov-2001 93 eccentric_dipole.ipsolv 13-Apr-2007 1.2k fibres.ipcell 13-Nov-2001 1.7k fibres.ipelem 12-Feb-2004 1.3k fibres.ipequa 26-May-2003 1.5k fibres.ipgrid 06-Mar-2003 475 fibres.ipinit 13-Nov-2001 1.1k fibres.ipmate 13-Nov-2001 1.8k fibres.ipnode 12-Feb-2004 7.4k fibres.ipsolv 13-Nov-2001 889 test.ippara 14-Mar-2003 5.9k test_output.com 13-Nov-2001 128

Download the entire example:

Name                      Modified     Size

examples_d_d1_d11.tar.gz 14-Apr-2007 15k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:02:32 20161
cm-debugSuccessSat Mar 5 00:04:44 20162
cmSuccessSun Aug 19 01:41:59 200710
cm-debugSuccessWed Aug 15 01:38:27 200731
cm-debug-clear-mallocSuccessSat Aug 18 01:47:25 200740
cm-debug-clear-malloc7SuccessMon Aug 20 01:45:04 200739
cm64SuccessSun Aug 19 01:40:54 200711
cm64-debugSuccessTue Aug 21 01:37:30 200733
cm64-debug-clear-mallocSuccessThu Apr 1 11:52:29 200414
cmSuccessWed Mar 4 01:08:17 20091
cm-debugSuccessMon Mar 2 01:08:57 20096
cm64SuccessWed Mar 4 01:08:17 20092
cm64-debugSuccessTue Mar 3 01:14:16 20097
cmSuccessSun Mar 6 00:01:06 20160
cm-debugSuccessSat Mar 5 00:01:44 20161

Testing status by file:

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

Input last modified: Fri Apr 13 10:40:48 2007

CMISS Help / Examples / d / d1 / d11