Real-Time Interactive Simulations of Complex Ionic Cardiac Cell Models in 2D and 3D Heart Structures with GPUs on Personal Computers

Abouzar Kaboudian*, PhD

*abouzar.kaboudian@physics.gatech.edu



Cardiac models and their complexities

\[ C_m\frac{\partial V}{\partial t}= \nabla.\left(D\nabla V\right)-I_{ion} \]
  • Minimal models have as low as 12 parameters and 2-4 variables.
  • TP model , 98 equations, 24 variables (ODEs)
  • Single-Cell models can have up to 100 variables!
  • Stiff ODEs ($dt\sim0.01ms$)
  • Spatial resolution ($\sim 200\mu m$)
  • Number of ODEs per computational cell (2-100)

So, for simulating 1 second of activity on a $4\times4$cm 2D slab, we need to solve

\[ \begin{array}{llcl} (200\times200)\times10^{5}\times&2 & = & 8\times10^{9} \\ & 100 & = & 4\times10^{11} \end{array} \]

Similarly, 1 second of simulation in 3d requires solving $\sim$twenty trillion ODE's.

Unfortunately, single processors are only able to solve about $10^6$ to $10^7$ ODEs per second.

Traditional parallel processing

  • can be expensive to aquire;
  • can be difficult to maintain;
  • can be challenging to implement code;
  • require users with specialized expertice to run their codes;
  • involves special expertise to debug codes;
  • involves the hassle of dealing with cluster queues;

The alternative is GPU computing!

Graphic Processing Units (GPUs) can provide high levels of parallelization at a fraction of the cost of clusters.

Why do you think GPU computing is the future?

Notice that CPU power has been stagnant in the order of a few GHz due to thermodynamic limits!

How do we program them?

Why WebGL?

  • Runs all modern browsers, e.g. not Internet Explorer;
  • No need to compile
  • No need to install
  • Platform independent
  • Simultaneous processing and post-processing
  • Interactive
  • Free!

How easy is it to code in WebGL?

  • It used to be difficult to reach to the part where you can start to programm your computational code in WebGL.

With the help of our library, Abubu.js, it is no longer so!

Abubu.js is freely available for download!

So, if you know C or a similar programming language, you can easily learn to program shaders!

We have also released a ton of resources at https://abubujs.org/

The philosophy is to treat the time-marching problem as an image manipulation problem!

  1. We consider our physical values on the domain to be stored into one/several image(s)!
  2. We assign state-variables to each color of every image
  3. We use shader language to update our solution by using these images as input and output!
Visit: https://kaboudian.github.io/CinC-2021-Competition

Can you affor a pocket super computer?

Solving OVVR Model in 3D! This phone is solving 1.7 billion ODEs per second!

Concluding remarks

  • The proposed GPU technology can expand the types of research we can do!
  • This is not just a replacement of HPC!
  • The speed of the simulations can be illuminating and guiding us in our future studies.
  • The wide availability and universality of the technology, promotes a level field for all groups in cardiac dyanmics.

If you would like to try these programs on your own computer visit:

https://kaboudian.github.io/CinC-2021-Competition/

Special thanks to my great mentor...

Thank you for the opportunity to present this work!

Thank you for your attention!

How fast are these simulations can be?

On this machine with a USD600 GPU, in every second, I can solve $3.6\times 10^{10}$ ordinary differential equations!

How fast is that?

How fast is WebGL with Abubu.js when compared against other languages?

It's not enough to be fast...

How reliable are the results?

Let's campare against experimental results:

The experiments were reproduced using the 41-variable OVVR model*.

[*] O'Hara, Thomas, Laszlo Virag, Andras Varro, and Yoram Rudy. "Simulation of the undiseased human cardiac ventricular action potential: model formulation and experimental validation." PLoS computational biology 7, no. 5 (2011): e1002061.

Another comparison!

Comparing experimental data with the interactive simulations. (A) Single spiral wave (VT) and (B) fibrillation in porcine ventricles. (C) VT in rabbit with drug DAM. (D) Fibrillation in rabbit with drug CytoD.

VT in porcine ventricles

What can we do with this type of simulations?

Mechanistic studies are now intuitive...

The test to verify this mechanism of defibrillation is currently underway via Optogenetic experiemnts on 2D mono-layers by our collaboratores at McGill Univeristy.

The fact that we can interact with these simulations makes these types of mechanistic studies the more intuitive.

Once the mechanism is discoverred, the simulation may no longer be needed.

Variability and uncertainty play an important role in device efficacy, reliability and safety!

Uncertainty quantification and variability studies in cardiac EP models can be done in multi-dimensions!

Snapshots of activity at t = 1, 000 ms for 100 random parameters, under Ito parameter uncertainty in the canine cell model by Pathnamanathan et al (2019).

For details and more on this study see

At this point, I think you are almost convinced, but...

Why study 3D?

Dimensional Effects

Single-Cell Simulations in OVVR model

One-Dimensional Tissue Simulations in OVVR model

Two-Dimensional Tissue Simulations in OVVR model

Single stimulus leads to complex dynamics in 2D for OVVR model. I_Kr partial blockage leads to the complex dynamics in 2D.

How do we simulate dynamics in 3D?

It's easy. All we have to do is to flatten 3D space into 2:-D

... and use the following function instead of texture:

Ready for the simulation?

Let's use a patient specific model:

Patient specific fitting of the model can be helpful in understanding why dynamics can be different for different patients.

This technology can enable us to study the effects of variability of patient specific anatomies

Shouldn't we use this technology in AR/VR?

Of course we should!

These simulations can become the heart and sole of AR and VR programs such as this one:

NSF/FDA SIR award

Real-Time Simulations of Electrical Activity of the Heart and Augmented/Virtual Reality for Medical Device Applications

Award No: 2037894

Our goal is to help create a an infrastructure critically needed by the FDA to evaluate and validate in silico studies and VR/AR systems intended to explore new approaches for visualization and manipulation of cardiovascular anatomies, including electrical wave propagations and strategical planning of invasive procedures used in the clinic as well as anti-arrhythmic drug design.

What else can AR/VR help with?

  • Teaching: if a picture is worth a thousand words, how valuable is AR/VR?
  • Patient outreach;
  • Patient specific medicine;

Last question: can we bring fluid-flow into the picture?

So sorry! One more question...

Can you affor a pocket super computer?

Solving OVVR Model in 3D! This phone is solving 1.7 billion ODEs per second!

Concluding remarks

  • The proposed GPU technology can expand the types of research we can do!
  • This is not just a replacement of HPC!
  • The speed of the simulations can be illuminating and guiding us in our future studies.
  • The wide availability and universality of the technology, promotes a level field for all groups in cardiac dyanmics.

If you would like to try these programs on your own computer visit:

https://kaboudian.github.io/InterviewSeminarAtFDA/