Hybrid grid generation for viscous flow simulations in complex geometries

Hongfei Ye
Center for Engineering and Scientific Computation
Zhejiang University
310027HangzhouChina

Yang Liu
China Aerodynamics Research and Development Center
621000MianyangChina

Bo Chen
China Aerodynamics Research and Development Center
621000MianyangChina

Zhiwei Liu
Center for Engineering and Scientific Computation
Zhejiang University
310027HangzhouChina

Jianjing Zheng
Center for Engineering and Scientific Computation
Zhejiang University
310027HangzhouChina

Yufei Pang
China Aerodynamics Research and Development Center
621000MianyangChina

Jianjun Chen email@example.com†
Center for Engineering and Scientific Computation
Zhejiang University
310027HangzhouChina

Bo Chen
Jianjun Chen
Hybrid grid generation for viscous flow simulations in complex geometries
10.1186/s42774-020-00042-xR E S E A R C H Open Access * Correspondence: contributed equally to this work and should be considered co-corresponding authors. Full list of author information is available at the end of the articleMesh generationHybrid meshMesh qualityViscous flow
In this paper, we present a hybrid grid generation approach for viscous flow simulations by marching a surface triangulation on viscous walls along certain directions. Focuses are on the computing strategies used to determine the marching directions and distances since these strategies determine the quality of the resulting elements and the reliability of the meshing procedure to a large extent. With respect to marching directions, three strategies featured with different levels of efficiencies and robustness performance are combined to compute the initial normals at front nodes to balance the trade-off between efficiency and robustness. A novel weighted strategy is used in the normal smoothing scheme, which evidently reduces the possibility of early stop of front generation at complex corners. With respect to marching distances, the distance settings at concave and/or convex corners are locally adjusted to smooth the front shape at first; a further adjustment is then conducted for front nodes in the neighbourhood of gaps between opposite viscous boundaries. These efforts, plus other special treatments such as multi-normal generation and fast detection of local/global intersection, as a whole enable the setup of a hybrid mesher that could generate qualitied viscous grids for geometries with industry-level complexities.

Introduction

For RANS computations involving complex geometries, a challenging task is the generation of high-quality RANS meshes. Among the different mesh types, prismatic hybrid meshes are preferred in many applications because they represent a good compromise between solution accuracy and ease of use [1][2][3][4]. In a prismatic hybrid mesh, the near field of viscous walls (referred to as a boundary layer hereafter) is configured with layered prismatic elements to resolve high flow gradients normal to the walls, whereas the remaining domain is usually filled with an unstructured mesh. Thus, the generation of a hybrid prismatic mesh usually consists of two individual meshing steps: boundary layer mesh generation and unstructured mesh generation.

In general, the generation of boundary layer elements starts from the surface triangulation on viscous walls. The initial front is defined on this triangulation, and a marching direction is computed at each mesh point of the front. Each front point is then propagated to a new position by adding a step value along the marching directions. As a result, a layer of prismatic elements can be formed by connecting all the front points with their new neighbours. The entire boundary layer mesh could then be created by repeating the above procedure a few times [2][3][4][5][6][7]. With respect to the generation of unstructured meshes, either the advancing front technique (AFT) based approach [8] or the Delaunay triangulation (DT) based approach [9][10][11] could be adopted. In some studies, it has been suggested to first fill an axis-aligned Cartesian mesh in the far field of viscous walls and then connect the boundary layer mesh and the Cartesian mesh with a few transition layers of unstructured elements [12][13][14][15].

Compared with the now mature unstructured mesh generation and Cartesian mesh generation, the generation of boundary layer meshes still gives rise to numerous difficulties and is therefore the main challenge in generating the entire prismatic hybrid mesh. Among those difficulties, those induced by the computations of marching directions and marching distances should be highlighted because both computations determine the quality of the resulting elements and the reliability of the meshing procedure to a large extent. A large portion of the efforts involved in the development of a prismatic hybrid mesher were invested in tackling these issues [16][17][18][19][20][21][22].

In principle, a practically useful hybrid mesh generation scheme should take the quality of the resulting elements and the reliability of the meshing procedure as the primary consideration. Following this principle, we proposed several novel computing strategies for marching directions and marching distances. With respect to the computation of marching directions, three strategies featured with different levels of efficiencies and robustness performance are combined to compute the initial normals at front nodes to balance the trade-off between efficiency and robustness. After that, an improved smoothing scheme is proposed for these normals to avoid the abrupt changes on lengths of neighbouring front lines. As a result, this smoothing could evidently reduce the possibility of early stop of front generation at complex corners. With respect to the computation of marching distances, the initial marching distances are computed by the user-specified parameters, followed by a two-step adjustment: the distance settings at concave and/or convex corners are locally adjusted to smooth the front shape at first; a further adjustment is then conducted for front nodes in the neighbourhood of gaps between opposite viscous boundaries. To support the second-step adjustment, an improved ray-casting algorithm is developed for the automatic identification of the gaps. In the meantime, the cost of this computation is reduced to a very low level with the aid of a background mesh.

In addition to the above novel strategies, other special treatments are developed to improve the robustness and efficiency of the hybrid meshing procedure, multi-normal generation, fast detection of intersections between front faces, remove of non-manifold fronts, to name a few. These efforts, as a whole, enable the setup of a hybrid mesher that could generate qualitied viscous grids for geometries with industry-level complexities. Numerical experiments are conducted including comparison with results by stateof-the-art commercial tools to verify the effectiveness and efficiency of the mesher.

The remainder of this paper is organized as follows. Section 2 reviews the existing computing strategies of marching directions and distances briefly. Section 3 presents an outline of the hybrid meshing method. Section 4 introduces important implementation details involved in the hybrid meshing method. Section 5 presents various numerical experiments. Section 6 concludes with the outcomes of the study and points out some directions for future studies.

On computation of marching directions

Presently, the most prevailing approaches for computing marching directions are those based on the analysis of the manifold of a point [16][17][18][19][20]23]. The manifold of a point here refers to the set of front faces adjacent to the point, and these front faces are thus named manifold faces of that point. Intuitively, the marching direction at a point could be obtained by computing a weighted average of the normal vectors of its front faces. However, this intuitive computation strategy cannot ensure the resulting marching direction is always visible to all the manifold faces. As a remedy, Kallinderis and Ward [23] presented the visibility cone concept, which refers to a subset of the space depicted by the manifold of the point. To ensure the mesh validity, the computed marching direction must be located within the visibility cone. Based on the visibility cone concept, Aubry and Löhner [16,17] recast the problem of computing a marching direction into an optimization problem. The solution of that problem could result in the 'best' marching direction at a point by providing an optimal angle property for the next layer of elements that meet at that direction. Nevertheless, it was reported that if the marching direction at each point of a front face was computed in a locally optimal fashion [19,20], it still might not be optimal for the prism carried by the face. Therefore, some kind of global smoothing must be performed after the initial computation of the marching directions. To improve the effect, a front node classification procedure is required before the execution of such smoothing techniques such that the marching directions defined at different types of front nodes could be treated differently. It is worth noting that the results of this node classification procedure are very sensitive to the userspecified angle thresholds [19,20]. There also exist some other approaches for computing marching directions. For example, in the face offsetting method proposed by Jiao [21], faces are directly propagated along their normals and the vertices are then reconstructed through an eigenvalue analysis locally, and good resulting boundary layer meshes are presented [22] for several biomedical models based on this method.

Recently, a few new techniques that rely on the solution of a partial differential equation (PDE) have been investigated for boundary layer mesh generation [1,14,[24][25][26][27]. Accordingly, the computation of marching directions is defined in the solution space of the adopted governing equation rather than in the geometric space. For example, the marching direction at a point could be defined as the gradient vector of the solution at that point [25]. At present, a frequently adopted governing equation is the Eikonal equation, and the adopted numerical schemes for the solution include the fastmarching method [25,28], fast sweeping method [29], the finite element method and the finite difference method. To harness these numerical schemes, an additional volume background mesh is always created [24][25][26][27]. Recently, the Laplacian equation has been chosen as the governing PDE but changed from the scalar function to a vector one [1]. Mathematically speaking, the solution of this vector form Laplacian equation could smoothly propagate the marching vectors defined at initial fronts into the domain interior. Meanwhile, the authors suggest the boundary element method (BEM) be adopted as the numerical scheme of the governing equation due to two advantages of the BEM over other numerical schemes. Firstly, the result of BEM is computed by boundary integration equations rather than by interpolations; therefore, the computed directions are more accurate. Secondly, the BEM only needs a surface mesh input rather than a volume counterpart.

In comparison with conventional approaches based on local geometric computations, the PDE based approaches provide a new global angle to view the front propagation problem. However, the present PDE-based approaches have some common issues as well. For example, these approaches are usually much slower. Moreover, it remains a challenging issue on how to combine these approaches with multi-normal generation schemes.

On computation of marching distances

The default marching distance at a front node could be computed by user-specified parameters. This default value leads to viscous elements with the same lateral edge lengths at each layer. For viscous walls having complex corners and/or small gaps, local adjustment is necessary to avoid intersections of front lines and generation of lowquality elements. Most existing algorithms support increasing marching distances slightly at concave corners and vice versa at convex corners in order to smear concave and convex corners and facilitate the marching process. The computation of local curvatures or angle values, based on either the discrete manifold or the original CAD model, is commonly used to determine local marching distances [1,3,20]. Nevertheless, for some PDE-based approaches [1], the solution of PDEs could support a correct adjustment of local marching distance as above. In this case, no local geometric computation is needed any more.

In the neighbourhood of small gaps, reducing marching distances appropriately is an option to avoid global intersection of viscous elements propagated from opposite viscous walls. Here, the main issue is efficient computation of gap distances. Normally, an extra data structure (e.g. quadtree in two-dimensional and octree in three dimensional) is required. In [20], an approach relying on constrained DT is suggested.

The local adjustment of marching distances may lead to an abrupt change of marching distances at neighbouring front nodes. If this issue happens, Laplacian-type smoothing strategies are usually suggested to resolve it.

The more challenging issue is to adapt the mesh to flow solutions or boundary movements. Since this issue is not involved in this study, the discussion is beyond the scope of this paper. Interested readers are referred to [30,31].

3 Outline of the hybrid meshing method Figure 1 presents the main steps included in our hybrid meshing method. Given a valid CAD model, the proposed method mainly takes the following steps to output a hybrid mesh.

Step 1. Apply the approach proposed in [32] to compute a sizing function for surface mesh generation and define boundary conditions on surface patches of the model.

Step 2. Given the input model and the sizing function, create a surface triangulation by an in-house advancing front mesher [33].

Step 3. The viscous layer meshing step needs three user parameters that indicate the height of the first layer h 0 , the expansion ratio of neighbouring layers μ and the allowed maximum number of layers n l , respectively. According to these parameters, we can compute the marching distance at each front node. In addition, the marching direction at each front node can be computed by analyzing the manifold of the node. Once the marching directions and marching distances are determined at all the front nodes, a layer of prismatic elements can then be created by connecting the front nodes and their duals after propagating the front. Repeating this front propagation procedure for at most n l times, we can then create semi-structured prismatic elements in the vicinity of the viscous walls.

Step 4. If a symmetry plane is defined on the domain boundary, layered quadrilateral elements should be created in the vicinity of the common curves of the symmetry plane and viscous walls after Step 3. Therefore, the surface mesh of the symmetry plane, which is initially composed of triangular elements only, needs to be updated to accommodate these quadrilateral elements.

Step 5. We can then collect the surface triangles that depict the remaining unmeshed volume region. These triangles include those located at the boundaries with the non-viscous wall types and those depicting the outmost boundary of the boundary layer elements. With these surface triangles as the input, we finally employ an in-house mesher to fill the unstructured tetrahedra in the domain enclosed by the input surface triangles [10,11]. A feature of the employed mesher is its robust capability to create a boundary constrained tetrahedral mesh. This feature is a key for the success of this step, where a point-to-point conformity is required between the unstructured tetrahedra and boundary layer elements. The above discussion only sketches the main steps in our method. Nevertheless, to be concise, this discussion does not include a few non-trivial techniques incorporated in our method. These techniques are necessary to improve our method for application to real problems. In Sections 4 to 6, we will discuss the important technical details involved in the three steps, respectively, with a particular focus on Step 3.

Boundary layer mesh generation

Outline of the method

The right part of Fig. 1 presents the workflow of our boundary layer mesh generation method. The inputs include the surface triangulation of the domain boundary and some user parameters (such as h 0 , μ and n l ). A list of front faces L f and a list of front nodes L n are maintained during the entire workflow. Accordingly, flags are attached to the active front nodes and faces to distinguish them from others.

Initially, L f and L n are filled in with those input surface elements and surface nodes located on the viscous walls, respectively. After that, four steps are consecutively followed to create the boundary layer mesh: (1) computing marching directions, (2) computing marching distances, (3) creating a layer of elements and (4) updating L f and L n . To ensure the reliability of the algorithm and the validity and usability of the output mesh, the intermediate outputs of the former three steps are checked carefully.

In the following subsections, we will present the algorithmic details of the four main steps.

Computing marching directions

The computation of marching directions is based on the classification of front nodes. A front node is labelled as flat if the maximal angle is smaller than 5 degrees between any two normals of the faces connected to the node. For those unlabelled nodes, a further classification is conducted by computing the average of angles between neighbour face normals. Here, the average angle is denoted by β, and approximately, front nodes are classified as concave or convex ones by their β values.

For flat nodes, its marching direction is computed by a simple average of all neighbouring normals. For other nodes, three strategies are combined to set up a costeffective scheme for marching direction computation:

Strategy I. Compute the normals of faces connected to a given front node and classify them into groups such that the number of groups is as small as possible under the condition that the maximal angle is smaller than 25 degrees between any two normals belonging to the same group. For each group, a representative normal is computed by averaging all normals belonging to the group. The normal at the front node is exactly the average of all representative normals. Strategy II. Compute the marching vector lying on the bisection plane of the two faces on the manifold forming the wedge with the smallest angle. The location of the marching vector on that plane is evaluated by bisecting the visibility region on that plane [6]. As is shown in Fig. 2, the visibility region is represented by a polyhedral cone extending outward from the point, and it can be simplified into a visibility cone with the circular cross section and half-cone angle, which can also be called the visibility angle β i . Strategy III. This is an iterative algorithm aimed at finding the 'most normal' normal,

i.e., the normal that minimizes the maximal angle with the given set of normals [16]. Weights are given to each face normal depending on the angle created with the current normal. If the angle is high, more weight is given to the normal. See [16] for a pseudo code of this implementation.

To balance the trade-off between efficiency and robustness, the above strategies are conducted in the order listed above. The quality of the normal at the front node is evaluated by the maximal angle between the normal and normals of manifold faces. A hillclimbing scheme is used to ensure the optimal normal is kept always. Meanwhile, the next level of strategy gets no opportunity in order to save computing time when the quality of the present 'optimal' normal is less than 30 degrees.

After computing the initial marching directions, a further smooth is executed to ensure a desirable variation across the front and facilitate the following marching process. Here, the smooth is performed by a weighted Laplacian approach, i.e.,
N n i ¼ 1 − ω ð ÞN n − 1 i þ ω P j w ij X j w ij À Á N n − 1 j ;ð1Þ
where N n − 1 i and N n i are normals at front node p i after n and n-1 iterations, N n − 1 j is the normal at neighbouring front node p j after n-1 iterations, and w ij is the weight defined at p j . Note that it is beneficial to let normals at convex corners be closer to their neighbours, and vice versa for concave corners. To achieve this, n ij is defined as below,
w ij ¼ k 2 ij p i is a convex point 1=k 2 ij p i is a concave point 1 otherwise 8 < : ;ð2Þ
where k ij ¼ n d ij P j¼1;n d ij and d ij is the distance between p i and p j . There are cases where one single normal could not ensure the validity of visibility cone. A multi-normal strategy is adopted in these cases. Interested readers are referred to [33] for more details.

To ensure the validity of the computed marching directions, for each marching direction, we check whether it is visible to all the front faces adjacent to the front nodes. If no valid marching direction can be defined at a front node, we stop propagating the front node and clear the 'front' flag attached to that node. Figure 3 presents the computed marching directions in the neighbourhood of two typical corners. It can be seen that the computed directions are reasonable and no abrupt changes occur between neighbouring marching directions. Fig. 2 The visibility region and its subset (a cone region) at a front node

Computing marching distances

Suppose p i is a front node, u i is the marching direction at p i , and m is the present layer number. The marching distance at p i can be computed by
h i ¼ μ m − 1 h 0 :ð3Þ
If simply applying the above Equation in all front nodes, the computed marching sizes would be the same. As a result, the front will conduct a so-called advective motion at expansion. As illustrated in Fig. 4, wave-frontal motion may be more desirable than advective motion because it would smooth out convex or concave corners, whereas the advective motion would preserve them. To implement the effect of a wave-frontal motion, a coefficient α can be added such that the distances at the convex corners need to be shortened and the marching distances at the concave corners need to be lengthened.
h i ¼ αμ m − 1 h 0 ; ð4Þ where α ¼ 1 þ cosβ i β < 180°1 − cosβ i β ≥ 180°&
Another geometric factor that impacts the computation of marching distances is the gap between opposite viscous boundaries. Given a front node p i and a direction starting  from p i to domain interiors, a minimal distance between p i with viscous walls is computed first, denoted by d G i . Denote the total height of viscous boundary at p i by
l i ¼ X m¼1;n l αμ m − 1 h 0 :ð5Þ
If d G i > 2l i , no further modification is required on the marching distance at p i ; otherwise, the height of the first viscous layer at p i is computed by
h i;0 ¼ ε 1 Â d G i P m¼1;n l μ m − 1 ;ð6Þ
where ε 1 ∈ [0,0.5] is a user parameter that determines how large the space is left for unstructured elements (less is more).

Apparently, the computation of d G i should be speeded up with the aid of a spatial data structure. Here, we reuse the octree grid for speeding up front intersection checks to compute d G i . Algorithm 1 presents the setup procedure of this octree grid, and Algorithm 2 presents the computation of d G i based on the grid. In Algorithm 2, variable H i is a prediction of the local height of boundary layer elements enumerated from front node p i . Assuming h 0 is the height of the first layer, μ is the ratio of heights of neighbouring layers, m i is the possible layer number at p i , then
H i ¼ X m i 1 μ m − 1 h 0 :ð7Þ
Here, both h 0 and μ are specified by the user, and m i meets the equation as below under the requirement of stopping front propagation when the shapes of prisms are nearly isotropic:
S i ≈ μ m i − 1 h 0 :ð8Þ
Here S i is the average length of surface edges connecting to p i . By adding Eq. 8 to Eq. 7, we can finally get
H i ≈ S i μ − h 0 μ − 1 :ð9Þ
After executing Algorithm 2, a smoothing procedure is executed to avoid the abrupt changes of neighbouring marching directions. A simple Laplacian smoothing is presently employed.

Creating a layer of elements

For each front node qualified for propagation, we can compute its dual by marching it along the marching direction. After that, we can create a layer of prismatic elements by connecting all the front nodes qualified for propagation and their duals.

Low-quality elements may be created in this step, in particular in the vicinity of concave corners. In this study, we selected scaled aspect ratio [22] to evaluate the quality of a prism. This quality measure in effect combines the measures of triangle shapes and edge orthogonality. For a given prism τ, denote the scaled aspect ratio of this element by ρ(τ) (ρ(τ)∈[− 1,1]). ρ = 1 indicates an ideal prism, and ρ < 0 indicates an inverted element.

After creating a layer of elements, we pick those elements whose quality values are below 0.1 for removal. Meanwhile, we stop propagating the front faces that carry those elements.

Updating the front

The mesh nodes on viscous walls are regarded as the initial front nodes. Correspondingly, those fronts composed of the initial front nodes are regarded as the initial propagating fronts. As the propagation of nodes continues layer by layer, the propagating fronts are updated according to the propagating behaviour of their forming nodes. In this study, three stopping criteria are applied to each front node:

(1). The current layer number of the node is equal to the prescribed maximum number of boundary layers, i.e., i l = n l ; (2). At each node of a newly generated element e, the scaled aspect ratio (denoted by ρ(p) hereafter) [22] is computed, and the propagation will stop when ρ(p) < 0;

(3). The new front faces starting from the front node are involved in global intersections; (4). If one of the neighbouring nodes of the current node in the previous layer is set to stop propagating, then the propagation of that node is stopped.

Criterion 1 is straightforward and ensures the termination of the boundary layer mesh generation procedure. Criterion 2 avoids the generation of elements with negative signed volumes. Figure 5a presents a node p 1 with ρ(p 1 ) < 0, which leads to an inverted element. Criterion 3 is used to avoid global intersection. Criterion 4 is only executed for 3D cases and ensures the difference in the layer numbers of the neighbouring nodes does not exceed one. In 2D problems, the exposed segments after boundary layer mesh generation are sent to a triangular mesh generator, and the difference in the layer numbers of the neighbouring nodes will not affect the resulting mesh quality. However, in 3D problems, the exposed faces include triangles and quadrilaterals, and some transition elements should be added to hide the quadrilateral faces before the exposed faces are sent to a tetrahedral mesh generator. If the difference in the layer numbers of the neighbouring nodes is allowed to be larger than one, stretched pyramids will be added as the transition elements. Figure 5b presents the added transition elements for two different cases.

Let F be one of the current propagating fronts and p i (i = 0, 1, 2) be the forming nodes of that front. If p i (i = 0, 1, 2) is propagated to a new position, i.e., p ' i (i = 0, 1, 2), then F is propagated to F ′ , with p ' i as its forming nodes. In addition, F ′ will replace F as a new front in the next layer. However, if at least one node of p i (i = 0, 1, 2) is not allowed to propagate to the next layer, F will also be allowed to propagate to the next layer.

Unstructured mesh generation

If a symmetry plane is defined on the domain boundary, layered quadrilateral elements should have been created in the vicinity of the common curves of the symmetry plane and viscous walls after boundary layer mesh generation. To accommodate those quadrilateral elements, we first remove the original surface mesh of the symmetry plane, then obtain the boundary description of the unmeshed region of the symmetry plane, and finally mesh this region using an advancing front surface mesher [33].

We next employ an in-house DT mesher to fill the unstructured tetrahedra in the domain enclosed by the input surface. Note that the DT criterion provides a reasonable method to link a given point set; however, it cannot ensure the existence of boundary constraints in the resulting tetrahedralisation. A boundary recovery procedure is thus required to ensure the boundary integrity of the resulting mesh. For the hybrid meshing problem focused on in this study, one part of the surface input to the DT mesher is composed of the exposed faces of the boundary layer elements. Some of those faces could be rather stretched and thus lead to a more challenging task for the boundary recovery procedure. By incorporating a few novel techniques for boundary recovery [10,11], a feature of our in-house mesher is its capability to robustly create a boundary constrained tetrahedral mesh. This feature is a key for the success of the unstructured mesh generation step because point-to-point conformity is required between the unstructured tetrahedra and boundary layer elements.

DLR F6 aircraft model

The surface mesh of the F6 model is presented in Fig. 6a; it contains 14,866 nodes and 29,732 triangle elements. Many complex concave regions and corner nodes are involved in this model, e.g., a complex corner node at the tail of the engine and several concave regions near the joint of the engine and wing (see close-up views in Fig. 6a). In the process of boundary layer mesh generation, the surface mesh of the F6 model was set as the viscous wall boundary condition. Figure 10b presents a cut view of the hybrid mesh for exterior flow simulations, in which 689,281 prisms, 160,452 tetrahedron and 9441 pyramids are contained. A cut-out view of the boundary layer mesh and local mesh details around two complex corners are presented in Fig. 10b. As can be seen, a

Rocket model

To demonstrate that the proposed method could avoid global intersections by identifying small gaps and reducing marching distances locally, a rocket model is selected in which a few volume proximities exist between the main body and 9 boosters. This model contains 445 surface patches, on which 73,759 surface nodes and 147,470 triangles are generated. The resulting hybrid mesh contains 3,891,188 prisms, 520,245 tetrahedrons and 42,862 pyramids. Figure 7 presents the surface mesh and the close-up views for the color map of gap distances, in which regions with small gap distances are rendered in blue. As can be seen, the volume proximities between the main body and boosters are all correctly identified. Figure 8 presents two cut-out views of the hybrid mesh. Narrow gap can be clearly observed and the global intersection there is effectively avoided with the proposed method.

Space shuttle model

To demonstrate the proposed method for configurations with industry-level complexity, we chose to generate the hybrid mesh of a space shuttle model. This model contains 595 surface patches, on which 170,933 surface nodes and 341,846 triangles are generated. Note that this model contains abundant geometric details near the joints of different parts, the volume proximities between the main bodies  Figure 9 presents two cutout views of the hybrid mesh. Figure 10 presents close-up views of three local details of the hybrid mesh.

Mesh quality

Quality of prismatic elements is our major concern. To evaluate the quality of the generated prismatic elements, the scaled aspect ratio quality measure was first adopted in this study. In this study, inverted elements are not allowed, and we refer to elements with ρ(τ) < 0.2 as low-quality elements. The distributions of scaled aspect ratios of prismatic elements for the F6, rocket and space shuttle models are presented in Fig. 11. The ratio of low-quality elements accounts for 0.4%, 0.7%, 0.03% of the total numbers of prism elements for the three models, respectively. The equiangular skewness is another commonly used quality measure for various types of elements. For a prism, it is represented as the maximum ratio of the element faces' included angles to the angles of equilateral faces. Its value varies between 0 (good) and 1 (bad). It is recommended this skewness measure be kept below 0.8 for a good grid; values below 0.9 are acceptable, depending on the solver. Therefore, we refer to elements with skewness values larger than 0.9 as low-quality elements. Under this new standard, the ratio of low-quality elements accounts for 0.17%, 0.18%, 0.026% of the total numbers of prism elements for the three models, respectively.  Overall, the above data reveals that the boundary layer elements created by the proposed method have acceptable shape and quality.

Comparison with commercial tools

In most tests we conducted, the proposed method achieved the similar level of reliability and element quality as commercial mesh tools, such as Pointwise. However, it was also observed in some convex corners, the proposed method creates boundary layer elements with more desirable quality. Figure 12a presents the surface input used for comparison. With the same surface input and same user settings, we create two hybrid meshes by using the proposed method and Pointwise, respectively. Figure 12b and c enlarge the details of two meshers near the tail of the aircraft, in which a convex corner with a very small angle exists. Although the multi-normal technique was employed by Pointwise, the resulting boundary mesh by Pointwise stopped its propagation much earlier than its counterpart by our method.

In addition, we add two examples to compare the meshing results of our algorithm and Pointwise at sharp concave angles, as shown in Fig. 13. In the presented cases, our algorithm produces quite large boundary layers as expected, although Pointwise behaves better in terms that it provides larger boundary layers than our algorithm. More investigations reveal that Pointwise can tolerate prisms with very small quality values, while our algorithm choose to stop front propagation once such prisms are going to appear (considering the requirements of our in-house flow solver). It deserves further   Table 1 lists the timing statistics of our algorithm and Pointwise, plus a breakdown of time spent on different steps of our algorithm. All the tests are conducted on a personal computer (Frequency: 4GH; Memory: 32G), and the same settings of surface inputs and user parameters are applied for our algorithm and Pointwise in each group of the tests. The test results reveal that their timing performance is at the same level in general.

Concluding remarks

A prismatic hybrid mesh configured with layered prismatic elements in the near field of viscous walls and an unstructured mesh in the rest of the domain is preferred in many applications because it represents a good compromise between solution accuracy and ease of use. Several novel computing strategies for marching directions and marching distances are implemented by taking the quality of the resulting elements and the reliability of the meshing procedure as the primary consideration. These efforts enable the setup of a hybrid mesher that could generate qualitied viscous grids for geometries with industry-level complexities. Numerical experiments including academic cases, benchmark cases and cases from industry-level simulations are presented to verify its effectiveness and efficiency.

Fig. 1
1Flowchart of hybrid mesh generation

Fig. 3
3Marching directions in the neighbourhood of two different types of corners. (a) A concave corner. (b) A convex corner

Fig. 4
4Advection vs. wave-frontal propagation at expansion at a (a) convex corner and (b) concave corner

Fig. 5
5(a) An invalid element with ρ(p 1 ) < 0. (b) Transition elements in two different cases

Fig. 6
6The hybrid mesh of the F6 model: (a) The surface mesh; (b) Cut-out views of the hybrid mesh valid normal vector was obtained by the proposed method in both corners. If using the average normal vectors of the neighbouring surfaces, it was difficult to determine suitable normals here because the normal vectors of several faces around both corners are nearly in opposite directions.

Fig. 7
7The hybrid mesh of a rocket model: (a) The surface mesh; (b) Close-up views of the color map of gap distances (d G i ) Fig. 8 Cut-out views of the hybrid mesh of the rocket model of boosters and fuel tanks, etc. The resulting hybrid mesh contains 6,176,455 prisms, 2,111,679 tetrahedrons and 114,465 pyramids.

Fig. 9
9Cut-out views of the hybrid mesh of the space shuttle model: (a) Front view; (b) Side view

Fig. 10
10Local details of boundary layer meshes of the space shuttle aircraft. (a) Boundary layer meshes around the support between the plane and rocket; (b) Boundary layer meshes around the top view of rocket; (c) Boundary layer meshes around space shuttle tail

Fig. 11
11Quality histogram of prisms. (a) Scaled aspect ratio; (b) Equiangular skewness

Fig. 12
12Meshing results in the neighbourhood of one sharp convex corner. (a) Surface input. (b) Result by our algorithm. (c) Result by Pointwise studies to develop strategies that could increase the heights of boundary layer at the same time of maintaining the quality of boundary layer elements at a reasonable level.

Fig. 13
13Meshing results in the neighbourhood of two sharp concave angles. (a) Results by our algorithm. (b) Results by Pointwise

Table 1
1Timing statistics (unit: seconds) Model Boundary layer mesh generation Tetrahedral mesh generation Overall time Pointwise Normal Smoothing Front Intersection OthersDLR F6 5.85
18.58
6.51
1.19
32.15
28.82

Rocket 21.23
126.62
31.32 6.72
184.88
178.54

Space
shuttle

42.45
209.17
61.11 19.97
332.71
314.84

Total 69.53
354.37
98.94 27.88
549.74
522.20

AcknowledgementsThis research is funded by the National Numerical Wind Tunnel Project of China (Grant No. NNW2018-ZT5B10).Authors' contributionsThe research output comes from joint effort. All authors read and approved the final manuscript.Availability of data and materialsThe datasets used and/or analysed during the current study are available from the corresponding author upon reasonable requests.Competing interestsThe authors declare that they have no competing interests.Author details1
Novel methodology for viscous-layer meshing by the boundary-element method. Y Zheng, Z Xiao, J Chen, J Zhang, AIAA J. 56Zheng Y, Xiao Z, Chen J, Zhang J (2018) Novel methodology for viscous-layer meshing by the boundary-element method. AIAA J 56:209-221

Efficient hybrid surface and volume mesh generation for viscous flow simulations. Y Ito, M Murayama, K Yamamoto, AIAAIto Y, Murayama M, Yamamoto K (2011) Efficient hybrid surface and volume mesh generation for viscous flow simulations. AIAA paper 2011-3539

Hybrid prismatic/tetrahedral grid generation for viscous flow applications. D Sharov, K Nakahashi, AIAA J. 36Sharov D, Nakahashi K (1998) Hybrid prismatic/tetrahedral grid generation for viscous flow applications. AIAA J 36:157- 162

Unstructured tetrahedral mesh generation for three-dimensional viscous flows. O Hassan, K Morgan, E J Probert, J Peraire, Int J Numer Meth Eng. 39Hassan O, Morgan K, Probert EJ, Peraire J (1996) Unstructured tetrahedral mesh generation for three-dimensional viscous flows. Int J Numer Meth Eng 39:549-567

Efficient generation of high-quality unstructured surface and volume grids. D L Marcum, Eng Comput. 17Marcum DL (2001) Efficient generation of high-quality unstructured surface and volume grids. Eng Comput 17:211-233

Three-dimensional unstructured viscous grids by the advancing-layers method. S Pirzadeh, AIAA J. 34Pirzadeh S (1996) Three-dimensional unstructured viscous grids by the advancing-layers method. AIAA J 34:43-49

Boundary layer mesh generation for viscous flow simulations. R V Garimella, M S Shephard, Int J Numer Meth Eng. 49Garimella RV, Shephard MS (2000) Boundary layer mesh generation for viscous flow simulations. Int J Numer Meth Eng 49:193-218

Generation of three-dimensional unstructured grids by the advancing-front method. R Löhner, P Parikh, Int J Numer Meth Fluids. 8Löhner R, Parikh P (1988) Generation of three-dimensional unstructured grids by the advancing-front method. Int J Numer Meth Fluids 8:1135-1149

Computing dirichlet tessellations. A Bowyer, Comput J. 24Bowyer A (1981) Computing dirichlet tessellations. Comput J 24:162-166

Three-dimensional constrained boundary recovery with an enhanced Steiner point suppression procedure. J Chen, D Zhao, Z Huang, Y Zheng, S Gao, Comput Struct. 89Chen J, Zhao D, Huang Z, Zheng Y, Gao S (2011) Three-dimensional constrained boundary recovery with an enhanced Steiner point suppression procedure. Comput Struct 89:455-466

Improved boundary constrained tetrahedral mesh generation by shell transformation. J Chen, J Zheng, Y Zheng, H Si, O Hassan, K Morgan, Appl Math Model. 51Chen J, Zheng J, Zheng Y, Si H, Hassan O, Morgan K (2017) Improved boundary constrained tetrahedral mesh generation by shell transformation. Appl Math Model 51:764-790

A novel approach of three-dimensional hybrid grid methodology: part 1. Grid generation. Y Zheng, M S Liou, Comput Methods Appl Mech Eng. 192Zheng Y, Liou MS (2003) A novel approach of three-dimensional hybrid grid methodology: part 1. Grid generation. Comput Methods Appl Mech Eng 192:4147-4171

A novel approach of three-dimensional hybrid grid methodology: part 2. Flow solution. M S Liou, Y Zheng, Comput Methods Appl Mech Eng. 192Liou MS, Zheng Y (2003) A novel approach of three-dimensional hybrid grid methodology: part 2. Flow solution. Comput Methods Appl Mech Eng 192:4173-4193

Hybrid grid generation for viscous flow analysis. S Park, B Jeong, J G Lee, H Shin, Int J Numer Meth Fluids. 71Park S, Jeong B, Lee JG, Shin H (2013) Hybrid grid generation for viscous flow analysis. Int J Numer Meth Fluids 71:891- 909

A 3D hybrid grid generation technique and a multigrid/parallel algorithm based on anisotropic agglomeration approach. L Zhang, Z Zhao, X Chang, X He, Chin J Aeronaut. 26Zhang L, Zhao Z, Chang X, He X (2013) A 3D hybrid grid generation technique and a multigrid/parallel algorithm based on anisotropic agglomeration approach. Chin J Aeronaut 26:47-62

On the 'most normal'normal. R Aubry, R Löhner, Commun Numer Methods Eng. 24Aubry R, Löhner R (2008) On the 'most normal'normal. Commun Numer Methods Eng 24:1641-1652

On the 'most normal'normal-part 2. R Aubry, E L Mestreau, S Dey, B K Karamete, D Gayman, Finite Elem Anal Des. 97Aubry R, Mestreau EL, Dey S, Karamete BK, Gayman D (2015) On the 'most normal'normal-part 2. Finite Elem Anal Des 97:54-63

Robust boundary layer mesh generation. A Loseille, R Löhner, 10.1007/978-3-642-33573-021st international meshing roundtable. BerlinSpringer-VerlagLoseille A, Löhner R (2013) Robust boundary layer mesh generation. In: 21st international meshing roundtable. Springer- Verlag, Berlin, pp 457-474. https://doi.org/10.1007/978-3-642-33573-0

Multiple marching direction approach to generate high quality hybrid meshes. Y Ito, A M Shih, B K Soni, K Nakahashi, AIAA J. 45Ito Y, Shih AM, Soni BK, Nakahashi K (2007) Multiple marching direction approach to generate high quality hybrid meshes. AIAA J 45:162-167

Hybrid meshing using constrained delaunay triangulation for viscous flow simulations. F Wang, L Di Mare, Int J Numer Meth Eng. 108Wang F, di Mare L (2016) Hybrid meshing using constrained delaunay triangulation for viscous flow simulations. Int J Numer Meth Eng 108:1667-1685

Face offsetting: a unified approach for explicit moving interfaces. X Jiao, J Comput Phys. 220Jiao X (2007) Face offsetting: a unified approach for explicit moving interfaces. J Comput Phys 220:612-625

Variational generation of prismatic boundary-layer meshes for biomedical computing. V Dyedov, D R Einstein, X Jiao, A P Kuprat, J P Carson, Int J Numer Meth Eng. 79Dyedov V, Einstein DR, Jiao X, Kuprat AP, Carson JP, del Pin F (2009) Variational generation of prismatic boundary-layer meshes for biomedical computing. Int J Numer Meth Eng 79:907-945

Prismatic grid generation for three-dimensional complex geometries. Y Kallinderis, S Ward, AIAA J. 31Kallinderis Y, Ward S (1993) Prismatic grid generation for three-dimensional complex geometries. AIAA J 31:1850-1856

Eikonal equation based front propagation technique and its applications. Y Wang, AIAA paper 2009-375Wang Y (2009) Eikonal equation based front propagation technique and its applications. AIAA paper 2009-375

Eikonal equation-based front propagation for arbitrary complex configurations. Y Wang, F Guibault, R Camarero, Int J Numer Meth Eng. 73Wang Y, Guibault F, Camarero R (2008) Eikonal equation-based front propagation for arbitrary complex configurations. Int J Numer Meth Eng 73:226-247

Level sets for CFD in aerospace engineering. H Xia, P G Tucker, W N Dawes, Prog Aerosp Sci. 46Xia H, Tucker PG, Dawes WN (2010) Level sets for CFD in aerospace engineering. Prog Aerosp Sci 46:274-283

Viscous layer meshes from level sets on Cartesian meshes. W N Dawes, S A Harvey, S Fellows, C F Favaretto, A Velivelli, AIAA paper 2007-0555Dawes WN, Harvey SA, Fellows S, Favaretto CF, Velivelli A (2007) Viscous layer meshes from level sets on Cartesian meshes. AIAA paper 2007-0555

Level set methods and fast marching methods: evolving interfaces in computational geometry, fluid mechanics, computer vision, and materials science. J A Sethian, Cambridge University PressCambridgeSethian JA (1999) Level set methods and fast marching methods: evolving interfaces in computational geometry, fluid mechanics, computer vision, and materials science. Cambridge University Press, Cambridge

A fast sweeping method for Eikonal equations. H K Zhao, Math Comput. 74Zhao HK (2005) A fast sweeping method for Eikonal equations. Math Comput 74:603-627

An improved local remeshing algorithm for moving boundary problems. J Zheng, J Chen, Y Zheng, Y Yao, S Li, Z Xiao, Eng Appl Comp Fluid Mech. 10Zheng J, Chen J, Zheng Y, Yao Y, Li S, Xiao Z (2016) An improved local remeshing algorithm for moving boundary problems. Eng Appl Comp Fluid Mech 10:403-426

A method for time accurate turbulent compressible fluid flow simulation with moving boundary components employing local remeshing. O Hassan, K A Sørensen, K Morgan, N P Weatherill, Int J Numer Meth Fluids. 53Hassan O, Sørensen KA, Morgan K, Weatherill NP (2007) A method for time accurate turbulent compressible fluid flow simulation with moving boundary components employing local remeshing. Int J Numer Meth Fluids 53:1243-1266

Fine-grained parallel algorithm for unstructured surface mesh generation. D Zhao, J Chen, Y Zheng, Z Huang, J Zheng, Comput Struct. 154Zhao D, Chen J, Zheng Y, Huang Z, Zheng J (2015) Fine-grained parallel algorithm for unstructured surface mesh generation. Comput Struct 154:177-191

Generation of viscous grids at ridges and corners. R Aubry, R Löhner, Int J Numer Meth Eng. 77Aubry R, Löhner R (2009) Generation of viscous grids at ridges and corners. Int J Numer Meth Eng 77:1247-1289

Publisher's Note. Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.