- openpnm.models.geometry.pore_size.largest_sphere(target, fixed_diameter='pore.fixed_diameter', iters=5)¶
Finds the maximum diameter pore that can be placed in each location without overlapping any neighbors.
target (OpenPNM Base object) – Object with which this model is associated. This controls the length of the calculated array, and also provides access to other necessary properties.
fixed_diameter (string) – Name of the dictionary key on
targetwhere 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.
iters (integer) – 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.
diameters – A numpy ndarray containing pore diameter values
- Return type
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
iterswill 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.