PMEAL / OpenPNM

A Python package for performing pore network modeling of porous media
http://openpnm.org
MIT License
442 stars 175 forks source link

Missing methods in "Generic network" #1129

Closed jdrodriguezcar closed 5 years ago

jdrodriguezcar commented 5 years ago

Hello PMEAL team . In InvasionPercolation algorithm "find_clusters2" method is called. However, "GenericNetwork" doesn't have included its. Therefore, when I run invasion percolation the follows message appears:

clusters = net.find_clusters2(~invaded_ps)

 `AttributeError: 'GenericNetwork' object has no attribute 'find_clusters2'`

I added this and "_site_percolation" method taking codes from OpenPNM v1, also I modified the code due to difference in argument's names. With the above my code ran, but I expected the irreducible saturations to be seen and this doesn't occurred.

jgostick commented 5 years ago

Many/most of the percolation and topology related functions were moved to the topotools module, so instead of having too many methods on the networks, they are compartmentalized and available 'as needed'. For instance, you'd do: op.topotools.find_clusters(network=net)

Version 2 breaks things for version 1. We decided to do this to clean up and better organize the code. We will endeavor to create a document that highlights the major changes as per issues #1128