Metrics module effective diffusivity #2387
Replies: 2 comments
-
Hi @PascalRuzzante...we are very sorry but things are in a state of flux at the moment as we move from V2 to V3. The docs are being generated from the 'dev' branch, but the release on pip is v2.8.2. BUT, we haven't updated many/most of the examples yet, so if you are using the 'dev' version, then the examples won't all run properly. We are hoping to have this fixed as soon as possible, BUT updating the code base has become a MASSIVE undertaking, so 'soon' is a bit of a fuzzy term. Honestly, we should probably just remove the examples from the dev branch so that they don't render on the website, because it's causing a lot of headaches for people. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response @jgostick ! That is fair enough, it is understandably a very time-consuming undertaking to update the whole code base. I just wanted to make sure there wasn't an issue with my own installation of openpnm (2.8.2 from conda-forge). I think most of the example code actually does usually run on my installation, with the exception of the effective diffusivity class, which I'm going to guess is something that is being added in the 3.0 version, and therefore doesn't work properly in 2.8. I will continue to follow the examples to try to learn a little bit more about how the module works. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am starting to test some stuff with openpnm and have gotten some errors with some of the example codes (I have installed v2.8.2). In particular, I have been trying to get the effective diffusivity of an imported structure.
However, even using the example code: https://openpnm.org/modules/generated/openpnm.metrics.EffectiveDiffusivity.html#openpnm.metrics.EffectiveDiffusivity
I have been running into errors. The first one I encountered was that saying that openpnm had no metrics module. I think I found the metrics module under the algorithms module instead, but the effective diffusivity class isn't available there (though formation factor is). I continued in this way, using the formation factor class, but when I execute the FF.run() command, I receive a KeyError: 'throat.diffusive_conductance'.
For referece, the code I'm running is as follows:
import openpnm as op
import numpy as np
np.random.seed(5)
pn = op.network.Cubic(shape=[10, 10, 10], spacing=1e-5)
geo = op.geometry.SpheresAndCylinders(network=pn, pores=pn.Ps, throats=pn.Ts)
ED = op.algorithms.metrics.FormationFactor(network=pn)
Deff = ED.run()
I am wondering if this issue is related to the difference between metrics module being in the algorithms module. Is the version on the examples page based on a different version of openpnm? For that matter, a number of the examples/ tutorials pages are showing errors directly on the page (at least from my end). Such as: https://openpnm.org/examples/getting_started/concise_overview_of_openpnm.html (line 8, 13-22) showing attribute errors
https://openpnm.org/examples/getting_started/intro_to_openpnm_basic.html lines 21+ (various NameErrors).
I think there are a number of others, but I'm guessing it's due to the codes based on a different version of openpnm. Any clarification here would be helpful, and also which version of openpnm I should be using for the most consistent results.
Beta Was this translation helpful? Give feedback.
All reactions