Example b124: Cubic polynomial model

Single Cell cubic This example solves the cubic model.


The comfile run by this example is as follows:

# Example b124 - Single cell cubic

# If the example path is not set, default to current directory
if (! defined $example) {
    $example = "./";
}
# Drop off the trailing / in the example path
$chopped = chop $example;
if ($chopped ne "/") {
    $example .= $chopped;
}

fem define para;r;$example/test;

#Define geometry of the problem
#  Define underlying geometry
fem define base;d;
fem define node;d;
fem define elem;d;
#  Define grid geometry
fem define grid;d;
fem update grid geometry;
fem update grid metric;

#Define equation to solve
#  Define monodomain with HH kinetics
fem define equa;r;$example/cubic;

#Define material properties for the problem

#  Define cellular material properties
fem define cell;r;$example/cubic;
#  Define the continuum material parameters
fem define mate;r;$example/test;
fem update grid material;

#Define continuum initial conditions
#  Set no-flux boundary condition
fem define init;r;$example/cubic;

#Define the explicit solve, using the adams integrator
fem def solv;r;$example/test;

#Solve the problem

#  Initialise the solve
fem solve to 0;

#  Open a binary history file to store the membrane potential,
#  the h, m, and n gates and the three currents: INa, IK, and Il and
#  the stimulus current
fem open history;test write variables yqs niqslist 1 binary;

#  Loop through time
$Tend = 100;
$dt = 1.0;
for ($time=0;$time<$Tend;$time+=$dt) {
    # Solve for the current time
    fem solve restart to $time;
    # Write the membrane potential to the history file
    fem write history time $time variables yqs binary;
}

#  Close the history file
fem close history binary;

#  Calculate the binary signal file from the history file
#  for the membrane potential (YQS(1))
fem evaluate electrode;test history test from grid yqs iy 1 binary;

#  Define UnEmap export properties
fem define export;r;$example/test;

#  Define names for the signals
fem define leads;r;$example/test;

#  Export the binary signal file to UnEmap
fem export signal;test leads signal test;

# For testing we compare the generated CMISS signal files
if ($TESTING) {
    fem compare signal;test basis both masterfile $example/test comparefile test binary;
}

Files used by this example are:

Name              Modified     Size

example_b124.com 07-Feb-2003 2.1k cubic.ipcell 06-Feb-2003 1.7k cubic.ipequa 26-May-2003 1.4k cubic.ipinit 06-Feb-2003 498 test.binsig 07-Feb-2003 4.0k test.ipexpo 06-Feb-2003 658 test.iplead 06-Feb-2003 356 test.ipmatc 06-Feb-2003 430 test.ipmate 06-Feb-2003 3.2k test.ippara 06-Feb-2003 5.9k test.ipsolv 06-Feb-2003 897

Download the entire example:

Name                           Modified     Size

examples_b_b1_b12_b124.tar.gz 19-Aug-2006 6.9k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:02:09 20160
cm-debugSuccessSat Mar 5 00:04:13 20161
mips-irix
cmSuccessSun Aug 19 01:33:10 20077
cm-debugSuccessWed Aug 15 01:28:25 200710
cm-debug-clear-mallocSuccessSat Aug 18 01:37:39 200714
cm-debug-clear-malloc7SuccessMon Aug 20 01:28:43 200714
cm64SuccessSun Aug 19 01:33:11 20076
cm64-debugSuccessTue Aug 21 01:25:32 200710
cm64-debug-clear-mallocSuccessThu Apr 1 11:09:07 20045
rs6000-aix
cmSuccessWed Mar 4 01:07:32 20091
cm-debugSuccessMon Mar 2 01:06:26 20092
cm64SuccessWed Mar 4 01:07:32 20091
cm64-debugSuccessTue Mar 3 01:12:15 20092
x86_64-linux
cmSuccessSun Mar 6 00:01:04 20161
cm-debugSuccessSat Mar 5 00:01:34 20161

Testing status by file:


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

Input last modified: Mon May 26 18:03:54 2003


CMISS Help / Examples / b / b1 / b12 / b124