Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Examples

Install the example dependencies first (matplotlib, cardiac-geometriesx, the circulation model, …):

python3 -m pip install "simcardemsx[demo]"

Tutorials

Short scripts that build up the ideas one at a time. Each is a jupytext percent-format script, so it runs as python3 <script>.py or opens as a notebook. All of them are executed when the documentation is built.

TutorialWhat it showsRun time
01_cell_model.pyThe ToR-ORd + Land cell model on its own, and how it is split between EP and mechanics~1 min (mostly code generation, cached afterwards)
02_coupling_schemes_0d.pyMonolithic, naive segregated and stabilized coupling in 0D, and why the naive scheme does not converge~10 s
03_single_element.pyThe same three schemes on one finite element, with GeneratedActivation and pulse~10 s
04_coupled_slab.pyEP and mechanics coupled on a slab through SimulationController~2 min

Applications

Larger programs with a command line, output in the layout of the pulse and beat CLIs (results.bp, log.csv, …), checkpoints and restarts, and a post.py that replots a finished run. Run each from its own directory.

ExampleWhat it is
slab/EP and mechanics on a slab, for any split, scheme or crossbridge model
circulation_biv/A biventricular heart beating in a closed-loop circulation (Regazzoni et al.)
rodero_05/A Rodero-cohort biventricular heart driven through the five phases of the cardiac cycle
scheme_comparison/Batch runs and a report comparing the three coupling schemes

Shared files