Skip to main content

OpenImpala

Banner

Open In Colab PyPI License: BSD-3-Clause DOI GitHub release Build and Test codecov

OpenImpala is a high-performance framework for computing effective transport properties — tortuosity, effective diffusivity tensors, and effective conductivity — directly from 3D voxel images of porous media (X-ray CT, FIB-SEM, synthetic microstructures). It solves the governing PDEs on the Cartesian voxel grid using finite differences, bypassing mesh generation, and scales across MPI ranks and CUDA GPUs via AMReX and HYPRE.

Outputs parameterise continuum-scale models such as PyBaMM.

📖 Documentation: https://base-laboratory.github.io/OpenImpala/ 📓 Tutorials: tutorials/ (runnable on Google Colab)

Quick example

import numpy as np
import openimpala as oi

image = np.zeros((64, 64, 64), dtype=np.int32)
image[:, :, 16:48] = 1   # solid slab through the middle

with oi.Session():
    vf  = oi.volume_fraction(image, phase=0)
    tau = oi.tortuosity(image, phase=0, direction="z", solver="mlmg")
    print(f"Volume fraction: {vf.fraction:.4f}")
    print(f"Tortuosity:      {tau.tortuosity:.4f}")

Install

pip install openimpala            # Linux x86_64 AMReX/HYPRE wheel + universal pure-Python fallback
pip install openimpala-cuda       # compiled HYPRE/AMReX CUDA wheel (Linux x86_64)

On Linux x86_64, openimpala installs pre-built AMReX/HYPRE C++ bindings — install an MPI runtime (libopenmpi-dev, openmpi, or conda install -c conda-forge openmpi) to enable multi-rank C++ execution. On macOS, Windows, and ARM64 (or when MPI is absent), openimpala automatically uses its pure-Python SciPy/CuPy solver with the same API. See Getting Started for full details.

Container (HPC)

Pre-built Apptainer/Singularity images are attached to each GitHub Release:

apptainer exec -B "$(pwd):/data" openimpala-vX.Y.Z.sif \
    /usr/bin/Diffusion /data/inputs

For batch SLURM scripts, see HPC Usage.

Build from source

See CONTRIBUTING.md for the native and containerised developer build, code style, and test workflow.

Features

  • Steady-state diffusion / conduction on segmented 3D voxel images
  • Tortuosity factor, full 3×3 effective diffusivity tensor, multi-phase transport
  • Microstructural metrics: volume fraction, percolation, particle size, specific surface area
  • TIFF / HDF5 / RAW / DAT image input; JSON output compatible with BPX / BattINFO
  • Solvers: HYPRE (PCG, FlexGMRES, BiCGSTAB; SMG / PFMG preconditioners) and AMReX MLMG (matrix-free, GPU-native)
  • MPI + OpenMP + CUDA parallelism — scales from a laptop to multi-node HPC

Citation

If you use OpenImpala in published work, please cite:

@article{LeHoux2021OpenImpala,
  title   = {{OpenImpala}: {OPEN} source {IMage} based {PArallisable} {Linear} {Algebra} solver},
  author  = {Le Houx, James and Kramer, Denis},
  year    = {2021},
  journal = {SoftwareX},
  volume  = {15},
  pages   = {100729},
  doi     = {10.1016/j.softx.2021.100729},
}

If you use the homogenisation-based effective diffusivity workflow, additionally cite Le Houx et al., Transport in Porous Media 150, 71–88 (2023), doi:10.1007/s11242-023-01993-7.

License

BSD 3-Clause. See LICENSE.

Acknowledgements

This work was financially supported by the EPSRC Centre for Doctoral Training in Energy Storage and its Applications [EP/R021295/1]; the Ada Lovelace Centre (STFC) project CANVAS-NXtomo; the EPSRC prosperity partnership with Imperial College, INFUSE [EP/V038044/1]; the Rutherford Appleton Laboratory; the Faraday Institution Emerging Leader Fellowship [FIELF001]; and Research England's Expanding Excellence in England grant at the University of Greenwich via the M34Impact programme. We acknowledge the use of the IRIDIS HPC facility, Diamond Light Source's Wilson cluster, STFC SCARF, and the University of Greenwich M34Impact cluster, and thank the developers of AMReX, HYPRE, libtiff, and HDF5.

Contact

Issues and feature requests: https://github.com/BASE-Laboratory/OpenImpala/issues. Questions: GitHub Discussions.

Metadata

Release files for openimpala 4.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for openimpala 4.6.0
File Actions
openimpala-4.6.0-py3-none-any.whl Python 3 none any Details for openimpala-4.6.0-py3-none-any.whl
openimpala-4.6.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for openimpala-4.6.0-cp313-cp313-manylinux_2_28_x86_64.whl
openimpala-4.6.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for openimpala-4.6.0-cp312-cp312-manylinux_2_28_x86_64.whl
openimpala-4.6.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for openimpala-4.6.0-cp311-cp311-manylinux_2_28_x86_64.whl
openimpala-4.6.0-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details for openimpala-4.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
openimpala-4.6.0-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details for openimpala-4.6.0-cp39-cp39-manylinux_2_28_x86_64.whl

Total release size: 21.9 MB

Release files / openimpala-4.6.0-py3-none-any.whl

Download URL openimpala-4.6.0-py3-none-any.whl
Size 29.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dde2813fc43b59bc53c72dda31bf41f8f1963fb9c42bdc78cd24859c0c468605
BLAKE2b-256 checksum
How to use checksums
17563c9ee71a80c7b0f2404261b20ac25513fbfe7264ad6d26df927baa223b69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / openimpala-4.6.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL openimpala-4.6.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 4.4 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
401088648b3c3772f45e9dd04384e081334445b40a7602ed8813f4d4ce48c437
BLAKE2b-256 checksum
How to use checksums
9b642893df18d67cdd296fdb945864b443aa0283317b6af9df9207bf46f7afb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / openimpala-4.6.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL openimpala-4.6.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 4.4 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
124dd658a6a9ef848e3e6a1f6fa69f2c0ccdab2b34a0dca29ca03ac26ef00428
BLAKE2b-256 checksum
How to use checksums
5a84c2ffdd7f08760367bce2216695b3c2956fe7151792913f7c472dc91b623c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / openimpala-4.6.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL openimpala-4.6.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 4.4 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
01ee4f6c6d6c32989ae43e7c542c631fa003390801c8f4fdff82a393ef2b26a3
BLAKE2b-256 checksum
How to use checksums
02ba917ebbc844dcffea63bd14cd4edb7ba89f0059c48bff13a69266d672fd93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / openimpala-4.6.0-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL openimpala-4.6.0-cp310-cp310-manylinux_2_28_x86_64.whl
Size 4.4 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
70dffdcd90ac9e866bd342d25d38e7a5671b3652d47c1e810e2212c596710653
BLAKE2b-256 checksum
How to use checksums
84433df98cc99edfaeb4091e154bf58228b4728fb64477fd64d9cdbe379f5a95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / openimpala-4.6.0-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL openimpala-4.6.0-cp39-cp39-manylinux_2_28_x86_64.whl
Size 4.4 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
af0b96204e67d11ba662d488fec45d622d7b8327f4dca9fb5cc2c7e883a4135e
BLAKE2b-256 checksum
How to use checksums
fdf2752190132a2c0616dfdd021118fb87309ff7c502d877db912099752f5004
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for openimpala 4.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for openimpala-4.6.0-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.6.0 This release

6 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page