CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [mesh manipulation] Utility for hexaedra cell splitting (https://www.cfd-online.com/Forums/openfoam-meshing/155352-utility-hexaedra-cell-splitting.html)

karlli June 29, 2015 08:03

Utility for hexaedra cell splitting
 
3 Attachment(s)
Dear all,
I'm in the process of creating a mesh where I need to split hexaedral cells into pyramid- and tetrahedral cells in order to obtain conforming patches that can later be merged. I now need some help on what existing utilities that are best suited for the cell splitting task.

To explain my needs, the patches are shown in the figure below. As shown, the overlapping parts conform if I'm able to split the hexaedras on the diagonal.

Attachment 40477

To achieve the diagonal split, my approach is to subdivide each cell that belong to the patches into four pyramid cells (retaining the original side faces). I can then proceed splitting the pyramids that still belong to the patch into two tetrahedra each. The cell splits are shown in the figure below, with the two tetrahedra colored yellow.

Attachment 40478


The following figure shows the end result I would like for the yellow patch.

Attachment 40479

So far, I have tried using splitCells, but the results were rather unpredictable at the edges of the patch and the utility has few settings. Perhaps it can be used for one of the tasks above with some modifications? Would this be the most feasible alternative?

I have also found out that modifyMesh can split hex cells into pyramids, but I would like to provide it with a cellSet rather than a list of points (as the current implementation requires). As I am new to OpenFOAM programming, could someone give me a hint on how to add this feature (point to source code using cell sets etc)?

For the pyramid -> tetrahedron split, I have found the source code of the tetDecomposer utility, but I have no idea how to use it. Would it be a feasible point to start for this task, or are there better alternatives?

All help is appreciated,
Best regards,
Karl

karlli July 6, 2015 09:27

New utilities
 
For those stumbling upon this thread, I have create the utilities I required myself. They are available on github at the links below. Just clone/download and wmake. Please drop a line below if you find it useful.

http://github.com/kelindqv/hexCellSetToPyr
http://github.com/kelindqv/pyrCellSetToTet

Usage should be self-explanatory (from the -help text), but I should point out that consistent pyramid -> tetrahedron splitting relies on consistent face vertex numbering of the pyramid "base" throughout the mesh. The utility works great on meshes created by blockMesh but I don't know the performance on meshed which have been modified e.g. by snappyHexMesh.


All times are GMT -4. The time now is 07:54.