Documentation for Release 2024.2
Using the cardiac executable
This page provides examples of how to use the Chaste cardiac executable.
Building the cardiac executable
Please see Building Executable Apps for instructions on how to compile the cardiac executable, called simply Chaste
.
Running the executable
If you have built the executable yourself from source on the same machine, then your paths will (probably) be set up already, and you can simply run
Then to run this in parallel you should use mpirun (or perhaps mpiexec) associated with the mpi/PETSc you used to compile Chaste:
where N is the number of processes to run with.
Visualization
In all of these examples, you can change to use the visualizer that you want by setting one of these options (meshalyzer, vtk or cmgui) in the <Simulation>
block:
vtk (visualized using paraview
) seems to be the most well supported and likely to still work if you are reading this in a few years, if not the simplest to use!
Basic simulations
- UserTutorials/CardiacExecutable/Propagation1d – simple simulation on a 1d fibre
- UserTutorials/CardiacExecutable/S1S2Protocol – 2d spiral wave simulation produced by two stimuli
- UserTutorials/CardiacExecutable/Propagation3d– propagation on a anatomically realistic down-sampled ventricular mesh using fibre directions. This tutorial also discusses visualising the results in different tools.
Examples of further functionality
- How to determine what the hardcoded cell model options are
- See below for dynamic loading of CellML files
- UserTutorials/CardiacExecutable/HeterogeneousExample
- UserTutorials/CardiacExecutable/UsingFibreDefinitions – also mentions postprocessing options
- UserTutorials/CardiacExecutable/BidomainSimulationsWithPerfusingBath
- UserTutorials/CardiacExecutable/CheckpointingAndRestarting – how to do checkpoint and restart.
Further examples using dynamic loading of CellML files
See CodeGenerationFromCellML for more details and options for annotations within CellML files.
- UserTutorials/CardiacExecutable/UsingCellmlFiles – this shows how to use cell models defined directly from a cellml file (not one of the hardcoded options), and how to output cell model variables
- UserTutorials/CardiacExecutable/DrugAction Running a simulation with multiple-channel drug action
Utilities
- UserTutorials/CardiacExecutable/MeshConvert – making the
MeshConvert
utility and using it to help produce scalable mesh loading