Skip to content

Translate physical names from Gmsh meshes to PorePy tags. #1325

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

Open
pschultzendorff opened this issue Feb 7, 2025 · 2 comments · May be fixed by #1392
Open

Translate physical names from Gmsh meshes to PorePy tags. #1325

pschultzendorff opened this issue Feb 7, 2025 · 2 comments · May be fixed by #1392
Assignees
Labels
enhancement New feature or request. user group Issue to be worked on in the internal user group.

Comments

@pschultzendorff
Copy link
Contributor

Gmsh meshes often come with physical names/tags assigned to cells, faces, and nodes. An example is the SPE11 benchmark, which features 7 different facies with varying permeability and porosity. Translating physical names to pp.Grid.tags during meshing allows to easily implement such simulations from the Gmsh file instead of having to tediously loop through all cells and figure out which facies they belong to.

Currently, fracs.msh_2_grid translates physical names to tags only for boundary faces and only for 2D grids. This issue aims to add analogous functions for all faces, cells, and nodes for grids of all dimensions.

ToDo:

  • Understand how Gmsh meshes logically translate to PorePy grids. Perhaps not all physical names are relevant for PorePy, perhaps there exists another type of "tags" in Gmsh other than physical names, etc.
  • Update all methods in fracs.msh_2_grid to translate physical names into cell, face, and node tags.
  • Add methods remove_tags and all_cell_tags to utils.tags. In particular the former is important, if one wants to import a Gmsh mesh but slightly alter the assignment of tags!
  • The translation from physical names to tags for boundary faces in fracs.msh_2_grid.create_2d_grids is rather old and obtuse, and marked as such. Check whether this can be made clearer.
@pschultzendorff pschultzendorff added enhancement New feature or request. user group Issue to be worked on in the internal user group. labels Feb 7, 2025
@pschultzendorff pschultzendorff self-assigned this Feb 7, 2025
@keileg
Copy link
Contributor

keileg commented Mar 4, 2025

@pschultzendorff: Do you use meshio for reading the tags? That should take care of most of the I/O technicalities.

@pschultzendorff
Copy link
Contributor Author

@keileg Yes, that is done by PorePy and the required information is actually stored as a variable at some point. However, when creating the subdomains, this information gets lost. See the following flowchart:

Image

@pschultzendorff pschultzendorff linked a pull request Apr 10, 2025 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request. user group Issue to be worked on in the internal user group.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants