Skip to content

Latest commit

 

History

History
 
 

examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

OpenPNM: Gallery of Examples

This page links to examples in the Github repo at github.com/PMEAL/OpenPNM/examples/notebooks

Link Description
Tutorial 1 - Basic An overview of OpenPNM in terms of basic manual calculations
Tutorial 2 - Intermediate A repeat of Tutorial 1, but using the features of OpenPNM correctly
Concise but Detailed Overview This notebook goes over most of the key aspects OpenPNM with minimal description, favoring links to other relevant notebooks and resources instead for further reading
Storage of Network Data and Topology Provides a explanation of how numerical data is stored in OpenPNM, including the storage of the topological information using sparse adjacency matrices
Querying the Topology to Find Neighbors Illustrates how to find neighboring pores and throats using topological and spatial information
Using and Creating Labels Labels are used to mark pores and throats for easier selection elsewhere in the simulation, such as applying boundary conditions. This tutorial illustrates how to use the labels that are automatically included on generated networks and how to add new user-defined labels.
Defining Multiple Subdomains One of the "power" features of OpenPNM is the ability to define multiple subdomains, enabling the simulation of layered or hierarchical materials with different pore sizes. This tutorial provides an explanation of this feature.
The Workspace and Projects OpenPNM simulations called Projects and several Projects can be open within a single Workspace. This tutorial illustrates the relationship between these to constructs and their features.
Link Description
Cubic Lattice The Cubic lattice is the classic pore network topology, and provides an excellent starting point for any investigation. The ability to alter the coordination number up to 26, combined with deleting random pores and throats creates an even more realistic topology.
Dual Cubic Lattice The simultaneous simulation of transport in the void and solid, and their interactions, can be done with two interpenetrating cubic networks as illustrated in this tutorial
Cubic Template Cubic lattices do not have to be constrained to cubic shaped domains. This tutorial explains how arbitrary shaped domains (e.g. a spherical particle) can be created, though note the networks would still have a cubic lattice connectivity.
Delaunay and Voronoi Tessellation If truly random topology is necessary then this can be accomplished by performing a Delaunay tessellation on randomly (or not so randomly) distributed points
Link Description
Adding Boundary Pores Boundary pores are useful when conducting transport simulations, but they are not added to generated OpenPNM network automatically. This tutorial explains their importance as well as how to add them to the network.
Manually Adding and Removing Pores and Throats It's possible to alter a pore network by manually adding/removing pores and/or throats. This tutorial describes the available tools in OpenPNM and explains what occurs behind the scenes.
Stitching and Merging Networks Given two or more networks, it is necessary to somehow join them into a single domain to perform simulations. This tutorial explains the difference between merging and stitching, and gives some examples on how to do both.
Joining Pore Network and Continuum Domains This is a variation on stitching networks together, where one has much smaller spacing than the other
Link Description
Benthiemer ICL Benchmark This example is one of the benchmark examples to illustrate the capability of OpenPNM for fast and accurate prediction of permeability. A network model for Benthiemer rock sample were extracted using PoreSpy. Permeability and of the network and effective diffusivity of air was then calculated implementing Stokes flow and Fickian diffusion in OpenPNM. Methods for calculation of permeability and diffusivity (effective properties) are included in generic transports in OpenPNM.
Doddington ICL Benchmark This example is a benchmark example to calculate the permeability of a Doddignton rock sample. The extracted network is loaded in OpenPNM for implementing Stokes flow.
Berea ICL Benchmark This example is a benchmark example to calculate the permeability of a Berea rock sample. The extracted network is loaded in OpenPNM for implementing Stokes flow and Fickian diffusion for effective properties calculation.
Predicting Permeability of Berea This example is a benchmark example to illustrate the steps towards calculation of permeability for a Berea rock sample. This example includes the network extraction procedure in PoreSpy as well. OpenPNM was then used to find the permeability of the network.
Working with Extracted Networks This example illustrates the the steps for extracting networks from synthetic image of porous medium. Network extractions on digital porous media images can be implemented in PoreSpy open source package. PoreSpy output is consistent with OpenPNM input modules. The extracted network can then be easily used for other purposes in OpenPNM.
Link Description
Basic Stick and Ball The SpheresAndCylinders contains the standard pore-scale models to describe the geometry of a pore network.
Defining Continuum Regions in progress
Overview of Shape Factors in progress
Adjusting Pore Size Distributions The basic SpheresAndCylinders class is a good place to start since it has all the necessary pore-scale models, but to customize it for a specific material requires adjusting the pore and throat size distribution. This example illustrates how to change the pore-size distribution function and how to tweak the distributions parameters to get a suitable result.
Link Description
Fibrous Media with Voronoi Tessellations The Voronoi tessellation has been successfully used to model transport in fibrous media in several papers. This class generates a VoronoiDelaunay network object, then further creates a geometry object containing all the associated geometrical models.
Link Description
Creating a Custom Phase OpenPNM includes only a few common phases as predefined classes, but it is quite easy to create new phases with custom properties. This example illustrates how to leverage the library of generic pore-scale models to create phases for any application.
Working with Mixtures in progress
Link Description
Ordinary Percolation Ordinary percolation corresponds to pressure-based invasion of non-wetting fluid. The OrdinaryPercolation class is the basis for simulating mercury intrusion and other capillary pressure curve measurements. This example illustrates its general use.
Invasion Percolation Invasion percolation corresponds to the to volume-based injection of a non-wetting phase. InvasionPercolation is the preferred approach for estimating multiphase transport properties since all saturations can be obtained, unlike OrdinaryPercolation which only produces saturations at discrete applied pressure steps.
Mixed Invasion Percolation Mixed invasion percolation is used for simulating imbibition of a wetting fluid. The mixed aspect refers to the fact that both pore bodies and throats are considered during the invasion.
Meniscus Model Comparison More elaborate meniscus models beyond the standard cylindrical tube are discussed in this example.
Mercury Intrusion Porosimetry The IntrusionPorosimetry class is a subclass of OrdinaryPercolation which is specifically developed for simulating capillary drainage of a non-wetting fluid. This class illustrates how to compare simulation to experimental data.
Link Description
Basic Fickian Diffusion, Tortuosity, and Formation Factor Calculating the rate of diffusion through a network is a primary use of OpenPNM, and this example illustrates how to do it, and how to convert the result into known transport parameters such as tortuosity and formation factor.
Diffusion with Concentration Dependent Diffusivity This example illustrates how to define a costum diffusivity model and assign to the phase object. A Fickian diffusion on a cubic network with a variable diffusivity is implemented.
Permeability Tensor The direct connection between the structure on the transport is one of main benefits of pore networks. This examples uses a 2-layered network with 3x smaller pores in on layer to illustrate how the permeability coefficient for each direction can be determined.
Deep Dive into Conductance Models in progress
Link Description
Relative Diffusivity OpenPNM supports different multiphase transport phenomena. This example shows the procedures for calculation of relative diffusivity of Air and Water phases in a cubic network. For a multiphase diffusive mass transport problem invasion and distribution of phases can be modeled with percolation algorithms. Relative diffusivity of phases can then be calculated implementing Fickian diffusion for each phase considering multiphase pore scale models.
Relative Permeability in 2D OpenPNM is capable of simulating multiphase transport mechanisms such as drainage and imbibition in porous media. Relative properties of phases can be calculated assigning a related pore scale model and transport algorithm. This example presents the calculation procedures for relative permeability of Air and Water phases for a 2D network. Calculations for 3D networks follow the same steps.
Advection-Diffusion in progress
Nernst-Planck-Poisson in progress
Link Description
Transient Fickian Diffusion The package OpenPNM allows for the simulation of many transport phenomena in porous media such as Stokes flow, Fickian diffusion, advection-diffusion, transport of charged species, etc. Transient and steady-state simulations are both supported. An example of a transient Fickian diffusion simulation through a Cubic pore network is shown here.
Transient Fickian Diffusion with Reaction OpenPNM supports adding reaction terms to both steady state and transient simulations. OpenPNM already includes many different source term models that can be added to simulate a reaction. In this example, we show how to add a powerlaw source term model to a transient fickian diffusion simulation.
Transient Advection-Diffusion Transient advection-diffusion simulations can be used to model elution curves. This example shows how to fit the concentration profile at the outlet to determine the dispersion coefficient of a network.
Link Description
Understanding Basic Solver Settings in progress
Understanding Reactive Solver Settings in progress
Understanding Transient Solver Settings in progress
Comparison of Available Matrix Solvers in progress
Overview of Algorithm Inheritance in progress
Issue with Domain Area and Length Automatically determining the length and area of a domain is more difficult that it seems, as illustrated in this notebook.
Link Description
Quick Plotting Networks There are several functions built into OpenPNM for generating quick and dirty plots of network topology. These are useful for ensuring topological manipulations are working as expected, for example.
Rendering in Paraview Paraview is the recommended visualization software to use in conjuction with OpenPNM. This example is still in progress
Loading a Statoil File and Calculating K The Statoil format is used by the group at Imperial College, who have pioneered the principle of sharing code. Their maximal ball network extraction code outputs 4 files, which can be imported into OpenPNM, as outlined in this example.