Hi,
in gmsh there is the possibility to assign names to physical entities. When the mesh is saved the names are contained the $PhysicalNames section of the msh file. I wonder if Elmer interprets this section at mesh import. So far ElmerGUI doesn't display those names, but this would be very practical - one would have the possibility to assign meaningful names to the entities and use them in ElmerGUI to find the right bodies and boundaries without having to use ElmerFront, as I do frequently, at least for 3D meshes.
Would this be much work to implement?
I have attached a small example mesh.
Thanks for having a look on this,
Matthias
Display physical names
Display physical names
- Attachments
-
- box.msh
- (38.37 KiB) Downloaded 468 times
Re: Display physical names
I am partially answering my own question:
It seems that Elmergrid does not support pysical names. At least I did not find those names in the Elmer mesh files generated by Elmergrid.
Nevertheless, this would be a nice feature, and facilitate the handling of complex geometries with many bodies and boundaries.
Also it would be nice to have the "display bodies" and "display boundaries" capabilities of ElmerFront in ElmerGUI - the "select bodies" funcionality does not work correctly in 3D.
Matthias
It seems that Elmergrid does not support pysical names. At least I did not find those names in the Elmer mesh files generated by Elmergrid.
Nevertheless, this would be a nice feature, and facilitate the handling of complex geometries with many bodies and boundaries.
Also it would be nice to have the "display bodies" and "display boundaries" capabilities of ElmerFront in ElmerGUI - the "select bodies" funcionality does not work correctly in 3D.
Matthias
Re: Display physical names
Hi,
it seems that under certain conditions, Elmergrid generates a file mesh.names. It did so for me when I converted a unv file for testing purposes. I have attached the mesh.names as an example (zipped since the extension .names is not allowed for attachments here...). The file contains names for bodies and boundaries.
When I have a gmsh file with names for physical entities, the names contained therein are not written in a mesh.names file.
I did not find any mention of mesh.names in the Elmergrid or Elmersolver documentation. Neither Elmerfront nor ElmerGUI display the names contained in mesh.names.
Question: Can this feature be used to define names for bodies/boundaries in ElmerGUI? It would "only" be necessary that ElmerGUI interprets mesh.names, and also that Elmergrid always writes a mesh.names file if there are physical names e.g. in a gmsh file.
Would it be possible...?
Matthias
it seems that under certain conditions, Elmergrid generates a file mesh.names. It did so for me when I converted a unv file for testing purposes. I have attached the mesh.names as an example (zipped since the extension .names is not allowed for attachments here...). The file contains names for bodies and boundaries.
When I have a gmsh file with names for physical entities, the names contained therein are not written in a mesh.names file.
I did not find any mention of mesh.names in the Elmergrid or Elmersolver documentation. Neither Elmerfront nor ElmerGUI display the names contained in mesh.names.
Question: Can this feature be used to define names for bodies/boundaries in ElmerGUI? It would "only" be necessary that ElmerGUI interprets mesh.names, and also that Elmergrid always writes a mesh.names file if there are physical names e.g. in a gmsh file.
Would it be possible...?
Matthias
- Attachments
-
- mesh.zip
- (176 Bytes) Downloaded 423 times
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Display physical names
Hi Matthias
The intended use of the mesh.names has been sort of poor mans physical names. If in the .sif file you define
then you can refer to the names in the boundary condition section primitively by
This is not at all supported by ElmerGUI and not much used elsewhere. What would be nice would be to have an alternate way to define the BC directly by its name whereas here the MATC language is used to do the job and the field "Name" is just shown in the postprocessing.
-Peter
The intended use of the mesh.names has been sort of poor mans physical names. If in the .sif file you define
Code: Select all
include mesh.names
Code: Select all
Boundary Condition 7
Name = "bcname"
Target Boundaries = $fixed
...
End
-Peter
Re: Display physical names
I see.
So this is yet another point on the wishlist...
Are there plans for an ElmerGUI overhaul (e.g. in a student's project) in the foreseeable future?
Matthias
So this is yet another point on the wishlist...
Are there plans for an ElmerGUI overhaul (e.g. in a student's project) in the foreseeable future?
Matthias
Re: Display physical names
It appears as if compiling mesh from the .unv format doesn't create the mesh.names file. The
command doesn't create one. while
does so, even if not very useful ones!
Code: Select all
gmsh <fileName>.geo -3 -order 2 -format unv
ElmerGrid 8 2 <fileName>.unv -autoclean -out <folderName>
Code: Select all
gmsh disk_hole.geo -3 -order 2
ElmerGrid 14 2 <fileName>.msh -autoclean -out <folderName>
Last edited by foadsf on 09 May 2022, 18:59, edited 1 time in total.
Re: Display physical names
I also wonder what the enteties.sif file is meant for?
-
- Posts: 2317
- Joined: 25 Jan 2019, 01:28
- Antispam: Yes
Re: Display physical names
enteties.sif is for copying and pasting into your sif file for users who write their own sif files and want to use names for bodies and boundaries as opposed to numbers. It provides the sif entries for names bodies and boundary that you can copy and paste to your sif.
-
- Site Admin
- Posts: 4832
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: Display physical names
Hi
Unv and .msh format can basically maintain names if the names are there to begin with. This might not be the case, for example, if Gmsh creates Unv files (I haven't tested). The challenge of Unv format is that probably nobody can handle all the hundreds of fields in the standard so people implement sufficient subsets that may, or may not, be overlapping between different software. ElmerGrid should include some complaints if there are untreated keywords and we might add them if they are useful, and easily added.
-Peter
Unv and .msh format can basically maintain names if the names are there to begin with. This might not be the case, for example, if Gmsh creates Unv files (I haven't tested). The challenge of Unv format is that probably nobody can handle all the hundreds of fields in the standard so people implement sufficient subsets that may, or may not, be overlapping between different software. ElmerGrid should include some complaints if there are untreated keywords and we might add them if they are useful, and easily added.
-Peter