Python bindings for OpenImpala — transport-property computation on 3-D voxel images
Project description
OpenImpala
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.value:.4f}")
print(f"Tortuosity: {tau.value:.4f}")
Install
Python (recommended)
pip install openimpala # CPU + optional CuPy GPU acceleration
pip install openimpala-cuda # compiled HYPRE/AMReX CUDA wheel (Linux x86_64)
OpenImpala uses MPI for distributed parallelism — install an MPI runtime
(libopenmpi-dev, openmpi, brew install open-mpi, or
conda install -c conda-forge openmpi) before pip install. 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/local/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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file openimpala-4.4.3-cp312-cp312-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: openimpala-4.4.3-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
692ff8198cbc97a9a3bd099252dd5c27f4303859d22fc7a2015e993f8326f0aa
|
|
| MD5 |
8cc7833e5a4676efff811682384d447c
|
|
| BLAKE2b-256 |
ae435746ff3e8db50515e94b494a86960ddf30833cff268b792bb7adee90835d
|
Provenance
The following attestation bundles were made for openimpala-4.4.3-cp312-cp312-manylinux_2_28_x86_64.whl:
Publisher:
pypi-wheels-cpu.yml on BASE-Laboratory/OpenImpala
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openimpala-4.4.3-cp312-cp312-manylinux_2_28_x86_64.whl -
Subject digest:
692ff8198cbc97a9a3bd099252dd5c27f4303859d22fc7a2015e993f8326f0aa - Sigstore transparency entry: 1640090670
- Sigstore integration time:
-
Permalink:
BASE-Laboratory/OpenImpala@641f3236656e548f6a4bb59e34f26eb8218d3a25 -
Branch / Tag:
refs/tags/v4.4.3 - Owner: https://github.com/BASE-Laboratory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-wheels-cpu.yml@641f3236656e548f6a4bb59e34f26eb8218d3a25 -
Trigger Event:
release
-
Statement type:
File details
Details for the file openimpala-4.4.3-cp311-cp311-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: openimpala-4.4.3-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2919d1440c1a44aebb12433d2f0b54c4c2e01b659412a931b403d8d2538bc91
|
|
| MD5 |
0df099abe83891b8980cfa67a0c88f1a
|
|
| BLAKE2b-256 |
70b4da2a6e172a8f2f65eba9e4f3b04fb27e974b7cb925181153a9873f83f0f5
|
Provenance
The following attestation bundles were made for openimpala-4.4.3-cp311-cp311-manylinux_2_28_x86_64.whl:
Publisher:
pypi-wheels-cpu.yml on BASE-Laboratory/OpenImpala
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openimpala-4.4.3-cp311-cp311-manylinux_2_28_x86_64.whl -
Subject digest:
d2919d1440c1a44aebb12433d2f0b54c4c2e01b659412a931b403d8d2538bc91 - Sigstore transparency entry: 1640090859
- Sigstore integration time:
-
Permalink:
BASE-Laboratory/OpenImpala@641f3236656e548f6a4bb59e34f26eb8218d3a25 -
Branch / Tag:
refs/tags/v4.4.3 - Owner: https://github.com/BASE-Laboratory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-wheels-cpu.yml@641f3236656e548f6a4bb59e34f26eb8218d3a25 -
Trigger Event:
release
-
Statement type:
File details
Details for the file openimpala-4.4.3-cp310-cp310-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: openimpala-4.4.3-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecd32e02db3be3d24a195dca3b22da86e00e3c4cee4a4eb3deb8ccfb7f0d64d7
|
|
| MD5 |
5fae652ee811876b2b3affcddd2914f2
|
|
| BLAKE2b-256 |
1ba2438b74d554cbea93483ee76ae25b7b469d7857bb14fc14c66406ebe29b61
|
Provenance
The following attestation bundles were made for openimpala-4.4.3-cp310-cp310-manylinux_2_28_x86_64.whl:
Publisher:
pypi-wheels-cpu.yml on BASE-Laboratory/OpenImpala
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openimpala-4.4.3-cp310-cp310-manylinux_2_28_x86_64.whl -
Subject digest:
ecd32e02db3be3d24a195dca3b22da86e00e3c4cee4a4eb3deb8ccfb7f0d64d7 - Sigstore transparency entry: 1640090939
- Sigstore integration time:
-
Permalink:
BASE-Laboratory/OpenImpala@641f3236656e548f6a4bb59e34f26eb8218d3a25 -
Branch / Tag:
refs/tags/v4.4.3 - Owner: https://github.com/BASE-Laboratory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-wheels-cpu.yml@641f3236656e548f6a4bb59e34f26eb8218d3a25 -
Trigger Event:
release
-
Statement type:
File details
Details for the file openimpala-4.4.3-cp39-cp39-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: openimpala-4.4.3-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4626cebef12eddea5e55e2d1ebe8fa4db45ba7b87239c22cd88162718a00e8fc
|
|
| MD5 |
d01ef08231a30e2040f91a6d7c6be0d9
|
|
| BLAKE2b-256 |
9568a2a7444ab0322150b77d739a010dd02f95a340845939e7498066456eab35
|
Provenance
The following attestation bundles were made for openimpala-4.4.3-cp39-cp39-manylinux_2_28_x86_64.whl:
Publisher:
pypi-wheels-cpu.yml on BASE-Laboratory/OpenImpala
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openimpala-4.4.3-cp39-cp39-manylinux_2_28_x86_64.whl -
Subject digest:
4626cebef12eddea5e55e2d1ebe8fa4db45ba7b87239c22cd88162718a00e8fc - Sigstore transparency entry: 1640090747
- Sigstore integration time:
-
Permalink:
BASE-Laboratory/OpenImpala@641f3236656e548f6a4bb59e34f26eb8218d3a25 -
Branch / Tag:
refs/tags/v4.4.3 - Owner: https://github.com/BASE-Laboratory
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-wheels-cpu.yml@641f3236656e548f6a4bb59e34f26eb8218d3a25 -
Trigger Event:
release
-
Statement type: