Example b21524: Beeler-Reuter on 3d cube

This example solves a bidomain version of the Beeler-Reuter ionic equation on a simple cube domain. The collocation grid is generated using the lattice grid scheme.

The comfile run by this example is as follows:

# Set up for bidomain.

fem define parameters;r;br_cube
fem define coordinates;r;br_cube

fem define node;r;br_cube

fem define base;r;br_cube

fem define elem;r;br_cube

fem define grid;r;br_cube
fem update grid geometry
fem update grid metric

fem group grid external as boundary
fem group grid xi2 high as stim_point oneoff element 1

fem def equa;r;br_cube class $VM,$PHI_E
fem def mate;r;br_cube class $VM,$PHI_E
fem def cell;r;br_cube class $VM,$PHI_E

fem update grid material class $VM,$PHI_E

fem def init;r;br_cube class $VM,$PHI_E

fem def solve;r;br_cube class $VM
fem def solve;r;br_cube class $PHI_E
fem solve to 0 class $VM,$PHI_E

# Export the grid elements and nodes
fem export node;Domain as Domain reg 1
fem export elem;Domain grid_numbers as Domain reg 1
fem export elem;"MemPot_000" field as Solution class $VM

fem open history;br_cube write variables yq niqlist 1 binary class $VM

  for $M ( 0..10 )
   for $L ( 0..9 )
   #Solve for new time
   print "Time step: $M.$L\n"; 
   fem solve restart to "${M}.$L" class $VM,$PHI_E

   #Draw solution to graphics window
   #fem draw field grid 1 zmin=-110 zmax=60 class $VM
   #refresh graphics

   # Export solution
   fem export elem;"MemPot_${M}.$L" field as Solution class $VM

   #Write solution to file
   fem write history time "$M.$L" variables yq binary class $VM
   #Print graphics window to frame - for movie viewing (Optional)
   #cmiss("fem gxprint;frame_${J}${N}$M portable width 480 height 480")

fem close history binary class $VM
fem eval elec;br_cube history br_cube from grid yq binary

fem def expo;r;br_cube_sig 
fem expo signal;br_cube elec signal br_cube

fem def expo;r;br_cube_dat
fem expo signal;br_cube elec signal br_cube

Files used by this example are:

Name                Modified     Size

example_b21524.com 29-Apr-2003 1.7k Domain.exelem 29-Apr-2003 10k Domain.exnode 29-Apr-2003 1.0k MemPot_0.0.exelem 29-Apr-2003 11k MemPot_0.1.exelem 29-Apr-2003 11k MemPot_0.2.exelem 29-Apr-2003 11k MemPot_0.3.exelem 29-Apr-2003 11k MemPot_0.4.exelem 29-Apr-2003 11k MemPot_0.5.exelem 29-Apr-2003 11k MemPot_0.6.exelem 29-Apr-2003 11k MemPot_0.7.exelem 29-Apr-2003 11k MemPot_0.8.exelem 29-Apr-2003 11k MemPot_0.9.exelem 29-Apr-2003 11k MemPot_000.exelem 29-Apr-2003 11k MemPot_1.0.exelem 29-Apr-2003 11k MemPot_1.1.exelem 29-Apr-2003 11k MemPot_1.2.exelem 29-Apr-2003 11k MemPot_1.3.exelem 29-Apr-2003 11k MemPot_1.4.exelem 29-Apr-2003 11k MemPot_1.5.exelem 29-Apr-2003 11k MemPot_1.6.exelem 29-Apr-2003 11k MemPot_1.7.exelem 29-Apr-2003 11k MemPot_1.8.exelem 29-Apr-2003 11k MemPot_1.9.exelem 29-Apr-2003 11k MemPot_2.0.exelem 29-Apr-2003 11k MemPot_2.1.exelem 29-Apr-2003 11k MemPot_2.2.exelem 29-Apr-2003 11k MemPot_2.3.exelem 29-Apr-2003 11k MemPot_2.4.exelem 29-Apr-2003 11k MemPot_2.5.exelem 29-Apr-2003 11k MemPot_2.6.exelem 29-Apr-2003 11k MemPot_2.7.exelem 29-Apr-2003 11k MemPot_2.8.exelem 29-Apr-2003 11k MemPot_2.9.exelem 29-Apr-2003 11k br_cube.binhis 29-Apr-2003 178k br_cube.binsig 29-Apr-2003 120k br_cube.dat 29-Apr-2003 1.1k br_cube.ipbase 29-Apr-2003 2.4k br_cube.ipcell 29-Apr-2003 2.0k br_cube.ipcoor 29-Apr-2003 570 br_cube.ipelem 29-Apr-2003 404 br_cube.ipequa 26-May-2003 1.6k br_cube.ipgrid 29-Apr-2003 600 br_cube.ipinit 29-Apr-2003 903 br_cube.ipmate 29-Apr-2003 1.8k br_cube.ipnode 29-Apr-2003 1.8k br_cube.ippara 29-Apr-2003 5.9k br_cube.ipsolv 13-Apr-2007 1.8k br_cube.signal 29-Apr-2003 336 br_cube_dat.ipexpo 29-Apr-2003 406 br_cube_sig.ipexpo 29-Apr-2003 661

Download the entire example:

Name                                        Modified     Size

examples_b_b2_b21_b215_b2152_b21524.tar.gz 14-Apr-2007 173k

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

Input last modified: Fri Apr 13 10:39:47 2007

CMISS Help / Examples / b / b2 / b21 / b215 / b2152 / b21524