find_clusters(network, mask=[])[source]#

Identify connected clusters of pores and throats in the network.

Either site and bond percolation can be considered, see description of mask argument for details.

  • network (Network) – The network

  • mask (array_like, boolean) – A list of open bonds or sites (throats or pores). If the mask is Np-long, then the method will perform a site percolation to identify clusters, and if the mask is Nt-long bond percolation will be performed.


p_labels, t_labels – A tuple containing an Np-long array of pore cluster labels, and an Nt-long array of throat cluster labels. The label numbers correspond such that pores and throats with the same label are part of the same cluster. Uninvaded locations are set to -1.

Return type:

tuple of ndarrays