Skip to main content

Python package to compute pore network based on given particle packing

Project description

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 currently has only information about connected pores. Properties like area is in TODO list.

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

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

  1. Using pip

    python3 -m pip install packing2porenet

  2. Using make (calls python3 -m pip install ., i.e. option 3, internally):

    make install

  3. Using pip locally

    python3 -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

  • throat properties
  • documentation
  • tests
  • periodicity
  • other shapes
  • other properties and functionality

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

packing2porenet-0.1.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

packing2porenet-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file packing2porenet-0.1.0.tar.gz.

File metadata

  • Download URL: packing2porenet-0.1.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for packing2porenet-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9b9218c1d6d53e6482d48adf0e8b83271e40adb7420973fda7ae167f2282e5ee
MD5 c9a340fa038c5d027adda9f87a563e35
BLAKE2b-256 123867cfee262f1e7f347f9bf138c47ae899e31f01caa99c4925bf25af851feb

See more details on using hashes here.

File details

Details for the file packing2porenet-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for packing2porenet-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50aff932a400e3dbfba62b713f93a68f47cec50a3bc01fadd9b49c31575d3ac9
MD5 1e2754f0fdcebd45fdf17e6c38644511
BLAKE2b-256 406df206124464609803a7c748d4c93807032f23f816293160507a19c3430b84

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page