find_surface_pores

openpnm.topotools.find_surface_pores(network, markers=None, label='surface')[source]

Find the pores on the surface of the domain by performing a Delaunay triangulation between the network pores and some external markers. All pores connected to these external marker points are considered surface pores.

Parameters
  • network (GenericNetwork) – The network for which the surface pores are to be found

  • markers (array_like) – 3 x N array of the marker coordinates to use in the triangulation. The labeling is performed in one step, so all points are added, and then any pores connected to at least one marker is given the provided label. By default, this function will automatically generate 6 points outside each axis of the network domain. Users may wish to specify a single external marker point and provide an appropriate label in order to identify specific faces. For instance, the marker may be above the domain, and the label might be ‘top_surface’.

  • label (str) – The label to apply to the pores. The default is ‘surface’.

Notes

This function does not check whether the given markers actually lie outside the domain, allowing the labeling of internal sufaces.

If this method fails to mark some surface pores, consider sending more markers on each face.

Examples

>>> import openpnm as op
>>> net = op.network.Cubic(shape=[5, 5, 5])
>>> op.topotools.find_surface_pores(network=net)
>>> net.num_pores('surface')
98

When cubic networks are created, the surfaces are already labeled:

>>> net.num_pores(['top','bottom', 'left', 'right', 'front','back'])
98