This repository contains the code of the project for the Numerical Methods for Partial Differential Equations course @Polimi (prof. Alfio Maria Quarteroni, TA Michele Bucelli). Students:
This project solves the Monodomain equation coupled with the Bueono-Orovio ionic model, employing the Finite Elements Method. Various type of tissue can be simulated, including the epicardium, the myd-miocardium and the endocardium.
In order to run the software a few libraries are required:
deal.ii, built with MPI and Trilinos support.- MPI, for parallel execution.
gmsh, needed only for the mesh generation.
The software needs a mesh as one of the inputs. Various formats are accepted, including the .msh one. A script is provided in the scripts folder, which can be used to generate a 21 mm x 7 mm x 3 mm cuboid mesh, with an adjustable refinement. In order to use it, the following instructions should be followed:
$ mkdir build
$ cd build
$ cmake ..
$ make GenerationMesh MESH_STEP=[mesh_step]where mesh_step is the chosen mesh refinement (in meters).
The mesh will be created in the newly created meshes folder.
To build the executable, make sure you have loaded the needed modules with
$ module load gcc-glibc dealiiThen run the following commands:
$ mkdir build
$ cd build
$ cmake .. -DCHECK_ACTIVATION_TIMES=[ON|OFF]
$ makeIn order to compile so that the activation times files is written in output, the CHECK_ACTIVATION_TIMES variable must be set to ON.
The executable will be created into build, and can be executed from the build folder through
$ mpirun -n N nmpde [optional] -o outputprefixwhere
Nis the number of processes- optional flags are the following (if the optinal flag are not specified, the default values will be used):
-fnis the path to the mesh-Tthe time (in seconds)-dTis the time step (in seconds)-tfeis the theta value for the Monodomain equation-todeis the theta value for the system of ODEs of the Ionic Model-ctis the coupler type, in particular- 0 corrsponds to the
ICI Coupler - 1 corrsponds to the
GI Coupler - 2 corrsponds to the
SVI Coupler
- 0 corrsponds to the
-ttis the tissue type to simulate, in particular- 0 corresponds to the epicardium
- 1 corresponds to the myd-miocardium
- 2 corresponds to the endocardium
-osspecify how many time steps there are between two output files
-ois the prefix attached to all output files