FreeCAD .step file doesn't mesh

The graphical user interface of Elmer
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

FreeCAD .step file doesn't mesh

Post by Gary R »

Hi all,
Debian 10 host with Linux Elmer/Mint guest on VirtualBox. AMD64 x 4 processor.

Using FreeCAD 0.19 AppImage and the latest ElmerGUI, I have been trying to setup a Helmholtz resonator for some audio simulations. I built the resonator with FreeCAD and exported the file as a .step file. ElmerGUI accepted the file but refused to mesh the file. The resonator showed up in the Model window but nothing showed in the GUI window. I tried to run a step file from the samples folder and that worked fine. I tried importing a sample step file to FreeCAD and then re importing the file to ElmerGUI and everything worked fine at all stages in the process. Any suggestions as to what is wrong here?

Gary R
Attachments
HelmholtzResonator36Hz.step
(51.65 KiB) Downloaded 281 times
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: FreeCAD .step file doesn't mesh

Post by kevinarden »

gmsh and salome meshed the geometry with no issues. ElmerGUI is not the most robust mesher. I would recommend using gmsh or salome to create meshes, both are translatable to Elmer by ElmerGrid.

Salome requires exporting a *.unv file
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: FreeCAD .step file doesn't mesh

Post by Gary R »

Thanks for the reply.

I tried using FreeCAD to gmsh to ElmerGrid to ElmerGUI. I did the meshing with gmsh and converting .msh to .mesh with ElmerGrid 14 2. The meshing seemed to work fine but ElmerGUI refused to accept the .mesh files. I got the following error:

Code: Select all

Loading elmer mesh files
Unknown element family (possibly not implamented)
Failed loading mesh files

So I'm still in the tall weeds. If there is any additional information that would help, please let me know.

Waiting for reply.

Gary R
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: FreeCAD .step file doesn't mesh

Post by kevinarden »

the latest gmsh release went to a new file format that Elmer isn't up to yet. You can change the format of the gmsh file. using mesh.format option

viewtopic.php?f=4&t=6633&p=21513&hilit= ... mat#p21513

you should also use -autoclean

ElmerGrid 14 2 myfile.msh -autoclean
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: FreeCAD .step file doesn't mesh

Post by raback »

Hi

Could you provide the .msh file that is causing the complaint. Indeed the series 4 format of Gmsh is quite much more complicated than the previous ones. The elements should still be the same.

-Peter
kevinarden
Posts: 2237
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: FreeCAD .step file doesn't mesh

Post by kevinarden »

This is the picture of the mesh in gmsh and Elmer
mesh.png
(495.02 KiB) Not downloaded yet
The gmsh file is too large

I will email it to you
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: FreeCAD .step file doesn't mesh

Post by raback »

Hi

I looked on the .msh file on current devel branch. Seems to work ok.

If ElmerGrid/ElmerGUI is more than one month (Sep 24) old I would recommend updating since chasing bugs of old versions is sometimes quite unfruitful.

-Peter
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: FreeCAD .step file doesn't mesh

Post by Gary R »

Sorry. I got sidetracked and lost the thread on this one. The gmsh file format needs to be changed to 2 instead of 10. You can find this change in the "Help > Current Options" file.This produces a .unv file but the mesh produced by gmsh has several glitches in the mesh if I start with a .step file. This can be solved by using an .iges file and feed the gmsh .unv file through ElmerGrid 8 2 to produce the mesh directory.

Unforunately, The mesh is only on the surfaces and not throughout the solids and space inside the resonator. What did I do wrong?

Also, is there any way to permanently change the current option file? It is a bit anoying to have to remenber to make the change each time gmsh is re-started.

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

Re: FreeCAD .step file doesn't mesh

Post by raback »

Hi

If you use Gmsh and rely on physical entities you should create both BCs and the volumes. Gmsh will not save undefined entities.

What is "current option file" ?

-Peter
Gary R
Posts: 162
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: FreeCAD .step file doesn't mesh

Post by Gary R »

I was refering to the "Help > Current Options And WorkSpace" file. I have no idea where this data resides.

Gary R.
Post Reply