Getting Started with Electrophysiology

These steps will guide you through the creation of a new Electrophysiology model using the model editor, compile the model on a remote server, solve a problem on that server, using the client/server architecture of Continuity and setup an anatomically accurate rabbit ventricular mesh with orthotropic conductivity using your newly created model.

Continuity Client/Server

Model Editor

  • Add a new model by Fenton and Karma, 1998, Chaos, 8, 20-47.

  • Go to Electrophysiology - Edit - Ionic Model - Add new model
  • Name your model as EP_Fenton_Karma_model

  • Add the Author's name and details about the model
  • Switch tab to Edit equations and setup your EP model as follows:

    • CONSTANTS
      • u_v = 0.04

        u_csi = 0.85

        tau_si = 30

        k = 10

        u_c = 0.13

        Cm = 1

        g_fi_max = 4

        tau_w_plus = 870

        tau_w_minus = 41

        V_0 = -85

        V_fi = 15

        tau_v_plus = 3.33

        tau_v1_minus = 1250

        tau_v2_minus = 19.6

        tau_r = 33

        tau_0 = 12.5

        u_v = 0.04

        u_csi = 0.85

        tau_d = Cm/g_fi_max

    • GATING_PARAMETERS
    • CURRENTS
      • J_si = - w * (1 + tanh(k*(u-u_csi))) / (2*tau_si)

        J_so = u*(1-p)/tau_0 + p/tau_r

        J_fi = -v*p*(1-u)*(u-u_c)/tau_d

        I_fi = J_fi*Cm*(V_fi - V_0)

        I_si = J_si * Cm * (V_fi - V_0)

        I_so = J_so * Cm * (V_fi - V_0)

    • STIMULUS
      • J_stim = stim_amp * HeavisideEq( t - t_start ) * (1 - HeavisideEq( t - t_end))

        I_stim = J_stim * Cm * (V_fi - V_0)

    • STATE_VARIABLES
      • du_dt = - (J_fi + J_so + J_si - J_stim)

        dv_dt = ((1-p) * (1-v)/ tau_v_minus) - (p*v/tau_v_plus) (as spatially coupled variable)

        dw_dt = ((1-p)*(1-w)/tau_w_minus) - (p*w/tau_w_plus)

  • Set your Initial Values and Set the Parameters properly
  • You can also find a text file with the model here

  • Switch to the Compile tab and Save and Compile your model and Submit

Model Setup

  • Start with Rabbit_model

  • Load the file, Send, Calculate Mesh, Render lines

  • A few things need to be noticed:
    • Integration/collocation points are 2 rather than 3
    • TriCubic Hermite basis function (should be the first basis selected)

    • TriLinear Lagrange Basis function should be defined too

  • Go to View - Edit Dimensions and Apply Marked Recommendations
  • Go to View - Set Divisions to maybe 4
  • Go to View - Change Renderer and make sure that you are using Open Mesh
  • Open the Nodes form and verify that:

    • Fiber Fields are defined: (Mesh > Edit > Material Coordinates > Mat Coord Standard and the Fiber, Transverse and Sheet parameters are setup to the right Fields)

    • Field 1 contains the stimuli at the desired nodes. To verify this you can render the Field. To set it up click "Change list" and Apply value 15.0 to node list .*stim.* of Field 1 Value

    • Field 2 has a Tri-Cubic basis function and is set to the value of the resting Voltage of the cell model

  • Render Surfaces (that is necessary to solve)

Diffusion Tensor Transformation

  • The Conductivity is a diagonal matrix at the fiber angle orientation and is defined as:
    • (f11) Dfiber

      0

      0

      0

      f(22) Dtransverse

      0

      0

      0

      f(33) Dsheet

  • To Calculate the conductivity tensor (Electrophysiology > Edit > Conductivity Model > Standard Conductivity) and setup the values for f11, f22 and f33 using either a constant value or a field and Submit (If you want to define a higher conductivity for the endocardial nodes, simply define it on a field by clicking "Change list" in the Nodes form and Apply value for all nodes list and then Apply a higher value to node list containing .*endo.* of Field 3 Value. You should setup f22 on Fields 4 and f33 on Field 5 respectively for an orthotropic conduction).

  • Recalculate mesh
  • Setup Ionic Model
    • Choose Your Model

    • u = Field 2
    • Stim_Amp = Field 1
  • Send

  • Initialize

  • Calculate Constraints (Fix out of plane...)

  • Reset > Save,reset, and reload

  • Recalculate Mesh

  • Initialize

  • Electrophysiology > Solve > Integration Setup the Duration of your stimulus (at least 300ms recommended for this simulation), select the name of your Output file. Go to > Output and increase the number of display solutions to at least 20. Calculate

  • Retrieve your solution and Render Solution (make sure to use -85.0 and 15.0 for Max and Min value)

Potential Gotchas?

  • Must calculate mesh after changing basis functions of fields
  • Maybe memory error with too many frames?
  • The solution was written at the server and it needs to be retrieved by the client
  • Rendering frames is somewhat slow