Documentation for Release 2024.1

Running a simulation of a spiral wave in 2d mesh

Getting the data

Download and save the attached file: S1S2Protocol.tgz. Either use an Archive Manager to extract the contents to disk or save it and then unpack it with

tar xvfz S1S2Protocol.tgz

Running the simulation

Change directory to S1S2Protocol:

cd S1S2Protocol

In this folder you will find the following files:

  • ChasteParameters.xml – this file describes the simulation, and can be used to override the default parameter values (in releases of the executable up to and including version 2.0, the default parameters were read in from another xml file, ChasteDefaults.xml).
  • ChasteParameters_2_1.xsd – XML schema for input validation (in general never has to be altered or touched).

Run the simulation by doing

<path_to_chaste>/Chaste ChasteParameters.xml

A folder called testoutput will appear once the simulation has finished.

Visualising the results

Move into the newly created output folder

cd testoutput/ChasteResults

In this folder you will find the following files and folders:

  • progress_status.txt – this file can be viewed whilst the simulation is running to gauge how long it will take
  • S1S2Results.h5 – the output of the simulation, in HDF5 format
  • output (folder) – contains the output converted into meshalyzer format

Move now into the Meshalyzer-compatible output folder

cd output

Launch Meshalyzer with

<path_to_meshalyzer>/meshalyzer S1S2Results_mesh

and visualise the results by loading the S1S2Results_V.dat file

There are more details on visualising your results at ChasteGuides/VisualisationGuides.

Understanding the XML parameters file

Open ChasteParameters.xml (it is sensible to do this in a web-browser or XML editor in order to get syntax highlighting). The file should be reasonably readable; it defines:

  • a 2D simulation that lasts for 1000ms
  • the use of the monodomain model
    • to use bidomain, the only thing that needs to be done is to change Mono to Bi
  • a FaberRudy2000 cell model as the default cell model
  • a 2D autogenerated mesh of size 4cm by 6cm with a space step of 1mm
  • Two stimulated regions:
    • a stimulated region a long the y-axis for x less than 1mm. It starts at the beginning of the simulation and its duration is 2ms.
    • a rectangular stimulated region defined by the corners (0.0, 0.0) and (2.0, 4.5). It starts at time 255ms and its duration is 2ms.
    • note: in the Cuboid definition, the z coordinate is ignored in 2D simulations
  • output directory and filenames
  • physiological parameters: conductivities, capacitance, surface-area-to-volume ratio
    • in monodomain problems, the defined intracellular conductivity is used not a harmonic mean. The extracellular conductivity is therefore ignored, as are the components in normal directions since this is a 2D simulation.
  • Numerical parameters including ODE, PDE and printing timesteps
    • Note: ‘KSP’ stands for Krylov subspace and just refers to solvers of linear systems (a PETSc acronym)