Darcy scale image analysis toolbox
Visit pmgbergen.github.io/DarSIA
If you use DarSIA in your research, we ask you to cite the following publication:
Nordbotten, J. M., Benali, B., Both, J. W., Brattekås, B., Storvik, E., & Fernø, M. A. (2023). DarSIA: An open-source Python toolbox for two-scale image processing of dynamics in porous media. Transport in Porous Media, https://doi.org/10.1007/s11242-023-02000-9
The first release can be also found on Zenodo: 10.5281/zenodo.7515016
DarSIA is developed under Python 3.12+. Clone the repository from GitHub and enter the DarSIA folder.
uv is a fast Python package manager. Install it once, then use it for all DarSIA installs:
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone & install (editable, with dev dependencies)
git clone https://github.com/pmgbergen/DarSIA.git
cd DarSIA
uv sync --extra devgit clone https://github.com/pmgbergen/DarSIA.git
cd DarSIA
pip install -e .[dev]petsc4py is an optional but recommended dependency for performance-critical solvers such as Wasserstein distance computation. It is not installed by default.
Linux (Ubuntu/Debian):
sudo apt-get install -y libhypre-dev libmumps-seq-dev build-essential gcc gfortran mpich cmake
pip install numpy mpi4py
PETSC_CONFIGURE_OPTIONS="--download-hypre --download-mumps --download-parmetis --download-ml --download-metis --download-scalapack" pip install petsc petsc4py
# Then install DarSIA:
# E.g. with uv (editable environment):
uv sync --extra devmacOS / conda:
conda install -c conda-forge petsc petsc4pySee also conda_env.yaml for a complete conda environment.
The DarSIA GUI provides an interactive interface for image analysis workflows.
uv run darsiaTo make DarSIA appear in your Linux application menu or Windows Start Menu:
uv run darsia-install-desktopTo remove the desktop entry:
uv run darsia-install-desktop --uninstallNote: On Windows, this feature requires pywin32, which is automatically installed when syncing the darsia package on Windows systems.
Use black (version 22.3.0), flake8 and isort formatting. See DEVELOPER_NOTES.md for workflow documentation maintenance guidance, including risks, acceptance criteria, and update conventions.