| title | OpenImpala: Scalable Transport Property Computation on 3D Voxel Images of Porous Media | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| tags |
|
|||||||||||||||
| authors |
|
|||||||||||||||
| affiliations |
|
|||||||||||||||
| date | 12 May 2026 | |||||||||||||||
| bibliography | paper.bib |
OpenImpala is a high-performance computing framework for evaluating effective transport properties — tortuosity, effective diffusivity tensors, and effective conductivity — directly from three-dimensional microstructural imaging data such as X-ray CT reconstructions [@withers2021xray]. Built upon the AMReX adaptive mesh refinement library [@amrex2019], OpenImpala formulates the governing partial differential equations on the Cartesian voxel grid, eliminating the mesh-generation step that limits conventional finite element approaches. The framework couples a scalable, distributed-memory C++ backend with the HYPRE linear solver library [@falgout2002hypre] and a Python interface via pybind11 [@jakob2017pybind11], enabling automated microstructural parameterisation for downstream continuum modelling.
An earlier version of the software was described in @LeHoux2021OpenImpala. Since that publication the codebase has been redesigned with the following major additions: GPU acceleration via CUDA, a matrix-free geometric multigrid solver (AMReX MLMG), full effective diffusivity tensor computation via homogenisation, multi-phase transport, microstructural characterisation modules, and a high-level Python API distributed through PyPI.
High-resolution three-dimensional microstructural imaging is increasingly used across battery research, geosciences, and materials engineering to characterise internal transport phenomena [@withers2021xray]. Extracting bulk effective parameters — particularly the tortuosity factor [@epstein1989tortuosity; @tjaden2016origin] — from billion-voxel datasets is a significant computational challenge.
Several open-source tools address this problem. TauFactor [@cooper2016taufactor] pioneered accessible tortuosity computation in MATLAB and has seen widespread adoption in the battery community; TauFactor 2 [@kench2023taufactor2] subsequently added single-GPU PyTorch acceleration but remains single-node. PoreSpy [@gostick2019porespy] provides a comprehensive Python toolkit for morphological image analysis and includes single-process finite-difference transport simulations, but no MPI-distributed solvers for out-of-core volumes. PuMA [@ferguson2018puma] offers voxel-based effective property computation in C++ with multi-threading, but lacks distributed-memory MPI scalability.
OpenImpala addresses these limitations by combining MPI, OpenMP, and CUDA parallelism in a single solver backend capable of scaling across hundreds of compute cores and GPU accelerators. Through its Python API (import openimpala), the framework serves as an upstream microstructural parameterisation engine: it ingests raw or segmented tomographic data and exports effective properties to downstream continuum models such as PyBaMM [@sulzer2021python]. The methodology has been validated against synchrotron data for statistical effective diffusivity estimation [@le2023statistical], with computed tortuosity factors agreeing to within a few percent of published benchmark values.
OpenImpala is organised into three layers (\autoref{fig:architecture}): an I/O layer that reads TIFF, HDF5, and raw binary volumetric images into AMReX distributed data structures; a physics solver layer; and an output layer that exports results in structured JSON formats compatible with battery parameterisation standards such as BPX and BattINFO.
The primary solver discretises the steady-state diffusion equation
Transport properties computed include the tortuosity factor
The Python interface exposes the core capabilities through a high-level facade:
import openimpala as oi
with oi.Session():
result = oi.tortuosity(data, phase=0, direction="z")
print(f"Tortuosity: {result.tortuosity:.4f}")A pure-Python package with optional CuPy GPU acceleration (pip install openimpala) and a compiled CUDA wheel with HYPRE/AMReX solvers (pip install openimpala-cuda) are distributed via PyPI. Interactive tutorial notebooks for Google Colab cover workflows from basic tortuosity computation to digital twin parameterisation with PyBaMM. Documentation is at https://base-laboratory.github.io/OpenImpala/. The test suite includes analytical regression benchmarks (uniform block, series layers / Reuss bound, parallel layers / Voigt bound) verified to machine precision, plus integration tests on real tomographic data via CTest; CI enforces clang-format, clang-tidy, and code coverage via Codecov.
The author thanks Denis Kramer for supervision and initial conceptual direction during the early development of OpenImpala during the author's doctoral studies.
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. The author acknowledges the use of the IRIDIS HPC facility, Diamond Light Source's Wilson cluster, STFC SCARF, and the University of Greenwich M34Impact cluster, and thanks the developers of AMReX, HYPRE, libtiff, and HDF5.
Generative AI (Anthropic's Claude) was used to assist with specific software development tasks, including Fortran-to-C++ kernel translation, boilerplate test generation, and documentation formatting. The author reviewed, edited, and validated all AI-assisted outputs, made all core architectural decisions, and assumes full responsibility for the accuracy, correctness, and originality of the codebase.
