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.
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
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
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
Metadata
Release files for poromics 0.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| poromics-0.0.8.tar.gz | 27.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| poromics-0.0.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.4 kB
Release files / poromics-0.0.8.tar.gz
| Download URL | poromics-0.0.8.tar.gz |
|---|---|
| Size | 27.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eec2a55998b257a59f2a9c2e977f7462bc895a7cdfeba41b4de18442dbd15d72
|
|
BLAKE2b-256 checksum How to use checksums |
85dda68be13b041de556c4c557b463bbff9d756cb4633a4c18ac4a15d1e5aaaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1
|
Release files / poromics-0.0.8-py3-none-any.whl
| Download URL | poromics-0.0.8-py3-none-any.whl |
|---|---|
| Size | 35.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1e1be78d6cfc7ea5bebbaa4cfdd00abebedcf1d7b67c59c0aff729ac77c3cfd
|
|
BLAKE2b-256 checksum How to use checksums |
537704492046013f5253ad9fa43725be3d3e95eb8eb35a5b4244782d25bcaa33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Hatch/1.16.5 cpython/3.12.3 HTTPX/0.28.1
|