This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A framework for conducting pore network modeling simulations of multiphase transport in porous materials.

Project Description

Overview of OpenPNM

OpenPNM is an open source project aiming to provide porous media researchers with a ready-made framework for performing a wide range of pore network simulations. The main features and capabilities of OpenPNM are:

Defines a universal means of representing any network topology based on a sparse representation of the adjacency matrix - Includes network generators for creating cubic or random networks with arbitrary connectivity
Provides a set of tools for querying, inspecting, and manipulating topology - Including finding neighboring pores, labeling specific locations, adding or removing pores and throats, joining networks, subdividing and merging pores to create multiscale models, and much more
Stores pore and throat property data in vectorized format - Allows for fast calculations even on large networks - Supports the familiar and advanced array access features such as direct indexing, slicing, Boolean masking, etc.
A mechanism for calculating the pore-scale properties that define the geometrical (i.e. pore radius), thermophysical (i.e. viscosity), and physics (i.e. hydraulic conductance) properties of the simulation - The interdependence of some properties on other properties is naturally included so values can be regenerated when changes occur (i.e. viscosity can be updated when temperature changed) - This mechanism was designed to allow users to easily create new customized pore-scale models suitable for their specific domain - A wide assortment of pore-scale transport parameter, pore size calculations, and thermophysical property models are included
A suite of algorithms for performing network simulations - Including invasion percolation, capillary drainage, mass diffusion, permeability and so on.
Supports saving, loading, importing and exporting data in numerous formats - Allows importing networks generated or extracted by other code, as well as exporting data for post-processing and visualization - Saving and loading of simulations allows for batch processing of simulations to be analyzed at a later point

Example Usage

The following code block illustrates how to use OpenPNM to perform a mercury intrusion porosimetry simulation in just 10 lines:

>>> import OpenPNM as op
>>> pn = op.Network.Cubic(shape=[10, 10, 10], spacing=0.0001)
>>> geo = op.Geometry.Stick_and_Ball(network=pn, pores=pn.Ps,
...                                  throats=pn.Ts)
>>> Hg = op.Phases.Mercury(network=pn)
>>> Air = op.Phases.Air(network=pn)
>>> phys = op.Physics.Standard(network=pn, phase=Hg, pores=pn.Ps,
...                            throats=pn.Ts)
>>> MIP = op.Algorithms.Drainage(network=pn)
>>> MIP.setup(invading_phase=Hg, defending_phase=Air)
>>> MIP.set_inlets(pores=pn.pores(['top', 'bottom']))
>>> MIP.run()

The network can be visualized in Paraview giving the following:

The drainage curve can be visualized with MIP.plot_drainage_curve() giving something like this:

A collection of examples is available as a separate Github repository: OpenPNM-Examples.

Installation

OpenPNM can be installed from the Python Package index using:

pip install openpnm

Or the source code can be downloaded from Github and installed by running:

python setup.py

Release Management and Versioning

OpenPNM uses Semantic Versioning (i.e. X.Y.Z) to label releases. All major and minor versions (X.Y.z) are available on PyPI, but bugfixes (x.y.Z) updates are not generally pushed unless the bug is particularly egregious.

OpenPNM uses the Github Flow system of Git branching. Any code added to master is done via Pull Requests (PRs). When new PRs are merged into the master branch, they are generally not given a new version number. Once enough new features have been added, or a sufficient amount of time has passed, the minor release number (x.Y.z) will be incremented. Any code added to the Master branch between incrementing the version number is subject to change, but once a version number has been tagged to code can be considered up-to-date and stable.

OpenPNM depends on several other packages widely known as the Scipy Stack. It is our policy to always support the latest version of all these packages and their dependencies.

The main developer for this project is Prof. Jeff Gostick (jgostick@gmail.com).

Licence and Citation

OpenPNM is completely free to use and is offered under the permissive MIT License.

If you do use OpenPNM in an academic work the developers ask that you cite the following paper, which outlines the design principles and general uses of OpenPNM:

Gostick et al. OpenPNM: A pore network modeling package. Computing in Science & Engineering. 18(4), p60-74.

A link to this article can be found here.

Release History

Release History

This version
History Node

1.6.1

History Node

1.5

History Node

1.4.6

History Node

1.4.5

History Node

1.4.0

History Node

1.3.0

History Node

1.2.0

History Node

1.1

History Node

1.0.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
OpenPNM-1.6.1-py3.4.egg (485.8 kB) Copy SHA256 Checksum SHA256 3.4 Egg Feb 18, 2017
OpenPNM-1.6.1-py3.5.egg (484.9 kB) Copy SHA256 Checksum SHA256 3.5 Egg Feb 18, 2017
OpenPNM-1.6.1-py3.6.egg (479.8 kB) Copy SHA256 Checksum SHA256 3.6 Egg Feb 18, 2017
OpenPNM-1.6.1.tar.gz (161.4 kB) Copy SHA256 Checksum SHA256 Source Feb 18, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting