MercuryIntrusion

class openpnm.metrics.MercuryIntrusion(*args, **kwargs)[source]

A ready-made Mercury Intrusion Porosimetry algorithm

This class accepts a pre-existing Project, including a Network and any associated Geometries, then internally creates a new Mercury Phase object and a new Physics for each Geometry associated with the Network. Finally, the Washburn capillary pressure model is added to each Physics object (or to the Mercury object if there are no Geometries defined).

The results can be plotted using plot_intrusion_data, and numerical data can be obtained with get_intrusion_data.

Examples

>>> import openpnm as op
>>> pn = op.network.Cubic(shape=[10, 10, 10], spacing=1e-5)
>>> geo = op.geometry.SpheresAndCylinders(network=pn)
>>> mip = op.metrics.MercuryIntrusion(network=pn)
>>> mip.run()

You can then plot the results using `mip.plot_intrusion_curve()`.

It is also possible to add some experimental data to the algorithm which will the be plotted along with the simulated data:

>>> mip.pc_data = [10000, 20000, 30000]
>>> mip.snwp_data = [0, 0.5, 0.9]
Attributes
Np

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

Nt

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

Ps

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

Ts

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

name

String representing the name of the object

network

A shortcut to get a handle to the associated network.

pc_data
project

A shortcut to get a handle to the associated project.

settings

Dictionary containing object settings.

snwp_data

Methods

get_conduit_data(poreprop[, throatprop, mode])

Combines requested data into a single 3-column array.

get_intrusion_data([Pc])

Obtain the numerical values of the calculated intrusion curve.

get_percolation_threshold()

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

interleave_data(prop)

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)

is_percolating(applied_pressure)

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

Brief explanation of 'plot_intrusion_curve'

props([element, mode, deep])

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

reset()

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

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_partial_filling(propname)

Define which pore filling model to apply.

set_residual([pores, throats, overwrite])

Specify locations of any residual invader.

show_hist([props, bins, fontsize])

Shows a quick plot of key property distributions.

to_indices(mask)

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

results