Using the cardiac executable
This page provides examples of how to use the Chaste cardiac executable.
Commands
Downloaded executable
If you have downloaded the executable you can run it with
./Chaste.sh <PATH TO CONFIG FILE>/ChasteParameters.xml
(the script will set up the necessary library paths etc. and then call the Chaste executable). The downloadable executable is specially built with an old mpi version to run in parallel on most machines, so you can do
./Chaste.sh -np N <PATH TO CONFIG FILE>/ChasteParameters.xml
where N is the number of processes to run with.
Compiled executable
If you have built the executable yourself from source (this is required only for dynamic loading of CellML files), then your paths will (probably) be set up already, and you can simply run
./apps/src/Chaste <PATH TO CONFIG FILE>/ChasteParameters.xml
Then to run this in parallel you should use mpirun (or perhaps mpiexec) associated with the mpi you used to compile Chaste:
mpirun -np N ./apps/src/Chaste <PATH TO CONFIG FILE>/ChasteParameters.xml
where N is the number of processes to run with.
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
These require a full developer install and the executable to be built from the source, since the CellML files need to be converted into code and compiled, see CodeGenerationFromCellML for more details.
- 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 the help produce scalable mesh loading
Alphabetical listing
- BidomainSimulationsWithPerfusingBath Running a bidomain simulation of cardiac tissue contained in a perfusing bath
- CheckpointingAndRestarting Checkpointing
- DrugAction Running a simulation with multiple-channel drug action
- HardCodedCellModels Hardcoded cell model options
- HeterogeneousExample Simulations with heterogeneities
- MeshConvert Making the `MeshConvert` utility and using it to help produce scalable mesh loading
- Propagation1d Running a simple example: propagation in a tissue fibre
- Propagation3d 3D on a realistic cardiac geometry
- S1S2Protocol Running a simulation of a spiral wave in 2d mesh
- UsingCellmlFiles UserTutorials/CardiacExecutable/UsingCellmlFiles
- UsingFibreDefinitions Using fibre directions and postprocessing