Example cellml/fenton_karma_1998: Fenton and Karma - 1998

This example solves the Fenton & Karma 1998 simplified ventricular myocyte model, defined by a CellML version of the model.

Fenton & Karma provide a three current simplification of the original BR and LR I models, as well as a modified BR and a guniea-pig LV epicardial model. All four of these versions are given in this example as separate parameter sets (IPCELL files) for the same set of equations in the single CellML file.

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


The comfile run by this example is as follows:

# 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;
}

# We want to run the same model for multiple different parameter sets, so
# set up a function to do the solve and call it for each parameter set
sub runModel {
    $model = shift;

    fem define cell;r;"$example/$model";
    fem define material;d cell;
    fem define material;d;
    fem update grid material;
    fem define initial;d;
    fem define solve;r;$example/lsoda;
    fem solve to 0;
    fem open history;$model write variables yqs niqslist 1..13 binary;
    $Tend = 1500;
    $dt = 1.0;
    for ($time=0;$time<$Tend;$time+=$dt) {
        fem solve restart to $time;
        fem write history time $time variables yqs binary;
    }
    fem close history binary;
    fem evaluate electrode;$model history $model from grid yqs iy 1..13 binary;
    fem define export;r;$example/fenton_karma_model_1998;
    fem export signal;$model electrodes signal $model names cell;
}

fem define parameters;r;$example/cellml;
fem define node;d;
fem define bas;d;
fem define elem;d;
fem define grid;d;
fem update grid geometry;
fem update grid metric;
fem define equation;r;$example/cellml;

@models = ("FK_BR","FK_mod_BR","FK_mod_LR_I","FK_GP");
foreach $model (@models) {
    &runModel($model);
}

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

Files used by this example are:

Name                            Modified     Size

fenton_karma_1998.com 14-Nov-2003 1.6k FK_BR.binsig 14-Nov-2003 127k FK_BR.ipcell 14-Nov-2003 5.6k FK_GP.binsig 14-Nov-2003 127k FK_GP.ipcell 14-Nov-2003 5.6k FK_mod_BR.binsig 14-Nov-2003 127k FK_mod_BR.ipcell 14-Nov-2003 5.7k FK_mod_LR_I.binsig 14-Nov-2003 127k FK_mod_LR_I.ipcell 14-Nov-2003 5.6k cellml.ipequa 08-Nov-2003 1.5k cellml.ippara 08-Nov-2003 5.9k fenton_karma_model_1998.cml 14-Nov-2003 33k fenton_karma_model_1998.ipexpo 14-Nov-2003 658 lsoda.ipsolv 08-Nov-2003 1.2k

Download the entire example:

Name                                      Modified     Size

examples_cellml_fenton_karma_1998.tar.gz 19-Aug-2006 179k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:09:39 201613
cm-debugSuccessSat Mar 5 00:33:24 201622
mips-irix
cmSuccessSun Aug 19 05:43:17 2007265
cm-debugSuccessWed Aug 15 05:56:19 2007480
cm-debug-clear-mallocSuccessSat Aug 11 03:43:31 2007511
cm-debug-clear-malloc7SuccessMon Aug 20 05:54:06 2007493
cm64SuccessSun Aug 19 05:58:39 2007267
cm64-debugSuccessTue Aug 21 03:59:08 2007476
cm64-debug-clear-mallocSuccessThu Apr 1 11:48:19 2004224
rs6000-aix
cmSuccessWed Mar 4 01:21:32 200930
cm-debugSuccessMon Mar 2 01:26:44 200976
cm64SuccessWed Mar 4 01:24:11 200943
cm64-debugSuccessTue Mar 3 01:36:43 200982
x86_64-linux
cmSuccessSun Mar 6 00:01:46 20168
cm-debugSuccessSat Mar 5 00:03:39 201612

Testing status by file:


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

Input last modified: Fri Nov 14 20:16:26 2003


CMISS Help / Examples / cellml / fenton_karma_1998