Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model collection for importing snow networks #2602

Open
jgostick opened this issue Oct 17, 2022 · 3 comments
Open

Model collection for importing snow networks #2602

jgostick opened this issue Oct 17, 2022 · 3 comments

Comments

@jgostick
Copy link
Member

OpenPNM wants 'pore.diameter' but snow returns 'pore.inscribed/equivalent/inscribed_diameter'. Same is true for several other properties ('throat.length'). I think it would be helpful to offer a collection of geometry models which maps the snow outputs to the openpnm inputs that openpnm expects. It should be done in such as way that you can then add a normal geometry model collection for computing other stuff like volumes and surface areas.

Actually, as I type this it occurs to me that it should work as follows:

mods1 = op.models.collections.geometry.spheres_and_cylinders
mods2 = op.models.collections.geometry.snow_to_openpnm_mapping  # or whatever name works
mods1.update(mods2) 
pn.add_model_collection(mods1)

The second-last line is the key since it will overwrite any models that are present on spheres_and_cylinders that we don't want, like 'pore.diameter'.

@Pengzhu-Lin
Copy link

Hi, i found that module 'openpnm.models.collections.geometry' has no attribute 'snow_to_openpnm_mapping' for the current version(3.1.2). Would you mind sharing how to conduct model collection for importing snow networks? Thank you!

@Pengzhu-Lin
Copy link

From Snow, we can get equivalent_diameter, then can we get pore.diameter and throat.diameter by this? Then add other needed properties for further simulations?

pn.add_model(propname='pore.diameter',
             model=op.models.geometry.pore_size.equivalent_diameter)
pn.add_model(propname='throat.diameter',
             model=op.models.geometry.throat_size.equivalent_diameter)
pn.regenerate_models()

@jgostick
Copy link
Member Author

This is not implemented yet, it's just a proposal/suggestion/idea/todo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants