GMSH 3D hibrid mesh: ill elements, negative volumes and incorrectly oriented faces
Howdy y'all,
This is my first post, so I hope I am doing everithing right.
I'm designing a 3D mesh of a wing using gmsh in order to run it on Openfoam. I made a hibrid mesh, so the elements around the wing are hexahedra and the elements far from it are tetrahedra; between those hexahedra and tetrahedra there is a layer of pyramids in order to combine the quadrangle faces of the structured mesh with the tetrahedra nodes (It's done by default with the Delaunay algo). When running the algorithm I have problems, I have two error messages which are the following: "Warning : Strange edge cavity (tet is deleted)" and "Warning : 12 ill-shaped tets are still in the mesh". I managed to reduce the number of ill-shapped tets from 2000 to 12 by reducing the aspect ratio of the quadrangles in contact with the un-structured volumes (this way the pyramids and the tetrahedra sorrounding it seem to be simpler and the algorithm seems to work better), but there are still cells that have 0 or negative volume according to OpenFOAM.
On the other hand, when runing the checkMesh code on openFoam i have several errors : " ***Zero or negative cell volume detected. Minimum negative volume: -0.00053318274, Number of negative volume cells: 83 ", "***Open cells found, max cell openness: 1, number of open cells 432", " ***Number of non-orthogonality errors: 373." , " ***Error in face pyramids: 660 faces are incorrectly oriented." and "***Max skewness = 45.903898, 27 highly skew faces detected which may impair the quality of the results".
I have been working on this for several days but now I'm at a point that I don't know how to advance further. Here is the .geo file:
Cwing_hibridMesh_3_FineMeshCDependant_WingtipMesh.geo
I have attached several images. On the last one can be seen the tetrahedra with a low gamma value, note how the nodes are almost on the same plane creating elements with very low volumes. Also, are images of only the pyramids and only the hexahedra (which are around the wing forming a local structured mesh). I have also attached images of the 2D mesh of the wing and the computational domain, so it is easier to understand the definition of the mesh.
Any help regarding these issues would be very appreciated, Kind regards,
Sergi Giménez Herrero