/fluid-flow-in-astrocyte-networks

Modeling electrodiffusive, osmotic, and hydrostatic interplay in astrocyte networks

Primary LanguagePythonMIT LicenseMIT

ffian: Fluid Flow In Astrocyte Networks

ffian is an implementation of the KNP continuity equations for a one-dimensional system containing two compartments: one representing an astrocyte network (ICS) and one representing the extracellular space (ECS). ffian.flow_model takes transmembrane- and compartmental fluid flow into account and predicts the evolution in time and distribution in space of the volume fractions, ion concentrations (Na+, K+, Cl-), electrical potentials, and hydrostatic pressures in the ICS and ECS. In ffian.zero_flow_model, the transmembrane- and compartmental fluid flow is assumed to be zero (corresponding to the model presented in Halnes et al. 2013). The fluid model is presented in Sætra et al. 2023, Neural activity induces strongly coupled electro-chemo-mechanical interactions and fluid flow in astrocyte networks and extracellular space – a computational study.

Documentation

Documentation at https://martejulie.github.io/fluid-flow-in-astrocyte-networks.

Installation

Conda

Warning If you want to run the examples, and use conda to install ffian, you need to have texlive-core installed on your system.

Start by cloning into the repository:

$ git clone https://github.com/martejulie/fluid-flow-in-astrocyte-networks.git
$ cd ffian

Then, using the environment.yml file in the root of the repository, you can call:

$ conda env update --file environment.yml --name your_environment

Next, you can now activate your environment by running::

$ conda activate your_environment

Finally, install ffian inside your conda environment using pip:

$ python3 -m pip install .

Docker

Version 0.1.0 is available as a docker image at Github Packages and can be run using

docker run -ti -v $(pwd):/root/shared -w /root/shared ghcr.io/martejulie/fluid-flow-in-astrocyte-networks:v0.1.0

Source

To install the ffian-library from source, navigate to the root of the repository and run the following commands from the command line:

python3 -m pip install . --upgrade

ffian requires fenics-dolfin, numpy, and matplotlib.

Run simulations

The example folder includes code showing how to run the simulations. To reproduce the results presented in Sætra et al. 2023, see https://github.com/martejulie/fluid-flow-in-astrocyte-networks-analysis.