|
[Sponsors] |
[Gmsh] Convert pure Tetrahedra Mesh to pure Hexahedra Mesh (e.g. by splitting) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 16, 2020, 04:23 |
Convert pure Tetrahedra Mesh to pure Hexahedra Mesh (e.g. by splitting)
|
#1 |
Member
Join Date: Mar 2015
Posts: 36
Rep Power: 11 |
Dear Foamers,
actually, I am looking for an easy way to make unstructured meshes usable with dynamicMeshRefinement which unfortunately only works with pure hexahedra meshes. I have access to a quite good meshing tool which has many benefits but is not able to produce a pure hexahedra-mesh, but it is able to produce a pure tetrahedra mesh. Therefore, my idea was to load this pure tetrahedra mesh into gmsh and use the function "split to hexahedra", but I don’t know any conversion tool like FoamMeshToGmsh. After some efforts with google I noticed, that only GmshToFoam does exist. Does anybody have an idea how to convert a pure tetra-mesh into a pure hexahedra-mesh by simple spitting the cells? Obviously, the resulting mesh will be finer but that is OK for me. Thanks for any contribution, K.C. |
|
February 7, 2023, 11:53 |
|
#2 |
Member
Join Date: Mar 2015
Posts: 36
Rep Power: 11 |
After long time a small progress was done.
You can use formToVTK and load the vtk into gmsh. Import an openfoam mesh is possible this way. But no I am facing the next problem: The Refine by splitting functionality does not split the mesh into pure hexahedra. Does anybody tried this and was succesfull? Split pure tetra mesh to pure hexa mesh in gmsh? Thanks for any contribution, K.C. |
|
February 7, 2023, 12:39 |
|
#3 | |
Senior Member
M
Join Date: Dec 2017
Posts: 698
Rep Power: 12 |
Quote:
This conversion is implemented e.g. in ANSYS ICEM. Under some conditions it is possible to convert a tet mesh to hex mesh in ICEM. The tets away from the boundary are more or less structured when using the octree algorithm, so they can be easily merged back 5 to 1 hex as well. However, this does not work in the unstructured part near the boundary. The mesh is then called "hexa-core". I cannot find any details on what gmsh's "split to hexahedra" does, but with the experience I have with ICEM, it probably does some kind of merging instead of splitting? That being said, have you thought about extracting the boundaries of your mesh and use snappyHexMesh to build a hex mesh that is eligible for DMR? |
||
February 27, 2023, 16:11 |
|
#4 |
Member
Join Date: Mar 2015
Posts: 36
Rep Power: 11 |
Hi AtoHM,
thanks for your reply. I do not know the exact algorithm of GMSH, but it should always be possible to split a tet cell to 4 hex cells. I tried to create a sketch how it works in my head. (see attached image) For each edge you can construct an auxiliary plane that is perpendicular to this edge and coincides with the center of gravity (or any other point of the tetrahedra). Each pair of these 4 planes intersects and the intersection line forms the new edge of the inlying 4 hexahedra cells. This should be possible with any tetrahedra cell. I agree, that merging tetrahedra to a hex is much more challenging. Regarding to the snappyHexMesh-approach: Unfortunately SHM does not preserve the pure hex mesh. Some cells are deformed and considered as polyhedra after snapping even if no refinement is performed and the mesh is only snapped to the surface (At least checkMesh states, they are polyhedra). Adding a boundary layer will increase the number of polyhedra even more. I already tested adaptive mesh refinement on meshes that also contain non-hex cells. Those cells are just ignored during refinement and only the hex cells can undergo dynmaic refine- and unrefinement. But these polyhedra cells mostly appear near the wall where the magic of most flows will occur. Therefore, it is better than nothing but not satisfying and solving the problem at all. Anyway thanks four your tip |
|
February 27, 2023, 16:12 |
|
#5 |
Member
Join Date: Mar 2015
Posts: 36
Rep Power: 11 |
Sorry for double posting.
Forgot to attache the image and can not add it with a simple edit of previous post. |
|
February 28, 2023, 03:22 |
|
#6 |
Senior Member
M
Join Date: Dec 2017
Posts: 698
Rep Power: 12 |
You are, of course, right. I googled a bit before my last post and failed to find it, but now it comes straight up. There is a nice image here of the splitting:
https://www.sandia.gov/files/cubit/1...rsion/thex.htm I wonder if you could use Cubeit for your purpose? Unfortunately, I have no experience with this tool and much too few with GMSH to be of further help on your issue. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gambit problems | Althea | FLUENT | 22 | January 4, 2017 04:19 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |
Icemcfd 11: Loss of mesh from surface mesh option? | Joe | CFX | 2 | March 26, 2007 19:10 |
How to control Minximum mesh space? | hung | FLUENT | 7 | April 18, 2005 10:38 |