Chaste Tutorials
Before you start
If you are viewing this on the Chaste wiki, the tutorials here are automatically updated to work with the latest development version of Chaste. They are not guaranteed to work with any release version, in fact they are unlikely to! If you are working with a release version of the code then this page is archived upon releases; the tutorials corresponding to each release version of Chaste can be found at https://chaste.github.io/releases/
The basics
These tutorials assume prior knowledge or understanding of various C++ language features and some libraries, including (at least): std::vectors, c_vectors, and object-oriented inheritance including abstract classes and virtual methods.
If you don't know anything about these we recommend a first course in C++, there are plenty online (here is one from cplusplus.com). There is also a Scientific Computing in C++ book by some of our team available too.
To run any of these tutorials, call
scons test_suite=<NAME_OF_TUTORIAL_FILE>
from the main chaste directory, e.g.
scons test_suite=ode/test/TestSolvingOdesTutorial.hpp
To do this, either call this from the command line, or create a new 'Make Target' in Eclipse, with the above command as the 'Build command'
- UserTutorials/WritingTests - start here, then choose core/cardiac/cell-based
Core functionality
Solving ODEs
Solving PDEs
- UserTutorials/SolvingLinearPdes
- UserTutorials/SolvingNonlinearPdes
- UserTutorials/SolvingLinearParabolicPdeSystemsWithCoupledOdeSystems
Writing new PDE solvers (advanced)
Solid Mechanics
- UserTutorials/SolvingElasticityProblems - computing the deformation of a nonlinearly elastic body
- UserTutorials/SolvingMoreElasticityProblems
Cardiac Chaste
For executable users:
Source code users:
- UserTutorials/RunningBidomainSimulations - basic bidomain simulation; note monodomain is virtually the same
- UserTutorials/AnotherBidomainSimulation - shows how to use varying fibre directions and different output formats in particular
- UserTutorials/Monodomain3dExample - illustrates the (trivial) changes required to go from 2d to 3d, or bidomain to monodomain
- UserTutorials/Monodomain3dExampleWithCvode - illustrates how to adapt the previous tutorial to create cells with CVODE solvers, which can provide increased speed and accuracy.
- UserTutorials/Monodomain3dRabbitHeart - illustrates loading meshes from file, and specifying fibre and cross-fibre conductivities, on a realistic (but low res) rabbit whole ventricles mesh.
- UserTutorials/BidomainWithBath - illustrates the use of Backward Euler ODE solvers (very stable), and solving a bidomain problem in tissue surrounded by (extra-cellular domain) bath.
- UserTutorials/BidomainWithBathAndFibres
- UserTutorials/BidomainWithConductivityModifier - shows how to use conductivity modifiers in a bidomain simulation.
- UserTutorials/CardiacCheckpointingAndRestarting
- UserTutorials/CardiacElectroMechanics
- UserTutorials/AnotherCardiacElectroMechanics
- UserTutorials/SingleCellSimulation
See also cardiac Chaste practical for details of a practical we have used to teach cardiac Chaste.
Cell-based Chaste
Where to start with cell-based simulations:
Running basic simulations:
- UserTutorials/RunningMeshBasedSimulations - the simplest (and first to be implemented in Chaste) type of cell-based simulation, start here
- UserTutorials/RunningNodeBasedSimulations - includes details of how to simplify cell-based tests
- UserTutorials/RunningVertexBasedSimulations - includes adding boundary conditions and removing cells from simulations
- UserTutorials/RunningPottsBasedSimulations - lattice-based simulations
- UserTutorials/VisualizingWithParaview
Running crypt-specific simulations:
- UserTutorials/RunningMeshBasedCryptSimulations
- UserTutorials/RunningVertexBasedCryptSimulations
- UserTutorials/RunningCryptSimulationsWithMutations
More advanced examples:
- UserTutorials/RunningContactInhibitionSimulations
- UserTutorials/RunningDeltaNotchSimulations
- UserTutorials/RunningDifferentialAdhesionSimulations
- UserTutorials/RunningTumourSpheroidSimulations
Adding new functionality:
- UserTutorials/CreatingAndUsingANewCellCycleModel
- UserTutorials/CreatingAndUsingANewCellKiller
- UserTutorials/CreatingAndUsingANewCellPopulationBoundaryCondition
- UserTutorials/CreatingAndUsingANewForce
- UserTutorials/CreatingAndUsingANewCellMutationState
- UserTutorials/CreatingAndUsingANewCellProperty
- UserTutorials/CreatingAndUsingNewCellBasedWriters
See also cell-based Chaste practical for details of a practical we have used to teach cell-based Chaste.
Automatically generated alphabetical listing
- AnotherBidomainSimulation Another example showing how to run a bidomain simulation
- AnotherCardiacElectroMechanics Cardiac Electro-mechanical Problems (cont.)
- BidomainWithBath An example showing how to run a bidomain simulation for tissue contained in a perfusing bath
- BidomainWithBathAndFibres Running a bidomain simulation with a bath and fibres
- BidomainWithConductivityModifier We now show how to run a bidomain simulation using conductivity modifiers.
- CardiacCheckpointingAndRestarting Checkpointing and restarting cardiac simulations
- CardiacElectroMechanics Cardiac Electro-mechanical Problems
- CardiacExecutable Using the cardiac executable
- 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
- BidomainSimulationsWithPerfusingBath Running a bidomain simulation of cardiac tissue contained in a perfusing bath
- CellBasedDemo Examples showing how to create, run and cell-based simulations in Chaste
- CreatingAndUsingANewCellCycleModel An example showing how to create a new cell-cycle model and use it in a cell-based simulation
- CreatingAndUsingANewCellKiller An example showing how to create a new cell killer and use it in a cell-based simulation
- CreatingAndUsingANewCellMutationState An example showing how to create a new cell mutation state and use it in a cell-based simulation
- CreatingAndUsingANewCellPopulationBoundaryCondition An example showing how to create and use a new cell population boundary condition
- CreatingAndUsingANewCellProperty An example showing how to create a new cell property and use it in a cell-based simulation
- CreatingAndUsingANewForce An example showing how to create and use a new force
- CreatingAndUsingNewCellBasedWriters An example showing how to create a new cell writer and use it in a cell-based simulation
- Monodomain3dExample 3D monodomain example
- Monodomain3dExampleWithCvode 3D monodomain example using CVODE for ODE solution
- Monodomain3dRabbitHeart 3D monodomain rabbit heart example
- RunningBidomainSimulations An example showing how to run bidomain simulations
- RunningContactInhibitionSimulations An example showing how to use a contact inhibition cell cycle model and volume tracking simulation modifier
- RunningCryptSimulationsWithMutations Examples showing how to run crypt simulations with various mutations
- RunningDeltaNotchSimulations An example showing how to run Delta/Notch simulations
- RunningDifferentialAdhesionSimulations An example showing how to simulate cell sorting due to differential adhesion in a vertex-based model
- RunningMeshBasedCryptSimulations Examples showing how to run crypt simulations on periodic meshes with different cell-cycle models
- RunningMeshBasedSimulations Examples showing how to create, run and visualize mesh-based simulations
- RunningNodeBasedSimulations Examples showing how to create, run and visualize node-based simulations
- RunningPottsBasedSimulations Examples showing how to create, run and visualize Potts-based simulations
- RunningTumourSpheroidSimulations An example showing how to run tumour spheroid simulations
- RunningVertexBasedCryptSimulations Examples showing how to create, run and visualize vertex-based simulations on periodic meshes with different cell-cycle models
- RunningVertexBasedSimulations Examples showing how to create, run and visualize vertex-based simulations
- SingleCellSimulation An example showing how to run a single cell simulation
- SolvingElasticityProblems Solving solid mechanics problems
- SolvingLinearParabolicPdeSystemsWithCoupledOdeSystems Examples showing how to solve a system of coupled linear parabolic PDEs and ODEs
- SolvingLinearPdes Examples showing how to solve linear elliptic and parabolic PDEs
- SolvingMoreElasticityProblems Introduction
- SolvingNonlinearPdes An example showing how to solve a nonlinear elliptic PDE. Also includes function-based boundary conditions.
- SolvingOdes In this tutorial we show how Chaste can be used to solve an ODE system
- VisualizingWithParaview Examples showing how to visualize simulations in Paraview
- WritingPdeSolvers Introduction
- WritingPdeSolversTwo Introduction
- WritingTests Writing tests