PMEAL / OpenPNM

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

quick plotting in openpnm #1171

Closed xu-kai-xu closed 5 years ago

xu-kai-xu commented 5 years ago

@jgostick @TomTranter , i did the tutorial in the OpenPNM-Examples/IO_and_Visualization/quick_plotting_in_openpnm.ipynb section, and i found that the code gave some different plot with what you show. i repeat the work in spyder and jupyter and try on two computers. the former results are the same. the only difference is the last one and i think the code related is the last two line. what i got is showed below, which means find_neighbor_throats did not really work. and i use window system, could that be the problem?

x e wu49 hy n0w e ln c

and the link is https://github.com/PMEAL/OpenPNM-Examples/blob/master/IO_and_Visualization/quick_plotting_in_openpnm.ipynb

jgostick commented 5 years ago

The behavior of find_neighbor_throats changed between version 1 and 2...specifically the mode='intersection' argument. Maybe ensure that spyder and jupyter are using the same version of openpnm?

xu-kai-xu commented 5 years ago

@jgostick i use jupyter and spyder via anaconda. and the version of openpnm in anaconda's lib is 2.0.3, the same version.

jgostick commented 5 years ago

Yes, the problem is the changed meaning of the intersection keyword.

Instead of: Ts = net.find_neighbor_throats(pores=net.pores('internal'), mode='intersection')

It should be: Ts = net.find_neighbor_throats(pores=net.pores('internal'), mode='shared')

xu-kai-xu commented 5 years ago

@jgostick yes, thank you. the final result is correct. i can export the photos as yours.

default

xu-kai-xu commented 5 years ago

i saw on the offical page of OpenPNM, a picture showed a sandstone network extracted using the maximal ball algorithm, but i did not find the revelant article. May you tell me which article this picture belongs? and i am trying to transfor the X-ray computed tomography data to a pore network, seems that i can not directly do it using openpnm, right? thanks for your time to read and reply it.

jgostick commented 5 years ago

That network is extracted using porespy, our other open source package. We have a network extraction algorithm called SNOW, that we think does a pretty good job. BTW, if you have general questions for me, feel free to email, so we can keep the github issues just for issues. jgostick at uwaterloo dot ca