Demos#

This page indexes all the demos in fenicsx-beat, grouped the same way as in the sidebar. If you are new to the library, start with the mathematical background page for the model and notation used throughout, then work through the FitzHugh–Nagumo demo below.

Getting started#

Examples#

Verification#

  • Verifying Second-Order Temporal Convergence — checks the second-order-in-time convergence of Strang splitting combined with a Crank–Nicolson PDE step, using the method of manufactured solutions.

  • Monodomain convergence test — the companion check of the (first-order) spatial and Godunov-splitting convergence rates.

  • Bidomain convergence test — the same kind of check for beat.BidomainModel, measuring the rate in \(h\) and \(\Delta t\) for the extracellular potential as well as the transmembrane one, and confirming that the model collapses exactly onto the monodomain model when the conductivity tensors are proportional.

Advanced topics#

  • Fully implicit high-order time stepping with Irksome — replaces the default explicit/\(\theta\)-rule time stepping with fully implicit, high-order Runge–Kutta methods (via the optional Irksome dependency) for the PDE and/or ODE step, demonstrated on a gotranx-generated cell model and a strongly heterogeneous conductivity field.

  • Cell-model stepping via dolfinx-external-operator — a drop-in alternative ODE step (via the optional dolfinx-external-operator dependency) that reuses your existing cell-model function unchanged; cross-checks it against DolfinODESolver on a real gotranx-generated cell model and reports the current performance trade-off honestly.

  • A compiled C backend for cell models — compiles the C code that gotranx generates into a drop-in replacement for the NumPy cell-model function, and compares NumPy, Numba, C and C with OpenMP for the ODE step alone and in a small monodomain simulation.

  • Monolithic implicit PDE+ODE coupling with dolfinx-external-operator — a prototype fully implicit Newton solve of the PDE and cell model together, with a JAX-autodifferentiated Jacobian and no operator-splitting error at all; validated against an independent reference and quantitatively compared against MonodomainSplittingSolver.

[LGA+15]

Sander Land, Viatcheslav Gurev, Sander Arens, Christoph M Augustin, Lukas Baron, Robert Blake, Chris Bradley, Sebastian Castro, Andrew Crozier, Marco Favino, and others. Verification of cardiac mechanics software: benchmark problems and solutions for testing active and passive material behavior. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 471(2184):20150641, 2015.

[tTP06] (1,2)

Kirsten H W J ten Tusscher and Alexander V Panfilov. Alternans and spiral breakup in a human ventricular tissue model. American Journal of Physiology-Heart and Circulatory Physiology, 291(3):H1088–H1100, 2006. doi:10.1152/ajpheart.00109.2006.

[ZLH+21]

Zhaoyang Zhang, Michael B Liu, Xiaodong Huang, Zhen Song, and Zhilin Qu. Mechanisms of premature ventricular complexes caused by qt prolongation. Biophysical journal, 120(2):352–369, 2021.