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

Postby sodelo » Mon Feb 20, 2017 10:06 am

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 6146 times
gmsh_mesh.png
gmsh_mesh.png (58.1 KiB) Viewed 6146 times
Attachments
example.txt
GMSH input file - TO RENAME as a .GEO file
(11.32 KiB) Downloaded 312 times
User avatar
bernd
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Example of an Hex mesh with GMSH

Postby bernd » Tue Feb 21, 2017 5:39 pm

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

Postby sodelo » Tue Feb 21, 2017 6:31 pm

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

Re: Example of an Hex mesh with GMSH

Postby bernd » Wed Feb 22, 2017 5:32 pm

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

Postby sodelo » Wed Feb 22, 2017 7:08 pm

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

Postby sodelo » Wed Feb 22, 2017 9:17 pm

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 6042 times
With a very simple geo file I got this.
mesh.png
mesh.png (50.6 KiB) Viewed 6042 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 210 times
geom3.brep
(23.89 KiB) Downloaded 112 times
sodelo
Posts: 73
Joined: Tue Jan 24, 2017 9:20 am

Re: Example of an Hex mesh with GMSH

Postby sodelo » Wed Feb 22, 2017 10:54 pm

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

Re: Example of an Hex mesh with GMSH

Postby bernd » Thu Feb 23, 2017 6:26 am

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
Posts: 8329
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: Example of an Hex mesh with GMSH

Postby bernd » Thu Feb 23, 2017 6:41 am

: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 6012 times
HoWil
Posts: 838
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Example of an Hex mesh with GMSH

Postby HoWil » Thu Feb 23, 2017 6:53 am

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