PMEAL / OpenPNM

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

Kernel dies when attempting to run FickianDiffusion on network extracted via porespy's snow2 #1995

Closed ryanvolpi closed 3 years ago

ryanvolpi commented 3 years ago

Describe the bug When I try to run the fickian diffusion algorithm on a network extracted using Porespy's Snow2 algorithm, my jupyter notebook kernel dies. To Reproduce

import porespy as ps
import openpnm as op

im = ps.generators.blobs(shape=[50, 50, 50], porosity=0.6)
snow_output = ps.networks.snow2(im, boundary_width=[3, 3, 3])
pn, geo = op.io.PoreSpy.import_data(snow_output.network)

air = op.phases.Air(network=pn)
phys_air = op.physics.Basic(network=pn, phase=air, geometry=geo)

h = pn.check_network_health()
op.topotools.trim(pn, pores=h['trim_pores'])
op.topotools.label_faces(pn)

fd = op.algorithms.FickianDiffusion(network=pn, phase=air)
fd.setup(phase=air)
fd.set_value_BC(pores=pn.pores("top"), values=1)
fd.set_value_BC(pores=pn.pores("bottom"), values=0)
fd.run()

Expected behavior I expect the code to run without errors

I first mentioned this issue here: https://github.com/PMEAL/OpenPNM/discussions/1971

ma-sadeghi commented 3 years ago

I don't think this is a bug, I was able to successfully run the code that you posted. It's likely that your Python installation is somehow broken (maybe broken dependencies, etc.). To make sure if that's the case, create a new conda environment and install a fresh copy of porespy/openpnm and rerun the script.

jgostick commented 3 years ago

If this issue persists please let us know and we'll re-open it.