Elmer mesh from gmsh

Mesh generators, CAD programs, and other tools

Elmer mesh from gmsh

Postby Kraut~salat » 22 Jul 2012, 14:41

Hi all,

being new in the FEA field of work I'm struggling getting to work with Elmer. I use gmsh to make a simple geometry, it's just a bigger block with a small block sitting on top. In Elmer I want them to be treated as 2 bodies, as the smaller one shall have a body heat force, and one side of the bigger block shall be the heat sink with a temperature BC. I understand that in order for this to work the interface between the to cubes need to share the same nodes. I think I created something in gmsh that fulfills this requirement. I then use ElmerGrid 14 2 cubes.msh to get an Elmer mesh. When I run ElmerGUI and "File->Load Mesh" it just does on me, segfaults to be precise.
I attached the files for reference. Would be great if one of the experienced guys here could have a look and point me towards what I have done wrong, in construction and work flow.

Thx everyone
Attachments
cubes.msh
(14.96 KiB) Downloaded 248 times
cubes.geo
(1.84 KiB) Downloaded 206 times
Kraut~salat
 
Posts: 9
Joined: 22 Jul 2012, 14:03

Re: Elmer mesh from gmsh

Postby mzenker » 23 Jul 2012, 11:43

Hi,

you can open your .msh file directly in ElmerGUI (File->Open). This works for me without problem.
Opening the mesh converted with "Elmergrid 14 2 cubes.msh" makes ElmerGUi crash. I have a slightly outdated version (Rev. 5730), however. There might have been an ElmerGUI update recently.
A mesh converted by "Elmergrid 14 2 cubes.msh -autoclean" opens without problem in my ElmerGUI.

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

Re: Elmer mesh from gmsh

Postby Kraut~salat » 24 Jul 2012, 23:47

Thank you for your advice.

My final goal is to import a more complex structure into Elmer, which are too complex for designing them manually in gmsh or netgen. These parts contain multiple bodies which must be connected to each other when meshing. This is no problem when "code"-constructing them in netgen for example. But when I import a step file into netgen or gmsh the bodies are meshed independently. Your advice using the -autoclean option already helped a lot. The mesh is usable, but some parts are deformed and the solver complains about some dead 2D elements. Now that i'm confident with creating simple geometries with netgen or gmsh the question is:
how do I get more complex multi-body geometries from a step-formate into Elmer? How do I make the interfaces between bodies share nodes? Simply using File->Open to open a step file shows the geometry but it just doesnt do anything when I tell it to mesh. The summary says it has 0 surfaces, 0 volumes, etc. Opening it in an older version of Elmer will just make it crash.
Kraut~salat
 
Posts: 9
Joined: 22 Jul 2012, 14:03

Re: Elmer mesh from gmsh

Postby mzenker » 25 Jul 2012, 10:08

Hi,

AFAIK, Elmer cannot mesh a STEP file.
To my knowledge, there is currently no general solution to your problem when using a free mesher. That said, there are several options you can try:

* Salome is reported to be able to cut and merge duplicated interfaces. I didn't try that myself so far.
* The recent version of gmsh has imported some code from Salome to cut & merge faces. To use it, check "cut and merge faces" under Tools->Options->Geometry->General before opening your STEP file.
* There are also commercial meshers, GiD being one of the cheaper ones. There is a GiD->Elmer interface, and you can test GiD for 30 days for free if I remember right.

HTH,

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

Re: Elmer mesh from gmsh

Postby Kraut~salat » 27 Jul 2012, 09:49

Well I had a look at Salome for this matter. Although being one of the better tools for preprocessing it is a bit - say clunky. You have to create a partition from the different regions you want to mesh and then also indivudual groups for every volume. In the Mesh module you then mesh the partition and recreate the groups from the geom module also in the mesh module. After exporting the mesh to .unv you convert it to Elmer with ElmerGrid. In ElmerGUI you initially only have one surface. After splitting them you also get the different volumes. I find that splitting method strange so I do it differently.
I create my geometry in Salome and also create a partition containing my multiple bodies. I then export the partition to a .brep which I load into netgen. Netgen recognized my three different bodies and meshed them correctly. Thanks to ElmerMesh support getting it into Elmer is no trouble then and I do not have to split any surfaces in ElmerGUI anymore.

This still does not really solve my original problem of meshing a step file. But using Salome already facilitates creating more complex geometries than using a texteditor and coding it in netgen language.
Kraut~salat
 
Posts: 9
Joined: 22 Jul 2012, 14:03

Re: Elmer mesh from gmsh

Postby mzenker » 27 Jul 2012, 11:00

Hi,

doesn't Salome read STEP?

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

Re: Elmer mesh from gmsh

Postby Kraut~salat » 27 Jul 2012, 14:08

It can read step files, but I haven't tested how well it works when I manipulate it. In general it looks promising, at least for the low complexity geometry I currently work with. I haven't tested if it keeps multiple bobies after changing the imported geometry
Kraut~salat
 
Posts: 9
Joined: 22 Jul 2012, 14:03

Re: Elmer mesh from gmsh

Postby skoushik » 02 Feb 2018, 16:00

Sorry I'm a primitive user.

I have a .msh file (from gmsh). How can I convert this to Elmer-solvable mesh file in windows.
It is preferred to do this only with gmsh and ELMER, without trying out anymore new software (like the ones mentioned above).

@mzenker : File->open in ELMER GUI is not loading the .msh file.
Elmer grid command "Elmergrid 14 2 cubes.msh -autoclean" works in linux, but how can I do this in windows.

Please suggest!
Thanks.
skoushik
 
Posts: 9
Joined: 22 Jan 2018, 01:55

Re: Elmer mesh from gmsh

Postby mzenker » 02 Feb 2018, 16:38

Hi,

File->open in ElmerGUI normally loads a .msh file. What happens if you try it? If you open Model->Summary, what do you see there? Are you sure your .msh file is OK? Can you load it with gmsh?
For Windows command line, I have already given you an answer here: http://www.elmerfem.org/forum/viewtopic.php?f=9&t=2417&start=10

HTH,

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

Re: Elmer mesh from gmsh

Postby skoushik » 10 Feb 2018, 19:10

Hi

Thanks mzenker for your response.

When I try File->Open with a .msh file in Elmer GUI, it crashes.

Gmsh part : File->Save Mesh generates 2 files - untitled.geo and untitled.msh . Upon opening (File->Open) untitled.msh in gmsh window it loads the mesh without the geometry. Is this .msh file OK ? Or is there a mistake?

I moved the untitled.msh into elmer installed folder and tried ElmerGrid command in windows Dos box. It did not generate the 4 mesh files required for elmer. Help please...?

Thanks.
Attachments
untitled.geo
(757 Bytes) Downloaded 16 times
untitled.msh
(22.36 KiB) Downloaded 13 times
skoushik
 
Posts: 9
Joined: 22 Jan 2018, 01:55

Next

Return to External tools

Who is online

Users browsing this forum: No registered users and 1 guest

cron