Importing Mesh Created in Gmsh

@FEAnalyst , I must be doing something wrong because I get the following result:

You can find the cad file at Grabcad at https://grabcad.com/library/battery-holding-bracket-1

This geometry is quite complex for hex meshing, you may have to partition it first. I don’t have much experience with Gmsh but you can also try changing meshing algorithm settings. It will be best to ask in their GitLab issues section since Gmsh doesn’t have a forum.

1 Like

Looks likes you have meshed the part with some option to create first a 2d quad mesh and then the solid elements (tets), so in the interface between those quads and tets the mesher has put piramids. Now I don´t remember if piramid elements are allowed in Prepomax.

1 Like

PrePoMax and CalculiX support wedge, not pyramid elements.

I have tried with all different settings in Gmsh (see below), but keep getting the same mesh result as above.

Can someone who uses Gmsh please try the Grabcad model in the link above and export a hex mesh ?

Can you share the .geo file (script generated by Gmsh) ?

@FEAnalyst Do you mean this ?..

Merge “holding_bracket.stp”;
//+
SetFactory(“OpenCASCADE”);
//+
Physical Volume(“e”, 214) = {1};

image

Hi Arnie,

Your Subdivision algorithm is not appropriate (You don’t want quads).
You should get a beautiful 2D mesh before going to 3D.
Be sure Gmsh is showing you the real mesh you have generated.
*.inp should work fine as common format.

If you need something more structured, you may have to partition it first as FEAnalyst suggested.

It seems that the OP wants quad surface mesh and hex elements inside.

Yes, I would like a hex dominant mesh. I don’t need a surface mesh per se.
Since PrePoMax cannot yet produce a hex mesh, I was trying to achieve this in Gmsh and then import into PrePoMax.

Gmsh can build Hex dominated meshes automatically but unstructured (If possible, I don’t know how to do it).
What I have seen is that it can build beautiful Quad meshes on the surface, then meshes the volume with Tet elements and later you can request to subdivide to convert to hexahedral. That’s what is done in my image. It is a full hex mesh, but the original quad structure on the surface is partially lost.(You can keep its flavor up to a certain level where it can be recognized with some algorithms like in the image)

You can give a try to the mesh to see if it can fit your expectations and it is worth to lose some esthetics to have a fully hex mesh.

holding_bracket.inp (4.3 MB)

@ANYS Could you kindly post your Gmsh mesh settings that produced this mesh ?

Manual gmsh.pdf pag 279.

Mesh.SubdivisionAlgorithm

hi, the models seems too large it make GMSH like freeze, i reduced at mesh size.

*edited
sorry, previously i miss to reset in mesh option menus, below result after correcting.