Display physical names

The graphical user interface of Elmer
Post Reply
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Display physical names

Post by mzenker »

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
Attachments
box.msh
(38.37 KiB) Downloaded 402 times
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Display physical names

Post by mzenker »

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
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Display physical names

Post by mzenker »

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
Attachments
mesh.zip
(176 Bytes) Downloaded 407 times
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Display physical names

Post by raback »

Hi Matthias

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
then you can refer to the names in the boundary condition section primitively by

Code: Select all

Boundary Condition 7
  Name = "bcname"
  Target Boundaries = $fixed
  ...
End
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
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Display physical names

Post by mzenker »

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
foadsf
Posts: 81
Joined: 20 Sep 2016, 23:56
Antispam: Yes
Contact:

Re: Display physical names

Post by foadsf »

It appears as if compiling mesh from the .unv format doesn't create the mesh.names file. The

Code: Select all

gmsh <fileName>.geo -3 -order 2 -format unv 
ElmerGrid 8 2 <fileName>.unv -autoclean -out <folderName>
command doesn't create one. while

Code: Select all

gmsh disk_hole.geo -3 -order 2
ElmerGrid 14 2 <fileName>.msh -autoclean -out <folderName>
does so, even if not very useful ones!
Last edited by foadsf on 09 May 2022, 18:59, edited 1 time in total.
foadsf
Posts: 81
Joined: 20 Sep 2016, 23:56
Antispam: Yes
Contact:

Re: Display physical names

Post by foadsf »

I also wonder what the enteties.sif file is meant for? 🤔
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Display physical names

Post by kevinarden »

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.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Display physical names

Post by raback »

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
Post Reply