OpenImpala#
OpenImpala computes effective transport properties—tortuosity factors, symmetric \(3 \times 3\) effective diffusivity tensors, multi-phase effective conductivities, and stereological microstructure metrics—directly on 3D segmented voxel images from X-ray CT, FIB-SEM, or synthetic reconstructions.
Built on AMReX and HYPRE, OpenImpala discretises steady-state conservation laws directly on the Cartesian voxel grid without unstructured mesh generation, scaling from interactive Python notebooks on a laptop to multi-node MPI + CUDA clusters.
Install pre-built wheels on Linux (CPU or CUDA 12), macOS, or Windows, load a 3D TIFF stack, and run your first tortuosity solve.
Six executed notebooks with full derivations, plots, and Google Colab launchers—from basic diffusion to \(3\times 3\) homogenisation, REV convergence, and OME-Zarr / yt plotfiles.
Finite-volume discretisation, solver selection (AMReX MLMG vs. HYPRE), CUDA GPUs, MPI/SLURM clusters, ParmParse inputs, and yt plotfiles.
Complete documentation for the openimpala Python facade, openimpala.datasets, openimpala.synthetic, result dataclasses, and the underlying C++ classes.
Quick Install & Example#
pip install openimpala
On Linux x86_64, openimpala installs compiled AMReX + HYPRE C++ bindings (install OpenMPI for multi-rank execution). On macOS, Windows, and ARM64, it uses the built-in pure-Python SciPy solver with the identical API.
pip install openimpala-cuda
Drop-in GPU package with AMReX ParallelFor and HYPRE structured multigrid compiled natively for NVIDIA Volta+ GPUs (sm_75 and newer).
apptainer exec -B "$(pwd):/data" openimpala-v5.0.0.sif \
/usr/bin/Diffusion /data/inputs
import openimpala as oi
vol = oi.datasets.two_phase_cubic() # (64, 64, 64) segmented porous medium
res = oi.tortuosity(vol, phase=1, direction="z")
print(f"Porosity: {res.active_volume_fraction:.4f}, Tortuosity: {res.tortuosity:.4f}")