The parameter "name" of openpnm.geometry.genericgeometry
See original GitHub issueDear, when i use code geo = op.geometry.StickandBall(network=gn, project=proj, pores=gn.Ps, throats=Ts, name='model_1') to construct a geometry, i found the parameter “name”. But i do not know how to use it in operating the network.
Then i want change the network to geo = op.geometry.GenericGeometry(network=gn, project=proj, pores=gn.Ps, throats=Ts, name='model_1'), it tells me that name “model_1” has been used. Then i change the name to “mode1_2”, it tells me that the geometry has been used by “model_1” .
So i think if i can use del to delete the original ones and create a new one. I use del to delete op.geometry.GenericGeometry, still didnot work. Then i del op.geometry, it tells me that
‘AttributeError: module ‘openpnm’ has no attribute ‘geometry’’.
I just want to know how to use this “name” parameter. And i am confused by this parameter.
Thanks for all your guys.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
Hi @xu-kai-xu: A1:
nameis not really necessary, one is generated for you automatically if you don’t provide one. It’s is mostly used internally by openpnm, but is also helpful for you to keep track of objects, for instance you may have a variable namedgeobut are not sure which object this is, so you can doprint(geo.name)to see the unique name of the object.A2: Once you assign pores and throats to a geometry, openpnm will raise an error if you assign those same locations to a new geometry. You can delete geometries using the following:
Jeff, @jgostick , I did some demo about the problem, which is based on one of openpnm examples. Please find the attached file. Thanks. The delayed reply is because I missed your message. check_gostick2007.txt