- Research article
- Open access
- Published:
A frontal approach to hex-dominant mesh generation
Advanced Modeling and Simulation in Engineering Sciences volume 1, Article number: 8 (2014)
Abstract
Background
Indirect quad mesh generation methods rely on an initial triangular mesh. So called triangle-merge techniques are then used to recombine the triangles of the initial mesh into quadrilaterals. This way, high-quality full-quad meshes suitable for finite element calculations can be generated for arbitrary two-dimensional geometries.
Methods
In this paper, a similar indirect approach is applied to the three-dimensional case, i.e., a method to recombine tetrahedra into hexahedra. Contrary to the 2D case, a 100% recombination rate is seldom attained in 3D. Instead, part of the remaining tetrahedra are combined into prisms and pyramids, eventually yielding a mixed mesh. We show that the percentage of recombined hexahedra strongly depends on the location of the vertices in the initial 3D mesh. If the vertices are placed at random, less than 50% of the tetrahedra will be combined into hexahedra. In order to reach larger ratios, the vertices of the initial mesh need to be anticipatively organized into a lattice-like structure. This can be achieved with a frontal algorithm, which is applicable to both the two- and three-dimensional cases. The quality of the vertex alignment inside the volumes relies on the quality of the alignment on the surfaces. Once the vertex placement process is completed, the region is tetrahedralized with a Delaunay kernel. A maximum number of tetrahedra are then merged into hexahedra using the algorithm of Yamakawa-Shimada.
Results
Non-uniform mixed meshes obtained following our approach show a volumic percentage of hexahedra that usually exceeds 80%.
Conclusions
The execution times are reasonable. However, non-conformal quadrilateral faces adjacent to triangular faces are present in the final meshes.
Background
Whether hex-meshing or tet-meshing is better for finite element computations is a long-standing controversy. This paper does not aim at deciding on that issue. Yet, it is a fact that a large number of finite element users would highly appreciate having automatic hex-meshing procedures for general 3D domains. A number of arguments can indeed be stated in favor of hex-meshing. For the same number of vertices, hex meshes have fewer elements, which speeds up the matrix/residual assembly. In solid mechanics, hexahedra exhibit higher accuracy than tetrahedra [1], which are plagued by locking problems [2]. In fluid dynamics, boundary layers made of hexahedra are effective for capturing large gradients and resolving viscous flows near the boundary, and semi-structured boundary-layer meshes attract significant interest (see, e.g. [3–5]).
Hexahedral mesh generation is still an ongoing research [6], and a major conclusion so far is that the generation of full-hex conforming meshes on arbitrary domains is beyond our reach nowadays. Relaxing a bit the requirements, hex-dominant meshes [7], in contrast with full-hex meshes, are allowed to aggregate a mixture of hexahedra, prisms, pyramids and tetrahedra. The goal of hex-dominant meshing is to generate meshes where hexahedral elements dominate, both in number and volume. This paper presents such an algorithm to automatically generate non-uniform isotropic hex-dominant meshes in arbitrary geometries. However, quadrilateral faces adjacent to triangular faces are usually found in the resulting meshes. Such non-conformities represent an additional complication for finite element methods. Various attempts at palliating the impact of these non-conformities have been discussed in the literature [8].
The proposed approach relies on an indirect strategy. The tetrahedra of an initial mesh are combined into hexahedra using Yamakawa-Shimada’s algorithm [9], which works basically as follows: (i) All tetrahedra of an initial mesh are considered one after the other. (i i) The neighbors of each tetrahedron are visited in order to identify potential hexahedra. Candidate hexahedra are stored in an array and sorted with respect to their geometrical quality. (i i i) The algorithm then iterates through this array, starting from the highest quality hexahedron, in order to effectively generate the hexahedral elements. Hexahedra that are composed of available tetrahedra (not marked for deletion) and that preserve hexahedral conformity are successively added to the mesh.
However, meshes obtained by applying a recombination algorithm to an arbitrary tetrahedral mesh fail to be hex-dominant. As an illustration, a mesh (depicted on Figure 1) was created using Yamakawa-Shimada’s recombination algorithm from a tetrahedral mesh generated with the Delaunay refinement algorithm [10] of Gmsh [11]. The number of hexahedra in this mesh represents only 12.34% of the total number of elements.This low percentage of hexahedra results from the fact that the mesh vertices were not placed so as to favor recombination. In order to obtain higher ratios of good quality hexahedra, vertices need to be anticipatively aligned into a lattice-like structure that respects the user prescribed mesh size and the preferred directions of the mesh. This is what we are going to do with a specific frontal algorithm.
In a perfect hexahedral mesh, each interior vertex is linked with six other vertices: left-right, above-below, front-back (four vertices in case of a perfect quadrangular mesh). The main idea of our vertex placement algorithm is based on that observation. Knowing the prescribed local mesh size and the local preferred mesh directions, each interior vertex attempts to spawn six new vertices. A prospective vertex, however, is effectively created only if it lays inside the domain and if it is not too close to an existing vertex. This algorithm is applied to the boundaries of the geometry, prior to the volumes. When done, the vertices are tetrahedralized and Yamakawa-Shimada’s algorithm can be applied.
Our approach has some similarities with the advancing front method. The vertices are created layer by layer toward the center of the geometry. However, contrary to the advancing front method, our algorithm does not construct a mesh topology along the way. All tetrahedra are built at the end. Figure 2 illustrates the various steps of our approach. The basic input is a CAD geometry file readable by the Gmsh free software.
The Methods section first examines more closely a number of data structures, tools and concepts that contribute to make the algorithm more efficient. It then describes the two- and three-dimensional versions of the frontal algorithm. Finally, it discusses Yamakawa-Shimada’s algorithm and the issue of finite element conformity. The Results and discussion section presents a number of application examples, including mesh statistics and execution times.
Previous work
A large variety of procedures for hexahedral meshing have been proposed over the years. This section reviews a certain number of them, focusing on the automatic ones.
Several techniques extract hexahedral meshes from octree data structures [12]. These methods can generate non-uniform full-hex meshes in arbitrary geometries. The hexahedra orientation is defined by the octree root, which is a cube englobing the geometry. Boundary hexahedra perpendicular to the boundary surface can be achieved by projecting buffer layers [13, 14]. The main limitations of octree-based approaches is that the generated hexahedra cannot be oriented flexibly, and that the quality of the hexahedra near boundaries is degraded [15].
Certain parametrization methods have been able to mesh complex three-dimensional domains [16, 17]. These methods start by computing a three-dimensional direction field. The singularities of the direction field are then identified. Later on, the domain is cut in order to place all singularities on the boundary and to reduce the genus to 0 [18]. A parametrization minimizing the difference between the hexahedra orientation and the three-dimensional direction field is selected [19]. The supplementary cutting required to place all singularities on the boundary is necessary because it leads to a better parametrization [16]. Full hexahedral meshes of very good quality can be obtained for complicated domains. However, a variable mesh size cannot be prescribed [20]. Parametrization methods are very diverse. For example, a few algorithms capable of deforming a three-dimensional domain into a polycube model have been developed [21]. The polycube model is meshed and re-deformed back into its original shape.
Graph theory can be applied to the problem of creating hexahedra by recombining tetrahedra [22]. The starting point of the method is a tetrahedral mesh, which can be viewed as a graph. The method consists in searching through the mesh to identify subgraphs yielding hexahedra. There are six particular subgraphs to look for. Potential hexahedra can be constructed immediately or after classification along various criterions. This approach can be applied to prisms and pyramids as well. The recombination algorithm used throughout this article has been devised by Yamakawa and Shimada [9]. These authors have also designed an iterative procedure to align vertices in three dimensions. The first step of the procedure consists of filling the domain with crystal cells. Each crystal cell has the shape of a cube: there is one atom at the center and eight atoms in the corners. Crystal cells exert force on each other via their atoms. A set of equations of motion govern the cells positions. Throughout the process, cells can be added or removed depending on the local density. Once cells velocities have sufficiently decrease, the center of each crystal cell becomes a mesh vertex.
To improve the spatial distribution of the set of vertices (which has a large impact on the effectiveness of such graph-based approaches), several techniques have been proposed, such as a modified version of Lloyd’s algorithm. Lloyd’s algorithm repeatedly moves vertices to the centroid of their Voronoi cell [23]. As the number of iterations increases, the Voronoi cells take the shape of perfect hexagons. In fact, it has been proven that Lloyd’s algorithm minimizes an energy functional equal to the sum of the moments of inertia of the Voronoi cells [24]. Lévy-Liu’s algorithm consists of minimizing higher order moments of inertia: the Voronoi cells then become squarely instead of hexagonal, which has the effect of aligning vertices in precise directions. Tetrahedral meshes smoothed by Lévy-Liu’s algorithm make excellent candidates for recombination. When used in conjunction with the graph method discussed above, Lévy-Liu’s algorithm can generate mixed meshes with high hexahedra percentages [24]. However, the method presented in this article is frontal, not iterative. The vertices are created layer by layer.
Methods
We have pointed out above the importance of having the mesh vertices pre-aligned to ensure a good recombination rate. It is the purpose of the vertex placement algorithm to achieve this. This algorithm, however, relies on a number of data structures and geometrical concepts that are first introduced and developed below.
First, the vertex placement algorithm needs to know, at each point of the domain, the prescribed local mesh size and the local preferred mesh directions. In practice, those geometrical quantities are conjointly obtained by evaluating a specific field structure called cross field. The generation of direction fields was extensively studied in [25].
Secondly, the notion of distance itself represents another degree of freedom of the method. We shall show that it is particularly appropriate when dealing with hex-meshing, to compute distances with the infinity norm, instead of the standard Euclidean norm.
Finally, the algorithm is characterized by a large number of spatial searches, in order to check whether or not a prospective vertices is too close to any already existing vertex. To optimize the efficiency of this operation, an R-tree data structure is employed [26, 27].
Cross fields
At each point of a region , the frame field (d1,d2,d3) represents the three local orthogonal preferred directions of the hexahedral mesh. Frame fields are usually required to satisfy many constraints [16, 28]. On the geometrical edges of Ω, one of the three directions should be tangent to the edge itself [9]. On the surfaces of Ω, one of the three directions should be perpendicular to the surface [9, 16]. A last requirement is that the frame field should be as smooth as possible.
On the other hand, at each point of Ω, the size field represents the prescribed local mesh size value. Mesh sizes h1,h2,h3 are defined for every point of the volume in each of the directions d1,d2,d3. In this paper, the mesh size field at a point x is isotropic, i.e. h(x)=h1(x)=h2(x)=h3(x). The extension to anisotropic meshing will be done in a forthcoming work.
The user fixes the mesh size at the geometrical vertices of the model. One-dimensional size fields are then computed along the geometrical edges. Because the surfaces are bounded by geometrical edges, Dirichlet conditions can be imposed on the surfaces boundaries. A Laplace equation is used to obtain the size field over the surfaces. The size field over the volume is calculated in a similar manner. Continuous finite elements of the first order are employed in each case. The final size field is therefore a three-dimensional piecewise continuous field. The Laplace equation was chosen because it leads to smooth and gradual solutions.
The cross field (h1d1,h2d2,h3d3), now, combines both information into a single field. At each vertex of the mesh, the cross field evaluates into a symmetric real 3 by 3 tensor whose columns are the three orthogonal vectors parallel to the local preferred directions of the hexahedral mesh. Moreover, the norm of the vectors represent the local mesh size; the three norms are identical in case of an isotropic mesh (which is the case considered in this paper), but they may differ in case of an anisotropic mesh.
The construction of a frame field on a region Ω belongs to the category of elliptic problems. Boundary conditions must be imposed on the boundary ∂ Ω. We thus proceed logically by explaining first how the frame field is constructed on surfaces, and deal afterwards with the prolongation into the volumes.
Let
be a smooth parametrization of the surface (see [29–31] for a review of parametrization techniques for surface remeshing). It should be noted that the parametrization does not need to be conformal, i.e the angles do not need to be conserved, for the algorithms presented in this paper. (This is a nice feature because guaranteed one-to-one conformal maps are more difficult to compute than bijective harmonic mapping.) For example, Figure 3 shows a harmonic parametrization of an arbitrary surface onto a unit disk.
Consider the two tangent vectors
which are the images in of the basis vectors t′1=(1,0) and t′2=(0,1) of the parameter plane . Because they are not parallel for any point of , one can build the unit normal vector n=t1×t2/∥t1×t2∥. Each vector t tangent to can be expressed as t=u t1+v t2 with (u,v) the covariant coordinates of t. The tangent vector t is thus the image of a vector t′=(u,v) in the parameter plane. It is easy to compute covariant coordinates of any tangent vector t using the metric tensor of the parametrization. By definition, t=u t1+v t2. Then, t·t1=u t1·t1+v t2·t1 and t·t2=u t1·t2+v t2·t2, which reads in matrix form
where is the metric tensor, invertible for any smooth parametrization.
For defining our frame field, a local orthonormal frame (s1,s2,n) is first constructed at all points x of with s1=t1/∥t1∥, s2=n×t1/∥n×t1∥. Next, the direction d1 of the frame field is computed at the points x b of the boundaries of surface : d1 is the tangent vector to the boundary. The local orientation of the frame field at the boundary can then be computed as the oriented angle between s1 and d1. Then, an elliptic boundary value problem is used to propagate the complex number z(u)=a(u)+i b(u)=e4iθ(u) in the parametric domain. More specifically, two Laplace equations with Dirichlet boundary conditions are solved in the parametric space in order to compute the real part a(u)= cos4θ and the imaginary part b(u)= sin4θ of z:
After solving those two PDEs, the frame field can be represented in the whole domain by the angle
The choice 4θ as the argument of z is motivated by symmetry arguments: frame fields are equivalent when they are rotated around n by any angle that is a multiple of π/2. Details of that procedure are given in [32]. Finally, the frame field (d1,d2,d3) can be computed on the whole surface as follows:
where θ is the solution of the elliptic boundary value problem (3).
As an example, Figure 4 presents the frame field computed on surfaces of a mechanical part. Figure 5 shows two triangular meshes of different coarseness and their resulting frame fields. Linear interpolation of the a and b components discussed earlier was used in order to obtain the same number of frames regardless of the mesh density. As seen from the figure, the frame field (a) is not entirely radial and contains defects because the mesh (a) is too coarse.
The frame field at any point inside the volume is then chosen to be equal to the frame field at the closest surface vertex [24]. (ANN nearest neighbor library is employed for the queries [33].)
These frame fields are not going to be smooth whenever the distance function to the walls is not itself smooth. Recently, two methods capable of generating smooth frame fields have been developed [16, 17]. Both of these methods employ LBFGS optimization to minimize energy functionals.
Measuring distances
For inserting a new mesh vertex in our frontal algorithm, the distance between a prospective vertex x i and any already existing vertex x must be smaller than kh, where h is the local mesh size and k a free parameter of the algorithm ranging from 0 to 1. Parameter k absolutely needs to be inferior to one. If not, too many valid vertices will be missing from the cloud. In the implementation described in this work, k is equal to 0.7.
The way distances between vertices are calculated is however a degree of freedom of the method. When dealing with hex-meshing, it turns out to be advantageous to compute distances in the infinity norm, instead of in the Euclidean norm:
In the infinity norm, the unit sphere is actually a cube, which reduces to a square in two dimensions (see Figure 6). The exclusion area around each prospective vertex is therefore a cube, resp. a square, which precisely matches the shape of the elements one wishes to build.
Contrary to the Euclidean norm, the infinity norm is not isotropic and, consequently, it has an orientation which is given by the frame field. In the parameter plane, due to the change of coordinates (1), the exclusion area is the parallelogram determined by
where M x is the Jacobian matrix of (1), evaluated at x.
The infinity distance is not a differentiable function [24]. However, this is not an issue, because the frontal algorithm does not require the computation of distance derivatives.
Using the infinity distance instead of the Euclidean distance can increase the hexahedra percentage. The quarter cylinder illustrated on Figure 7 provides an example where an improvement by 5% of the ratio of hexahedra is observed, by simply using the L ∞ norm instead of the L2 norm in the R-tree spatial search algorithm described in the next section.
Using R-trees for spatial searches
As said before, a prospective vertex is effectively created only if there is enough unoccupied space around it. The size of this exclusion area or volume depends on the local mesh size. According to the dimension and the chosen norm, the shape of the exclusion region can be a parallelogram or an ellipse (in 2D), and a cube or a sphere (in 3D).
The computation of the distance between the prospective vertex and all the other vertices would have a quadratic complexity in time and would therefore be prohibitive in terms of computation time. The number of computations required to ensure the exclusions can however be considerably decreased if the exclusion cube of each vertex is enclosed in a bounding box whose edges are parallel to the coordinate axis. An R-tree data structure [26, 27] can efficiently determine bounding boxes intersections and, then, it is enough to compute the distance between pairs of vertices whose boxes intersect each other.
We now illustrate with a 2D example of a planar surface how to decide wether a prospective vertex can be inserted or not. For this example, we have chosen the infinity norm for computing distances. In Figure 8(a), x1 is the prospective vertex and x is an existing mesh vertex. The dotted square around x1 is the oriented exclusion area of vertex x1, that is computed from the surface cross field (h1d1,h1d2) that has a uniform mesh size field h1. The solid box surrounding the prospective vertex is the bounding box of the exclusion area that is parallel to the xy-coordinate axis. This bounding box should always include the oriented exclusion square of side 2kh. This condition is satisfied in 2D if the box is of side and in 3D if the cube is of side . Even if the boxes intersect each other in Figure 8(a), the distance between x1 and x is sufficiently large. Thus, x1 can be inserted in the cloud and added to the queue.
Figure 8(b) shows the same two vertices. Again, the boxes intersect each other. This time, however, x1 is too close to x and x1 cannot be added to the cloud or to the queue.
It should be noted that on Figures 8(a) and 8(b), is not necessarily equal to . The local mesh sizes at x1 and x can also be different as illustrated in Figure 8(a). However, if x is outside the dotted square of x1, it is considered sufficient.
For non-planar surfaces, the surfaces need to be parametrized. As the parametrization is not necessarily conformal, i.e. the angles between d1 and d2 are not conserved, the dotted squares (exclusion area) of Figure 8 become parallelograms in the parametric space. As far as the bounding boxes are concerned, they are computed in the same manner and are then parallel to the uv-coordinate axis of the parametric space.
Let’s assume that on surfaces, each vertex attempts to create four vertices in the four cardinal directions. If the surface normal is not constant, these prospective vertices may not rest on the surface. The next section describes a scheme capable of solving this issue by intersecting surfaces with circle arcs.
Surface meshing: the packing of parallelograms algorithm
The quadrilateral mesh algorithm presented here is a simpler variant of [32] that we call packing of parallelograms. Consider one vertex located at point u=(u,v) of the parameter plane which correspond to point x(u,v) in the 3D space (see Figure 9). The cross field at this point of the surface is (h1d1,h2d2,h n n), in terms of the three orthonormal preferred mesh directions, {d1,d2,n}, and the three corresponding mesh sizes, {h1,h2,h n },.
In a perfect quad mesh, each vertex is connected to four neighboring vertices forming a cross parallel to the cross field. In our approach, four prospective points x i , i=1,…,4 are constructed in the neighborhood of point x with the aim of generating the perfect situation.
Points x1 and x2 are constructed as the intersection of the surface with a circle of radius h1, centered on x and situated in the plane Π of normal d2 (see Figure 9). Points x3 and x4 are constructed as the intersection of the surface with a circle of radius h2, centered on x and situated in the plane of normal d1 (not in the figure for clarity).
Numerical difficulties associated with the surface-curve intersection are overcome by choosing a good initial guess for the intersection. If we approximate the surface by its tangent plane at x, point x1 is situated at x1=x+h1d1. A good initial guess in the parameter plane is u1=u+d u1 where d u1=(du1,dv1) is computed using (2) i.e.
This also gives u2=u−d u1, d u3=(du3,dv3)
u3=u+d u3 and u4=u−d u3.
The algorithm works as follows. Each vertex of the boundary is inserted in a fifo queue. Then, the vertex x at the head of the queue is removed and its four prospective neighbors x i are computed. A new vertex x i is inserted at the tail of the queue if the following conditions are satisfied: (i) vertex x i is inside the domain and (i i) vertex x i is not too close to any of the vertices that have already been inserted.
As for the first condition, it is enough to check if the preimage of x i is inside the bounds of the parameter domain. Concerning the second condition, the distances on the surface should theoretically be measured in terms of geodesics, This is however clearly overkill from a mesh generation point of view. We define an exclusion zone for every vertex that has already been inserted (this includes boundary vertices). This exclusion zone is a parallelogram in the parameter plane (see the yellow parallelogram of Figure 9). This parallelogram is scaled down by a factor k=0.7 in order to allow the insertion of (at least) points x i . The different stages of the procedure for a non planar surface are presented on Figure 10 and Figure 11. Then, the surfaces are triangulated in the parameter plane using an anisotropic Delaunay kernel and the triangles are subsequently recombined into quadrilaterals using the Blossom-Quad algorithm [34].
As shown on Figure 11, exclusion areas can become anisotropic parallelograms in the parametric plane. However, they always correspond to squares in the three-dimensional space. The vertices are triangulated in the parametric plane. Anisotropic triangulation is therefore necessary in order to obtain the expected arrangement of right triangles.
Volume meshing: the 3D point insertion algorithm
Volume meshing proceeds in the same way as surface meshing. The procedure starts from a 2D triangular mesh that has been created using surfacic frame fields. A frontal algorithm is used to create well aligned vertices inside the volume, starting from surface points. The 3D point insertion algorithm works in the same manner as the one used for surfaces.
All boundary mesh vertices are initially pushed into a queue. The vertices are popped in order: each vertex Q popped out of the queue attempts to create six neighboring vertices in the six cardinal directions P1,2=Q±h d1, P3,4=Q±h d2, P5,6=Q±h d3 at a distance h from itself (see Figure 12).
A prospective vertex is added to the vertices cloud and to the queue only if it satisfies the two following conditions:
-
1.
It is inside the domain.
-
2.
It is not too close to an existing mesh vertex, i.e. if the distance is smaller than kh.
An octree data structure is again employed to efficiently determine if a vertex is inside the domain [11].
Eventually, no more prospective vertices can be added to the cloud without being too close to existing ones. The process then stops and the cloud is tetrahedralized with a Delaunay procedure [35].
The frontal algorithm was applied to the quarter cylinder starting from the surface mesh shown in Figure 13(a). In Figure 13(b), lines are traced between each vertex and its parent in order to observe the progression of the 3D point insertion algorithm.
The quality of the alignment inside the geometry is very dependent on the quality of the alignment on the boundaries. If the triangles on the boundaries are far from being right-angled, then the vertices inside the geometry will not be well aligned. Various algorithms are capable of generating sets of aligned vertices on surfaces, such as the Delquad algorithm [32] or Lévy-Liu’s algorithm [24, 36]. However, for the majority of the examples presented in this article, a two-dimensional version of the frontal algorithm was employed.
As explained earlier, each vertex attempts to create six other vertices at a distance d=h from itself. For smoother size transitions, d can instead be an average between the local mesh size at the parent vertex and the local mesh size at the prospective vertex.
Volume meshing: Yamakawa-Shimada’s algorithm and finite element conformity
This section briefly describes Yamakawa-Shimada’s recombination algorithm. It then discusses the problem of finite element conformity in the case of mixed hex meshes.
Yamakawa-Shimada’s algorithm begins by iterating through the tetrahedra of the initial mesh. For each tetrahedron, it attempts to find neighboring tetrahedra with which to construct a hexahedron. Five, six or seven tetrahedra are required to construct one hexahedron. Three patterns of assembly are considered. Two out of these three patterns are described in [9]. When a potential hexahedron is found, it is added to an array. However, the hexahedron will not necessarily be part of the final mesh. Once all tetrahedra have been visited, the array is sorted by hex quality.
The quality Q is defined as follows:
where i is the vertex number. For a hexahedron, i goes from 1 to 8; vi 1, vi 2 and vi 3 are the three vectors parallel to the three edges connected to vertex i. Q is in fact the modulus of the minimum scaled Jacobian [9]. Evidently, Q is meaningless for invalid hexahedra. Invalid hexahedra are characterized by a null or negative Jacobian determinant, which renders the mesh improper for calculations.
Starting from the highest quality hexahedron, the algorithm then iterates through the array. Potential hexahedra composed of tetrahedra not yet marked for deletion are added to the mesh. The tetrahedra of the added hexahedron are then marked for deletion. It is to be noted that only a small fraction of potential hexahedra appear in the final mesh.
Prisms can later be added by following a similar procedure [9]. All prisms are composed of three tetrahedra. There is only one pattern of construction for prisms [9].
Figure 14 shows a mixed mesh created with Yamakawa-Shimada’s algorithm.
Let’s assume that finite elements of the first order are employed. The tetrahedral shape functions are therefore linear, while the hexahedral shape functions are trilinear [37]. On triangular faces, the interpolation is linear and takes into account three degrees of liberty. On quadrilateral faces, the interpolation is bilinear and takes into account four degrees of liberty [8, 9]. If a nonplanar quadrilateral face is adjacent to a triangular face, there will be a gap or overlap [9]. The elements are not going to be a perfect partition of the domain anymore, which goes against the basic assumptions of the finite element method. Gaps or overlaps can also be created by several configurations of neighboring hexahedra or prisms. Figures 15 and 16 show four cases of non-conformities between hexahedra [9].
Figures 17 and 18 show six cases of non-conformities between one hexahedron and one prism. Non-conformities resulting from neighboring prisms can be deduced from these six cases.
Yamakawa-Shimada’s algorithm should therefore avoid creating the configurations illustrated on Figures 15, 16, 17 and 18 while iterating through the sorted arrays of potential hexahedra and prisms. Non-conformities can be efficiently identified by employing hashing techniques.
After the creation of hexahedra and prisms, some tetrahedra are recombined into pyramids. Every pair of tetrahedra resting on a quadrilateral face is merged to form a pyramid. This step can fix many non-conformities. However, it does not resolve them all. As shown on Figure 19, many quadrilateral faces can still be adjacent to triangular faces belonging to either tetrahedra or pyramids.
These non-conformities can be fixed by Owen-Canann-Saigal’s algorithm [38]. Owen-Canann-Saigal’s algorithm first creates a flat pyramid on each non-conformal quadrilateral face. The apex of the pyramid is not initially present in the mesh, but it is added by the algorithm. Surrounding tetrahedra and pyramids need to be subdivided to accommodate this new vertex. The pyramid is then raised so it does not have a null volume. Figure 20 illustrates the pyramid constructed to correct the non-conformity on Figure 19.
Owen-Canann-Saigal’s algorithm can render a mixed hexahedral mesh completely conformal. However, it has a drawback. It increases the number of tetrahedra and pyramids, which lowers the percentage of hexahedra by number. As a consequence, Owen-Canann-Saigal’s algorithm was not used for the results presented below.
Some quadrilateral faces will be adjacent to one or two triangles. Finite element solvers capable of handling these type of non-conformities are required.
Results and discussion
This section presents several mixed hex meshes created with the frontal algorithm and Yamakawa-Shimada’s algorithm. Three quantities are used to evaluate the quality of the meshes: the percentage of hexahedra by number H nbr , the percentage of hexahedra by volume H vol and the average hex quality Q defined in Eq. 8. In general, H vol is higher than H nbr . CPU designates the total execution time (in s) on a 2010 laptop computer. All the data is compiled in Table 1. The following convention is used throughout this section: the hexahedra are white, the prisms are yellow, the pyramids are red and the tetrahedra are blue. The variable NC represents the percentage of non-conformal interior quadrilateral faces.
Figure 21 shows a mesh containing 142,466 elements. The mesh size is constant throughout the domain. The CAD model is composed of 250 geometrical faces of various sizes. In order to avoid altering the geometrical edges, hexahedra or prisms whose facets lie on two different geometrical faces are not created.
Each module described in this article shares a certain percentage of the total execution time. These percentages are detailed in Figure 22. The mesh illustrated on Figure 21 was used for the analysis. The blue modules refer to tetrahedra recombination. They are the most time-consuming. The green and yellow modules pertain to volume and surface mesh vertices generation.
In Figure 23, a rectangular parallelepiped surrounding a NACA airfoil is meshed with 43,094 elements. Figures 24 and 25 are zoomed images of Figure 23.
Figure 26 is a cutaway view of the mixed mesh inside a cylinder. The mesh size is constant and the cardinal directions are radial.
Choosing a size field consistent with the geometry can improve the hexahedra percentage. For the spherical model shown on Figures 27 and 28, a mesh size proportional to the radius is more suitable than a constant one.
A mixed hexahedral mesh of a cylinder is displayed on Figure 29. However, this time the front was initiated only from the lower and upper disks, not from the curved face. In other words, the vertices on the curved face were not allowed to create prospective vertices. The mesh has the following statistics: H nbr = 81.88%, H vol = 91.44% and Q = 0.97. Because of the regularity of the curved face mesh, the hexahedra percentages are much higher than those of the previous cylinder.
Figures 30 and 31 show a mixed hexahedral mesh of the anc101 mechanical part. The mesh was generated in 194 seconds and contains 92,282 elements. It has a H nbr of 59.39%. The anc101 part was designed by Computer Aided Manufacturing Inc. [39] and is commonly used in mesh generation literature, in particular in Lévy and Liu’s article. For approximately the same mesh size, they obtain a H nbr of 77.14% and an execution time of 12 minutes. Pyramid recombination was not employed in both case.
A mesh convergence analysis was performed on the mechanical piece displayed on Figure 32. The mechanical piece is made of steel and one of its extremities is fixed. The first and second frequencies are computed, as shown on Table 2. Mixed hexahedral meshes of various densities are employed. According to a similar finite element calculation performed on a structured mesh, the first frequency is equal to 757.76 Hz and the second one is equal to 1921.93 Hz. The results appear to converge.
Figures 33, 34, 35 and 36 present additional examples of mixed hexahedral meshes. Figures 37, 38, 39 and 40 show cutaway views of these meshes. Table 3 contains the corresponding mesh data. The CAD models of these meshes come from an online repository [40–42].
A frequency-domain computational acoustic simulation was performed on the submarine model SUB of Table 3, under plane wave incidence. Figure 41 shows a cutaway view of the iso-surfaces of the diffracted pressure field. Again, the simulations were shown to converge with mesh refinement.
Surfaces and volumes are meshed sequentially. The two surface meshes bounding a thin region may also not be identical. As a consequence, many non-hexahedral elements can be created. The algorithm is usually less effective for geometrical models featuring many thin regions.
Conclusion
A method capable of generating mixed hexahedral meshes has been presented. The first step consists of covering geometrical boundaries with aligned vertices using a frontal process. The interior is treated in a similar fashion. Vertices creation are guided by a direction field and a size field. The interior vertices are eventually tetrahedralized with a Delaunay procedure. All tetrahedra combinations yielding hexahedra are identified. They are sorted by quality and the highest quality hexahedra are created first. The same approach is applied to prisms. The final mesh contains hexahedra, prisms, pyramids and remaining tetrahedra.
The method has obvious drawbacks. First, there are no guarantees regarding the hexahedra percentage. It can be higher for certain geometries and lower for others. Secondly, the hexahedra are not anisotropic. For many geometries, well chosen anisotropy could increase the number of hexahedra. Finally, the resulting meshes are useful only to solvers capable of handling a certain number of non-conformal faces.
References
Benzley SE, Perry E, Merkley K, Clark B, Sjaardema G: A comparison of all hexagonal and all tetrahedral finite element meshes for elastic and elasto-plastic analysis. In Proceedings of the 4th International Meshing Roundtable. Edited by: Tautges T. Albuquerque: Sandia National Laboratories; 1995.
Puso MA, Solberg J: A stabilized nodally integrated tetrahedral. Int J Numer Meth Eng 2006, 67: 841–867. 10.1002/nme.1651
Ito Y, Nakahashi K: Improvements in the reliability and quality of unstructured hybrid mesh generation. Int J Numer Meth Fl 2004, 45: 79–108. 10.1002/fld.669
Pirzadeh S: Three-dimensional unstructured viscous grids by the advancing-layers method. AIAA J 1996, 34: 43–49. 10.2514/3.13019
Kallinderis Y, Ward S: Prismatic grid generation for three-dimensional complex geometries. AIAA J 1993,31(10):1850–1856. 10.2514/3.11858
Shepherd JF, Johnson CR: Hexahedral Mesh Generation Constraints. Eng Comput 2008, 24: 195–213. . https://dl.acm.org/citation.cfm%3Fid=1394234 . 10.1007/s00366-008-0091-4
Meyers RJ, Tautges TJ, Tuchinsky PM: The ‘Hex-Tet’hex-dominant meshing algorithm as implemented in CUBIT. In Proceedings of the 7th international meshing roundtable. Edited by: Freitag L. Dearborn: Sandia National Laboratories; 1998:151–158.
Dewhirst DL, Grinsell PM, Tucker JR, Mahajan A: Joining tetrahedra to hexahedra. In Proceedings of MSC World Users’ Conference. Arlington: MSC Software; 1993. . http://web.mscsoftware.com/support/library/conf/wuc93/p04593.pdf .
Yamakawa S, Shimada K: Fully-automated hex-dominant mesh generation with directionality control via packing rectangular solid cells. Int J Numer Meth Eng 2003, 57: 2099–2129. 10.1002/nme.754
Shewchuk JR: Tetrahedral mesh generation by Delaunay refinement. In Proceedings of the fourteenth annual symposium on Computational geometry. Minneapolis: ACM; 1998:86–95.
Geuzaine C, Remacle JF: Gmsh: a three-dimensional finite element mesh generator with built-in pre- and post-processing facilities. Int J Numer Meth Eng 2009, 79: 1309–1331. 10.1002/nme.2579
Schneiders R, Schindler R, Weiler F: Octree-based Generation of Hexahedral Element Meshes. In Proceedings of the 5th International Meshing Roundtable. Pittsburgh: Sandia National Laboratories; 1996.
Ito Y, Shih AM, Soni BK: Octree-based reasonable-quality hexahedral mesh generation using a new set of refinement templates. Int J Numer Meth Eng 2008, 77: 1809–1833.
Maréchal L: Advances in Octree-Based All-Hexahedral Mesh Generation: Handling Sharp Features. In Proceedings of the 18th International Meshing Roundtable. Edited by: Clark BW. Salt Lake City: Springer; 2009.
Blacker TD: Meeting the Challenge for Automated Conformal Hexahedral Meshing. In Proceedings of the 9th International Meshing Roundtable. Edited by: Owen S. New Orleans: Sandia National Laboratories; 2000.
Huang J, Tong Y, Wei H, Bao H: Boundary aligned smooth 3D cross-frame field. In Proceedings of ACM SIGGRAPH Asia. Edited by: Bala K. Hong Kong: Association for Computing Machinery; 2011:2011–2011.
Li Y, Liu Y, Xu W, Wang W, Guo B: All-hex meshing using singularity-restricted field. In Proceedings of ACM SIGGRAPH Asia. Edited by: Sloan P. Singapore: Association for Computing Machinery; 2012:2012–2012.
Huang J, Jiang T, Wang Y, Tong Y, Bao H: Automatic Frame Field Guided Hexahedral Mesh Generation. 2012.http://www.cad.zju.edu.cn/home/hj/12/hex/techreport/hex-techreport.pdf Tech. rep., Zhejiang University. .
Nieser M, Reitebuch U, Polthier K: CubeCover - parameterization of 3D volumes. Comput Graph Forum 2011, 30: 1397–1406. 10.1111/j.1467-8659.2011.02014.x
Kowalski N, Ledoux F, Frey P: A PDE Based Approach to, Multidomain Partitioning and Quadrilateral Meshing. In Proceedings of the 21th International Meshing Roundtable. Edited by: Jiao X, Weill J. San Jose: Springer; 2012.
Gregson J, Sheffer A, Zhang E: All-Hex mesh generation via volumetric polyCube deformation. Comput Graph Forum 2011, 30: 1407–1416. 10.1111/j.1467-8659.2011.02015.x
Meshkat S, Talmor D: Generating a mixed mesh of hexahedra, pentahedra and tetrahedra from an underlying tetrahedral mesh. Int J Numer Meth Eng 2000, 49: 17–30. 10.1002/1097-0207(20000910/20)49:1/2<17::AID-NME920>3.0.CO;2-U
Du Q, Faber V, Gunzburger M: Centroidal Voronoi Tessellations: Applications and Algorithms. Siam Rev 1999, 41: 637–676. 10.1137/S0036144599352836
Lévy B, Liu Y: L p Centroidal Voronoi Tessellation and its Applications. In Proceedings of ACM SIGGRAPH 2010. Edited by: Hoppe H. Los Angeles: Association for Computing Machinery; 2010.
Ray N, Vallet B, Li WC, Lévy B: N-Symmetry direction field design. ACM T Graph 2008, 27: 1–25.
Guttman A: R-Trees: A Dynamic Index Structure for Spatial Searching. In ACM Special Interest Group on Management of Data. Boston: Association for Computing Machinery; 1984:47–57.
Douglas G, Green M, Guttman A, Stonebraker M: R-trees: a dynamic index structure for spatial searching. 2004.http://www.superliminal.com/sources/RTreeTemplate.zip .
Vyas V, Shimada K: Tensor-Guided Hex-Dominant Mesh Generation with Targeted All-Hex Regions. In Proceedings of the 18th International Meshing Roundtable. Edited by: Clark BW. Salt Lake City: Springer; 2009.
Remacle JF, Geuzaine C, Compère G, Marchandise E: High quality surface meshing using harmonic maps. Int J Numer Meth Eng 2010, 83: 403–425.
Marchandise E, de Wiart CC, Vos WG, Geuzaine C, Remacle JF: High-quality surface remeshing using harmonic maps-Part II: Surfaces with high genus and of large aspect ratio. Int J Numer Meth Eng 2011, 86: 1303–1321. 10.1002/nme.3099
Marchandise E: Remacle JF. Eng Comput 2013. doi:10.1007/s00366–012–0309–3 doi:10.1007/s00366-012-0309-3
Remacle JF, Henrotte F, Baudouin TC, Geuzaine C, Béchet E, Mouton T, Marchandise E: A Frontal Delaunay quad mesh generator using the L∞ norm. In Proceedings of the 20th International Meshing Roundtable. Edited by: Quadros W. Paris: Springer; 2011.
Mount DM, Arya S: ANN: A library for approximate nearest neighbor searching. In CGC Workshop on Computational Geometry. Durham: The Center for Geometric Computing; 1997:33–40.
Remacle JF, Lambrechts J, Seny B, Marchandise E, Johnen A, Geuzaine C: Blossom-Quad: a non-uniform quadrilateral mesh generator using a minimum cost perfect matching algorithm. Int J Numer Meth Eng 2012, 89: 1102–1119. 10.1002/nme.3279
Si H: TetGen: A Quality Tetrahedral Mesh Generator and Three-Dimensional Delaunay Triangulator. 2006.http://tetgen.berlios.de/files/tetgen-manual.pdf
Baudouin TC, Remacle JF, Marchandise E, Lambrechts J, Henrotte F: Lloyd’s energy minimization in the L p norm for quadrilateral mesh generation. Eng Comput 2012. DOI:10.1007/s00366–012–0290-x DOI:10.1007/s00366-012-0290-x
Fortin A, Garon A: Les Eléments finis : de la théorie à la pratique. 2014.http://giref.ulaval.ca/files/afortin/Publications/elements_finis.pdf .
Owen SJ, Canann SA, Saigal S: Pyramid Elements for Maintaining Tetrahedra to Hexahedra Conformability. In ASME Trends in Unstructured Mesh Generation. Edited by: Canann S, Saigal S. Evanston: American Society of Mechanical Engineers; 1997:123–129.
Agoston MK: Computer Graphics and Geometric Modeling. USA: Springer-Verlag; 2005.
Rieling R: Yamaha XTZ-125. 2013.http://grabcad.com/library/yamaha-xtz-125 .
5 Bladed Propeller 2011.http://grabcad.com/library/5-bladed-propeller .
Hall C: CV HP1. 2013.http://grabcad.com/library/cv-hp1 .
Acknowledgements
This work has been partially supported by the Belgian Walloon Region under WIST grants ONELAB 1017086 and DOMHEX 1017074. The authors wish to thank Gaëtan Compère for the mesh convergence analysis and Jonathan Lambrechts for suggesting the use of R-trees. The authors also appreciate the reviewers’ efforts and suggestions.
Author information
Authors and Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Authors’ contributions
TCB worked on the algorithms and drafted some parts of the manuscript. JFR, EM and FH worked on the algorithms, drafted some parts of the manuscript and carried out detailed revisions. CG performed acoustic finite element analyses with hex-dominant meshes and carried out detailed revisions of the manuscript. All authors read and approved the final manuscript.
Authors’ original submitted files for images
Below are the links to the authors’ original submitted files for images.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
About this article
Cite this article
Baudouin, T.C., Remacle, JF., Marchandise, E. et al. A frontal approach to hex-dominant mesh generation. Adv. Model. and Simul. in Eng. Sci. 1, 8 (2014). https://doi.org/10.1186/2213-7467-1-8
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/2213-7467-1-8