Reading gmsh mesh with elmer (ElmerGrid/Elmer GUI)

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

Re: Reading gmsh mesh with elmer (ElmerGrid/Elmer GUI)

Post by mzenker »

The essential is that both are synchronized, no matter how it is implemented in detail... :)
spacedout
Posts: 177
Joined: 30 Mar 2020, 23:27
Antispam: Yes

Re: Reading gmsh mesh with elmer (ElmerGrid/Elmer GUI)

Post by spacedout »

Thanks for transferring me to this link since I had only searched the external tools forum. I want to add that

Gmsh allows one to save its mesh in .unv format and that one can then do

Elmergrid 8 2 filename

But,

Elmergrid 14 2 filename also exists which implies Elmer can understand some .msh format produced by Gmsh

The question is which ? version 1 or 2 ? Both ?

Thank you
Marc
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Reading gmsh mesh with elmer (ElmerGrid/Elmer GUI)

Post by raback »

Hi

Basically there is a separate reader for 1,2,4 and 4.1. This does not mean that they would always work. Especially the v. 4 is significantly more complex and features may be missing.

-Peter
spacedout
Posts: 177
Joined: 30 Mar 2020, 23:27
Antispam: Yes

Re: Reading gmsh mesh with elmer (ElmerGrid/Elmer GUI)

Post by spacedout »

I noticed that Elmergrid ignores the Physical Curve and Physical Surface lines in the .geo file. Which means that (for 2D) in the .sif, we have to concatenate the desired curves under

Boundary Condition i
Target Boundaries (n) = .....

and the desired surfaces under

Body i
Target Bodies (n) = .....

I also saved the mesh from Gmsh into a .unv file format because with the .msh file format (version 2), Elmergrid renumbers the boundaries and in addition created boundaries that were nonexistent in the .geo file

Have a nice week-end
spacedout
Posts: 177
Joined: 30 Mar 2020, 23:27
Antispam: Yes

Re: Reading gmsh mesh with elmer (ElmerGrid/Elmer GUI)

Post by spacedout »

I'll take it back. Elmergrid does not know anything about the .geo file in Gmsh. It is up to the .msh file of Gmsh to provide it with the actual physical element numbers. This can be done in Gmsh by simply exporting to .msh format version 2 and NOT checking saving all elements. What happens then is that only the physical element numbers are saved (if any are mentioned in the .geo script). These numbers can then be observed in the mesh.boundary and mesh.elements files created by Elmergrid.

The Target Boundaries (Bodies) of the .sif then only need to refer to those physical curve (surface) numbers.

So again apologies are due from me for misleading everybody.
Post Reply