You are on page 1of 21

AIAA SciTech Forum 10.2514/6.

2021-1779
11–15 & 19–21 January 2021, VIRTUAL EVENT
AIAA Scitech 2021 Forum

Hybrid quasi-structured anisotropic mesh adaptation


using metric-orthogonal approach

Lucille-Marie Tenkes ∗, Julien Vanharen † and Frédéric Alauzet‡


GAMMA Team, INRIA Saclay Ile-de-France, Palaiseau, France

In the context of mesh adaptation for CFD simulations, some phenomena or numerical
schemes require the mesh to be structured, while respecting some alignment constraints
e.g. boundary layers. Since full-hexahedra or full-quadrilaterals mesh generation methods
cannot fulfill such requirements so far, we propose to use hybrid meshes, i.e. meshes
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

containing both structured and unstructured elements. Accordingly, the following work
focuses on hybrid metric-based mesh adaptation and CFD simulation on such meshes.
Regarding hybrid mesh generation, the method relies on a preliminary mesh obtained
through the so-called metric-orthogonal approach.8, 11 These approaches use the directional
information held by a prescribed metric-field to generate right angled elements, that can
be combined into structured elements to form a hybrid mesh. The result highly depends
on the quality of the metric field. Thus, emphasis is put on the size gradation control1
performed beforehand. This process is re-designed to favor metric-orthogonal meshes. To
validate the method, some CFD simulations are performed. The modifications brought to
an existing Finite Volume solver to enable such computations are detailed in this paper.

I. Introduction
The aim of mesh adaptation is to generate the best mesh to perform a specific numerical simulation. It is
nowadays a mature tool which is well-posed mathematically9, 10 and fully automatic regarding tetrahedral
meshes. Yet, there is still a strong demand for structured meshes, as many numerical schemes have proven
to be more accurate on quadrilateral meshes than triangle meshes, and as many favor structured elements in
the boundary layer instead of tetrahedra to simulate viscous turbulent flows. Since no method can automati-
cally provide pure hexahedral adapted meshes respecting alignment constraints, one solution is to use hybrid
meshes, i.e. meshes containing both structured and unstructured elements. In the proposed workflow, a
triangular mesh with right-angled elements is first generated using the so-called ”metric-orthogonal”8, 11 pro-
cess. These quasi-structured elements are then combined into quadrilaterals. The solution is then computed
on this hybrid mesh using a MUSCL V4-scheme4 accurately modified for this purpose.

Two main developments are presented here. First, the mesh size gradation control, which is a preprocessing
step that smooths the metric field to limit alignment variations and favor the formation of quadrilaterals.
Then, we focus on the modifications to the MUSCL V4-scheme implemented in the Wolf solver that enable
RANS simulations on hybrid meshes.

II. Hybrid meshing approach


Metric fields used for mesh generation can sometimes show some very strong size variations, which results
in flaws in the generated mesh. For example, regarding metric-aligned and metric-orthogonal meshes,11 an
abrupt size variation causes the formation of obtuse angles as illustrated in Figure 1, which unnecessarily
breaks the alignment of the elements. A metric-orthogonal method is used as a preliminary step to build
hybrid meshes, i.e. meshes that contain both structured and unstructured elements. If this preliminary
∗ PhD student, lucille-marie.tenkes@inria.fr
† Postdoctoral Researcher, julien.vanharen@inria.fr
‡ Senior Researcher, frederic.alauzet@inria.fr

1 of 21

American
Copyright © 2021 by the American Institute of Aeronautics and Astronautics, Inc. AllInstitute of Aeronautics and Astronautics
rights reserved.
mesh shows discontinuities in the element sizes, it will hinder the formation of quadrilaterals. More generally
speaking, the results of metric-based adaptive meshing and re-meshing processes highly depend on the quality
of the provided metric.
After recalling the framework of metric-based mesh generation,5, 9 and the metric-orthogonal process,8, 11
this section details our continuous approach of size gradation control.
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 1. Detail from a metric-aligned mesh (left) and the resulting hybrid mesh (right). Obtuse angles are
observed at the place of jumps in size prescription.

A. Continuous mesh framework


A metric tensor in Rn , n ∈ {2, 3}, is a symmetric, positive-definite tensor of size n that allows to define a
scalar product. If M is a metric, we have
t
∀ u, v ∈ Rn , hu, viM = hu, Mvi = uMv,

which induces a norm q q


t
kukM = hu, uiM = uMu.
A metric tensor can geometrically be represented by its unit ball, an ellipsoid
 q 
n t
EM = p ∈ R | opMop = 1 ,

where o is the center of the ellipsoid. Its axis directions and sizes are given by the eigenvalues and eigenvectors
of M.
Definition II.1. An Euclidian metric space (Rn , M) is a vector space, supplied with a scalar product h, iM
defined according to a metric tensor M, and its induced norm k · kM . The distance between two points p
and q is then dM (p, q), determining as well the length of the segment pq denoted `M (pq).
The volume of a bounded subset K, and the angle θ ∈ [0, π] between two vectors u and v can also be
established as follows Z √ √
|K|M = det M dK = det M |K|In ,
K
where In is the identity tensor of Rn , and

hu, viM
cos θ = .
kukM kvkM
Remark II.1. If M = In , the described space is the standard Euclidian metric space (Rn , k · k2 ).

2 of 21

American Institute of Aeronautics and Astronautics


So far in this section, a constant metric over the domain has been considered. Some definitions can be
extended to the case of a varying metric field.
Definition II.2. A Riemannian metric space is a continuous manifold Ω supplied with a continuous metric
field M(·) denoted by (M(x)). The restriction of the metric to a point x of the manifold defines a scalar
product on the tangent space. This tangent space equipped with this structure is an Euclidian space.

In this context, the length of an edge pq is computed using a straight line parametrization γ(t) = p+tpq, t ∈
[0, 1], therefore
Z 1 Z 1q
t
`M (pq) = kγ(t)kM dt = pqM(p + tpq)pq dt.
0 0
Considering an edge e, the prescribed size in direction e is

kek2
hM (e) = . (1)
`M (e)

1. Numerical computation of lengths in a Riemannian metric space


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

R 1 pt
As previously established, the length of a segment pq is given by `M (pq) = 0 pqM(p + tpq)pq dt
which could be approximated using a Gaussian quadrature. If pq is an edge, another solution is to only
consider the variation along the edge. It is more efficient and less time consuming. Indeed, this operation is
used multiple times in the mesh generation process.
Let e = pq be an edge of the mesh. The metrics at endpoints are known and denoted Mp and Mq . The
edge length in the Euclidian space is kek2 , the edge length in the metric space supplied with Mp (resp. Mq )
is `p (resp `q ). We introduce the ratio a = `p /`q . Then, Eq.(1) yields
1 1
1
Z Z
e e
rt
`M (e) = kek2 M(t) dt = kek2 dt,
0 kek2 kek2 0 hM (t)

where M(t) = M(p + tpq) and hM (t) = hM (p + tpq). Also,

kek2 kek2 hq
`p = , `q = , a= .
hp hq hq

To compute `M (e), we use the geometric interpolation


a−1
`M (e) = `p
,
a ln a
which is consistent with the metric interpolation detailed in the next paragraph.

2. Operations on metrics
Several operations need to be defined for the purpose of metric gradation.

Interpolation Since a mesh is a discrete entity, the metric field is only defined at its vertices and needs
to be interpolated everywhere else. Let (xi )i=1,...,k be a set of vertices, and (M(xi ))i=1,...,k their associated
Pk
metric tensors. Let x be a point such that x = i=1 αi xi , with (αi )i=1,...,k real positive numbers such that
Pk
x = i=1 αi = 1. The interpolated metric tensor at point x is computed according to the log-Euclidian
framework9 :
k
!
X
M(x) = exp αi ln (M(xi )) .
i=1

The exponential and logarithm operations on the metric tensors are built using their spectral decompositions:
t t t
if M = RΛR, then ln(M) = R ln(Λ)R and exp(M) = R exp(Λ)R.
This geometric interpolation ensures that the metric field is continuous in the domain, and preserves the
maximum principle, i.e., for an edge pq with endpoint metrics Mp and Mq , such that det Mp < det Mq ,
the inequality det(Mp ) ≤ det(M(p + tpq)) ≤ det(Mq ) stands for any t ∈ [0, 1].

3 of 21

American Institute of Aeronautics and Astronautics


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 2. Adapted meshes with metric-orthogonal (left) and standard (right) processes.

Intersection The metric gradation consists in correcting the metric at one vertex, considering the size
corrections from all vertices. The corrected metric is the intersection of all the correction metrics, i.e. the
largest metric under all constraints.
The intersection of two metrics Mp and Mq is performed here through a simultaneous reduction. Since
they both are symmetric tensors, they both are diagonal in a certain basis of Rn denoted P. There exists
µp = (µpi )i=1,...,n , µq = (µqi )i=1,...,n ∈ Rn such that
t t
Mp = P −1 diag(µp )P −1 and Mq = P −1 diag(µq )P −1 .

Then,
t
Mp∩q = P −1 diag(ν)P −1 ,
where ν ∈ Rn such that νi = max(µpi , µqi ), i ∈ 1, ..., n.
To intersect more than two metrics numerically using simultaneous reduction, the previous operation is ap-
plied in an order chosen with caution, since this operation is not commutative. The exact metric intersection
(John Ellipsoid7 ) can be found by solving an optimization problem.

B. Metric-aligned and metric-orthogonal methods


The metric field provides intrinsic directional information through its eigenvectors. Metric-orthogonal ap-
proach8, 11 aims at exploiting this direction field to generate right-angled elements. The points are iteratively
inserted following an advancing front point placement. Metric-orthogonal meshes are quasi-structured in ar-
eas where the anisotropy ratio of the metric is high enough. Right-angled triangles are then combined into
quadrilaterals to get the final hybrid mesh. To prevent the formation of poor-quality quadrilaterals, the
combination step starts from highest aspect ratio triangles and stops at a given threshold. This method
gives satisfying results in areas where the metric is highly anisotropic, however when it is isotropic, the
orientation of eigenvectors is not defined, so it doesn’t necessarily form right-angled elements.

4 of 21

American Institute of Aeronautics and Astronautics


The process is illustrated with the example of a cross-shaped analytical metric field,

! 
 hx = min(2αx × hmin , hmax ),
−2
hy = min(2αy × hmin , hmax ),

hx 0

Mcross = where
0 h−2
y


 hmin = 0.005, hmax = 0.1,
αx = 20 × |x − 0.5|, and αy = 20 × |y − 0.5|.

Figure 2 shows generated meshes with standard (right) mesh adaptation and metric-orthogonal point-
placement (left). No size gradation control has been applied. Consequently, an alignment break can be
observed in the close-up view of the metric-orthogonal mesh (bottom right).

C. Gradation
1. 1D mesh gradation control
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

P Q

Figure 3. Prescribed size growth from P (with size h) to Q in one dimension. β is the size gradation coefficient.

In this section, we recall the main lines of isotropic mesh gradation. Let M be an isotropic metric field
defined in the entire domain Ω. The metric field can be rewritten M = h(x)−2 I, x ∈ Ω where I is the
identity matrix. Let p and q be two points of the domain with associated sizes hp and hq .
Definition II.3. The H-shock or size gradation c(pq) related to the segment pq of Ω is the value:
 1/`M (pq)
hp hq
c(pq) = max , .
hq hp
The anisotropic H-shock value varies in the interval [1, +∞[. The H-shock in mesh gradation represents the
spatial geometric progression of the size prescription in the metric as depicted in 1D in Fig. 3. This notion
generalizes the classical geometrical element size progression : the next element is β times larger than the
previous one. Accordingly, if they have a size prescription h and we ask for an increase of β, at a distance
`M the size prescription is hβ `M .
The isotropic size correction consists in providing a minimal (optimal) reduction M̃ of M such that, for all
points, the size gradation is bounded by a given threshold β. This correction regularizes the metric field
and bounds the variations. Let’s illustrate this mechanism for two points p and q, assuming hp ≤ hq . The
problem is to reduce hq to obtain a new H-shock equal to β. The reduced size is denoted by h˜q . Therefore,
h˜q = hp β `M (pq) . (2)
We introduce the coefficient η 2 (pq) = β −2`M (pq) . It depends to the chosen interpolation law, for example
−2
η 2 (pq) = (1 + kpqk2 (β − 1)) in the h-linear interpolation law. M̃p (q) denotes the metric of spanned size
constraints from p to q, to write Eq.(2) in terms of metric tensors

M̃p (q) = η 2 (pq)Mp . (3)

2. Practical implementation
In the case of a mesh H supplied with a discrete metric field given at its vertices, each vertex provides a
metric for all the other vertices that imposes its size constraints in all directions. The reduced metric at
vertex q is given by  
\
M̃(q) =  M̃p (q) ∩ M(q)
p∈H

5 of 21

American Institute of Aeronautics and Astronautics


Unfortunately, we face a quadratic complexity algorithm. To avoid this, it is possible to approximate the
mesh gradation problem with a linear complexity algorithm based on the mesh edges, as presented in.1 This
algorithm is fast and has given nice results in most cases but it is sensitive to mesh topology.

3. Anisotropic mesh gradation control


Let p, q be two points of the domain. The metric tensor at point q corrected with the constraints from p is

Mnew
q = M̃p (q) ∩ Mold
q .

With anisotropic metric fields, different size constraints in all directions are involved, so the previously
described gradation process cannot be straightforwardly extended. A choice must be made to determine
how the size constraints are spanned to bound the size variation correctly.
In the first option, the metric is spanned according to a scalar growth factor. That is,

M̃p (q) = η 2 (pq)Mp ,

where η 2 (pq) = β −2`M (pq) . The resulting growth is homogeneous in the metric space, since the anisotropic
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

ratio is constant. This method is referred to in the remaining as ”metric space growth”.
The second option is to apply a growth that depends on the direction, by setting a different growth factor
to each eigenvalue. In this case, the constraint metric is
t
M̃p (q) = RN (pq)ΛR,

where N (pq) = diag((ηi2 )i=1,...,n ) contains factors that depend from the direction, for example, in h-linear
√ −2 √
interpolation ηi2 (pq) = 1 + λi kpqk2 (β − 1) . The presence of the factor λi accellerates the growth for
directions of small sizes. As a consequence, M̃p (q) tends to an isotropic tensor when the distance between
p and q increases. This processed is called in the remaining ”physical space growth”.

D. Gradation growth processes effect on resulting hybrid meshes and numerical examples
Physical space growth seems to show best results as a preliminary size correction for metric-orthogonal
meshes, as the following examples illustrate. To evaluate the quality of the orthogonal and hybrid meshes
displayed in this section, two quantities are used. First, a size jump indicator, defined at each vertex as the
ratio between the largest area and the smallest area of surrounding triangles. Then, the following definition13
of quadrilateral quality is used
  
2  π
η(q) = max 1 − max − αk , 0 .
π k 2

1. Analytical metric: circle


Size gradation control is applied to an analytical metric field representing a curved anisotropic feature having
the shape of a circle:
!
h−2
1 cos2 θ + h−2
2 sin2 θ (h−21 − h−2
2 ) cos θ sin θ
M(x, y) = .
(h−2 −2
1 − h2 ) cos θ sin θ h−2 2 −2
1 sin θ + h2 cos θ
2

The two growth processes described earlier were tested. In each case, the adapted mesh (using a metric-
orthogonal point placement,8, 11 likely to form right-angled triangles) and their resulting hybrid mesh are
displayed on Figures 4 and 5. Gradation tends to prevent misalignments due to size jumps. Physical growth
appears to be best suited for the metric-orthogonal process. The anisotropy loss caused by physical-space
growth induces smoother transitions, favoring the formation of all-quadrilaterals areas in the hybrid mesh,
see Figure 5. Indeed, a compromise has to be met between high anisotropy for the adapted mesh and the
number of quadrilaterals ensured in the hybrid mesh.

6 of 21

American Institute of Aeronautics and Astronautics


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 4. Metric-orthogonal adapted mesh from the circle metric. On the left side, a large scale view of each
mesh is displayed, respectively top and bottom result from a metric-space and physical-space growth. On the
right side, the top part shows close-up views corresponding to the red rectangles, and the bottom part displays
the angles and size jumps histograms for these two meshes and a no-gradation mesh.

III. Modification of the MUSCL V4-Scheme


This section focuses on the changes made to the numerical scheme to allow simulations on quadrilateral
and hybrid meshes. The major change is the computation of the gradients, since the gradients of the shape
functions of each quadrilateral are not constant in the element as they are for triangles.

A. The Reynolds Averaged Navier-Stokes equations and the Wolf solver


The RANS equations are composed of the compressible Navier-Stokes equations and a turbulence model.
According to the standard approach to turbulence modeling based upon the Boussinesq hypothesis, the
turbulence is modeled with an eddy viscosity µt , which is added to the laminar (or dynamic) viscosity, µ.
The dynamic viscosity is usually taken to be a function of the temperature, whereas µt is obtained using a
turbulence model. Here, we chose the Spalart-Allmaras one equation turbulence model14 with no trip.
We write the RANS system in the following (more compact) vector form:

Wt + F1 (W )x + F2 (W )y + F3 (W )z = S1 (W )x + S2 (W )y + S3 (W )z + Q(W ) ,
∂Si (W )
where Si (W )a = ∂a (i = 1, 2, 3, a = x, y, z) (idem for F ). W is the nondimensionalized conservative
variables vector:
T
W = (ρ, ρu, ρv, ρw, ρE, ρν̃) .

7 of 21

American Institute of Aeronautics and Astronautics


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 5. Hybrid meshes following metric-space growth (left) and physical space growth (right) gradation.
The histogram at the bottom shows the repartition of the quadrilateral’s quality.

F (W ) = (F1 (W ), F2 (W ), F3 (W )) are the convective (Euler) flux functions:


T
F1 (W ) = ρu, ρu2 + p, ρuv, ρuw, u(ρE + p), ρuν̃ ,
T
F2 (W ) = ρv, ρuv, ρv 2 + p, ρvw, v(ρE + p), ρvν̃ , (4)
T
F3 (W ) = ρw, ρuw, ρvw, ρw2 + p, w(ρE + p), ρwν̃ .
S(W ) = (S1 (W ), S2 (W ), S3 (W )) are the laminar viscous fluxes:
 ρ T
S1 (W ) = 0, τxx , τxy , τxz , uτxx + vτxy + wτxz + λTx ,(ν + ν̃)ν̃x ,
σ
 ρ  T
S2 (W ) = 0,τxy , τyy , τyz , uτxy + vτyy + wτyz + λTy , (ν + ν̃)ν̃y , (5)
σ
 ρ  T
S3 (W ) = 0,τxz , τyz , τzz , uτxz + vτyz + wτzz + λTz , (ν + ν̃)ν̃z ,
σ
where τij are the components of laminar stress tensor defined by:
 
∂vi ∂vj 2 ∂vk
τij = µ + − µ δij .
∂xj ∂xi 3 ∂xk
where (vi , vj , vk ) are the three components of the velocity and δij the Kroneker symbol.

Q(W ) are the source terms, i.e. the diffusion, production and destruction terms from the Spalart-Allmaras
turbulence model:
 2
cb2 ρ ν̃
Q(W ) = (0, 0, 0, 0, 0, 2
k∇ν̃k + ρcb1 S̃ ν̃ + cw1 fw ρ )T . (6)
σ d
Note that Q = 0 in the case of the laminar Navier-Stokes equations, unless additional source terms are added
(to take into account gravity, for instance).

8 of 21

American Institute of Aeronautics and Astronautics


B. Spatial discretization in Wolf
The spatial discretization of Wolf is vertex-centered and based on the Mixed-Element-Volume (MEV)
formulation,3, 4 in which convective and source terms are discretized using the Finite Volume method and
the viscous terms are discretized using the Finite Element method. One main advantage of using a vertex-
centered formulation is that it is well-suited to handle anisotropic adapted meshes and able to achieve
accurate prediction even if the mesh of the boundary layer region is fully unstructured and composed of only
triangles. Today, these points are problematic for cell-centered Finite Volume scheme.
Let H a mesh of domain Ω, the vertex-centered MEV formulation consists in associating with each vertex
Pi of the mesh a control volume or finite volume cell, denoted Ci . Discretized domain Ωh can be written as
the union of the elements or the union of the finite volume cells:
N
[ T N
[S
Ωh = Ki = Ci .
i=1 i=1

For the finite volume cell definition, we consider the median cells. It consists in subdividing each triangle
(resp. quadrilateral) into three (resp. four) quadrilateral cells around each vertex. The vertices of the
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

quadrilateral cell associated with vertex Pi are (i) the middle of the two edges issued from Pi , (ii) the gravity
center of the element and (iii) the considered vertex Pi . The median cell of vertex Pi is the union of all its
quadrilateral cells.
The Reynolds Averaged Navier-Stokes equations integrated on the finite volume cell Ci following a finite
volume formulation reads (using the Green formula):

dWi
|Ci | + Fi = Si + Qi + Γi , (7)
dt
where Wi is the mean value of the solution W on cell Ci , Fi , Si , Qi and Γi are respectively the numerical
convective, viscous, source flux and boundary terms:
Z Z Z Z
Fi = F (Wi ) · ni dγ , Si = S(Wi ) · ni dγ , Qi = Q(Wi ) dΩ , Γi = G(Wi ) dx ,
∂Ci ∂Ci Ci Ci ∩∂Ωh

where ni is the outer normal to the finite volume cell surface ∂Ci , and F , S and Q are respectively the
convective, viscous and source terms flux functions as defined previously in Relations (4), (5) and (6). G is
a boundary flux that depends on the type of considered boundary conditions.

1. Discretization of the convective terms


The integration of convective fluxes F of Equation (7) is done by decomposing the cell boundary in many
facets ∂Cij : Z Z
X
F(Wi ) · ni dγ ≈ F|∂Cij · ni dγ ,
∂Ci Pj ∈V(Pi ) ∂Cij

where V(Pi ) is the set of all neighboring vertices linked by an edge to Pi and F|∂Cij represents the constant
value of F(W ) at interface ∂Cij . The flow is calculated with a numerical flux function, denoted Φij :
Z
Φij = Φij (Wi , Wj , nij ) = F|∂Cij · ni dγ ,
∂Cij
Z
where nij = ni dγ. The numerical flux function approximates the hyperbolic terms on the common
∂Cij
boundary ∂Cij . We notice that the computation of the convective fluxes is performed mono-dimensionally
in the direction normal to the boundary of the finite volume cell. Therefore, the numerical calculation of the
flux function Φij at the interface ∂Cij is achieved by the resolution of a one-dimensional Riemann problem
in the direction of the normal nij by means of an approximate Riemann solver. In this work, the HLLC
approximate Riemann solver is used for the mean flow - more details can be found2 - and linear upwind
advection is used for the turbulent variable convection. But, such a formulation is only first order in space.

9 of 21

American Institute of Aeronautics and Astronautics


A second order scheme is obtained using a MUSCL type reconstruction method.15 The idea is to use
extrapolated values Wij and Wji instead of Wi and Wj at the interface ∂Cij to evaluate the flux. Note that,
in the implementation, the primitive variables are extrapolated to guarantee the positivity of the density
and the pressure, then the conservative variables are reconstructed from these values. Thus, the gradients of
the primitive variables are evaluated. However, in the following, we still denote by W the primitive variables
vector. The numerical flux becomes:
Φij = Φij (Wij , Wji , nij ) ,
where Wij and Wji are linearly extrapolated as:

1 −−→ 1 −−→
Wij = Wi + (∇W )i · Pi Pj and Wji = Wj + (∇W )j · Pj Pi .
2 2
In contrast to the original MUSCL approach, the approximate ”slopes” (∇W )ij and (∇W )ji are defined for
any edge and obtained using a combination of centered and upwind gradients.
The centered gradient, which is related to edge Pi Pj , is implicitly defined along edge Pi Pj by the relation:
−−→ −−→
(∇W )C
ij · Pi Pj = Wj − Wi and (∇W )C
ji · Pj Pi = Wi − Wj .
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Upwind and downwind gradients, which are also related to edge Pi Pj , are computed according to the
definition of upwind and downwind element of edge Pi Pj . These elements are respectively denoted Kij and
Kji . Kij (resp. Kji ) is either the unique triangle of the ball of Pi (resp. Pj ) the opposite edge of which
is crossed by the line defined by the edge Pi Pj , or the unique quadrilateral the opposite diagonal of which
satisfies the same condition, see Figure 6. Upwind and downwind gradients are then defined for vertices Pi
and Pj as:
(∇W )Uij = (∇W )|Kij and (∇W )D ij = (∇W )|Kji .
P
where (∇W )|K = P ∈K WP ∇φP |K is the P1 -Galerkin (resp Q1 -Galerkin) gradient on triangle (resp. quadri-
lateral) K. If Kij (resp. Kji ) is a quadrilateral, the Q1 -Galerkin gradient is computed at vertex Pi (resp.
Pj ).

Kij
Mi Kji Mj
Pi Pj

Kij
Mi Kji
Pi Pj Mj

Figure 6. Downwind Kij and upwind Kji elements associated with edge Pi Pj .

10 of 21

American Institute of Aeronautics and Astronautics


Quadrilateral shape functions and gradients To evaluate the Q1 -Galerkin gradient, the imple-
mentation of the quadrilateral shape functions gradients is needed. The shape functions are defined from the
shape functions of the reference element Q̂, chosen here to be the unit square [0, 1] × [0, 1] in the reference
domain Ω̂, and using an iso-parametric transformation that maps this reference element into any quadri-
lateral Q = {(xi , yi )i=0...3 }. The shape functions in Q̂ are denoted by (ψ̂i )i=0,...3 and have the following
expressions, for any (x̂, ŷ) ∈ Ω̂:

ψ̂0 (x̂, ŷ) = (1 − x̂)(1 − ŷ), ψ̂1 (x̂, ŷ) = x̂(1 − ŷ), ψ̂2 (x̂, ŷ) = x̂ŷ, ψ̂3 (x̂, ŷ) = (1 − x̂)ŷ.

The iso parametric transformation F mapping Q̂ to Q then reads


! ! ! ! !
x̂ x0 x1 x2 x3
F: 7→ (1 − x̂)(1 − ŷ) + x̂(1 − ŷ) + x̂ŷ + (1 − x̂)ŷ. (8)
ŷ y0 y1 y2 y3

The Jacobian matrix of the tranformation is denoted by J and its transposed inverse, used in the computation
of gradients, is J −T . The shape functions on the physical quadrilateral Q and their gradients are, for
i = 0, ...3 and any (x, y) ∈ Ω,
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

ψi (x, y) = ψ̂i F −1 (x, y) and ∇ψi (x, y) = J −T ∇ψ̂i (F −1 (x, y)).




To avoid the computation of F −1 , the gradients are evaluated in most cases either at vertices or at the iso-
barycenter of the quadrilateral. In the latter case, the gradient formula is simillar to the P1 shape functions
gradients
1
∇ψi (xg , yg ) = − ni ,
2|Q|
where ni is the outward normal to the diagonal facing i, as illustrated in Fig.7.

3 3
n0

2 n1 2

n2
0 1 0 1
n3

Figure 7. Illustration of the notations used in the gradient formula.

Fourth-order numerical dissipation: V4-scheme. A scheme with fourth-order numerical dissipation


can be obtained by using parametrized gradients, to this end we introduce the β-scheme:
−−→ −−→ −−→
(∇W )i · Pi Pj = (1 − β)(∇W )C
ij · Pi Pj + β (∇W )U
ij · Pi Pj
−−→ −−→ −−→
(∇W )j · Pj Pi = (1 − β)(∇W )C
ij · Pj Pi + β (∇W )D
ij · Pj Pi ,

where β ∈ [0, 1] is a parameter controlling the amount of upwinding. For instance, the scheme is centered
for β = 0 and fully upwind for β = 1.
The most accurate β-scheme is obtained for β = 1/3.6 Indeed, it can be demonstrated that this scheme
is third-order for the two-dimensional linear advection on structured triangular meshes of Friedrichs-Keller
type.

11 of 21

American Institute of Aeronautics and Astronautics


This result still holds on a quadrilateral cartesian mesh.
Considering the following advection model

Wt + aWx + bWy = 0,
with the upwind advection flux
! !
1 a 1 a
Φij = (Wij + Wji ) · nij − (Wij − Wji ) · nij ,
2 b 2 b
and the β-scheme with β = 31 , the spatial truncation analysis gives for the triangular cartesian mesh

Wt + aWx + bWy =
∆x3
 
1
− (|b∆x + a∆y| + | − b∆x + 2a∆y|) Wxxxx
36 ∆y
 
1
− |b∆x + a∆y| ∆x2 Wxxxy
9
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

 
1
− |b∆x + a∆y| ∆x∆y Wxxyy
6
 
1
− |b∆x + a∆y| ∆y 2 Wxyyy
9
∆y 3
 
1
− (|b∆x + a∆y| + |2b∆x − a∆y|) Wyyyy
36 ∆x
+ O(4),
and for the quadrilateral cartesian mesh

1 
|a|∆x3 Wxxxx + |b|∆y 3 Wyyyy + O(4),

Wt + aWx + bWy = −
12
where O(4) is O(∆x4 ) assuming ∆x/∆y and ∆y/∆x are bounded.
On unstructured meshes, a second-order scheme with a fourth-order numerical dissipation is obtained. These
high-order gradients are given by:
−−→ 2 −−→ 1 −−→
(∇W )Vi 4 · Pi Pj = (∇W )C
ij · Pi Pj + (∇W )U
ij · Pi Pj
3 3
−−→ 2 −−→ 1 −−→
(∇W )Vj 4 · Pj Pi = (∇W )C
ij · Pj Pi + (∇W )D
ij · Pj Pi .
3 3
In this case, we have three different gradients: the high-order (V4), the centered and the upwind / downwind.
In consequence classical limiters cannot be used. Koren6 proposed the following three-entries limiter in that
case: (
sign(u) min(2|u|, 2|v|, |w|) if uv > 0
LimKO (u, v, w) =
0 otherwise ,
and we use: LimKO ((∇W )C U V4
ij , (∇W )ij , (∇W )i ). But it still creates overshoots or undershoots because the
high-order gradient is bounded by two times the centered or the upwind ones.
A smooth and consistent limiter has been proposed by Piperno12 which is expressed in a factorized form,
(∇W )C
 
Lim D
(∇W ) = (∇W ) ψP I ,
(∇W )D
with
3 R12 − 6 R1 + 19

if R < 1


1 2 1 2 1 1
R3 − 3 R + 18

ψP I (R) = ( + R) · ψP? I (R) = ( + R) (9)
3 3 3 3 
 1 + ( 3 1 + 1)( 1 − 1)3

if R ≥ 1
2R R

12 of 21

American Institute of Aeronautics and Astronautics


(∇W )C
where R = .
(∇W )D

2. Discretization of the viscous terms


In Wolf, viscous terms are discretized with the Finite Element method (FEM). We evaluate viscous terms
of the form: Z X Z
S(Wi ) · n dγ = S(Wi ) · n dγ + BT
∂Ci Pj ∈V(Pi ) ∂Cij

where ∂Cij is the common interface between cells Ci and Cj , and BT are boundary terms. R
R φi the P1 or Q1 finite element basis function associated with vertex Pi , we have: K ∇φi dx =
Let
− ∂Ci ∩K n dγ and if we assume that S(Wi ), which comes from a gradient, is constant on element K, then
we get:
X Z X Z
S(Wi ) · n dγ = − S(Wi )|K · ∇φi dx .
Pj ∈V(Pi ) ∂Cij K3Pi K

We notice that the finite element discretization is equivalent to the finite volume one. The effective compu-
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

tation of the previous integral then leads to the computation of integrals of the following form:
Z
∇φi ∇φj dx = |K| ∇φi |K ∇φj |K .
K

In this expression, ∇φi |K is the constant gradient of basis function φi associated with vertex Pi . This
discretization is justified because the characteristic times associated with the diffusive terms are large as
compared to the characteristic times associated with the hyperbolic (convective) terms. We now apply the
FEM formulation to all convected variables that are averaged on the element and we easily verify that the
components of the (Cauchy) stress tensor S(W ) are constant on each element K.
For instance, the term u τxy of the (Cauchy) stress tensor reads:
X  ∂φi |K ∂φi |K

(u τxy )|K = u|K µ|K ui + vi .
∂y ∂x
pi ∈K

The other terms are computed analogously.


The Spalart-Allmaras dissipation term is also discretized with the FEM:
1  
ΦSA
visc,K (Wi , Wj , Wk , Wl ) = |K| ρi (ν|K + ν̃|K ) ∇ν̃|K · ∇φi |K .
σ

3. Discretization of the source terms


Finally, the Spalart-Allmaras source terms (diffusion, production and destruction) are discretized by simple
integration on each vertex cell:
 2 !
SA ν̃i cb2
Φsource (Wi ) = |Ci | ρi cb1 S̃i ν̃i − ρi cw1 fw + ρi k∇ν̃i k ,
di σ

ν̃i
where |Ci | is the volume of the vertex cell and all variables are point-wise: S̃i = Ωi + fv2 .
κ2 d2i

IV. Numerical results


A. Validation: convection of an isentropic vortex (COVO)
The modifications of the convective terms are first validated using an analytical solution of the unsteady
Euler equations, in order to compare the error analysis on different types of meshes.
The chosen test case is the convection of a compressible and isentropic vortex within a mean and constant

13 of 21

American Institute of Aeronautics and Astronautics


speed flow. The expression of the initial vortex, centered at (xc , yc ) with a characteristic radius Rc and a
vortex intensity β, is the following:
 2
βU0 r
u = U0 − (y − yc ) exp − , (10a)
Rc 2
 2
βU0 r
v= (x − xc ) exp − , (10b)
Rc 2
β 2 U02
exp −r2 ,
 
T = T0 − (10c)
2Cp
2 2
γR
gas
where Cp = γ−1 and r2 = (x−xc ) R+(y−y
2
c)
.
c
The parameters used in our simulations are
p
T0 = 300.0 [K], p0 = 100000.0 [Pa], M0 = γRgas T0 = 0.5 [-],
xc = 0.5 [m], yc = 0.5 [m], β = 0.2 [-], Rc = 0.1 [m].

The expected solution is the initial vortex convected without deformation. The simulations has been per-
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

formed on different types of meshes: a cartesian mesh, a cartesian mesh with a random perturbation, the
respective triangular meshes with the same topology and hybrid meshes where half the domain is quads and
the other half is triangles. Four meshes of each type and increasing number of vertices on the same domain
were generated to study the convergence √ and check if it was third-order as expected, as shown in Fig. 8.
The error is displayed with respect to N , N being the number of vertices, which is proportional to the
element size for cartesian meshes. The slopes are respectively −3.86, −3.59, −3.78.

Quadrilateral mesh Triangle mesh Hybrid mesh


−3
−3 −3
log10(Error)

log10(Error)

log10(Error)
−4

−4 −4

−5

1.9 2.0 2.1 √2.2 2.3 2.4 1.9 2.0 2.1 √2.2 2.3 2.4 1.9 2.0 2.1 √2.2 2.3 2.4
log10( N ) log10( N ) log10( N )

Figure 8. Convergence of the L2 error with respect to the size of the mesh, for the three types of topologies.

Secondly, a random perturbation was introduced in the meshes to evaluate the accuracy of the fluxes in
unstructured quadrilateral meshes compared to unstructured triangular meshes. The simulation turned out
to be 3 times faster on random quadrilaterals than on random triangles when using a global time step. Indeed,
the global time step depends on the smallest element height, which is longer in quadrilaterals. Therefore,
simulations on quadrilateral or hybrid meshes should be faster on average.

B. Inviscid flow simulation


This example is an inviscid flow simulation on a NACA airfoil modeled by the incompressible Euler equations.
A supersonic flow is considered with Mach = 1.6 and α = 8◦ . It is performed on an adapted hybrid mesh with
9371 vertices and the corresponding triangular mesh for comparison. Figure 9, 10, 11, 12 show respectively :
a large scale view of the meshes (top : hybrid mesh, bottom : triangular mesh), the corresponding solutions
(density), a zoomed view of the meshes (top : hybrid mesh, bottom : triangular mesh), and the corresponding
solutions (density). A gradation correction with β = 1.5 has been applied to the output metric computed
from the solution during the adaptation process. It can be observed on the hybrid mesh that the anisotropic
areas in the shocks are mainly filled with structured elements are expected. However, there remains some
triangles that disrupt the structure, and impact the solution. This example emphasizes that to improve
hybrid simulations, our hybrid mesh generation method should ensure to minimize the transitions from
structured to unstructured elements, and favor the formation of areas completely filled with quadrilaterals.

14 of 21

American Institute of Aeronautics and Astronautics


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 9. Adapted anisotropic hybrid (top) and triangular (bottom) meshes from a Euler simulation, large
scale view.

15 of 21

American Institute of Aeronautics and Astronautics


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 10. Flow density from the Euler simulation, large scale view.

16 of 21

American Institute of Aeronautics and Astronautics


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 11. Adapted anisotropic hybrid (top) and triangular (bottom) meshes for a Euler simulation, close to
the airfoil.

17 of 21

American Institute of Aeronautics and Astronautics


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

18 of 21
Figure 12. Flow density, close view.

American Institute of Aeronautics and Astronautics


C. Laminar flow on a 2D NACA airfoil
This section shows the simulation of a laminar flow on a NACA airfoil with Mach = 0.5. Reynolds = 100.
The adapted hybrid mesh shown in Figures 13 and 14 counts 9180 vertices. As expected, the structured
elements are aligned on the flow. However, like in the inviscid case, some triangles disturb the alignment,
creating a wavy pattern.
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 13. Large scale view of a hybrid adapted mesh (top) and Mach number (bottom) for a laminar simulation

V. Conclusion
Automatic generation of structured meshes respecting alignment constraints is a challenging issue. Our
approach is based on the generation of a quasi-structured mesh beforehand, quadrilaterals are then recovered
using a pairing algorithm. The quasi-structured mesh is generated through a metric-orthogonal process,

19 of 21

American Institute of Aeronautics and Astronautics


Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

Figure 14. Close view of a laminar flow adapted hybrid mesh, and Mach number.

20 of 21

American Institute of Aeronautics and Astronautics


which highly depends on the quality of the provided metric field. In particular, abrupt size jumps can
break the alignment and prevent the formation of quadrilaterals. To diminish this phenomenon, a gradation
correction is performed before mesh generation, to smooth the metric field. It has been slightly modified
to be best suited for the purpose of hybrid mesh generation. To evaluate the performances of our hybrid
meshes, some modifications have been brought to the finite volume solver Wolf. The main feature added to
the solver to handle hybrid meshes is the computation of the gradients on quadrilateral elements. We chose
to use the Galerkin Q1 gradients. Our hybrid mesh adaptation process has given some promising results so
far, yet improvement can be done to improve the accuracy of the simulation. Especially, the recovering of
quadrilaterals in the quasi-structured mesh is quite primitive so far and cannot ensure to limit the number
of triangles remaining in quadrilateral zones. This aspect is currently being investigated. Another lead for
improvement would be to use a different discretization method than Galerkin Q1 gradients. Moreover, the
Wolf solver is well suited for unstructured meshes, so it might not be the best solver to evaluate the impact
of our meshes. It is more likely that such hybrid meshes could improve the simulation results of solvers that
have difficulties to handle unstructured meshes.

References
1 Frédéric Alauzet. Size gradation control of anisotropic meshes. Finite Elements in Analysis and Design, 46:181–202, 02 2010.
Downloaded by 82.124.44.199 on January 5, 2021 | http://arc.aiaa.org | DOI: 10.2514/6.2021-1779

2 P. Batten, N. Clarke, C. Lambert, and D. M. Causon. On the choice of wavespeeds for the hllc riemann solver. SIAM Journal

on Scientific Computing, 18(6):1553–1570, 1997.


3 Paul-Henry Cournède, Bruno Koobus, and Alain Dervieux. Positivity statements for a mixed-element-volume scheme on

fixed and moving grids. Revue européenne de mécanique numérique, 15, 05 2012.
4 Christophe Debiez and Alain Dervieux. Mixed-element-volume muscl methods with weak viscosity for steady and unsteady

flow calculations. Computers & Fluids, 29(1):89 – 118, 2000.


5 P.L. George, F. Hecht, and M.G. Vallet. Creation of internal points in voronoi’s type method. control adaptation. Advances

in Engineering Software and Workstations, 13(5):303 – 312, 1991.


6 B. Koren. A robust upwind discretization method for advection, diffusion and source terms, pages 117–138. Notes on

Numerical Fluid Mechanics. Vieweg, Germany, 1993.


7 Adrien Loseille. Adaptation de maillage anisotrope 3D multi-échelles et ciblée à une fonctionnelle pour la mécanique des

fluides.¡br /¿Application à la prédiction haute-fidélité du bang sonique. Theses, Université Pierre et Marie Curie - Paris VI,
December 2008.
8 Adrien Loseille. Metric-orthogonal anisotropic mesh generation. Procedia Engineering, 82:403 – 415, 2014. 23rd International

Meshing Roundtable (IMR23).


9 Adrien Loseille and Frédéric Alauzet. Continuous mesh framework part i: Well-posed continuous interpolation error. SIAM

J. Numerical Analysis, 49:38–60, 01 2011.


10 Adrien Loseille and Frédéric Alauzet. Continuous mesh framework part ii: Validations and applications. SIAM J. Numerical

Analysis, 49:61–86, 01 2011.


11 D. Marcum and F. Alauzet. 3d metric-aligned and orthogonal solution adaptive mesh generation. Procedia Engineering,

203:78 – 90, 2017. 26th International Meshing Roundtable, IMR26, 18-21 September 2017, Barcelona, Spain.
12 Serge Piperno and S. Depeyre. Criteria for the design of limiters yielding efficient high resolution TVD schemes. Computers

and Fluids, 27(2):183–197, 1998.


13 J.-F. Remacle et al. Blossom-quad: A non-uniform quadrilateral mesh generator using a minimum-cost perfect-matching

algorithm. International Journal for Numerical Methods in Engineering, 89:1102–1119, 2012.


14 Philippe Spalart and Steven Allmaras. A one-equation turbulence model for aerodynamic flows. AIAA, 439, 01 1992.
15 B. van Leer. Towards the Ultimate Conservative Difference Scheme. V. A Second-Order Sequel to Godunov’s Method. Journal

of Computational Physics, 32(1):101–136, Jul 1979.

21 of 21

American Institute of Aeronautics and Astronautics

You might also like