https://github.com/ma-sadeghi/poromics
A tool for rapid estimation of transport properties of 3D images of porous materials
https://github.com/ma-sadeghi/poromics
gpu julia porous-materials porous-media porous-media-flow python tortuosity transport-phenomena
Last synced: about 1 month ago
JSON representation
A tool for rapid estimation of transport properties of 3D images of porous materials
- Host: GitHub
- URL: https://github.com/ma-sadeghi/poromics
- Owner: ma-sadeghi
- License: mit
- Created: 2025-03-26T09:26:46.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-04-11T07:57:06.000Z (about 2 months ago)
- Last Synced: 2025-04-11T09:51:20.917Z (about 2 months ago)
- Topics: gpu, julia, porous-materials, porous-media, porous-media-flow, python, tortuosity, transport-phenomena
- Language: Python
- Homepage: https://ma-sadeghi.github.io/poromics/
- Size: 1.69 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Poromics
Poromics is a set of tools for rapid estimation of transport properties of 3D images of porous materials. It is designed to be fast and easy to use. Currently, it can predict the tortuosity factor of an image. The goal is to support more transport properties in the future such as permeability. Poromics is optionally GPU-accelerated, which can significantly speed up the calculations for large images (up to 100x speedup).
## Installation
Poromics depends on the Julia package [Tortuosity.jl](https://github.com/ma-sadeghi/Tortuosity.jl/). However, it is not necessary to install Julia separately. The package will be installed automatically when you install `poromics`.
> [!NOTE]
> We highly recommend using `uv` instead of `pip` to install `poromics` (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 for `pip`.### Uv
Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/), and then run the following command in a terminal/command prompt:
```shell
uv pip install poromics
```### Pip
If you prefer to use `pip`, run the following command in a terminal/command prompt:
```shell
pip install poromics
```## Basic Usage
> [!NOTE]
> The first time you import `poromics`, it will take a few minutes to install Julia and the required packages. This is a one-time setup.```python
import porespy as ps
import poromicsim = ps.generators.blobs(shape=[100, 100, 1], porosity=0.6) # Test image
result = poromics.tortuosity_fd(im, axis=1, rtol=1e-5, gpu=True)
print(result)
```The `Result` object is a simple container with the following attributes:
- `im`: The tortuosity factor of the image.
- `axis`: The axis along which the tortuosity was calculated.
- `tau`: The tortuosity factor.
- `c`: The concentration field.## CLI
> [!WARNING]
> The CLI is still in development and not yet functional.```bash
poromics --help
```## Roadmap
- [ ] Speed up matrix assembly by direct assembly on GPU.
- [ ] Create Julia sysimage files upon installation for faster startup.
- [ ] Add more transport properties (e.g. permeability).
- [ ] Add CLI support.