A tool for rapid estimation of transport properties of 3D images of porous materials
Project description
Poromics
Poromics estimates transport properties of 3D porous material images. It is GPU-accelerated and designed to be fast and easy to use.
Supported properties:
- Tortuosity / effective diffusivity — via Julia-based FD solver (
tortuosity_fd) or Taichi-based LBM D3Q7 BGK solver (tortuosity_lbm) - Absolute permeability — via Taichi-based LBM D3Q19 MRT solver (
permeability_lbm)
Installation
The Julia-based FD solver depends on Tortuosity.jl, which is installed automatically. The LBM solvers use Taichi with automatic GPU detection.
[!NOTE] We highly recommend using
uvinstead ofpipto installporomics(or any other Python package!) as it's extremely faster. It has lots of useful features, but for all practical purposes, it is a drop-in replacement forpip.
Uv
Install uv, and then run the following command in a terminal/command prompt:
uv pip install poromics
Pip
If you prefer to use pip, run the following command in a terminal/command prompt:
pip install poromics
Basic Usage
[!NOTE] The first time you call
tortuosity_fd, it will take a few minutes to install Julia and the required packages. This is a one-time setup. The LBM solvers (tortuosity_lbm,permeability_lbm) use Taichi and do not require Julia.
Tortuosity (Julia FD solver)
import porespy as ps
import poromics
im = ps.generators.blobs(shape=[100, 100, 100], porosity=0.6)
result = poromics.tortuosity_fd(im, axis=0, rtol=1e-5, gpu=True)
print(result.tau, result.D_eff)
Tortuosity (LBM solver)
result = poromics.tortuosity_lbm(im, axis=0, D=1e-9, voxel_size=1e-6)
print(result.tau, result.D_eff)
Permeability (LBM solver)
result = poromics.permeability_lbm(im, axis=0, nu=1e-6, voxel_size=1e-6)
print(result.k)
Result objects
TortuosityResult attributes: im, axis, porosity, tau, D_eff, c, formation_factor, D.
PermeabilityResult attributes: im, axis, porosity, k, u_darcy, u_pore, velocity, pressure.
Simulation solvers
For more control, use the solver classes directly:
from poromics.simulation import TransientDiffusion, TransientFlow
solver = TransientDiffusion(im, axis=0, D=1e-9, voxel_size=1e-6)
solver.run(n_steps=100_000, tol=1e-2)
print(solver.concentration.shape, solver.converged)
CLI
[!WARNING] The CLI is still in development and not yet functional.
poromics --help
Acknowledgments
The LBM solvers are based on taichi_LBM3D by Yi-Jie Huang.
Roadmap
- Diffusional tortuosity
- Julia FD solver (Tortuosity.jl)
- Taichi LBM D3Q7 BGK solver
- Transient tortuosity
- Julia FD solver (Tortuosity.jl)
- Permeability
- Taichi LBM D3Q19 MRT solver
- Electrode tortuosity
- Julia/Taichi coexistence via subprocess isolation
- Add command-line interface (CLI) for easy usage
- Add support for sysimage creation upon installation for faster startup
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 Distribution
Built Distribution
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 poromics-0.0.8.tar.gz.
File metadata
- Download URL: poromics-0.0.8.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eec2a55998b257a59f2a9c2e977f7462bc895a7cdfeba41b4de18442dbd15d72
|
|
| MD5 |
599a9b2653a4ad38bf30bae4ef7b7091
|
|
| BLAKE2b-256 |
85dda68be13b041de556c4c557b463bbff9d756cb4633a4c18ac4a15d1e5aaaf
|
File details
Details for the file poromics-0.0.8-py3-none-any.whl.
File metadata
- Download URL: poromics-0.0.8-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1e1be78d6cfc7ea5bebbaa4cfdd00abebedcf1d7b67c59c0aff729ac77c3cfd
|
|
| MD5 |
78d6534560a2e993deaf9d7497359ead
|
|
| BLAKE2b-256 |
537704492046013f5253ad9fa43725be3d3e95eb8eb35a5b4244782d25bcaa33
|