Meaning of some codes #2358
-
I am studying the Concise Overview of OpenPNM on the https://github.com/PMEAL/OpenPNM/blob/dev/examples/getting_started/concise_overview_of_openpnm.ipynb. Several questions have been puzzling me. Firstly, the code is "op.topotools.plot_coordinates(network=pn, c='r', s=50, ax=ax) ". I want to know what are the 'r' , the 'b' and the 'g' . And does the '50' refer to "op.Workspace().settings['loglevel'] = 50"? Secondly, the code is "geo.models['pore.diameter']['shape'] = 1.5" and I want to know what the meaning of the "['pore.diameter']['shape']" is. By the way,how is this number, 1.5, determined. I'm sorry to ask you so many questions. Reall appreciate for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Please refer to our documentation here. Most functions (if not all) are fully documented. If you look a few cells above, you see: geo.add_model(propname='pore.diameter',
model=op.models.geometry.pore_size.weibull,
scale=0.5e-4, shape=0.8, loc=1e-6) meaning that we've added a model to calculate pore diameter, and that model depends on a few parameters such as As for why 1.5 was chosen, no particular reason. It's a just a parameter that gives you a certain size distribution. Google "Weibull" distribution to see how it depends on these parameters (you can also look it up in SciPy documentation since we're using |
Beta Was this translation helpful? Give feedback.
Please refer to our documentation here. Most functions (if not all) are fully documented.
s=50
refers to "scale". Increasing it makes your pores appear larger. You could also passsize_by
to draw a distribution of sizes.If you look a few cells above, you see:
meaning that we've added a model to calculate pore diameter, and that model depends on a few parameters such as
scale
,shape
, andloc
.geo.models['pore.diameter']['shape'] = 1.5
basically modifies the "shape" value that was originally passed as 0.8.As for why 1.5 was chosen, no particula…