Skip to content

Cardiac Electrophysiology MPI implementation for the Numerical Methods for PDEs (NMPDE) Course @POLIMI (Prof. Alfio Maria Quarteroni, TA Michele Bucelli)

Notifications You must be signed in to change notification settings

melanie-t27/Cardiac-Electrophysiology

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cardiac Electrophysiology

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:

Introduction

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.

Prerequisites

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.

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.

Compiling

To build the executable, make sure you have loaded the needed modules with

$ module load gcc-glibc dealii

Then run the following commands:

$ mkdir build
$ cd build
$ cmake .. -DCHECK_ACTIVATION_TIMES=[ON|OFF]
$ make

In order to compile so that the activation times files is written in output, the CHECK_ACTIVATION_TIMES variable must be set to ON.

Execution

The executable will be created into build, and can be executed from the build folder through

$ mpirun -n N nmpde [optional] -o outputprefix

where

  • N is the number of processes
  • optional flags are the following (if the optinal flag are not specified, the default values will be used):
    • -fn is the path to the mesh
    • -T the time (in seconds)
    • -dT is the time step (in seconds)
    • -tfe is the theta value for the Monodomain equation
    • -tode is the theta value for the system of ODEs of the Ionic Model
    • -ct is the coupler type, in particular
      • 0 corrsponds to the ICI Coupler
      • 1 corrsponds to the GI Coupler
      • 2 corrsponds to the SVI Coupler
    • -tt is the tissue type to simulate, in particular
      • 0 corresponds to the epicardium
      • 1 corresponds to the myd-miocardium
      • 2 corresponds to the endocardium
    • -os specify how many time steps there are between two output files
  • -o is the prefix attached to all output files

About

Cardiac Electrophysiology MPI implementation for the Numerical Methods for PDEs (NMPDE) Course @POLIMI (Prof. Alfio Maria Quarteroni, TA Michele Bucelli)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.6%
  • CMake 3.7%
  • GLSL 2.7%