Example cellml/hill_1938: Hill 1938

This example solves the 1938 Hill isometric contraction model defined by a CellML version of the model.

The model is solved twice - first with the parameter set for 0 degC and then for 23 degC.

NOTE: This example requires a CellML 1.0 enabled version of CMISS to run.


The comfile run by this example is as follows:

# Example showing how to use a cellml model

# We want to run the same model for two different parameter sets, so
# set up a function to do the solve and call it for each parameter set
sub runModel {
    ($suffix) = @_;

    # Define the CellML model to use and map the parameters to CMISS and
    # specify initial/boundary conditions for the cell model.
    fem define cell;r;$example/hill_$suffix;
    # Initialise the spatial properties of the model (there are none).
    fem define material;r;$example/hill cell;
    fem define material;r;$example/hill;
    fem update grid material;

    # Define the zero transmembrane flux boundary condition.
    fem define initial;r;$example/hill;

    # Define an explicit Adams integrator.
    fem define solve;r;$example/hill;

    # Initialise the solve.
    fem solve to 0;

    # Create a history file to store output variables of interest.
    fem open history;hill write variables yqs niqslist 1..3 binary;
    fem write history time 0 variables yqs binary;

    # Loop through time integrating the cellular model.
    $Tend = 1000;
    $dt = 10.0;
    for ($time=$dt;$time<$Tend;$time+=$dt) {
        fem solve restart to $time;
        fem write history time $time variables yqs binary;
    }
    fem close history binary;

    # Evaluate signals for the variables from the history file.
    fem evaluate electrode;hill_$suffix history hill from grid yqs iy 1..3 binary;

    # Define an export of the CMISS signals to UnEMAP signals..
    fem define export;r;$example/hill;

    # ..and export the signals to a UnEMAP signal file.
    fem export signal;hill_$suffix electrodes signal hill_$suffix names cell;
    
} # sub runModel


# 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 parameters;r;$example/hill;

# default nodes, elements and grids to get a single grid point
fem define node;d;
fem define bas;d;
fem define elem;d;
fem define grid;d;
fem update grid geometry;
fem update grid metric;

# Define the a user defined CellML electrophysiological model
fem define equation;r;$example/cellml;

# Run the model for 0 degrees C
&runModel("0degC");
# Run the model for 23 degrees C
&runModel("23degC");

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

Files used by this example are:

Name                Modified     Size

hill_1938.com 09-Jun-2003 2.6k cellml.ipequa 09-Jun-2003 1.5k hill.cml 21-Jun-2003 8.6k hill.ipcell 09-Jun-2003 1.2k hill.ipexpo 09-Jun-2003 658 hill.ipinit 09-Jun-2003 214 hill.ipmatc 09-Jun-2003 356 hill.ipmate 09-Jun-2003 3.2k hill.ippara 09-Jun-2003 5.9k hill.ipsolv 09-Jun-2003 1.2k hill_0degC.binsig 09-Jun-2003 4.8k hill_0degC.ipcell 11-Jun-2003 1.4k hill_23degC.binsig 09-Jun-2003 4.8k hill_23degC.ipcell 11-Jun-2003 1.4k

Download the entire example:

Name                              Modified     Size

examples_cellml_hill_1938.tar.gz 19-Aug-2006 11k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:03:14 20164
cm-debugSuccessSat Mar 5 00:13:33 20165
mips-irix
cmSuccessSun Aug 19 02:08:25 200739
cm-debugSuccessWed Aug 15 02:03:49 200789
cm-debug-clear-mallocSuccessSat Aug 18 02:23:21 200798
cm-debug-clear-malloc7SuccessMon Aug 20 02:18:16 200793
cm64SuccessSun Aug 19 02:05:40 200736
cm64-debugSuccessTue Aug 21 02:02:53 200790
cm64-debug-clear-mallocSuccessThu Apr 1 11:46:09 200440
rs6000-aix
cmSuccessWed Mar 4 01:10:57 20094
cm-debugSuccessMon Mar 2 01:13:08 200920
cm64SuccessWed Mar 4 01:11:40 20094
cm64-debugSuccessTue Mar 3 01:18:17 200920
x86_64-linux
cmSuccessSun Mar 6 00:01:07 20161
cm-debugSuccessSat Mar 5 00:01:51 20163

Testing status by file:


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

Input last modified: Sat Jun 21 15:10:54 2003


CMISS Help / Examples / cellml / hill_1938