class openpnm.algorithms.OrdinaryPercolation(*args, **kwargs)[source]

Ordinary percolation simulation with or without access limitations.

  • network (GenericNetwork) – The Network upon which this simulation should be run

  • name (str, optional) – An identifying name for the object. If none is given then one is generated.


Ordinary percolation refers the process of finding all bonds or sites in the network that can be invaded at a given threshold, then setting them all to invaded in a single step.

Optionally, it is possible to then find the clusters of invaded bonds or sites that are NOT connected to the inlets and setting them back to an uninvaded state.

An overview of percolation theory can be found on Wikipedia

If the simulation is repeated for increasing threshold values until the entire domain is invaded, then a percoaltion curve is obtained. The threshold at which each site and bond was invaded is recorded, so it is possible to find invading configurations easily using Boolean logic.


A shortcut to query the total number of pores on the object


A shortcut to query the total number of throats on the object


A shortcut to get a list of all pores on the object


A shortcut to get a list of all throats on the object


String representing the name of the object


A shortcut to get a handle to the associated network.


A shortcut to get a handle to the associated project.


Dictionary containing object settings.


get_conduit_data(poreprop[, throatprop, mode])

Combines requested data into a single 3-column array.


Obtain the numerical values of the calculated intrusion curve.


Find the invasion threshold at which a cluster spans from the inlet to the outlet sites


Retrieves requested property from associated objects, to produce a full Np or Nt length array.

interpolate_data(propname[, mode])

Determines a pore (or throat) property as the average of it's neighboring throats (or pores)


Returns a True or False value to indicate if a percolating cluster spans between the inlet and outlet pores that were specified at the given applied pressure.

map_pores(pores, origin[, filtered])

Given a list of pore on a target object, finds indices of those pores on the calling object

map_throats(throats, origin[, filtered])

Given a list of throats on a target object, finds indices of those throats on the calling object

plot_intrusion_curve([ax, num_markers])

Plot the percolation curve as the invader volume or number fraction vs the applied capillary pressure.

props([element, mode, deep])

Returns a list containing the names of all defined pore or throat properties.


Resets the various data arrays on the object back to their original state.


This method determines which pores and throats are filled with invading phase at the specified capillary pressure, and creates several arrays indicating the occupancy status of each pore and throat for the given pressure.

run([points, start, stop])

Runs the percolation algorithm to determine which pores and throats will be invaded at each given pressure point.

set_inlets([pores, overwrite])

Sets the locations from which the invader enters the network

set_outlets([pores, overwrite])

Sets the locations through which defender exits the network.

set_residual([pores, throats, overwrite])

Specify locations of any residual invader.

show_hist([props, bins, fontsize])

Shows a quick plot of key property distributions.


Converts a boolean mask to a list of pore or throat indices.

to_mask([pores, throats])

Convert a list of pore or throat indices into a boolean mask of the correct length.

toindices(*args, **kwargs)

Brief explanation of tomask

tomask(*args, **kwargs)

Brief explanation of tomask