largest_sphere#

largest_sphere(network, fixed_diameter='pore.fixed_diameter', iters=5)[source]#

Finds the maximum diameter pore that can be placed in each location without overlapping any neighbors.

Parameters:

network (OpenPNM Network object) –

fixed_diameterstr

Name of the dictionary key on network where the array containing pore diameter values is stored, if any. If not provided a starting value is assumed as half-way to the nearest neighbor.

itersinteger

The number of iterations to perform when searching for maximum diameter. This function iteratively grows pores until they touch their nearest neighbor, which is also growing, so this parameter limits the maximum number of iterations. The default is 10.

Returns:

diameters – A numpy ndarray containing pore diameter values

Return type:

ndarray

Notes

This function iteratively expands pores by increasing their diameter to encompass half of the distance to the nearest neighbor. If the neighbor is not growing because it’s already touching a different neighbor, then the given pore will never quite touch this neighbor. Increasing the value of iters will get it closer, but it’s case of Zeno’s paradox with each step cutting the remaining distance in half.

This model looks into all pores in the network when finding the diameter. This means that when multiple Geometry objects are defined, it will consider the diameter of pores on adjacent Geometries. If no diameters have been assigned to these neighboring pores it will assume 0. If diameter value are assigned to the neighboring pores AFTER this model is run, the pores may overlap. This can be remedied by running this model again.