Example of an Hex mesh with GMSH

About the development of the FEM module/workbench.

Moderator: bernd

sodelo
Posts: 73
Joined: Tue Jan 24, 2017 9:20 am

Example of an Hex mesh with GMSH

Post by sodelo »

Hi,

FYI and not knowing if it can be useful or not, here is an example of Gmsh hex mesh.
Everything has to be created within GMSH (points, lines, surfaces, ...).
There is a tutorial on the Gmsh site as well.
gmsh_geom.png
gmsh_geom.png (35.57 KiB) Viewed 11711 times
gmsh_mesh.png
gmsh_mesh.png (58.1 KiB) Viewed 11711 times
Attachments
example.txt
GMSH input file - TO RENAME as a .GEO file
(11.32 KiB) Downloaded 925 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Example of an Hex mesh with GMSH

Post by bernd »

Thanks for sharing. It's a pity. The mesh is made manually. I'm searching for a way to make a hex mesh by the use of GMSH meshing algorithm and some recombine or similar command. Best would be an example with the geometry imported by brep but this is not necessary.
sodelo
Posts: 73
Joined: Tue Jan 24, 2017 9:20 am

Re: Example of an Hex mesh with GMSH

Post by sodelo »

Not sure this is possible! Maybe we should ask advice to the GMSHV developers.
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Example of an Hex mesh with GMSH

Post by bernd »

sodelo wrote:Not sure this is possible! Maybe we should ask advice to the GMSHV developers.
Would you go for this?
sodelo
Posts: 73
Joined: Tue Jan 24, 2017 9:20 am

Re: Example of an Hex mesh with GMSH

Post by sodelo »

Why not? Though I do not know the internal structure of Freecad which may be an issue to go into th details.
What you would like is to be able to mesh with Hex while still providing a BREP (is it the name?) CAD description. Of course the geometry whould have to be subdivided and the information of the number of element (or size) should be provided. Is it correct?
sodelo
Posts: 73
Joined: Tue Jan 24, 2017 9:20 am

Re: Example of an Hex mesh with GMSH

Post by sodelo »

Did not contact the devs but played a little bit with Freecad and gmsh instead.
I created a CompoundFilter and exported as a Brep.
freecad.png
freecad.png (77.18 KiB) Viewed 11730 times
With a very simple geo file I got this.
mesh.png
mesh.png (50.6 KiB) Viewed 11730 times
There is some potential there!


Place the Brep and geo file in the same directory. Open the geo file and click on Mesh/define/3D.
Attachments
test.geo.txt
(136 Bytes) Downloaded 650 times
geom3.brep
(23.89 KiB) Downloaded 329 times
sodelo
Posts: 73
Joined: Tue Jan 24, 2017 9:20 am

Re: Example of an Hex mesh with GMSH

Post by sodelo »

Still learning
mesh2.png
mesh2.png (71.34 KiB) Viewed 11738 times
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Example of an Hex mesh with GMSH

Post by bernd »

Wow cool can't wait to see more. We should integrate this into FreeCAD GMSH meshing tool ...

Ahh some related informations: viewtopic.php?f=22&t=20351
User avatar
bernd
Veteran
Posts: 12849
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: Example of an Hex mesh with GMSH

Post by bernd »

:D First own hex mesh in FreeCAD which is not made manually. :D

I still do not really understand the geo commands which where used ...
Attachments
screen.jpg
screen.jpg (467.64 KiB) Viewed 11741 times
HoWil
Veteran
Posts: 1279
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Example of an Hex mesh with GMSH

Post by HoWil »

Impressed. This was fast... Had no time to write a post :D.

This is one of my long awaited features fur meshing.
It so interesting for messing extremely thin layers.

Looking forward to test it.

Br,
Howil
Post Reply