Pointwise V18.3 introduced a voxel capability (hex-core) that uses regular hexahedra instead of unstructured tetrahedra in regions away from the geometry model. The space between the final T-Rex (anisotropic tetrahedral extrusion) front and the farfield topology (see Figure 1) is filled with regular hexahedral cells. Use of regular hexahedra in the mesh can improve the CFD flow solver’s rate of convergence and solution accuracy. The transition between different sized hexahedral cells is achieved using combinations of tetrahedra and pyramid cells. This ensures maximum compatibility with a wide range of flow solvers. For some solvers like OpenFOAM, the usage of pyramids in the transition layers can be problematic. In this article, we describe a utility (vtCombine) for Caelus developed by Applied CCM that recombines the transition layers between the hexahedra into polyhedra cells. Resulting in smaller cell count, improved mesh quality and improved solver convergence.
Figure 2 shows an example transition region between four small hexahedra (blue cells) at the bottom to one large hexahedron at the top (not shown). To transition from the small to the large, combinations of tetrahedra and pyramids are used, as shown in Figure 2 (right sub-image).
Recombination of transition cells
OpenFOAM can handle polyhedral cells; therefore, it would be ideal not to retain the pyramid/tetrahedron cells in the transition, rather replace them with polyhedra, as shown in Figure 3. It is clear by comparing Figures 2 and 3 that there are features of the transition region which could be improved: (1) the pyramids and tetrahedra can have a smaller volume than the smallest hexahedra, leading to additional cells and (2) the tetrahedra are far from regular, with some tiny internal angles.
To achieve recombination of the transition cells, Applied CCM created a utility for Caelus called vtCombine. A brief outline of the algorithm for vtCombine is:
- Export the voxel mesh from Pointwise version 18.3 and later, using OpenFOAM as the CAE solver.
- Load the OpenFOAM formatted mesh, perform cell type detection and identify cells in zipper layer. The zipper layer is the layer of cells between the final T-Rex front and the voxel cells. This step requires some information from Pointwise which is exported from a Glyph script (Figure 4).
- Mark cells in the zipper layer.
- Loop through all points in the mesh to determine which points, faces and cells need removing.
- A supercell is a result of merging multiple cells.
- For each supercell, create a list of cells that will merge into it and loop through existing cells to create of list of faces for each supercell.
- Create a list of superfaces. Superfaces are those that will replace the merged faces.
- Create a list of new points in the mesh.
- Make internal and boundary faces for the new mesh.
- Generate new cells and calculate owner-neighbour lists.
- Calculate face and cell centres and face areas.
- Make a new mesh using new points, face and cells.
- Merge faces on boundaries and straight lines edges.
- Renumber mesh. See the article “It’s all in the numbering – mesh renumbering may improve simulation speed.”
- Write out the new OpenFOAM mesh.
Numerous tests have been conducted to evaluate the resource usage and performance of vtCombine at recombining the tetrahedra/pyramid combinations into polyhedra accurately. One example is an internal mesh in a quadcopter shown in Figures 5 and 6.
From testing of vtCombine the memory usage was found to be proportional to cell count (see Figure 7), with the largest mesh tested being 207 million cells.
The execution time was also found to be proportional to the mesh cell count (see Figure 8).
Is there a benefit from recombining the transition cells?
vtCombine provides the ability to recombine into polyhedra the transition cells in the voxel mesh. This means we can now have boundary layer resolution using T-Rex with the efficiency of polyhedra and hexahedra in the farfield. Does this give any benefit?
Steady-state laminar flow past a sphere was used to investigate the effect of farfield mesh type on simulation time and accuracy. The same T-Rex inflation around the sphere on three separate meshes using different farfield cell types was tested:
- Voxel (Figure 9),
- Recombined voxel (Figure 10), and
- Tetrahedra (Figure 11).
|Mesh type||Cell counts||Avg. Non-orthogonality (degrees)||Execution time (s)|
It was no surprise that the recombined voxel mesh was fastest because it had the least number of cells (see Table 1). Looking at the convergence of the pressure equation (Figure 12), one can see it is much better for the recombined voxel mesh. This is likely due to the combined cells having improved cell quality.
The difference in velocity residuals (see Figure 13) was only minimal, and the velocity magnitude contour plots for each mesh type show the voxel (Figure 14) and recombined voxel (Figure 15) meshes have near-identical results. The tet mesh results (Figure 16) exhibit a slightly shorter wake region behind the sphere.
Table 2 indicates that vtCombine achieves a good reduction in both cell count and OpenFOAM solver execution time. Proving that it is worth recombining the transition cells in voxel meshes. Conversion can only be after export, using utilities such as vtCombine until Pointwise supports polyhedral cells natively.
|Recombined voxel compared to||Cell count reduction (%)||Execution time reduction (%)|
vtCombine is under development and yet to be released publicly. If you would like to contribute to its development, please contact Applied CCM at email@example.com.
Want to test voxel meshes yourself?
If you want to try the voxel meshing feature in Pointwise for yourself, now is the time to request a free trial license.