Page 1 of 2

Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 11:19
by NewElmerUser
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 7733 times

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 12:10
by mzenker
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

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 12:44
by NewElmerUser
I solved declaring all physical and exporting the mesh in .unv extension.
Thanks for your time.

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 12:46
by mzenker
OK - normally it should work with .msh also. But the essential is that your problem is solved. :)

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 12:57
by NewElmerUser
I have another problem now on solver :mrgreen:
I'm opening a different thread, because I don't want to go off-topic here.

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 13:00
by kevinarden
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.

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 13:04
by kevinarden
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.

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 13:31
by mzenker
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

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 16:38
by NewElmerUser
Do you think that gmsh + Elmer is a good couple? Or I could do better (and more important, simplier) with other CAD software?

Re: Exporting gmsh file in ElmerGUI

Posted: 06 Feb 2019, 17:10
by mzenker
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