Preventing Sudden Cardiac Death Rob Blake NA Seminar
Outline Biology lesson Cellular modeling Tissue modeling Summary
Sudden Cardiac Arrest Heart falls out of rhythm Blood stops flowing, body dies 6 minutes - brain damage 10 minutes - death ~335,000 deaths each year Caused by electrical abnormalities Hard to predict Healthy people at risk
Mechanisms of contraction Normal contraction SA node AV node Purkinje fibers Contract from bottom to top All heart tissue is electrically active Responds like nerve cells to stimuli
Arrhythmia Literally “without rhythm” Electrical feedback Heart can’t pump blood
Movies
Defibrillation Idea: Introduce large stimulus Override electrical feedback After stimulus, heart returns to rest
Problems with Defibrillation Doesn’t work as well as it should No one really knows why Requires large stimulus in order to work Damages tissue Charged particles rip holes through cell membrane Painful “Feels like getting kicked in the chest by a donkey”
Experimental Methods Electric Probes Stick heart with pins, measure electric potential Con: Can only get low resolution Con: Pins change electric properties of the heart
Experimental Methods Optical Mapping Insert dye that glows when electric potential changes Con: Can only observe surface phenomena
Experimental Methods No good way to observe electricity in working heart Heart is still a “black box”
Why Simulation? Perfect measurements of heart interior Observe internal behavior Derive hypotheses Cheap Fast
Cell Models Membrane Kinetics Current created by ion flux
Cell Models C m - membrane capacitance V m - transmembrane voltage V m = i - e I ion - total ion flow through channels Nerve cell: I ion = I Na +I K +I l
Cell Models Go watch movies!
Behavior Cell activates if V m increases past a threshold (-55mV) ms action potential ms for cell to “recharge” for activation
Gates Control channel resistance Range from 0 (closed) to 1 (open) Given by Open/close rates are often exponential functions Stable time integration methods exist
Complications Cardiac cells much more complex than nerve cells
A simple cardiac model:
About the Equations LRd 115 equations 59 “expensive” function evaluations exp, log, cos, sqrt 17 differential unknowns, 12 are gates Extremely nonlinear Explicit methods Extremely stiff for high V m Even with gate stabilization Requires small timestep during defib shock (~1us) Output only accurate to about 10%
EasyML Description language for cell membrane models Translator writes C code Numerically integrates equations Lookup tables to minimize function evaluations
CS450 project Everyone uses Forward Euler to solve equations Implementing other methods is too error prone EasyML separates data from implementation Write new translators that use better integration methods Use automatic differentiation for stable time integration
Tissue Models
Extracellular space Intracellular space
Bidomain Equations C m - membrane capacitance B m - cellular surface : volume ratio I ion - membrane current - conductivity tensor - electric potential V m - transmembrane voltage V m = i - e
Bidomain Equations Conductivity tensors vary spatially I ion has state Independent at every point in domain
Discretizing Ill conditioned! Galerkin FEM (weak formulation)
Discretizing s - Euler integration parameter s=0 => Forward Euler s=.5 => Crank Nicholson s=1 => Backwards Euler Use old timestep for I ion Too complicated for implicit method
Decoupled system becomes
Memfem Software for solving bidomain equations Things that can vary Tissue models - any unstructured mesh Membrane models EasyML models Stimulation protocols
Memfem: Main Loop Spatial solve for V m Linear Galerkin FEM Stable - Backwards Euler, Crank Nicholson ODE integration at every point in the mesh Unstable - Explicit Methods Update membrane state Calculate I ion Calculate V m I ion VmVm
Memfem: Parallelization Cellular models are trivially parallel PETSc parallelizes matrix solve Additional routines for parallel output and checkpointing
Examples
Summary Cardiac simulation is a rich emerging field Crucial for hypothesis generation High barrier to entry Need physiological models Need working cellular models Dense terminology Researchers need help!
Unsolved problems Detailed error analysis of tissue modeling Extremely chaotic Best integration methods for cellular modeling My CS450 project Your ideas?