Example b211d: Explicit 2-D Noble 98 model

This example solves the monodomain equation using the Noble 98 model on a 2d strip of elements.

The comfile run by this example is as follows:

# Example b211d - Solve the Noble 98 ionic current model over a 
# distributed mesh. The stimulus is applied at one end of a 2d strip of 
# cells (grid points) and the activation wave propagates down the strip.

# Assign some useful variables
# The file format

$FORMAT = "binary"

# The signals to export ???


# The finish time of the integration

$TEND = 10

# The grid points to be stimulated

$STIMULUS_SITE = "xi1=low oneoff element 1"

# The name of the output files

$OUTPUT_FILE = "n98"

# Define the model size
fem define para;r;biline;example

# Define the geometry, using 2d linear Lagrange basis functions
fem define node;r;biline;example
fem define base;r;biline;example
fem define elem;r;biline;example

# Define a 9x9 grid scheme for each of the 10 elements
fem define grid;r;biline;example

# Update the grid information
fem update grid geometry
fem update grid metric

# Group the external grid points, used to set boundary conditions
fem group grid external as boundary
# Group the grid points to be stimulated
  my $command = "fem group grid $STIMULUS_SITE as stimulus_site";
  cmiss $command or die "Error in cmiss command \"$command\".\n";

# Define the model to be used - the monodomain Noble 98 ionic 
# current model
fem define equa;r;biline;example

# Define the cellular material parameters
fem define cell;r;n98;example
fem define material;r;n98;example cell

# Define an isotropic continuum with a conductivity of 0.17 mS/mm
fem define material;r;biline;example
fem update grid material

# Define the boundary conditions
fem define init;r;biline;example

# Define the integration scheme to use
fem define solv;r;biline;example

# Initialise the solve
fem solve to 0

# Create a history file to store the required variables at all 
# grid points
fem open history;$OUTPUT_FILE write variables yq niqlist $VARIABLES $FORMAT

# Export the geometry
fem export node;$OUTPUT_FILE as biline
fem export element;$OUTPUT_FILE as biline
fem export element;numbers as biline grid_numbers

# Integrate the model through time

for $TIME ( 0..$TEND ) 
  # Display the current time
  print " TIME = ".sprintf("%7.1f",${TIME})." ms"

  # Solve the model for the current time
  fem solve restart to $TIME

  # Write the new variable values to the history file
  fem write history time $TIME variables yq $FORMAT

  # Export the solution field

  fem export element;${OUTPUT_FILE}."_1".sprintf("%05d",$TIME) field as biline

# Close the history file
fem close history $FORMAT

# Export the UnEMAP signal file
fem evaluate electrode;$OUTPUT_FILE history $OUTPUT_FILE from grid yq iy $VARIABLES $FORMAT
fem define export;r;biline;example
fem export signal;$OUTPUT_FILE electrode signal $OUTPUT_FILE

Files used by this example are:

Name               Modified     Size

example_b211d.com 18-Dec-2002 2.7k biline.ipbase 10-Apr-2000 1.1k biline.ipelem 10-Apr-2000 2.6k biline.ipequa 26-May-2003 2.3k biline.ipexpo 20-Nov-2001 659 biline.ipgrid 06-Mar-2003 539 biline.ipinit 20-Nov-2001 214 biline.ipmate 20-Nov-2001 1.7k biline.ipnode 10-Apr-2000 2.8k biline.ippara 12-Nov-2002 5.9k biline.ipsolv 03-Oct-2001 1.3k display.com 20-Nov-2001 1.9k movie.com 20-Nov-2001 89 n98.ipcell 20-Nov-2001 9.2k n98.ipmatc 30-Jan-2003 672

Download the entire example:

Name                                 Modified     Size

examples_b_b2_b21_b211_b211d.tar.gz 19-Aug-2006 26k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:02:56 20161
cm-debugSuccessSat Mar 5 00:12:51 20165
cmSuccessSun Aug 19 01:46:05 200715
cm-debugSuccessWed Aug 15 01:45:52 200746
cm-debug-clear-mallocSuccessSat Aug 18 01:59:42 200754
cm-debug-clear-malloc7SuccessMon Aug 20 01:58:08 200753
cm64SuccessSun Aug 19 01:45:43 200714
cm64-debugSuccessTue Aug 21 01:45:31 200749
cm64-debug-clear-mallocSuccessThu Apr 1 11:12:10 200423
cmSuccessWed Mar 4 01:08:11 20092
cm-debugSuccessMon Mar 2 01:12:26 200913
cm64SuccessWed Mar 4 01:09:14 20092
cm64-debugSuccessTue Mar 3 01:16:08 200914
cmSuccessSun Mar 6 00:01:10 20162
cm-debugSuccessSat Mar 5 00:01:53 20163

Testing status by file:

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

Input last modified: Mon May 26 18:08:32 2003

CMISS Help / Examples / b / b2 / b21 / b211 / b211d