Exporting gmsh file in ElmerGUI

Mesh generators, CAD programs, and other tools
NewElmerUser
Posts: 7
Joined: 06 Feb 2019, 11:03
Antispam: Yes

Exporting gmsh file in ElmerGUI

Post by NewElmerUser » 06 Feb 2019, 11:19

Hi forum,
I am new to Elmer World and in these days I'm learning how to draw geometry in gmsh software.
From what I have understood, Elmer can not import the simple geometry file from gmsh, but I have to save directly the mesh generated in gmsh.
So, I created a sample cube, I meshed it in 1D->2D->3D and then I saved the .msh file.
In ElmerGUI I tried to import such file, but the result was that the cube became flat, a square. I tried also other three-dimensional geometries, same issue.

Have you ever seen this problem? How could I fix it?

Thanks.

PS: in gmsh...
cube_geo.png
(330.69 KiB) Not downloaded yet
in ElmerGUI...
cube_in_elmergui.png
cube_in_elmergui.png (9.43 KiB) Viewed 1962 times

mzenker
Posts: 1988
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Exporting gmsh file in ElmerGUI

Post by mzenker » 06 Feb 2019, 12:10

Hi,

several things you can try:
* Did you declare physical surfaces/volumes in gmsh? If you did that, you either have to declare everything physical, or you have to check "save all elements" in the dialog which pops up when you save the mesh. By default, if physical entities exist, gmsh would save only those.
* What do you get when you open the .msh file in gmsh?
* Have a look in Model->Summary in ElmerGUI. Does it say the geometry is 2D?
* You might check View->Volume Mesh in ElmerGUI.

HTH,
Matthias

NewElmerUser
Posts: 7
Joined: 06 Feb 2019, 11:03
Antispam: Yes

Re: Exporting gmsh file in ElmerGUI

Post by NewElmerUser » 06 Feb 2019, 12:44

I solved declaring all physical and exporting the mesh in .unv extension.
Thanks for your time.

mzenker
Posts: 1988
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Exporting gmsh file in ElmerGUI

Post by mzenker » 06 Feb 2019, 12:46

OK - normally it should work with .msh also. But the essential is that your problem is solved. :)

NewElmerUser
Posts: 7
Joined: 06 Feb 2019, 11:03
Antispam: Yes

Re: Exporting gmsh file in ElmerGUI

Post by NewElmerUser » 06 Feb 2019, 12:57

I have another problem now on solver :mrgreen:
I'm opening a different thread, because I don't want to go off-topic here.

kevinarden
Posts: 611
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Exporting gmsh file in ElmerGUI

Post by kevinarden » 06 Feb 2019, 13:00

Just tested it with the msh file and got the same result. Viewed the exported msh file and for example node 1 has the coordinates 0,0,1. After import to ElmerGUI and saving the project, viewing the mes.nodes files shows the coordinates of node 1 as 0,0,0. Same for all of the nodes coordinates, all of the z values were set to zero on import.

kevinarden
Posts: 611
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Exporting gmsh file in ElmerGUI

Post by kevinarden » 06 Feb 2019, 13:04

When I use ElmerGrid outside of the GUI, ElmerGrid 14 2 meshname.msh it translates fine. Using load mesh in ElmerGUI of the ElmerGrid command resulting in the correct mesh. Importing from ElmerGUI resulting in the z coordinates being zero.

mzenker
Posts: 1988
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Exporting gmsh file in ElmerGUI

Post by mzenker » 06 Feb 2019, 13:31

Ok, so there is a bug in the ElmerGrid fork which has been included into ElmerGUI.
Anyway, I have never understood why (part of) the ElmerGrid code has been copied to ElmerGUI rather than creating a common codebase or directly calling ElmerGrid under the hood...

Matthias

NewElmerUser
Posts: 7
Joined: 06 Feb 2019, 11:03
Antispam: Yes

Re: Exporting gmsh file in ElmerGUI

Post by NewElmerUser » 06 Feb 2019, 16:38

Do you think that gmsh + Elmer is a good couple? Or I could do better (and more important, simplier) with other CAD software?

mzenker
Posts: 1988
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Exporting gmsh file in ElmerGUI

Post by mzenker » 06 Feb 2019, 17:10

You can try Salomé which is far stronger in CAD, i.e. generation of geometries. The mesher is different from gmsh, it is a matter of taste.

HTH,
Matthias

Post Reply