This example simulates the slow wave activity in the 1D small intestine
(Longitudinal muscle (LM) and Interstitial Cells of Cajal (ICC)) and
generate a single dipole from the transmembrane potential gradients at each
element (refer Master Thesis Section 5.3 - A. Lin (2003)).
The cell model is based on Aliev et al. (2000) except for the excitation
parameter to create a decreasing frequency, conduction velocity and wavelength
profile. However, the transmembrane potential solution doesn't reach a steady state which is a limitation
of the cell model. An example of the transmembrane potentials at two specific times is given below. The
left figures are longitudinal muscle and the right figures are ICC layers.
LM                ICC |
LM                ICC |
![]() |
![]() |
t=5s |
t=160s |
set Num_threads 1 # Set up region $intestine = 1; # Set up class $active = 1; # Define the geometry of the small intestine fem define para;r;$example/intestine fem de coor 3,1 fem define nodes;r;$example/intestine reg $intestine fem de base;r;$example/intestine fem define elements;r;$example/intestine reg $intestine # Group different cell types fem group node 1..111 as ICC reg $intestine fem group elem 1..110 as ICC reg $intestine fem group node 112..222 as LM reg $intestine fem group elem 111..220 as LM reg $intestine # Group elements which have similar length to apply different grid scheme later fem group elem 27 as grid15 reg $intestine fem group elem 137 as grid15_LM reg $intestine fem group elem 44,40,67,39,43,28,38,46,45,18,31 as grid20 reg $intestine fem group elem 154,150,177,149,153,138,148,156,155,128,141 as grid20_LM reg $intestine fem group elem 80,58,53,68,91,29,62,25,49,84,19,77,66,61,72,57,41 as grid25 reg $intestine fem group elem 190,168,163,178,201,139,172,135,159,194,129,187,176,171,182,167,151 as grid25_LM reg $intestine fem group elem 33,51,52,36,64,23,83,82,17,10,69,75,26,47,86,79,107,42 as grid30 reg $intestine fem group elem 143,161,162,146,174,133,193,192,127,120,179,185,136,157,196,189,107,217,42,152 as grid30_LM reg $intestine fem group elem 74,13,16,65,59,104,50,87,54,21,94,73,92,32,76,102,12,35,109,100,48 as grid35 reg $intestine fem group elem 184,123,126,175,169,104,214,160,197,164,131,204,183,202,142,186,212,122,145,219,210,158 as grid35_LM reg $intestine fem group elem 37,63,93,95,105,34,101,14,2,7,60,78,56,90,4,20,99,70,71,11 as grid40 reg $intestine fem group elem 147,173,203,205,215,144,211,124,112,117,170,188,166,200,114,130,209,180,181,121 as grid40_LM reg $intestine fem group elem 110,30,89,108,55,96,97,15,5,3 as grid45 reg $intestine fem group elem 220,140,199,108,218,165,206,207,125,115,113 as grid45_LM reg $intestine fem group elem 1,103,88,6,81,85 as grid50 reg $intestine fem group elem 111,213,198,116,191,195 as grid50_LM reg $intestine fem group elem 98,106,9,24 as grid55 reg $intestine fem group elem 208,216,119,134 as grid55_LM reg $intestine fem group elem 22,8 as grid60 reg $intestine fem group elem 132,118 as grid60_LM reg $intestine # Apply different grid schemes to have the same spatial resolution fem define grid;r;$example/intestine reg $intestine fem update grid geometry reg $intestine fem update grid metri reg $intestine # Group the grids for one-to-one mapping later fem group grid grid 1..3716 as ICC_grid reg $intestine fem group grid grid 3717..7432 as LM_grid reg $intestine # Define the monodomain equation fem define equ;r;$example/ICCcmiss reg $intestine class $active # Use Aliev cell model fem define cell;r;$example/ICCcmiss reg $intestine class $active # The parameters are based on Aliev (2000) except the excitation parameters fem define mate;r;$example/ICCcmiss cell reg $intestine class $active # Define the conductivity based on Aliev (2000) fem define mate;r;$example/ICCcmiss reg $intestine class $active fem update grid material reg $intestine class $active # Define initial problem fem define init;r;$example/ICCcmiss reg $intestine class $active # Define solver fem define solv;r;$example/ICCcmiss reg $intestine class $active # Initial solve fem solve to 0 reg $intestine class $active # Exporting... fem export nodes;LM no LM as LM reg $intestine fem export nodes;ICC no ICC as ICC reg $intestine fem export element;LM ele LM as LM reg $intestine fem export element;ICC ele ICC as ICC reg $intestine fem export ele;grid_ICC ele ICC as ICC grid_numbers reg $intestine fem export ele;grid_LM ele LM as LM grid_numbers reg $intestine fem export no;intestine reg $intestine as intestine fem export ele;intestine reg $intestine as intestine fem export ele;coupling_field_0 reg $intestine class $active field as intestine; # Solve with a time step of 0.02s and output every 1s $counter=50; $over_time=5; $step=0.02; $endloop=$over_time/$step; for $M ( 0..$endloop) { $time=$M*$step; # one-to-one mapping fem update grid stimulus grid ICC_grid map_grid LM_grid diffusion 0.3 reg $intestine class $active fem solve restart to $time reg $intestine class $active if ($counter>=49) { print $time # Calculate the dipole sources (per element) and output electrical field fem define sour;c grid grregion $intestine grclass $active time $time fem export ele;coupling_field_$time reg $intestine class $active field as intestine; $counter=0; } else { $counter++; } } # Write out all the dipole source in one ipsour file fem define sour;w;dipole_elem grid grregion $intestine grclass $active fem export sour;dipole_all as dipole
Name Modified Size
example_i51.com 28-Oct-2005 4.6k ICCcmiss.ipcell 28-Oct-2005 3.5k ICCcmiss.ipequa 27-Oct-2005 1.5k ICCcmiss.ipinit 27-Oct-2005 214 ICCcmiss.ipmatc 27-Oct-2005 333k ICCcmiss.ipmate 27-Oct-2005 1.9k ICCcmiss.ipsolv 27-Oct-2005 900 ICCcmiss_new.cml 27-Oct-2005 8.9k intestine.ipbase 27-Oct-2005 5.6k intestine.ipelem 27-Oct-2005 68k intestine.ipgrid 27-Oct-2005 3.3k intestine.ipnode 27-Oct-2005 95k intestine.ippara 01-Nov-2005 5.9k
Name Modified Size
examples_i_i5_i51.tar.gz 19-Aug-2006 286k
Status | Tested | Real time (s) | |
i686-linux | |||
cm | Success | Sun Mar 6 00:04:16 2016 | 3 |
cm-debug | Success | Sat Mar 5 00:18:57 2016 | 10 |
mips-irix | |||
cm | Success | Sun Aug 19 02:30:15 2007 | 56 |
cm-debug | Success | Wed Aug 15 04:00:52 2007 | 344 |
cm-debug-clear-malloc | Success | Sat Aug 18 04:35:37 2007 | 355 |
cm-debug-clear-malloc7 | Success | Mon Aug 20 04:37:32 2007 | 351 |
cm64 | Success | Sun Aug 19 02:31:16 2007 | 58 |
cm64-debug | Success | Tue Aug 21 04:58:13 2007 | 308 |
rs6000-aix | |||
cm | Success | Wed Mar 4 01:11:15 2009 | 4 |
cm-debug | Success | Mon Mar 2 01:24:51 2009 | 53 |
cm64 | Success | Wed Mar 4 01:11:16 2009 | 4 |
cm64-debug | Success | Tue Mar 3 01:27:39 2009 | 58 |
x86_64-linux | |||
cm | Success | Sun Mar 6 00:01:10 2016 | 2 |
cm-debug | Success | Sat Mar 5 00:02:07 2016 | 6 |
i686-linux | |||
Success | cm: | cmiss_test.log.retain. | |
Success | cm-debug: | cmiss_test.log.retain. | |
mips-irix | |||
Success | cm: | cmiss_test.log.retain. | |
Success | cm-debug: | cmiss_test.log.retain. | |
Success | cm-debug-clear-malloc: | cmiss_test.log.retain. | |
Success | cm-debug-clear-malloc7: | cmiss_test.log.retain. | |
Success | cm64: | cmiss_test.log.retain. | |
Success | cm64-debug: | cmiss_test.log.retain. | |
rs6000-aix | |||
Success | cm: | cmiss_test.log.retain. | |
Success | cm-debug: | cmiss_test.log.retain. | |
Success | cm64: | cmiss_test.log.retain. | |
Success | cm64-debug: | cmiss_test.log.retain. | |
x86_64-linux | |||
Success | cm: | cmiss_test.log.retain. | |
Success | cm-debug: | cmiss_test.log.retain. |
i686-linux | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
mips-irix | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug-clear-malloc: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug-clear-malloc7: | ndiff test: no significant differences with generic answer. | |
Success | cm64: | ndiff test: no significant differences with generic answer. | |
Success | cm64-debug: | ndiff test: no significant differences with generic answer. | |
rs6000-aix | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
Success | cm64: | ndiff test: no significant differences with generic answer. | |
Success | cm64-debug: | ndiff test: no significant differences with generic answer. | |
x86_64-linux | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. |
i686-linux | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
mips-irix | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug-clear-malloc: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug-clear-malloc7: | ndiff test: no significant differences with generic answer. | |
Success | cm64: | ndiff test: no significant differences with generic answer. | |
Success | cm64-debug: | ndiff test: no significant differences with generic answer. | |
rs6000-aix | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. | |
Success | cm64: | ndiff test: no significant differences with generic answer. | |
Success | cm64-debug: | ndiff test: no significant differences with generic answer. | |
x86_64-linux | |||
Success | cm: | ndiff test: no significant differences with generic answer. | |
Success | cm-debug: | ndiff test: no significant differences with generic answer. |
Graphical output from this problem is given here.
Html last generated: Sun Mar 6 05:51:39 2016
Input last modified: Tue Feb 21 11:04:21 2006