Opening an STL file and remeshing it in Elmer

The graphical user interface of Elmer
lmehdizadegannam
Posts: 24
Joined: 14 Apr 2021, 17:12
Antispam: Yes

Opening an STL file and remeshing it in Elmer

Post 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
kevinarden
Posts: 1210
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post 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.
lmehdizadegannam
Posts: 24
Joined: 14 Apr 2021, 17:12
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post 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
kevinarden
Posts: 1210
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post 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.
lmehdizadegannam
Posts: 24
Joined: 14 Apr 2021, 17:12
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post 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
kevinarden
Posts: 1210
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post by kevinarden »

In use the latest version of Elmer. If you can post the msh file I could take a look.
lmehdizadegannam
Posts: 24
Joined: 14 Apr 2021, 17:12
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post by lmehdizadegannam »

Thank you so much Kevin. I really appreciate your help. Please find the gmsh file attached.

Kindest regards,
Lida
Attachments
12in_cylinder.msh
(8.62 KiB) Downloaded 33 times
kevinarden
Posts: 1210
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post 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.
Attachments
12in_cylinder.msh
(7.22 KiB) Downloaded 43 times
blendertogui.png
(725.4 KiB) Not downloaded yet
lmehdizadegannam
Posts: 24
Joined: 14 Apr 2021, 17:12
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post 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
kevinarden
Posts: 1210
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Opening an STL file and remeshing it in Elmer

Post by kevinarden »

I would use gmsh, Elmer is a good solver but not a very robust mesher.
Post Reply