|1D, 2D, 3D =||One-, two-, and three-dimensional, respectively|
|API =||Application Programming Interface|
|CAD =||Computer-Aided Design|
|CFD =||Computational Fluid Dynamics|
|CFI =||CADfix interface: its model API|
|CFL =||Courant–Friedrichs–Lewy condition|
|NACA =||Family of aerofoils developed by the National Advisory Committee for Aeronautics|
|=||Subelement of the reference element|
|=||Parametric coordinates in the reference element|
|=||Mapping from reference element to high-order element|
|=||Affine mapping from reference element to subelement|
|=||Determinant of the Jacobian of the mapping|
|=||Dimensionless wall distance|
The high-order CFD community currently suffers from the lack of robust mesh generation tools capabale of generating boundary-conforming meshes suited to high-Reynolds number flows of industrial relevance [1, 2]. Recent efforts have been made using an a posteriori approach where a linear mesh is first generated before being curved to represent the boundary representation of the domain accurately. A review of these techniques can be found in reference . On the one hand, robust tools exist for the generation of linear unstructured meshes and these have been used successfully by the low-order community for a long time. A posteriori high-order curving of such meshes has however been problematic due to the validity restriction of curvilinear elements. Highly stretched elements needed for high shear flows are very sensitive to curving therefore requiring curving of the internal mesh in addition to the boundary mesh. On the other hand, methods based on structured meshing and multi-block partitioning could naturally lend to themselves high-order curvilinear mesh generation. These meshes are ideal for simple geometries where domain blocks can be mapped to a reference hexahedral block. This mapping can in turn be used for additional curvilinear refinement [4, 5]. Such an approach however requires a valid block partitioning, often tedious to obtain on complex indutrial geometries .
We present an approach that aims at taking advantage of both approaches into a single framework. We call this approach semi-structured: a structured mesh is generated in the near-field where requirements of mesh anisotropy, quality and validity are high but also where boundary curvature is important; then an unstructured mesh is generated in the far-field where those requirements are softened and robust and fast mesh generation is desired. This approach was successfully applied to generic O-  and C-  type topologies and we extend it to H-type topologies best described by streamlined bodies.
The method relies on two sets of tools to achieve a final mesh. On the one hand, we utilise the commercial software CADfix  for CAD and linear mesh generation. In the near-field, CADfix uses an approach for block partitioning based on medial objects . This allows us to generate coarse boundary layer meshes suitable for high-order curving, which can be later refined to achieve highly-stretched boundary-aligned elements adapted to high-Reynolds number flows. CADfix also provides a powerful CAD environment capable of CAD healing and manipulation. This environment is made available through its CFI interface  which NekMesh, our second set of tools, uses for CAD queries. From a linear mesh, NekMesh, part of the Nektar++ open-source spectral/hp element framework , generates a curvilinear high-order mesh through projection of high-order nodes onto the boundary representation by querying the CAD model through CFI.
We describe our approach in the following sections. Section 2 first describes the method on a high-level and discusses its specific advantages for H-type topologies. Section 3 goes on to present CFI, the interface on which NekMesh relies heavily on to communicate with CADfix. Sections 4 & 5 provide details about the generation of the linear and the high-order meshes in the near- and far-field respectively while Section 6 presents an example of application of the method.
2 A semi-structured approach
We propose a semi-structured approach to high-order curvilinear mesh generation specifically tailored to streamlined bodies. The typical application of this method is the geeration of a mesh on a wing-fuselage model with a squared-off trailing edge. The following principles also apply to sharp trailing edges, a special case of squared-off trailing edges where the thickness is zero. This workflow can also be extended to similar streamlined body configurations.
The meshes generated by our approach are semi-structured: the near-field and wake are meshed in a structured manner, allowing us to generate highly stretched elements, suitable for high-Reynolds number simulations; the far field is meshed in an unstructured and robust manner. The approach takes advantage of both approaches in areas where they are best suited for. The structured mesh part relies on a block partitioning of the domain based on medial object technology  available in CADfix . A coarse boundary layer mesh can be easily generated and extended into the wake of the streamlined body. This thick boundary layer, composed of a single element in the thickness, is suitable for high-order mesh generation as it provides enough space for elements to be curved while remaining valid. This operation is performed in NekMesh. An isoparametric approach  is then employed to refine the coarse boundary layer mesh in the wall-normal direction. Highly stretched yet valid curvilinear elements can be easily generated this way, following certain restrictions of the mapping . The mesh is finally returned to CADfix where the far-field is meshed with pyramids (to interface any quadrilaterals on the skin of the structured near-field mesh) and tetrahedra in a robust unstructured way.
3 The CFI interface
Mesh generation relies on robust CAD systems for reliable node placement both in low-order and high-order approaches. High-order mesh generation in particular is very sensitive to CAD quality. Where poor quality CAD can suffice for low-order applications where linear elements would simply go over distortions in the surface definitions, their high-order equivalent is prone to highly distorted elements with no hope of recovery of a valid mesh. Because CAD software is often focused on design rather than numerical simulation, powerful CAD repair tools are necessary to obtain high quality CAD. For this reason, CADfix  is an environment of choice, able to read CAD files in different formats and from different CAD software and to improve the quality of the CAD definition.
These tools are made available at developer’s level through its CFI interface . Through polymorphism, NekMesh hides the complexity of using a CAD system behind a wrapper. Initially interfaced with OpenCASCADE , NekMesh now supports CFI, not only for access to the CADfix CAD system but also for mesh import and export. First, the CFI interface is launched by NekMesh and it loads the underlying CAD definition into its CAD system. The linear structured mesh, obtained from the procedure described in Section 4, is then imported from the CADfix database. An equivalent high-order mesh is generated, following the approach presented in Section 4.3, at which point extensive use of the CAD system is made through CAD queries. After splitting of the structured mesh, it is exported into a new database to be processed in CADfix for unstructured meshing of the far-field. Fig. 1 illustrates the strong interaction needed for this method to work.
4 Structured mesh
Starting from the streamlined body, a coarse structured mesh is generated in the near-field. It relies on the partitioning of the near-field through medial objects  to generate a coarse boundary layer. In order to benefit from the quality of structured meshes not only in the boundary layer but also in the wake of the body, these medial objects can be extended downstream and be meshed in a similar fashion.
4.1 Partitioning based on medial objects
We use the medial object technology implemented in CADfix [10, 9], based on the medial axis first introduced by Blum  to analyse the topology near the body of interest. The medial axis is defined as the set of all points inside the domain equidistant to 2 or more boundaries. CADfix computes these points and assembles them into non-manifold CAD objects, along with extra information such as the connectivities and the medial radius. These medial objects are used to guide the partitioning of the near-field domain in complex junctions. See Fig. 2, for an example of three-dimensional medial objects computed around a NACA wing.
To generate a valid partition of the near-field, surfaces of the streamlined body are offset and a shell is obtained, see Fig. 3. This operation essentially divided the domain into a near-field and a far-field partitions. Issues arise in sharp concave corners and edges where the shell will self-intersect. These self-intersections form lines called medial halos. These medial halos, because they are equidistant to at least 2 boundary surfaces, belong both to medial objects and to the shell. These are visible as red contours on both Fig. 2 and Fig. 3. The medial objects and medial halos together are used to construct the partition around concave areas in contact with the streamlined body. Once a shell is obtained, the partition is turned into a coarse prismatic layer by sweeping.
We identify three different mesh topologies, shown in Fig. 4 for the NACA wing example. In the most direct approach, medial objects inside the shell are used to split the boundary layer partition. This provides us with an O-type topology, see Fig. 4
(a), where the whole partition can be mesh with triangular prisms. This topology is easy to generate but it also creates skewed elements at the wing root junction. One improvement is the creation of a hexahedral block at that junction. This is also known as a C-type topology and it is shown in Fig.4(b). This hexahedral block can be further split in both wall-normal directions. The refined mesh at the junction is now suitable for capturing the complex flow patterns generated by the presence of the boundary layers of both the wing and the fuselage. This topology is well suited for the wing root junction but it is not adequate for the trailing edge. At the trailing edge, highly stretched elements are obtained, as in the rest of te boundary layer mesh, but their orientation is cross-flow. This misalignement of trailing edge elements and flow not only restricts the CFL number but it also lacks resolution to resolve shear flow. A second improvement over the O- and C-type topologies consists in creating a hexahedral block past the trailing edge, known as an H-type topology, as shown in Fig. 4(c). This allows us to split of the boundary layer mesh, aligned with the flow, improving the quality of the local mesh.
We present the implementation of this approach with H-type topologies, best suited for streamlined bodies where hexahedral blocks are obtained at the trailing edge, which can be similarly squared-off or sharp. These trailing edge blocks can be further further extended downstream to create a wake partition. By doing this, we are able to harness the advantages of structured meshes by generating highly anisotropic hexahedra in the wake of the streamlined body. This allows the mesh to better capture the shear flow in the same way the structured mesh around the wing is able to resolve the boundary layer flow. The trailing edge partition can also be manipulated to better suit the need for resolution. One such manipulation consists in a progressive widening of the partition in the cross-flow direction. This provides a smoother transition to coarser elements in the unstructured tetrahedral mesh. Fig. 5 illustrates the capabilities of CADfix in terms of creation and manipulation of wake blocks.
Difficulty can arise in the extension of the wake partition when the surface to which the wing is fixed isn’t plane, e.g. in a wing-fuselage configuration. In this situation, the “wake block root” not only would be hard to trace along the curved fuselage but it might also expand out of reach in either or both streamwise and cross-flow directions. For this reason, we introduce a gap between the boundary layer mesh generated at the fuselage or wall and the wake block. This approach gives us greater flexibility in the generation and manipulation of the wake block partition. This is illustrated in Fig. 6 on a wing clamped to a flat wall.
4.2 Linear mesh generation
The creation of block partitions in the near-field facilitates the generation of a coarse boundary layer mesh. In each block, a prismatic layer is generated by sweeping from the boundary CAD throughout the near-field partition. A bottom-up mesh generation approach is actually used to retain conformality between all partitions. Lines are meshed first, then boundary surfaces by Delaunay triangulation and finally volume blocks by sweeping of the surface meshes. While a multi-layer volume mesh would usually be created when generating a linear mesh, the difficulty of curving such highly stretched elements makes this practice undesirable for high-order meshes. A coarse mesh with a single element in the thickness is generated instead., giving more room for valid high-order curving.
Not all block partitions in an H-type mesh topology are filled with triangular prisms though. The hexahedral blocks at the wing root junction as well as in the wake cannot be meshed with prisms due their interface with the side of prismatic partitions. Instead, these hexahedral blocks are meshed with a single hexahedron in the thickness of the boundary layer. At the wing root junction, the block partition is connected to two distinct boundary surfaces and therefore belongs to two different boundary layers. A single hexahedron is thus generated in each direction. Fig. 7 illustrates the gain in quality of using a C-/H-type topology at the wing root junction over an O-type approach. In the wake, on the other hand, a split can be made in the streamise direction. Indeed, the wake blocks are not in contact with any boundary surface other than the negligible trailing edge. Quads obtained on the rear interface of the wing’s prismatic layer can be swept downstream in a multi-layer fashion.
4.3 High-order mesh generation
This coarse structured mesh makes the a posteriori generation of a high-order mesh less prone to invalid elements. The thickness of the coarse layer offers enough space to accommodate boundary curvature and avoid self-intersecting elements. The projection to high-order, i.e. the curving of elements, follows a bottom-up approach presented in . High-order nodes are placed along the edges of the linear elements then projected onto their parent CAD object. The same then goes for faces. Optimisation of the location of the nodes after projection typically provides a large improvement in high-order element quality. This is especially important for edge and face nodes projected onto surfaces. This optimisation consists in the minimisation of the deformation of a spring system around those nodes. First edge nodes are optimised while end nodes (existing from the linear mesh) are fixed. After optimisation, the high-order nodes are expected to approximately lie on the geodesic between the two end points. We then go on to optimise the location of face nodes by fixing all linear and high-order edge nodes. A more complex spring system is set up where each face node is connected to its neighbouring nodes and the deformation is minimised again.
A high-order curvilinear near-field mesh is obtained, consisting of a single layer of curved triangular prisms and hexahedra. This boundary layer is however too coarse for high-Reynolds number CFD simulations where gradients near the wall in the cross-flow are large. Splitting of the coarse boundary layer elements is necessary to achieve highly stretched elements able to provide enough resolution in the wall normal direction without restricting the CFL number in the streamwise direction. This wall normal refinement is achieved through the isoparametric splitting approach presented in . Starting from the mapping between a reference element and the physical space element , subdivisions are made by adding points along the height of the prisms and hexahedra. Because all nodes are introduced with respect to mapping , the split mesh retains the validity and quality of the coarse mesh. The number and height of subdivisions can be specified by the user according to the resolution needs. This allows us to reach aspect ratios virtually unachievable through traditional a posteriori mesh curving techniques. This technique is illustrated in Fig. 8 where a coarse prismatic layer (left) is split into fine multi-layer meshes with different growth ratios (centre and right).
While the isoparametric splitting approach was originally developed for O-type topologies, special care must be given to the hexahedral blocks located at wing root junctions. These hexahedra belong to two different boundary layers and need therefore to be split in both directions sequentially. A visual demonstration is shown in Fig. 9 where the initial version of the isoparametric splitting in one direction (left) was extended to bi-directional splitting (right). This natural evolution of the isoparametric splitting produces high quality elements at wing root junctions with added resolution in both directions of interest, able to capture the high wall normal gradients produced by the two neighbouring boundaries.
5 Unstructured mesh
We obtain a structured high-order curvilinear mesh in the near-field with high aspect ratio elements near the walls, where crucial phenomena in high-Reynolds number simulations require important resolution. As we move away from the wall, the flow field becomes smoother and coarser mostly isotropic elements are preferred. While traditional structured meshing techniques require a tedious block decomposition of the whole domain, we resort to an unstructured mesh generation approach. In the far-field, highly anisotropic elements are not required and there exists no curvature prone to render high-order elements invalid. We resort to easy-to-use and robust tetrahedral meshers for this part of the domain. The high-order mesh is first exported to a CADfix database file through the CFI interface. CADfix is then able to extract the skin mesh, i.e. the surface mesh of the shell generated during the block partitioning, and use it as an input for the tetrahedral mesher. Unlike in the O- and C-type topologies, the near-field mesh obtained in the H-type configuration is not only composed of triangles but also of (split) quadrilaterals. These quadrilaterals are located all around the wake block and require a pyramidal mesh layer to transition from the hexahedral block mesh to the unstructured tetrahedral mesh.
6 Example of application
We illustrate this semi-structured approach to high-order mesh generation around a streamlined body on a traditional NACA0012 wing. This wing has a squared-off trailing edge of finite thickness and is attached to a flat wall. The near-field is partitioned using an H-type topology as presented in Section 4.1 and the medial objects are shown in Figs 5 & 6 with a gap between the wake block and the wall. The near-field is then discretised with a linear mesh, then transferred to NekMesh for high-order meshing and finally split, following the procedures described in Sections 4.2 & 4.3. The structured mesh on a portion of span before and after splitting is shown in Fig. 10. A progression ratio of and elements in the thickness were used for the splitting in the boundary layer of the wing. The progression then linearly varies with distance from the trailing edge until reaching
(uniform distribution of elements) at the far end of the wake.
The adoption of a semi-structured approach, where a multi-block partition is only used in the near-field region and the rest of the computational domain is discretised via an unstructured mesh, permits the generation of high-quality, highly stretched meshes in the boundary layer and wake regions. Since we are not required to obtain a partition in cubes of the full domain, this eliminates one of the bottlenecks that often prevent the use of a full multi-block for some complex geometries. Further, the generation of a coarse structured mesh in the near-field where a split into layers along the normal direction via the isoparametric approach facilitates the generation of valid high-order meshes with large stretching that inherit their quality from the coarse structured mesh. We have adopted an H-type topology of the mesh in the near-field to incorporate wakes shed from wing boundary layers. To increase the flexibility of the method, we allow quadrilateral elements on the discretisation of the surface. The discretised near-field region is a hybrid mesh of triangular pyramids and hexahedra and the outer mesh incorporates quadrilateral pyramids in the transition to the near-field mesh. The proof-of-concept example presented illustrates the ability of the method to generate this type of meshes and also the ease with which the resolution within the boundary layer can be controlled to achieve values of of order 1 and below for the location of the first node away from the surface.
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement No 675008.
- Vincent and Jameson  Vincent, P. E., and Jameson, A., “Facilitating the Adoption of Unstructured High-Order Methods Amongst a Wider Community of Fluid Dynamicists,” Mathematical Modelling of Natural Phenomena, Vol. 6, No. 3, 2011, pp. 97–140. doi:10.1051/mmnp/20116305.
- Wang et al.  Wang, Z., Fidkowski, K., Abgrall, R., Bassi, F., Caraeni, D., Cary, A., Deconinck, H., Hartmann, R., Hillewaert, K., Huynh, H., Kroll, N., May, G., Persson, P.-O., van Leer, B., and Visbal, M., “High-order CFD methods: current status and perspective,” International Journal for Numerical Methods in Fluids, Vol. 72, No. 8, 2013, pp. 811–845. doi:10.1002/fld.3767.
- Turner et al. [2017a] Turner, M., Peiró, J., and Moxey, D., “Curvilinear mesh generation using a variational framework,” Computer-Aided Design, 2017a. doi:10.1016/j.cad.2017.10.004.
- Moxey et al. [2015a] Moxey, D., Green, M., Sherwin, S., and Peiró, J., “An isoparametric approach to high-order curvilinear boundary-layer meshing,” Computer Methods in Applied Mechanics and Engineering, Vol. 283, 2015a, pp. 636–650. doi:10.1016/j.cma.2014.09.019.
- Moxey et al. [2015b] Moxey, D., Green, M., Sherwin, S., and Peiró, J., “On the Generation of Curvilinear Meshes Through Subdivision of Isoparametric Elements,” 2015b, pp. 203–215. doi:10.1007/978-3-319-06053-8_10.
- Armstrong et al.  Armstrong, C., Fogg, H., Tierney, C., and Robinson, T., “Common Themes in Multi-block Structured Quad/Hex Mesh Generation,” Procedia Engineering, Vol. 124, 2015, pp. 70–82. doi:10.1016/j.proeng.2015.10.123.
- Turner et al. [2017b] Turner, M., Moxey, D., Peiró, J., Gammon, M., Pollard, C., and Bucklow, H., “A framework for the generation of high-order curvilinear hybrid meshes for CFD simulations,” Procedia Engineering, Vol. 203, 2017b, pp. 206–218. doi:10.1016/j.proeng.2017.09.808.
- Marcon et al.  Marcon, J., Turner, M., Peiró, J., Moxey, D., Pollard, C., Bucklow, H., and Gammon, M., “High-order curvilinear hybrid mesh generation for CFD simulations,” 2018 AIAA Aerospace Sciences Meeting, American Institute of Aeronautics and Astronautics, Reston, Virginia, 2018. doi:10.2514/6.2018-1403.
- ITI-Global  ITI-Global, “CADfix: CAD translation, healing, repair, and transformation,” , 2018.
- Bucklow et al.  Bucklow, J., Fairey, R., and Gammon, M., “An automated workflow for high quality CFD meshing using the 3D medial object,” 23rd AIAA Computational Fluid Dynamics Conference, American Institute of Aeronautics and Astronautics, Reston, Virginia, 2017. doi:10.2514/6.2017-3454.
- Bergemann et al.  Bergemann, N., Pollard, C., Bucklow, H., and Gammon, M., “CADfix API for Meshing Research,” Proceedings of the 27th International Meshing Roundtable, 2018.
- Cantwell et al.  Cantwell, C., Moxey, D., Comerford, A., Bolis, A., Rocco, G., Mengaldo, G., De Grazia, D., Yakovlev, S., Lombard, J.-E., Ekelschot, D., Jordi, B., Xu, H., Mohamied, Y., Eskilsson, C., Nelson, B., Vos, P., Biotto, C., Kirby, R., and Sherwin, S., “Nektar++: An open-source spectral/hp element framework,” Computer Physics Communications, Vol. 192, 2015, pp. 205–219. doi:10.1016/j.cpc.2015.02.008.
- Open Cascade SAS  Open Cascade SAS, “Open Cascade,” , 2018.
- Blum  Blum, H., “A transformation for extracting new descriptors of shape,” Models for the Perception of Speech and Visual Form, Vol. 5, 1967, pp. 362–380.
- Sherwin and Peiró  Sherwin, S., and Peiró, J., “Mesh generation in curvilinear domains using high-order elements,” International Journal for Numerical Methods in Engineering, Vol. 53, No. 1, 2002, pp. 207–223. doi:10.1002/nme.397.