Laplace Solver
Module: tutorials.02_EP_tissue.13_laplace.run
Section author: Anton J Prassl <anton.prassl@medunigraz.at>
Computing Laplace-Dirichlet maps provide an elegant tool for describing the distance between defined boundaries. Specialized software routines exploiting these maps in order to assign ventricular fibers and sheets or to determine the set of elements to receive heterogeneous conductivities are frequently used in the carputils framework.
The relevant part of the .par file for this example is shown below:
experiment = 2 # perform Laplace solve only
bidomain = 1
# ground electrode
stimulus[0].x0 = -50. # par-file units are always microns!
stimulus[0].xd = 100.
stimulus[0].y0 = -50.
stimulus[0].yd = 10100.
stimulus[0].z0 = -50.
stimulus[0].zd = 200.
stimulus[0].stimtype = 3 # extracellular ground
# stimulus electrode
stimulus[1].x0 = -50.
stimulus[1].xd = 10100.
stimulus[1].y0 = -50.
stimulus[1].yd = 100.
stimulus[1].z0 = -50.
stimulus[1].zd = 200.
stimulus[1].stimtype = 2 # extracellular voltage
stimulus[1].duration = 1.
stimulus[1].strength = 1.
# set isotropic conductivities everywhere
num_gregions = 1
gregion[0].g_il = 1
gregion[0].g_it = 1
gregion[0].g_el = 1
gregion[0].g_et = 1
To run this experiment
cd ${TUTORIALS}/02_EP_tissue/13_laplace
Run
./run.py --visualize
Note
[EXPECTED RESULT] laplace solution
Instead of having to define a different stimulus for each different Dirichlet value, specific nodes can be assigned different values in one file. The relevant parameters to change are below:
stimulus[1].stimtype = 2 # extracellular voltage
stimulus[1].vtx_file = BCs
stimulus[1].vtx_fcn = 1
stimulus[1].strength = 1.
When stimulus[1].vtx_fcn
is non-zero, the vtx_file
, BCs.vtx in this case, has vertex adjustment format in which the nodal strength is specified along with the node number.
The nodal strengths in the file are then multiplied by stimulus[1].strength
.