Example b131: HMT Cardiac Mechanics

Example b131 - HMT Cardiac Mechanics Model This example solves the HMT model for a single cell. It outputs each of the state variables (Vm, Cai, Cab, lambda, To, T, z) to a UnEMAP signal file. This example also uses a time variable to set a time varying boundary condition - namely the time course of the extension ratio (lambda).

The comfile run by this example is as follows:

# Example b131 - HMT
# Solves the HMT model for a single cell, with a step change in
# length defined by a time varying boundary condtion set by using
# a time variable.

fem define parameters;r;hmt;example

fem define node;d
fem define base;d
fem define element;d
fem define grid;d
fem update grid geom
fem update grid metric

fem define equation;r;hmt;example

fem define cell;r;hmt;example
fem define material;r;hmt;example cell
# Need to define the material conductivities even though they are not 
# really used
fem define material;r;hmt;example
fem update grid material

# read in the time variable describing the step length change
fem define time;r;step;example

# assign the time variable to use for the time varying boundary 
# condition
fem define initial;r;step;example

fem define solve;r;hmt;example

fem solve to 0

fem open history;hmt write variables yqs niqslist 1,2,3,4,5,6,7 binary

for $time ( 0..999 ) 
#  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

# Write out signal files for all the state variables.

# First as individual signal files
for $UNIT ( 1..7 ) 
fem evaluate electrode;hmt_$UNIT history hmt from grid yqs iy $UNIT binary
fem define export;r;hmt;example
fem export signal;hmt_$UNIT electrode signal "hmt_$UNIT"

# Then with all variables in one signal file
fem evaluate electrode;hmt_all history hmt from grid yqs iy 1..7 binary
fem define export;r;hmt_all;example
fem export signal;hmt_all electrode signal hmt_all

Additional testing commands:

fem list signal signal hmt_1 binary
fem list signal signal hmt_2 binary
fem list signal signal hmt_3 binary
fem list signal signal hmt_4 binary
fem list signal signal hmt_5 binary
fem list signal signal hmt_6 binary
fem list signal signal hmt_7 binary
fem list signal signal hmt_all binary

fem list time

Files used by this example are:

Name                  Modified     Size

example_b131.com 07-Oct-2001 1.6k hmt.ipcell 18-Jul-2002 3.5k hmt.ipequa 26-May-2003 1.2k hmt.ipexpo 10-Apr-2000 657 hmt.ipmatc 29-Jan-2003 431 hmt.ipmate 05-Mar-2001 1.8k hmt.ippara 12-Nov-2002 5.9k hmt.ipsolv 03-Oct-2001 900 hmt.ipsolv.old 10-Apr-2000 854 hmt_all.ipexpo 10-Apr-2000 657 step.ipinit 10-Apr-2000 535 step.iptime 30-Jul-2001 1.0k step_version2.iptime 10-Apr-2000 728 test_output.com 20-Apr-2001 305

Download the entire example:

Name                           Modified     Size

examples_b_b1_b13_b131.tar.gz 19-Aug-2006 125k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:03:44 20162
cm-debugSuccessSat Mar 5 00:12:21 20163
cmSuccessSun Aug 19 02:12:44 200741
cm-debugSuccessWed Aug 15 01:52:19 200764
cm-debug-clear-mallocSuccessSat Aug 18 02:04:20 200771
cm-debug-clear-malloc7SuccessMon Aug 20 01:59:20 200768
cm64SuccessSun Aug 19 02:13:00 200742
cm64-debugSuccessTue Aug 21 01:52:30 200765
cm64-debug-clear-mallocSuccessThu Apr 1 11:09:37 200429
cmSuccessWed Mar 4 01:09:10 20092
cm-debugSuccessMon Mar 2 01:09:43 20098
cm64SuccessWed Mar 4 01:09:10 20091
cm64-debugSuccessTue Mar 3 01:14:21 20097
cmSuccessSun Mar 6 00:01:05 20162
cm-debugSuccessSat Mar 5 00:01:42 20162

Testing status by file:

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

Input last modified: Mon May 26 18:04:06 2003

CMISS Help / Examples / b / b1 / b13 / b131