-
when I ran code of example, it shows error ( import openpnm as op
Lc = 1e-4
Nx, Ny, Nz = (10, 10, 10)
pn = op.network.Cubic(shape=[Nx, Ny, Nz], spacing=Lc)
geo = op.geometry.SpheresAndCylinders(network=pn, pores=pn.Ps, throats=pn.Ts)
Hg = op.phases.Mercury(network=pn)
phys = op.physics.Standard(network=pn, phase=Hg, geometry=geo)
mip = op.algorithms.Porosimetry(network=pn, phase=Hg)
mip.set_inlets(pores=pn.pores(['left', 'right', 'top', 'bottom']))
mip.run() ipython-input-3-11dabb12c30d in module
7 # Generate network, geometry, phase, and physics
8 pn = op.network.Cubic(shape=[Nx, Ny, Nz], spacing=Lc)
----> 9 geo = op.geometry.SpheresAndCylinders(network=pn, pores=pn.Ps, throats=pn.Ts)
10 Hg = op.phases.Mercury(network=pn)
11 phys = op.physics.Standard(network=pn, phase=Hg, geometry=geo)
AttributeError: module 'openpnm' has no attribute 'geometry' !('error details image from pycharm')[https://github.com/baelow/img_bed/raw/main/temp/%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20221230185239.png] BUT I CAN RUN THESE CODE WITHOUT ANY ERROR: import openpnm as op
import numpy as np
import matplotlib.pyplot as plt
op.visualization.set_mpl_style()
pn = op.network.Cubic(shape=[4, 4, 4], spacing=1e-5)
ax = op.visualization.plot_coordinates(pn)
ax = op.visualization.plot_connections(pn, ax=ax) WHAT I TRIED:
Now I donnot konw how to do nexr, hope you can help me. Thank you a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You are using the latest version of OpenPNM, but are trying to run an old script. I have written a short post on what is different in V3 and why here |
Beta Was this translation helpful? Give feedback.
You are using the latest version of OpenPNM, but are trying to run an old script. I have written a short post on what is different in V3 and why here