Example b211n: 3D Implicit LR2

Implict Luo-Rudy phase 2 over a small, one element, cube. If the geometry and fields are exported, they can be viewed using the cmiss_input/cmiss_input/movie.com command file. The signal file can be viewed using UnEMAP.


The comfile run by this example is as follows:

# Example b211m - Implict Luo-Rudy phase 2 over a small, one element,
# cube. If the geometry and fields are exported, they can be viewed 
# using the draw.com command file. The signal file can be viewed using 
# UnEMAP.

#Set up problem size
fem define para;r;cube;example

#Define geometry of the problem
fem define coor;r;cube;example
fem define node;r;cube;example
fem define base;r;cube;example
fem define elem;r;cube;example
fem define fibr;d
fem define elem;r;cube;example fibre
fem define grid;r;cube;example
fem update grid geometry
fem update grid metric
#  Some useful groups
fem group grid external as boundary
fem group grid grid 92,93,101 as stimulus_site

#Define equation to solve
#  Define monodomain with LR2 kinetics
fem define equa;r;lr;example

#Define material properties for the problem

#  Define cellular material properties
fem define cell;r;lr;example
#    Define cell variants and spatially varying material parameters
fem define mate;r;cube;example cell
#  Define continuum material parameters
fem define mate;r;cube;example
fem update grid material

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

#Define the implicit solve, using the adams integrator
fem define solv;r;implicit;example

#The geometry can be exported to CMGUI via these commands
#fem export node;3dcube as cube              !Export node geometry
#fem export elem;3dcube as cube              !Export element geometry

#Solve the problem

#  Set the number of threads to use when using a multiprocessing 
#  executable
set num_threads 16

#  Initialise the solve
fem solve to 0

#  Open a binary history file to store the membrane potential (YQ(1))
fem open history;cube write variables yq niqlist 1 binary

#  Loop through time (solve for 3ms)

# Command updated by fixcom.sh on Wed Aug 23 17:49:55 NZT 2000
# Old command: DO HUN=0..0
for $HUN ( 0..0 ) 
{


# Command updated by fixcom.sh on Wed Aug 23 17:49:55 NZT 2000
# Old command: DO TEN=0..0
for $TEN ( 0..0 ) 
{


# Command updated by fixcom.sh on Wed Aug 23 17:49:55 NZT 2000
# Old command: DO UNIT=0..3
for $UNIT ( 0..3 ) 
{


#  Solve for the current time

# Command updated by fixcom.sh on Wed Aug 23 17:49:55 NZT 2000
# Old command:   fem solve restart to $HUN//$TEN//$UNIT
fem solve restart to "${HUN}${TEN}$UNIT"


#  Write the membrane potential to the history file

# Command updated by fixcom.sh on Wed Aug 23 17:49:55 NZT 2000
# Old command:   fem write history time $HUN//$TEN//$UNIT variables yq binary
fem write history time "${HUN}${TEN}$UNIT" variables yq binary


#  Export the field to CMGUI
#  fem export elem;gridfield_1//HUN//TEN//UNIT field as cube


# Command updated by fixcom.sh on Wed Aug 23 17:49:55 NZT 2000
# Old command: ENDDO
}



# Command updated by fixcom.sh on Wed Aug 23 17:49:55 NZT 2000
# Old command: ENDDO
}



# Command updated by fixcom.sh on Wed Aug 23 17:49:55 NZT 2000
# Old command: ENDDO
}



#  Close the history file
fem close history binary

#  Calculate the binary signal file from the history file
fem evaluate electrode;cube history cube from grid binary

#  Define UnEmap export properties
fem define export;r;cube;example

#  Export the binary signal file to UnEmap
fem export signal;cube electrode signal cube

Files used by this example are:

Name                    Modified     Size

example_b211n.com 20-Nov-2001 3.2k cube.binhis 10-Apr-2000 28k cube.binsig 10-Apr-2000 45k cube.ipbase 10-Apr-2000 2.4k cube.ipcoor 10-Apr-2000 570 cube.ipelem 10-Apr-2000 404 cube.ipelfb 10-Apr-2000 233 cube.ipequa 26-May-2003 1.4k cube.ipexpo 10-Apr-2000 660 cube.ipgrid 06-Mar-2003 600 cube.ipinit 10-Apr-2000 213 cube.ipmatc 10-Apr-2000 642 cube.ipmate 10-Apr-2000 1.7k cube.ipnode 10-Apr-2000 1.8k cube.ippara 12-Nov-2002 5.9k cube.ipsolv 13-Apr-2007 1.8k cube.ipsolv.old 10-Apr-2000 1.4k draw.com 20-Nov-2001 3.2k implicit.ipsolv 13-Apr-2007 2.2k implicit.ipsolv.old 10-Apr-2000 1.8k lr.ipcell 10-Apr-2000 3.0k lr.ipequa 26-May-2003 1.4k movie.com 10-Apr-2000 445 test.ipsolv 03-Oct-2001 1.3k test.ipsolv.old 10-Apr-2000 1.3k test_output.com_broken 10-Apr-2000 27 test_output_hpc.com 10-Apr-2000 0

Download the entire example:

Name                                 Modified     Size

examples_b_b2_b21_b211_b211n.tar.gz 14-Apr-2007 61k

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

Input last modified: Fri Apr 13 10:38:08 2007


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