Gmsh Input

The graphical user interface of Elmer
Post Reply
sharath
Posts: 15
Joined: 14 Jul 2017, 09:20
Antispam: Yes

Gmsh Input

Post by sharath »

How will the architecture of Elmer build to take the input mesh form Gmsh .msh files.

Will fempre.c in source code of Elmergrid understands .msh file and sends the data to the femknot.c or .msh is directly read by femknot.c to take the input of Gmsh mesh file.

With Regards,
Sharath.
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Gmsh Input

Post by raback »

Hi

The code that reads in gmsh files in located in femfilein.c.

-Peter
sharath
Posts: 15
Joined: 14 Jul 2017, 09:20
Antispam: Yes

Re: Gmsh Input

Post by sharath »

Yes Peter I have seen that code. But I have few problems in importing the 18 node prism element and 27 node hexahedran element.

I am uploading my .msh files can u please help me out.
18nodprism.msh
(65.66 KiB) Downloaded 385 times
27nodhexahedran.msh
(49.91 KiB) Downloaded 350 times
sharath
Posts: 15
Joined: 14 Jul 2017, 09:20
Antispam: Yes

Re: Gmsh Input

Post by sharath »

Why is Elmer unable to import the surfaces of the body with 27 node Hexahedran element.

Why is ElmerGUI Core Dumps on importing 18 node prism.

Is there any axes orientation problems or element to boundary interface problem?

If so, where can we modify the code to take care new elements that i can add to elmer?
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Gmsh Input

Post by mzenker »

Hi,

I would concentrate in ElmerGrid. If ElmerGUI cannot import the mesh, you can always convert it with ElmerGrid and just open it with ElmerGUI.

HTH,

Matthias
sharath
Posts: 15
Joined: 14 Jul 2017, 09:20
Antispam: Yes

Re: Gmsh Input

Post by sharath »

Hi Matthias,

I have also tried using ElmerGrid. I am obtaining the same mesh files of as that are created by the ElmerGUI.

I have uploaded the .msh files in above post. Those mesh files are depicted by both ElmerGUI and ElmerGrid in a same fashion.

If you wanna try just import the above .msh file and import in ElmerGUI. You will find the following observations on importing.

1) For the 18 node prism element the ElmerGUI and ElmerGrid core Dumps. I think that that element is not present in the elmer software either of ElmerGUI and ElmerGrid.
Ref: femfilein.c
(GmshToElmerType function) : This functionsays that elmer does not have 18 node prism element which is been indexed as (elmertype = 718;)
But in the function,
(GmshToElmerIndx): The 18 node prism element is been reordered as (int order718[]={0,1,2,3,4,5,6,9,7,8,10,11,12,14,13,15,17,16};)
This should make the software to understand the import from Gmsh and both ElmerGUI and ElmeGrid are failing in doing so.
2) For the 27 node hexahedran element ElmerGUI and ElmerGrid are not able to detect the all surface and edge elements.
Ref: We had a discussion on the same topic in following link,
viewtopic.php?f=7&t=2355&sid=8b26524daa ... a28#p16791
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Gmsh Input

Post by mzenker »

Hi,

I tried your 18-node prism mesh. ElmerGUI crashed when opening the msh file. ElmerGrid converts it, and ElmerGUI is able to open the Elmer mesh files written by ElmerGrid. One volume body is recognized. However, ElmerGrid complains about unknown elementtype 718. The ElmerGrid command I used is

ElmerGrid 14 2 18nodprism.msh -autoclean

But my point in the previous post was a slightly different one:
If you want to enable Elmer to understand your mesh, as it obviously doesn't at the moment because it doesn't know some element types, you should IMO go for ElmerGrid and implement the missing types there, not in ElmerGUI. But I think you will need assistance of the Elmer team - I don't know if those element types already exist in Elmer altogether.
You may consult Appendix E of the Solver manual to check.

Question to the gurus: Can the problem be solved by just modifying ElmerGrid?

Matthias
Post Reply