Skip to main content

Hex-Core Voxels for Near-Body and Off-Body Meshing in Fidelity Pointwise

Abstract: Unstructured meshing methods gained traction for their ever-increasing degree of automation, with much faster turnaround than a structured grid technique, but tetrahedra on the flow domain interior remains a poor replacement for structured cells in terms of quality and flow solution accuracy. Rather than opting for structured grid form, replacing the bulk of the unstructured tets with Cadence® Fidelity™ Pointwise™ Mesh Generation’s hex-core voxel meshes can preserve the truncation error cancelation afforded by structured grids. Voxel meshing starts with a small number of root voxel elements, which are then refined via an octree framework to the size field specification. Voxel elements are classified as either cutting, inside, or outside of the prescribed surface mesh, resulting in sets of elements wholly outside the surface grid boundaries. These voxels are then converted to hex core (tet, pyramid, and hex) form, processed and finally connected to isotropic tet cells lying between hex core and surface grid regions.

Why Improve on Unstructured Tet Meshes?

Three decades ago, structured (mapped) grids were the predominant mesh type in CFD research and applications. As the complexity of the geometries increased, the construction of multi-block structured grids quickly became the bottleneck for solution turnaround. These constraints launched research into more efficient grid methods, namely unstructured tetrahedral meshes, to fill a general void in an automated manner.

Though these methods can be applied with an ever-increasing degree of automation, with much faster turnaround than a structured grid technique, using tetrahedra on the flow domain interior remains a poor replacement for structured cells in terms of quality and flow solution accuracy. Further, tet meshes are expensive to generate and their solution accuracy can degrade.

Binary and Octree Structures

A typical spatial binary tree data structure is a hierarchical network of nodes, with each node containing three-pointers (parent, left child, and right child), six real numbers for corners of the node, the number of levels below the root in each split direction, and the split direction of the node's children. A typical spatial octree data structure is similar, with each node containing nine pointers (parent and eight children), six real numbers for corners of the node, and the number of levels below the root.

While a binary tree's nodes contain less data, more nodes are required to represent the same partitioning as an octree. Further reductions in data structure size can be realized by using a block representation that stores a single pointer to a fixed length array of the child nodes. This increases the benefits of the octree node by removing seven pointers from the node, whereas it only reduces the binary tree node by a single pointer.

Another advantage of the octree data structure is the ease in encoding a location of a node within the data structure. This location code is the child index at each level of the octree as the data structure is traversed from the root node to the given node.

Isotropic Hex Core Meshes

A technique to avoid the geometric randomness in a tet mesh is to replace the isotropic tets with a Cartesian-aligned set of hex cubes, or voxels. In this way, prism and hex elements can still be used to resolve near-body phenomena, while voxel cells can be used to better resolve some problems containing gradients in the off-body regions. Since the size field will vary in space, it’s logical to allow for voxel refinement via repeated subdivision of voxels into octants controlled by an octree framework.

The octree method allows faces on adjacent voxels to be disjoint since no explicit connection is defined. As will be discussed, strict cell-to-cell connectivity is enforced by converting voxels to hex core meshes occupying the same space as the voxels.

Root Voxels

Isotropic voxel meshing has been implemented into Fidelity Pointwise in three similar but distinct modes. Each of these methods begins with the construction of a root voxel system, where the root voxel dimension is small while still allowing the voxel sizes to be uniform in the x, y, and z directions. The initial dimension of the root voxels is computed from the user-set extent box aspect ratio.

  1. In external mode, the block extents are user-prescribed, and any number of user-selected closed and open surface meshes are inserted into the block, resulting in a conformal mesh that contains voxels on the exterior and surface and/or anisotropic meshes on the block interior.

Figure 1. External-mode voxel mesh

  1. In internal mode, a closed outer boundary and zero or more closed and open inner boundaries are prescribed, and voxels are formed inside the outer boundary and outside the possible inner boundaries. While meshes of this type usually represent internal flow geometries, they may also be used in instances when the outer boundary needs to respect a prescribed mesh or spacing, such as when two or more blocks abut one another.

Figure 2. Internal-mode voxel mesh

Voxel Refinement

Once the root dimensions and extent box are computed, root voxels are refined recursively to match the local size field. In the following outline, the target level is equal to the number of binary divisions of the root voxel required to satisfy the size field.

Figure 3. Initial refinement of root voxels

Figure 4. Trans-layer enforcement and further voxel refinement

Voxel Classification

The mesh at this point will consist of a rectangular block of voxels that fully envelop the surface and boundary meshes, with each voxel refined to the level specified by the size field. In this section, voxels will be classified either as cutting the boundary meshes (cut), lying outside of the boundary meshes (out), or lying inside the boundaries (in)—the latter classification representing the only non-discarded set.

  1. A voxel cell cuts a triangle if any portion of the voxel or triangle occupies the same space, either by intersection or adjacency. Each triangle must ultimately be intersection-tested against each voxel, the Cartesian shape.
  2. In/out voxels: Voxels not identified as cut in the section above will now be classified as either in or out. Only a small number of voxels, specifically one per contiguous region of voxels, will need to be classified explicitly. All other voxels will be assigned in/out status via a recursive flood fill of the classified voxel.

Figure 5. Classification of cut, out, and in voxels

Voxels belonging to different group numbers will correspond to physically disjoint regions of voxels. After classification is complete, a tally is made of the number of voxels assigned to each region, and voxels belonging to groups containing less than 1% of the total number of voxels are marked out. This prevents very small pockets of voxels (which have no advantage in isolation from tets) from being present in the mesh.

Voxel Conversion to Hex Core Form

A voxel representation is converted into hex core form by replacing each voxel rectangle with either a single hex or a small set of tets and pyramids occupying the same physical space (prisms are not created from voxels).

This begins by enumerating a list of xyz vertices representing the corners of all voxels marked In. Next, each voxel is checked for face consistency with its neighbors. If all six faces fully match neighboring cell faces (or represent a boundary), the voxel is exported as a hex element. For all other cases, there will be at least one voxel face whose neighbor’s face is either a subset or superset of the face. Conversion of these cells to general elements could proceed simply by replacing one face in the voxel with four faces when the neighbor refines an additional layer. Conversion to tets, pyramids, and hexes, however, requires more complex logic. In general, only the regions of cells in the layer between voxels of differing refinement levels need be converted to tets and pyramids.

Figure 6. Transition pyramids and tets connecting levels of hex refinement

Front Classification and Isotropic Tet Generation

The remaining voids to fill with mesh elements are the ‘zipper’ regions—those bounded by the surface meshes and the boundaries of the hex-core cells. However, there may exist several closed and open surfaces meshes and hex-core boundaries, which greatly complicate the proper grouping of cells representing individual mesh regions.

Fortunately, a few simple heuristics can be implemented to identify which surfaces should be matched. First, surface meshes, and hex-core boundary meshes are independently divided into manifold fronts, oriented so that normal points in the direction are yet to be filled. For hex-core meshes, all fronts will be closed, but open fronts may exist on surface meshes if baffles have been inserted into the mesh.

Reference

  1. Steinbrenner, John P., Wyman, Nick J., Jefferies, Mike S., and Karman, Steve L., “Implementation of a Size Field Based Isotropic Hex Core Mesh Algorithm,” AIAA paper no. 2020-1408, January 2020.

Request a Demo

If you’d like to try Fidelity Pointwise for Hex-Core Voxels for Near-Body and Off-Body Meshing on your CFD applications, request a demo today.

About the Author

With an industry-leading meshing approach and a robust host of solver and post-processing capabilities, Cadence Fidelity provides a comprehensive Computational Fluid Dynamics (CFD) workflow for applications including propulsion, aerodynamics, hydrodynamics, and combustion.

Untitled Document