packing2porenet
Python package to compute pore network based on given particle packing.
Overview
Computes pores and throats and their properties based on given packing.
spherical pores from spherical packing
Firstly, the weighted (also denoted as regular) Voronoi tesselation is done based on the input spherical packing. Weights are spheres' radii.
From the weighted Voronoi tesselation, Delaunay tetrahedralization is determined, resulting in the set of tetrahedrons and their connectivity.
Pores are assigned for each Delaunay tetrahedron. Size and position of the pore is assigned as an inscribed spheres between the four "vertex" spheres.
Throats between pores are assigned radius equal to circle in face plane and inscribed between three "vertex" spheres.
It is possible to merge overlapping pores. Then the new pore is such that:
- volume is equal to the volume of spheres union
- position is weighted average of positions, with weights being input volumes Throats related to merged pores has radius such that the area of new throat is equal to the area of both merged throats.
Usage
Example
from packing2porenet import Sphere, Voronoi, PoreNetwork, export, ymport
# testing sphere pack
spheres = (
Sphere((0.00, 0.00, 0.00), 1.00),
Sphere((2.10, 0.10, 0.05), 1.20),
Sphere((4.05, 0.20, 0.10), 1.10),
Sphere((1.15, 2.15, 0.15), 1.15),
Sphere((3.05, 2.05, 0.05), 1.05),
Sphere((2.10, 4.20, 0.10), 1.25),
Sphere((1.05, 1.05, 2.10), 1.00),
Sphere((3.15, 1.10, 2.20), 1.10),
Sphere((2.05, 3.10, 2.05), 1.20),
Sphere((2.10, 2.15, 4.10), 1.15),
)
# pore network
export.spheres2vtk(spheres, "vtk-packing")
voro = Voronoi(spheres)
export.network2vtk(voro, "vtk-voro")
network = PoreNetwork().fromVoronoi(voro)
export.spheres2vtk([pore.asSphere() for pore in network.cells], "vtk-pores")
export.network2vtk(network, "vtk-throats")
network.mergeIntersectingPores()
export.spheres2vtk([pore.asSphere() for pore in network.cells], "vtk-pores-merged")
export.network2vtk(network, "vtk-throats-merged")
Compatibility
Tested on Ubuntu 18.04 LTS and Python 3.6
Installation
-
Using
pippython3 -m pip install packing2porenet -
Using
make(callspython3 -m pip install ., i.e. option 3, internally):make install -
Using
piplocallypython3 -m pip install .
Contribution
Merge Requests
Are welcome
Bug reporting
In case of any question or problem, please leave an issue at the GitLab page of the project.
Contributors
License
This project is licensed under the MIT License - see the license file for details.
TODO
- documentation
- tests
- periodicity
- other shapes
- other properties and functionality
Metadata
Release files for packing2porenet 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| packing2porenet-0.1.2.tar.gz | 15.4 kB | Without provenance | Details for packing2porenet-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| packing2porenet-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for packing2porenet-0.1.2-py3-none-any.whl |
Total release size: 29.7 kB
Release files / packing2porenet-0.1.2.tar.gz
| Download URL | packing2porenet-0.1.2.tar.gz |
|---|---|
| Size | 15.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48c579929384e54fd3f2b00f0ebe063fdda700a169a9c1a20447a68064141d79
|
|
BLAKE2b-256 checksum How to use checksums |
dcc87eeed080be3f997055c97f5bf5f6686665c61fe8697096644fd384b905da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / packing2porenet-0.1.2-py3-none-any.whl
| Download URL | packing2porenet-0.1.2-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96b87966f4ed273835ff77301a3d4b3733bf05e5e332547a1ebc7c9cfaf44e1b
|
|
BLAKE2b-256 checksum How to use checksums |
1c3b4bee463743b4dbe5f7c51b04c41c7b11d1ed4fc0473ba2b7c668f5e6dd1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Security for packing2porenet 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.