2D Sheet EP Simulations for BENG 276

Description

  • In these examples we simulate action potential propagation in a 2D model of cardiac tissue. The first two simulations use a point stimulus to initiate the propagating action potential similar to sinus node activity or an electrical pacing pulse. The second two simulations use a broken wave to initiate a spiral wave similar to those seen in reentrant cardiac arrhythmias.
  • The goal of these simulations is to familiarize the user with the basics of the Electrophysiology Module in Continuity including setting up a simulation with the Ionic and Conductivity Model Editors, running simulations through the Integrate Form, and rendering the resulting voltage solution. Additionally, we will cover using the Continuity database and running Continuity from a python script.


Point Stimulus Simulations

Model description

target[

Start Continuity and load the model

  • Launch the Continuity 6.4 Client
  • Go to File→Library→Search, select sheet2304 (ID: 1379), right-click, and select Load.

  • sheet2304.cont6

Mesh module data

Open and examine the following options in the Mesh menu:

  • Coordinates (Mesh→Edit→Coordinates...)

  • Material Coordinates (Mesh→Edit→Material Coordinates...)

    • Compile the code for C in double precision
  • Basis (Mesh→Edit→Basis...)

  • Nodes (Mesh→Edit→Nodes...)

    • Take note of which fields are initialized with which basis functions.
    • Look at the initial values for all fields (especially for node 1176).
  • Elements (Mesh→Edit→Elements...)

Render the mesh

  • Calculate the mesh (Mesh→Calculate Mesh...)

  • Render the element lines (Mesh→Render Elements...)

    • Click lines radio button

    • Click Render to display mesh lines

  • Render the element surfaces (Mesh→Render Elements...)

    • Click surfaces radio button

    • Click Render to display mesh surface

Electrophysiology module data

Open and examine the following options in the Electrophysiology menu:

  • Ionic Model Editor (Electrophysiology→Edit→Ionic Model...)

    • In the Edit equations tab, compare the equations to the Beeler-Reuter equations from the CellML website.

    • Check the Parameters (Edit equations tab) and the Initial conditions(Set initial values tab) and compare them to your notes from the Nodes form.

    • Compile the code for C in double precision
  • Conductivity Model Editor (Electrophysiology→Edit→Conductivity Model...)

    • Compile the code for C in double precision

Run Simulation #1

Point stimulation of an isotropic 2D tissue square

  • Initialize the electrophysiology simulation (Electrophysiology→Solve→Initialize)

  • Set the solution parameters and solve (Electrophysiology→Solve→Integration)

    • Run the simulation for 400 ms
    • Click OK to start solving

  • Render the solution (Electrophysiology→Render→Render Solution...)

    • Set Min value to -80 and the Max value to 10

target[

Run Simulation #2

Point stimulation of an anisotropic 2D tissue square

For this simulation we want to change the conductivity to make the mesh anisotropic and add a fiber angle of 45 degrees. This can be done interactively through the GUI. Alternatively, simulation steps can be coded in python and executed by Continuity. This is the most convenient and reproducible way to operate Continuity if you use it frequently. A script to change the conductivity and fiber angle then run the electrophysiology simulation has been loaded into the Script Manager.

  • Open the Script Manager (File→Scripts→ScriptManager)

    • Select Sim2

    • Click Execute Selected

  • Several minutes should elapse while the Electrophysiology problem executes. You can track the progress of the simulation by opening the Python Shell.
  • The solution should render and play automatically.

target[


Spiral Wave Simulations

Model description

Initial conditions: u (transmembrane voltage) - the red region is the activated tissue that will propagate the action potential

target[

v (inactivation/reactivation gate for the fast inward current) - The yellow and white region for v and w are refractory and prevent the propagation of the action potential in this direction

target[

w (inactivation/reactivation gate for the slow inward current)

target[

Start Continuity and load the model

  • Close and restart the Continuity 6.4 Client
  • Go to File→Library→Search, select sheet2304_spiral (ID: 1405), right-click, and select Load.

  • sheet2304_spiral.cont6

Mesh module data

Open and examine the following options in the Mesh menu:

  • Coordinates (Mesh→Edit→Coordinates...)

  • Material Coordinates (Mesh→Edit→Material Coordinates...)

    • Compile the code for C in double precision
  • Basis (Mesh→Edit→Basis...)

  • Nodes (Mesh→Edit→Nodes...)

    • Take note of which fields are initialized with which basis functions.
    • Look at the initial values for all fields.
  • Elements (Mesh→Edit→Elements...)

Render the mesh

  • Calculate the mesh (Mesh→Calculate Mesh...)

  • Render the element lines (Mesh→Render Elements...)

    • Click lines radio button

    • Click Render to display mesh lines

  • Render the element surfaces (Mesh→Render Elements...)

    • Click surfaces radio button

    • Click Render to display mesh surface

Electrophysiology module data

Open and examine the following options in the Electrophysiology menu:

  • Ionic Model Editor (Electrophysiology→Edit→Ionic Model...)

    • In the Edit equations tab, compare the equations to the Fenton-Karma equations from the CellML website.

    • Check the Parameters (Edit equations tab) and the Initial conditions(Set initial values tab) and compare them to your notes from the Nodes form.

    • Compile the code for C in single precision
  • Conductivity Model Editor (Electrophysiology→Edit→Conductivity Model...)

    • Compile the code for C in double precision

Run Simulation #3

Spiral wave simulation on an isotropic 2D tissue square

  • Initialize the electrophysiology simulation (Electrophysiology→Solve→Initialize)

  • Set the solution parameters and solve (Electrophysiology→Solve→Integration)

    • Run the simulation for 400 ms
    • Click OK to start solving

  • Render the solution (Electrophysiology→Render→Render Solution...)

    • Set Min value to 0 and the Max value to 1

target[

Run Simulation #4

Edit a model parameter and rerun the previous spiral wave simulation to observe how the spiral behavior changes.

Possible parameters to test are listed below:

  • Anisotropy ratio
  • Fiber direction (could be constant or spatially varying)
  • Add a small inexcitable region to the sheet (using the conductivity and/or excitability)
  • Ionic model excitability (g_fi_max) or other ionic model parameters

Sim4 in the Script Manager shows an example of altering the ionic model excitability (g_fi_max).