This tutorial runs a simulation on a whole rabbit heart mesh. Note that this
mesh is far too coarse for converged simulations, but provides a useful example.
First include the headers, MonodomainProblem this time.
Here we define a cell factory that gives stimuli to all cells
below height z = 0.042… this corresponds to the apex of the heart.
Now define the test
Specify the conductivity vector to use in the simulation. Since this is going to be
a monodomain simulation, we only specify intra-cellular conductivities.
Additionally, because this is an Axi-symmetric mesh then we must specify
conductivity along the sheet and normal directions to be the same (an exception will be
thrown if not).
The 3rd entry would be different for an orthotropic mesh with fibre, sheet and
normal directions. For a simulation without fibre directions, there should be one value.
Set the simulation duration, output directory, filename and VTK visualization.
We have set the simulation duration to be very short here so this tutorial runs
quickly, increase it to see decent propagation of the wavefront.
The ODE and PDE timesteps should be refined when using this code for real
scientific simulations. The values here are sufficient to ensure stability
in this case, but not sufficient for converged numerical behaviour.
Here we create an instance of our cell factory, which will tell the MonodomainProblem
class which action potential models to use at which nodes. The rest of the problem is set up
identically to the tutorial Monodomain 3D Example.
We can access nodes in the mesh using a NodeIterator. Here, we check that each node
has not been assigned to bath, and throw an error if it has. This is not a particularly useful test,
but it does demonstrate the principle.
Note if you were doing a ‘real’ scientific simulation you would want to use a higher
resolution mesh. A version of this can be found on the [http://www.cs.ox.ac.uk/chaste/download.html Chaste download website]
Navigate to the “Data” tab, and download either
[source:/data/public/OxfordRabbitHeart/OxfordRabbitHeart_binary.tgz OxfordRabbitHeart_binary.tgz] - 599MB, or
These will probably require HPC resources, and finer ODE and PDE time steps than we used here.
To visualize these results, see ChasteGuides/VisualisationGuides/ParaviewForCardiac. The colour axes in Paraview
may need to be rescaled in order to see the voltage changes.