Chapter 5: Bioelectric Field Simulation
Chapter Sections
Chapters 1-4 discussed various dataflow programming networks. The
networks were built to visualize existing datasets.
Chapter 5 demonstrates the construction of a network that
computes simulated voltages for a realistic volume conductor
problem.
Thus far, modules from the SCIRun package have been used (packages are
logically grouped sets of modules). Figure 5.1 shows a SCIRun menu
bar from a build that features several additional packages. To learn
more about packages, see User's Guide 3, Packages. Note that in
addition to the Packages listed (SCIRun, BioPSE, and
Teem), the Menu Bar has Sub-Networks and Help
menus. Sub-Networks are a new addition to SCIRun
(V1.20). Sub-networks allow modules to be grouped together (e.g., by
functionality). They are useful for hiding complexity of dataflow
networks by consolidating groups of modules that work together into a
single representation on the Network Editory canvas. See User's Guide,
Chapter 5 for more information on Sub-Networks. The Help menu
allows the user to turn on/off the use of Tooltips, show the
About splash screen, and review the SCIRun License.

Figure 5.1: SCIRun Package Menus
Modules within the SCIRun package serve as general purpose tools that
do not target specific applications. This chapter uses
modules from the BioPSE package, which contains a set of tools
specifically written for modeling, simulation, and visualization of
bioelectric field problems.
Given a volume conductor model and an equivalent dipole source, the
user will compute the potentials and electric field induced by the
source through the domain.
Analytic solutions exist for problems of specific geometric models
(e.g., cylinders or spheres). However, for most real-world
problems, the solution can only be obtained through discretization.
For this application, the user will discretize the domain into
tetrahedral finite elements, where each element contains a
conductivity tensor that defines how electricity travels through its
region of the domain. Within each element, a piece-wise linear
potential field is assumed (piece-wise constant electric field).
The above problem is governed mathematically by Poisson's
equation:
where is the local
conductivity tensor,
is the voltage over the domain, and is a source term indicating where
there are current sources within the domain. In plain language: the
divergence ( ) of the electric field ( ) is zero where there is not a
current source.
Discretizing Poisson's equation onto the tetrahedral domain, the divergence of the
electric field with the stiffness matrix A is approximated. is a vector composed of voltages at the
nodes. And b is a source vector
indicating the flux through the nodes. b it is only non-zero for nodes
that are corners of elements containing a current source. Given a
stiffness matrix, A, and a source vector,
b, the linear system:
  
can be solved to determine the potentials, , through the field. Taking the gradient,  , obtains the electric field through
the domain.
To compute the electric and potential fields given a finite element
volume conductor mesh and a dipolar current source, follow these
steps:
- Load the finite element mesh (tet elements, with a conductivity tensors for each cell).
- Load dipole sources.
- Construct the finite element stiffness matrix based on
the conductivity mesh.
- Construct the right side source vector based on
the location and orientation of any dipole sources.
- Solve the linear system
   , to determine the potentials at the nodes.
Each of the above steps corresponds to a SCIRun module:
- For steps 1 and 2, use two SCIRun->DataIO->FieldReader modules.
- For step 3, use a BioPSE->Forward->SetupFEMatrix module.
- For step 4, use a BioPSE->Forward->ApplyFEMCurrentSource module.
- For step 5, use a SCIRun->Math->SolveMatrix module.
All modules should be connected as shown in Figure 5.2.

Figure 5.2: Biolelctric Field Simulation Network
The SetupFEMatrix module constructs a finite element stiffness matrix
from a tetrahedral volume mesh. The user can incorporate the
local conductivity tensors into the stiffness matrix, or use a
uniform conductivity as shown in Figure 5.3. For this
application, incorporate the local conductivity changes.

Figure 5.3: SetupFEMatrix UI
The ApplyFEMCurrentSource module modifies the right hand side vector
to account for current sources within the model. In the module's UI,
users can choose whether the current sources are due to a dipole or a
source/sink electrode pair. For the Source Model option, select the
dipole setting.

Figure 5.4: ApplyFemCurrentSource UI
The SolveMatrix module solves a linear system using one of
several methods as indicated in the UI.
- Beneath the Methods tab, choose Conjugate Gradient & Precond
(SCI) method, and set the Target Error to 0.0001.
- Set the Maximum Iterations to 200.

Figure 5.5: SolveMatrix UI
Finally, for this simulation:
- For the FieldReader on the left, load the
mesh Field utahtorso-lowres-mesh.tvt.fld.
- For the FieldReader on the right, load the
dipole Field utahtorso-lowres-dipole.pcv.fld.
The mesh field contains the tetrahedral finite element mesh, which
forms the geometry of the torso. The mesh field also contains
pointers to the electric conductivity values as assigned to each
element. In Poisson's equation, these are the values of sigma. The
dipole field contains a single dipole vector, positioned within the
torso volume that functions as the bioelectric source.
Execute the network, and as the simulation progresses, watch the
residual plot in the SolveMatrix UI converge. To see the solution
converge again, make sure the "Use previous solution as initial guess" is unchecked in the UI and re-execute the module. A finite element
problem has just been solved. Save this net, it will be used
in Chapter 6.
Chapter 5 demonstrated the use of modules from the bioelectric
problem solving environment (BioPSE) package. This chapter also
illustrated the construction of a simulation network that computes
simulated voltages for a realistic volume conductor problem.
Chapter 6 will reuse the finite element simulation network from
chapter 5, and the visualization network from Chapter 4.
Return to Top
|