Page 1 of 2

Opening an STL file and remeshing it in Elmer

Posted: 15 Apr 2021, 19:15
by lmehdizadegannam
Hello,

I want to reduce the mesh element of a geometry I already have. Specifically, I have a STL file. How can I open it with Elmer and remesh it?

Based on prior discussion in the forum, I understand Elmer cannot open STL files. I am using Blender software to build my geometry. I have an existing STL file. I want to reduce the mesh elements. Can you guide me how I can do so? I cannot save my geometry as STEP or brep in Blender (as it was stated in the forum previously). Any help would be greatly appreciated.

Kindest regards,
Lida

Re: Opening an STL file and remeshing it in Elmer

Posted: 16 Apr 2021, 13:31
by kevinarden
AS a finite element solver Elmer uses CAD Model geometry, Blender is a rendering software and is not based on CAD models. CAD is a more scientific/mathematical representation generally focused on solid geometry, Blender is a more focused on how the objects look as it is more used artistically especially in animations. Most people use Salome, gmsh, or FreeCAD for Elmer. Google talks about add ons that convert Blender to DXF, although you may get a very limited conversion. FreeCAD can read dxf. gmsh tutorial 13 describes how to open a stl file and remesh it. If your intent is to use ElmerSolver for a simulation then the best approach would be to start with a CAD modeling tool. The above are open source.

Re: Opening an STL file and remeshing it in Elmer

Posted: 16 Apr 2021, 17:50
by lmehdizadegannam
Thanks so much Kevin for your reply. I tried gmsh to save the file as STL and remeshing the geometry before. I could not open the result in ElmerGUI. Can you also guide me how I should save the geometry and open it in Elmer? I really appreciate you helping me.

Kindest regards,
Lida

Re: Opening an STL file and remeshing it in Elmer

Posted: 16 Apr 2021, 19:09
by kevinarden
in gmesh you would use the save mesh option, it should save it as a .msh file. from ElmerGUI you should be able to use file, open to load the .msh file. The load. mesh option is for an ELmer mesh.

Re: Opening an STL file and remeshing it in Elmer

Posted: 16 Apr 2021, 19:55
by lmehdizadegannam
Thanks so much Kevin for your prompt response. I really appreciate it. I tried open to load the .msh file option in Elmer. However, I encounter the same issue. Elmer closes unexpectedly. May I ask what version of Elmer you are using? Is it possible the new version does not have this capability? ​

Thank you very much.
Kindest regards,
Lida

Re: Opening an STL file and remeshing it in Elmer

Posted: 16 Apr 2021, 19:59
by kevinarden
In use the latest version of Elmer. If you can post the msh file I could take a look.

Re: Opening an STL file and remeshing it in Elmer

Posted: 19 Apr 2021, 15:37
by lmehdizadegannam
Thank you so much Kevin. I really appreciate your help. Please find the gmsh file attached.

Kindest regards,
Lida

Re: Opening an STL file and remeshing it in Elmer

Posted: 19 Apr 2021, 19:09
by kevinarden
I downloaded the file and it crashed in ElmerGUI with the errors in the red circle. I then in gmsh and went to help, option, typed in mesh.format. Clicked on mesh.format which has a default of 10. I changed the value to 1, which is a previous version of gmsh file format. Did a save mesh command. then
ElmerGUI was able to read it.

Re: Opening an STL file and remeshing it in Elmer

Posted: 19 Apr 2021, 21:21
by lmehdizadegannam
Omg! Thanks so much Kevin for your help. I truly appreciate it!
I have a quick question. If I want to decrease the mesh size, do you suggest I do it in gmsh or Elmer?

Thank you very very much.
Kindest regards,
Lida

Re: Opening an STL file and remeshing it in Elmer

Posted: 19 Apr 2021, 21:24
by kevinarden
I would use gmsh, Elmer is a good solver but not a very robust mesher.