OpenPNM is open-source framework for conducting pore network modeling simulations of multiphase transport in porous materials. It includes modules for generating various common network topologies, pore and throat geometry models, pore scale physics models, and fluid property estimation. It also contains a large set of algorithms for running various simulations such as drainage curves, gas diffusion, permeability, and more.

OpenPNM is written in Python making extensive use of Scipy. Python is a very flexible object oriented programming language that will be familiar to those with experience using Matlab. Our goal is to help other scientists and engineers harness the power and intuitive pore network modeling approach, so if you are interested in this package, please contact us through Github, or email one of the developers directly.

OpenPNM is written in Python, which has many user-friendly features including an interactive command line.  OpenPNM is meant to be called from the command line, or by running scripts of commands.  The following script illustrates how to generated a cubic network, assign it geometrical sizes, and run a drainage algorithm to simulate mercury intrusion porosimetry:


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']))

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:

OpenPNM is completely free to use, but we would appreciate if you would cite the following paper in any publications.
Gostick et al. OpenPNM: A pore network modeling package. Computing in Science & Engineering. 18(4), p60-74. (link)

Get Started with OpenPNM

See Examples

OpenPNM is officially peer-reviewed!

The OpenPNM team has prepared a paper outlining the architecture and capabilities of our software package. It is now officially available in the IEEE journal Computers in Science and Engineering.  The developers would appreciate if people cited this article if they use OpenPNM in any publication.

OpenPNM Featured on CANARIE News Blog

CANARIE is a Canadian agency that promote, supports, funds, and generally enables digital technology and software development in Canada.  OpenPNM was recently featured in their news stream, which be read here.

The OpenPNM design paper is now In-Press

The Authors of OpenPNM have spent the last year working on a paper that outlines the underlying design and principles of OpenPNM, and it is now finally “in-press” in Computing in Science and Engineering.  This is a peer-reviewed journal that focuses on research software, published by IEEE.  A DOI has been assigned and the paper…

New publication using OpenPNM

Some of the OpenPNM developers from McGill and Juelich have recently published a new paper using OpenPNM in the Journal of the Electrochemical Society, which is available open-access.  This paper is an important milestone for several reasons.  Firstly, it couples multiple transport processes into a single ‘multiphysics’ simulation of a fuel cell electrode.  Specifically, it…