Skip to content

adajel/KNP-EMI-DG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

134 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KNP-EMI-DG

About

Code for solving the KNP-EMI problem using a DG fem method. The numerical method is described in Ellingsrud et al. 2025

Dependencies

All dependencies are listed in environment.yml. To create an environment with these dependencies use either conda or mamba and run

conda env create -f environment.yml

or

mamba env create -f environment.yml

Then call

conda activate KNP-EMI

Installation

To install the package run

python3 -m pip install -e .

Idealized geometries

The directory examples/idealized-geometries contains code for running 2D and 3D simulations on idealized geometries representing neurons surrounded by ECS with Hodgkin-Huxley membrane dynamics.

EMIx simulation

The directory examples/emix-simulations contains an example where the KNP-EMI DG code is used to run an electrodiffusive simulation on a realistic 3D geometry representing brain tissue generated via the emimesh pipeline.

The initial conditions for the coupled KNP-EMI system are calibrated by solving an extended system of ODEs to ensure an initial steady state - see mm_calibration.py and run_calibration.py for further details.

Selected files

  • solver.py: class for PDE solver.
  • membrane.py: class for membrane model (ODE stepping, functions for communication between PDE and ODE solver etc.).
  • mm_hh.py: Hodkin Huxley model (with ODEs)
  • run_*.py: scripts for running various simulations. Contains PDE parameters (mesh, physical and numerical parameters) make*mesh\_\*\*.py: scripts for generating idealized 2D and 3D meshes

Geometry

The code assumes ECS cells are tagged with 0 and ICS cells are tagged with 1,2,3, ... and that all interior facets are tagged with 0. The membrane potential is defined as phi_i - phi_e (i.e. phi_1 - phi_2). Since we have marked cell in ECS with 0 and cells in ICS with 1 we have an interface normal pointing inwards. In general, normals will always point from lower to higher (e.g. from 0 -> 1)

License

The software is free: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Community

Contact ada@simula.no for questions or to report issues with the software.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages