CFD For Fem
CFD For Fem
SCUOLA DI DOTTORATO
Dottorato in Fluidodinamica – XXVII ciclo
Tesi di Dottorato
Andrea Ferrero
matricola: 189152
December 2014
Summary
The purpose of this work is the development of a numerical tool devoted to the
study of the flow field in the components of aerospace propulsion systems. The
goal is to obtain a code which can efficiently deal with both steady and unsteady
problems, even in the presence of complex geometries.
Several physical models have been implemented and tested, starting from Euler
equations up to a three equations RANS model. Numerical results have been com-
pared with experimental data for several real life applications in order to under-
stand the range of applicability of the code. Performance optimization has been
considered with particular care thanks to the participation to two international
Workshops in which the results were compared with other groups from all over the
world.
As far as the numerical aspect is concerned, state-of-art algorithms have been im-
plemented in order to make the tool competitive with respect to existing softwares.
The features of the chosen discretization have been exploited to develop adaptive
algorithms (p, h and hp adaptivity) which can automatically refine the discretiza-
tion. Furthermore, two new algorithms have been developed during the research
activity. In particular, a new technique (Feedback filtering [1]) for shock capturing
in the framework of Discontinuous Galerkin methods has been introduced. It is
based on an adaptive filter and can be efficiently used with explicit time integra-
tion schemes. Furthermore, a new method (Enhance Stability Recovery [2]) for
the computation of diffusive fluxes in Discontinuous Galerkin discretizations has
been developed. It derives from the original recovery approach proposed by van
Leer and Nomura [3] in 2005 but it uses a different recovery basis and a different
approach for the imposition of Dirichlet boundary conditions. The performed nu-
merical comparisons showed that the ESR method has a larger stability limit in
explicit time integration with respect to other existing methods (BR2 [4] and origi-
nal recovery [3]). In conclusion, several well known test cases were studied in order
to evaluate the behavior of the implemented physical models and the performance
of the developed numerical schemes.
iii
Acknowledgements
I’m very grateful to my supervisor, Professor Francesco Larocca for all the time he
dedicated to my doubts and questions.
I would like to thank my family for the support and Francesca for her patience and
comprehension.
v
Contents
Summary iii
Acknowledgements v
2 Physical models 9
2.1 Euler equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Navier-Stokes equations . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Reynolds Averaged Navier-Stokes equations . . . . . . . . . . . . . 11
2.3.1 Spalart-Allmaras model . . . . . . . . . . . . . . . . . . . . 12
2.3.2 Wilcox k − ω model . . . . . . . . . . . . . . . . . . . . . . 14
2.3.3 Laminar Kinetic Energy model . . . . . . . . . . . . . . . . 20
2.4 Boundary conditions . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.4.1 BCs for Euler equations . . . . . . . . . . . . . . . . . . . . 23
2.4.2 BCs for Navier-Stokes equations . . . . . . . . . . . . . . . 23
2.4.3 BCs for Spalart-Allmaras model . . . . . . . . . . . . . . . 24
2.4.4 BCs for Wilcox k − ω model . . . . . . . . . . . . . . . . . 24
2.4.5 BCs for LKE model . . . . . . . . . . . . . . . . . . . . . . 26
II Discretization 27
3 Discontinuous Galerkin spatial discretization 29
3.1 Variational approach . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.2 Basis functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
vii
3.3 Mappings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3.1 Quadrilaterals . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.3.2 Triangles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4 Choice of the basis . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.5 Convective fluxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4 Diffusive fluxes 41
4.1 BR2 method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.2 Original recovery method . . . . . . . . . . . . . . . . . . . . . . . 44
4.3 Enhanced stability recovery method . . . . . . . . . . . . . . . . . 46
4.3.1 Derivation of the method . . . . . . . . . . . . . . . . . . . 46
4.3.2 Extension to 3D . . . . . . . . . . . . . . . . . . . . . . . . 52
4.3.3 BCs for ESR . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.3.4 Dirichlet BC’s in strong form . . . . . . . . . . . . . . . . . 53
4.3.5 Dirichlet BCs in weak form . . . . . . . . . . . . . . . . . . 55
4.3.6 Implementation and computational cost . . . . . . . . . . . 56
4.3.7 Interface integral computational cost . . . . . . . . . . . . . 56
4.3.8 Volume integral computational cost . . . . . . . . . . . . . 57
4.4 Tests and comparisons for the ESR method . . . . . . . . . . . . . 58
4.4.1 1D Poisson equation . . . . . . . . . . . . . . . . . . . . . . 58
4.4.2 1D Convection Diffusion problem . . . . . . . . . . . . . . . 59
4.4.3 2D Heat equation . . . . . . . . . . . . . . . . . . . . . . . . 60
4.4.4 Laminar boundary layer on a flat plate . . . . . . . . . . . . 63
4.5 Considerations on implicit time integration . . . . . . . . . . . . . 65
5 Time discretization 67
5.1 Explicit Runge-Kutta methods . . . . . . . . . . . . . . . . . . . . 68
5.2 Implicit methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.2.1 Jacobian evaluation . . . . . . . . . . . . . . . . . . . . . . 70
5.2.2 Iterative solver . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.2.3 CFL evolution laws for steady problems . . . . . . . . . . . 71
6 Shock capturing 73
6.1 Feedback filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.1.1 Exponential filter . . . . . . . . . . . . . . . . . . . . . . . . 74
6.1.2 Smoothness indicator . . . . . . . . . . . . . . . . . . . . . 75
6.1.3 Feedback filtering . . . . . . . . . . . . . . . . . . . . . . . . 76
6.1.4 Sod problem . . . . . . . . . . . . . . . . . . . . . . . . . . 78
6.1.5 Shock-bubble interaction . . . . . . . . . . . . . . . . . . . 82
6.1.6 Ringleb flow . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6.1.7 Transonic NACA0012 . . . . . . . . . . . . . . . . . . . . . 86
6.2 Artificial viscosity . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
viii
6.2.1 Future works . . . . . . . . . . . . . . . . . . . . . . . . . . 90
7 Adaptive algorithms 93
7.1 Sensors and error indicators . . . . . . . . . . . . . . . . . . . . . . 94
7.2 p-adaptive algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.2.1 Heat equation and p-adaptivity . . . . . . . . . . . . . . . . 96
7.2.2 Vortex shedding around a circular cylinder . . . . . . . . . 99
7.3 h-adaptive algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 102
7.3.1 Transonic NACA0012: h-adaptivity . . . . . . . . . . . . . 103
7.4 hp-adaptive algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 108
10 Conclusions 141
A Adimensionalization 143
D Meshes 149
Bibliography 155
ix
List of Tables
4.1 Condition number of the matrix [R]T [R] for the interface of Fig-
x
List of Figures
xi
6.6 Numerical Schlieren images for shock-bubble interaction at t = 0.071,
t = 0.21 and t = 0.33 (Feedback filtered DG2 scheme). . . . . . . . 83
6.7 Numerical Schlieren image for shock-bubble interaction at t = 0.18
(Feedback filtered DG2 scheme). . . . . . . . . . . . . . . . . . . . 84
6.8 Ringleb flow: constant speed lines (dashed) and computational do-
main Ω. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
6.9 Mach field on the NACA0012 airfoil (M∞ = 0.8,α∞ = 1.25o ): feed-
back filtered DG1 scheme. . . . . . . . . . . . . . . . . . . . . . . . 88
6.10 Mach field on the NACA0012 airfoil (M∞ = 0.8,α∞ = 1.25o ): feed-
back filtered DG5 scheme. . . . . . . . . . . . . . . . . . . . . . . . 88
6.11 Numerical Schlieren image for shock-bubble interaction at t = 0.18
(Feedback filtered DG2 scheme). . . . . . . . . . . . . . . . . . . . 89
6.12 Numerical Schlieren image for shock-bubble interaction at t = 0.18
(Feedback filtered DG2 scheme). . . . . . . . . . . . . . . . . . . . 89
7.1 Temperature field for the 2D heat equation problem, with kw = 5. 96
7.2 Example of order distribution with p-adaptivity and the 8x8x2 mesh
(αp = 0.3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.3 L2 -norm of the temperature error vs total number of DOF’s (possi-
ble orders: pe = 1,2,3,4,5). . . . . . . . . . . . . . . . . . . . . . . . 97
7.4 L2 -norm of the temperature error vs total number of DOF’s (possi-
ble orders: pe = 1,3,5) . . . . . . . . . . . . . . . . . . . . . . . . . 98
7.5 Distribution of the reconstruction order with the entropy sensor. . 101
7.6 Distribution of the reconstruction order with the sensor based on
velocity gradients. . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
7.7 Distribution of the reconstruction order using both the entropy and
the velocity gradient sensors. . . . . . . . . . . . . . . . . . . . . . 102
7.8 Entropy field around a circular cylinder with p-adaptivity (Re∞ =
102 ). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
7.9 Isotropic splitting on unstructured meshes: initial (black) and adapted
(red) meshes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
7.10 Initial mesh (1060 elements). . . . . . . . . . . . . . . . . . . . . . 106
7.11 Adapted mesh after 5 h-refinements (11806 elements). . . . . . . . 106
7.12 Transonic NACA0012: Mach field on the initial mesh (p=1). . . . 107
7.13 Transonic NACA0012: Mach field on the adapted mesh after 5 h-
refinements (p=1). . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
7.14 Computational domain for NACA0012 problem. . . . . . . . . . . 108
7.15 Transonic NACA0012: Cd error vs length scale . . . . . . . . . . . 109
7.16 Transonic NACA0012: Cl error vs length scale . . . . . . . . . . . 109
7.17 Transonic NACA0012: Cd error vs work units . . . . . . . . . . . 110
7.18 Transonic NACA0012: Cl error vs work units . . . . . . . . . . . . 110
8.1 Channel with smooth bump: acceleration by p-refinement. . . . . . 115
8.2 Channel with a smooth bump. . . . . . . . . . . . . . . . . . . . . 116
xii
8.3 Channel with smooth bump: entropy error vs equivalent length scale.118
8.4 Channel with smooth bump: entropy error vs work units. . . . . . 118
8.5 Domain for the transonic Ringleb flow. . . . . . . . . . . . . . . . . 120
8.6 Mach field for the transonic Ringleb flow: initial solution. . . . . . 121
8.7 Mach field for the transonic Ringleb flow: spurious shock. . . . . . 121
8.8 Example of structured mesh for the transonic Ringleb flow. . . . . 121
8.9 Transonic Ringleb flow: convergence history. . . . . . . . . . . . . . 122
8.10 Transonic Ringleb flow: entropy error vs equivalent length scale. . 122
8.11 Transonic Ringleb flow: entropy error vs work units. . . . . . . . . 123
8.12 Vortex transport: final velocity distribution on regular mesh. . . . 125
8.13 Vortex transport: error vs equivalent length scale on regular meshes. 125
8.14 Vortex transport: error vs work units on regular meshes. . . . . . . 126
8.15 Vortex transport: example of regular and perturbed mesh. . . . . . 126
8.16 Vortex transport: error vs equivalent length scale on perturbed
meshes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
8.17 Vortex transport: error vs work units on perturbed meshes. . . . . 127
8.18 Detail of the finest mesh used for the tandem airfoils test. . . . . . 128
8.19 Entropy field for the tandem airfoils test at the end of the simulation
(DG5RK4LS finest mesh) . . . . . . . . . . . . . . . . . . . . . . . 129
8.20 Drag coefficient for the trailing airfoil (finest mesh p=3,4,5). . . . . 130
8.21 Lift coefficient for the trailing airfoil (finest mesh p=3,4,5). . . . . 130
9.1 VKI-LS59 cascade: detail of the mesh. . . . . . . . . . . . . . . . . 132
9.2 VKI-LS59 cascade: Mach field. . . . . . . . . . . . . . . . . . . . . 133
9.3 VKI-LS59 cascade: wall isentropic Mach distribution. . . . . . . . 133
9.4 T106c cascade: example of hybrid mesh. . . . . . . . . . . . . . . . 135
9.5 T106c cascade: Mach at Re2s = 185000, M2s = 0.65 . . . . . . . . 136
9.6 T106c cascade: Mach at Re2s = 80000, M2s = 0.65 . . . . . . . . . 136
9.7 T106c cascade: laminar kinetic energy at Re2s = 185000, M2s = 0.65 137
9.8 T106c cascade: laminar kinetic energy at Re2s = 80000, M2s = 0.65 137
9.9 T106c cascade: turbulent kinetic energy at Re2s = 185000, M2s = 0.65138
9.10 T106c cascade: turbulent kinetic energy at Re2s = 80000, M2s = 0.65138
9.11 T106c cascade: wall isentropic Mach distribution (M2s = 0.65). . . 139
C.1 Curvilinear computational meshes (blue) and visualization meshes
(black) with different subdivisions for triangles and quadrilaterals. 148
xiii
Part I
A numerical approach to
aerospace propulsion
1
Chapter 1
Introduction
3
1 – Introduction
numerical experiment but, unfortunately, its cost becomes prohibitive for the typi-
cal Reynolds numbers which characterize the flows in aerospace propulsion systems
(105 − 107 ).
Starting from these considerations, the experimental approach seems to be more
reliable, especially if turbulent flows are considered. However, the experimental
study of flows related to aerospace propulsion systems can be challenging. This is
due to the fact that they are usually characterized by high speed and very large
jumps in pressure and temperature (e.g. in rockets or jet engines). These fea-
tures make the building of an experimental facility very expensive and complex.
For example, it is difficult to reproduce experimentally the working conditions of
a blade inside a turbomachine because of the unsteady interactions between the
stages. Furthermore the numerical approach gives the full distribution of the state
variables in the domain. This is very useful in several cases. For example, the
numerical approach can be used in conjugated heat transfer problems in order to
obtain directly the solution of the temperature distribution in both the flow and
in the immersed body.
Finally, the numerical approach is interesting in the framework of optimization
processes during the development of an industrial product. Indeed, simulations
can be efficiently used to drive the optimization process because they make it pos-
sible to test several different configurations without the need to build a large set of
prototypes. The experimental approach can then be used as a complementary tool
which allows to validate the numerical results and to quantify the error related to
the numerical predictions.
4
1.2 – Motivations and description of the work
In the preliminary study performed in this work, this last approach outperforms
both uniform low-order and uniform high-order discretizations (see Chapter 7.4).
5
1 – Introduction
The code developed during the first year was used to participate to the Second
International Workshop on High Order CFD methods [11]. It was a very useful
experience because it makes it possible to compare the developed tool with state of
art codes from all over the world. A first comparison was performed by considering
the error level as a function of the total number of degrees of freedom. Good results
were obtained in this case, especially in the transonic Ringleb flow (8.2.2). A sec-
ond comparison involved the computational time which was properly normalized
in order to take into account the features of the particular hardware used by each
participant. This second comparison showed that the preliminary code was signif-
icantly slower than other existing codes in steady problems. The main reason for
this weakness was the lack of a proper accelerating technique for steady problems.
Indeed, while all the other participants used implicit time integration schemes, the
preliminary code could use only explicit time integration schemes which can be
quite inefficient for steady problems. The workshop experience influenced several
of the following choices.
During the first year, only inviscid compressible flows were considered. This made
it possible to develop a solid numerical background for the following work and to
focus the attention on the problems related to shock capturing.
During the second year, diffusive fluxes were introduced in the model. Heat
equation, Navier-Stokes equations and Reynolds Averaged Navier-Stokes equations
were studied in this phase. The work was mainly related to the development of
a new method for the discretization of the diffusive terms. The method, named
Enhanced Stability Recovery [2], is related to the original recovery method intro-
duced by van Leer and Nomura [3] in 2005. The original recovery method shows
an elegant way to compute diffusive fluxes at the interface between two adjacent
elements. It is based on a procedure in which a smooth differentiable recovery
solution is obtained starting from the discontinuous solution of the two elements.
The main idea is to find a recovery solution which is the weak sense indistinguish-
able from the original discontinuous solution. The ESR method is based on the
same apporach but is uses a different recovery basis and a different procedure for
the imposition of Dirichlet boundary conditions. The performed numerical com-
parisons showed that the ESR method has a larger stability limit in explicit time
integration with respect to the original recovery method but it introduces a larger
discretization error (see Section 4.3).
As far as turbulence modeling is concerned, the Spalart-Allmaras one-equation
model has been implemented during the second year. The model showed good
results on turbomachinery flows characterized by high Reynolds number and fully
turbulent behavior (see Section 9.1). Furthermore it appears particularly suitable
for the use with implicit time integration schemes because of the low stiffness of
its source terms (if compared to Wilcox k − ω model).
However, the weaknesses of this model appear when it is used in very low Reynolds
6
1.2 – Motivations and description of the work
In order to investigate also low Reynolds number flows, other two turbulence
models have been implemented during the third year. In particular, the several
versions of the Wilcox k − ω model (1988 [12], 1998 [13], 2006 [14]) have been
implemented and tested. This phase was very useful to gain experience in tran-
sitional flows. Indeed, several sensitivity studies have been performed in order to
understand the effects of boundary conditions and calibration terms in turbulence
modeling. The attention was focused to a particular test case in the turboma-
chinery field: the transitional flow in the T106c turbine cascade. The numerical
experiments performed on this airfoil suggested the introduction of another turbu-
lence model, focused on transitional flows. In particular a three equation model
based on the k − ω model and the laminar kinetic energy concept has been imple-
mented and tested, following the approach of [15].
The stiffness related to the source terms of these turbulence models makes the
explicit time integration of the equations quite expensive. For this reason an im-
plicit time integration scheme has been implemented. This new feature improves
significantly the performances of the code in steady problems, bringing them to a
level comparable to that of other research codes presented at the Workshop.
The last months of the third year have been dedicated to the development of
adaptive algorithms. The discontinuous Galerkin approach offers the possibility to
easily perform adaptation in both the element order (p-adaptivity) and the element
size (h-adaptivity). Several experiments were done on both smooth flows and flows
with singularities. The most interesting results have been obtained by means of an
hybrid hp-adaptive approach.
7
8
Chapter 2
Physical models
In a CFD simulation the choice of the underlying physical model is the first funda-
mental step required to obtain results which can reproduce real-world phenomena.
In particular the physical model should be chosen in order to obtain a good com-
promise between the cost and the ability to reproduce the physics. For example,
the industrial design process of an aerospace component is characterized by sev-
eral steps in which the physical model is gradually refined and improved. In the
following, the five physical models implemented in the code are described putting
in evidence the typical flow features which they can describe.
All the models’ equations are adimensionalized following the procedure described
in Appendix A.
∂ρ ∂
+ (ρuj ) = 0 (2.1)
∂t ∂xj
∂ ∂ ∂P
(ρui ) + (ρui uj ) = − (2.2)
∂t ∂xj ∂xi
∂E ∂
+ (uj (E + P )) = 0 (2.3)
∂t ∂xj
9
2 – Physical models
Here ρ, P, E, u, v denote density, pressure, total energy per unit volume and
cartesian components of velocity normalized to conventional reference values (see
Appendix A). The set of equations is closed by the introduction of the following
equation of state:
p 1
E= + ρ(u2 + v 2 ) (2.4)
γ−1 2
in which the ratio of specific heats γ has been set equal to 1.4 for all the considered
test cases.
∂ρ ∂
+ (ρuj ) = 0 (2.5)
∂t ∂xj
∂ ∂ ∂P 1 ∂τij
(ρui ) + (ρui uj ) = − + (2.6)
∂t ∂xj ∂xi Reref ∂xj
∂E ∂ 1 ∂
+ (uj (E + P )) = [ui τij − qj ] (2.7)
∂t ∂xj Reref ∂xj
The heat flux is described through the linear Fourier law:
γ µ ∂T
qi = − (2.8)
(γ − 1) P r ∂xi
where the heat conductivity λ has been expressed in terms of the dynamic vis-
cosity µ and the Prandtl number P r. In this work the heat conductivity and the
dynamic viscosity are assumed constant. However, it is possible to easily imple-
ment the Sutherland’s law which describes the dependency of dynamic viscosity
from temperature. The components of the shear-stress tensor τij are computed ac-
cording to the Boussinesq approach and assuming the Stoke’s hypothesis for bulk
viscosity:
1 ∂uk
τij = 2µ Sij − δij (2.9)
3 ∂xk
where Sij is the mean strain rate tensor:
1 ∂ui
∂uj
Sij = + (2.10)
2 ∂xj ∂xi
10
2.3 – Reynolds Averaged Navier-Stokes equations
11
2 – Physical models
these flow fields. In contrast, the LES and DNS approaches require usually a 3D
simulation in order to describe properly the dynamics of vorticity, even if there is
a direction in which the averaged fields are constant.
Because of their low computational cost RANS models are widely used. In this
work, three models have been implemented and compared on several flow fields.
As it can be expected, each model works better than others in some problems and
so a general rule cannot be found. In the literature there is a trend in proposing
new models based on a growing number of equations. The goal is that the use
of more equations can reduce the number of calibration coefficients in the model.
This is not always true.
Since this work is devoted to the study of compressible flows, all the implemented
models are based on a Favre average of the Navier-Stokes equations. In the fol-
lowing the full system of conservation equations is reported for the different mod-
els. This makes it possible to put in evidence some approximations which can be
done during the coupling of the turbulence model with the original conservation
equations. For example, some models involve the definition of a turbulent kinetic
energy variable and this require some modification in the energy equation: the
total energy can be redefined in order to include also the turbulent kinetic energy
or, as it has been done in this work, an additive source term can be introduced in
the original energy equation. In contrast, there are models (like for example the
Spalart-Allmaras model) which do not involve the definition on a turbulent kinetic
energy variable. In these cases the energy equation remains unaltered, with the
exception of the inclusion of turbulent terms in the diffusive fluxes. As far as tur-
bulent heat fluxes are concerned they are computed thanks to the introduction of
a turbulent Prandtl number P rt , which has been set P rt = 0.9 in all simulations.
∂ρ ∂
+ (ρuj ) = 0 (2.11)
∂t ∂xj
12
2.3 – Reynolds Averaged Navier-Stokes equations
∂ ∂ ∂P ∂ τ̂ij
(ρui ) + (ρui uj ) = − + (2.12)
∂t ∂xj ∂xi ∂xj
∂E ∂ ∂
+ (uj (E + P )) = [ui τ̂ij − qj ] (2.13)
∂t ∂xj ∂xj
∂ ∂ 1 ∂ ∂ ν̃
cb2 ∂ ν̃ ∂ ν̃
(ρν̃) + (ρuj ν̃) = ρ P̂ − D̂ + ρ(ν + ν̃) + ρ +
∂t ∂xj σ ∂xj ∂xj σReref ∂xk ∂xk
1 ∂ρ ∂ ν̃
−
σReref ∂xk ∂xk
(2.14)
The heat flux includes the turbulent contribution which is modeled by the Reynolds
analogy and is expressed through the introduction of the turbulent Prandtl number
P rt :
γ µ µt ∂T
qi = − + (2.15)
(γ − 1) P rReref P rt ∂xi
The turbulent stress tensor τ̄ij is:
1 ∂uk
τ̄ij = 2µt Sij − δij (2.16)
3 ∂xk
2µ 1 ∂uk
τ̂ij = Sij − δij + τ̄ij (2.17)
Reref 3 ∂xk
The turbulent viscosity µt is defined as:
µt = ρν̃fv1 (2.18)
χ3 ν̃
fv1 = χ= (2.19)
χ3 + Cvi
3 ν
13
2 – Physical models
Here d is the distance from the closest wall while S̃ is the modified vorticity:
ν̃ χ
S̄ = fv2 fv2 = 1 − (2.21)
κ2 d2 1 + χfv1
S + S̄ if S̄ ≥ −cv2 S
S̃ = S (c2v2 S+cv3 S̄ ) (2.22)
S + if S̄ < −cv2 S
(cv3 −2cv2)S−S̄
where S is the magnitude of vorticity. In Eq. 2.22 the modified vorticity has been
limited following the approach proposed in [18]. In that work Spalart et al. observe
that the modified vorticity S̃ should always be positive and greater than 0.3S in
physically relevant situations. In the discretized equations it is possible for S̃ to
become zero or negative due to the fact that fv2 is itself negative over a range of
χ. Negative values of S̃ would introduce problems in the other correlations of the
model.
The function fw is:
1/6
1 + c6w3
ν̃
fw = g g = r + cw2 (r6 − r) r = min , rlim (2.23)
g 6 + c6w3 S̃κ2 d2
In the original SA model a trip term and a laminar suppression term are introduced
in the ν̃ equation. This makes it possible to force the transition of the flow in a
particular point specified by the user. Since in most of the applications the location
of the transition point is not known and the model is considered not appropriate
for transitional flows by Rumsey and Spalart [19], the trip and laminar suppression
terms have not been included in the previous equations.
The constants of the model are cb1 = 0.1355, σ = 2/3, cb2 = 0.622, κ =
0.41, cw1 = cb1 /κ2 , cw2 = 0.3, cw3 = 2, cv1 = 7.1, ct1 = 1, ct2 = 2, ct3 = 1.2, ct4 =
0.5, rlim = 10, cv2 = 0.7, cv3 = 0.9.
Some constants of the model (like for example κ) come from the constants of
the theoretical boundary layer law. Indeed, the tests performed on the velocity
profile for a turbulent boundary layer on a flat plate show good agreement with
the boundary layer law (see Figure 2.1). In Figure 2.2 the computed skin friction
coefficient for the turbulent flow on a flat plate is reported and compared with two
correlations from the literature.
14
2.3 – Reynolds Averaged Navier-Stokes equations
Figure 2.1. Velocity profile in turbulent boundary layer obtained by the proposed
discretization with the Spalart-Allmaras model
Figure 2.2. Skin friction coefficient for turbulent flat plate: comparison between
the implemented Spalart-Allmaras model and correlations from the literature
15
2 – Physical models
approach proposed by Bassi et al. [20]. In this way the equations are solved for the
logarithm of ω (ω̃ = log(ω)) instead of ω itself: this makes the discretization more
stable. Furthermore, both k and ω̃ are limited on the basis of physical consider-
ations. This helps in reducing the stiffness of the discretized equations which can
lead to unphysical values during strong transients. This problem is particularly
significant when the equations are integrated in time by an implicit scheme with a
very large time step.
In the implemented approach the conservative variable E includes only the internal
energy and the kinetic energy of the mean flow. The energy is intended per unit
volume. The conservation of the total energy (internal energy+kinetic energy of
the mean flow+turbulent kinetic energy) is guaranteed by the presence of coupling
source terms in the energy equation and in the k equation.
Wilcox proposed two versions of his models, named high Reynolds and low Reynolds.
The names refer to a local Reynols number (ReT ) obtained by the turbulence vari-
ables. While in the high Re version some coefficients are constant, in the low Re
version these coefficients become functions of ReT . The correlations of the low Re
model tend to the high Re model for high ReT . Since some applications considered
in this work involve low Reynolds number transitional flows, the low Re versions
of the models have been considered.
In the following the set of equations for the low Re k-ω(1998) model is reported in
the form implemented in the code:
∂ρ ∂
+ (ρuj ) = 0 (2.24)
∂t ∂xj
∂ ∂ ∂P ∂ τ̂ij
(ρui ) + (ρui uj ) = − + (2.25)
∂t ∂xj ∂xi ∂xj
∂E ∂ ∂ ∂ui
+ (uj (E + P )) = [ui τ̂ij − qj ] − τij + β ∗ ρk̄eω̃r (2.26)
∂t ∂xj ∂xj ∂xj
∂ ∂ ∂ui ∂ µ ∂k
(ρk) + (ρuj k) = τij − β ∗ ρk̄eω̃r + + σk µ̄t (2.27)
∂t ∂xj ∂xj ∂xj Reref ∂xj
∂ ∂ α ∂ui µ ∂ ω̃ ∂ ω̃
(ρω̃) + (ρuj ω̃) = τij − βρeω̃r + + σω µ̄t +
∂t ∂xj k̄ ∂xj Reref ∂xk ∂xk
(2.28)
∂ µ ∂ ω̃
+ + σω µ̄t
∂xj Reref ∂xj
The heat flux includes also the turbulent contribution:
γ µ µ̄t ∂T
qi = − + (2.29)
(γ − 1) P rReref P rt ∂xi
16
2.3 – Reynolds Averaged Navier-Stokes equations
1 ∂uk 2
τ̄ij = 2µ̄t Sij − δij − ρk̄δij (2.30)
3 ∂xk 3
2µ 1 ∂uk
τ̂ij = Sij − δij + τ̄ij (2.31)
Reref 3 ∂xk
The turbulent viscosity µ̄t is defined as:
α∗ ρk̄
µ̄t = (2.32)
eω̃r
The model constant, the auxiliary functions and the low Re correlations are:
β = β0 f β β ∗ = β0∗ fβ ∗ (2.35)
(
1 + 70χω 1 if χk < 0
fβ = fβ ∗ = (2.36)
1 + 80χω (1 + 680χk )/(1 + 400χk ) if χk ≥ 0
2 2
k̄ = max(0, k) (2.38)
17
2 – Physical models
Notice that k̄ has been limited exactly to zero (and not to an arbitrary small value)
because, after the appropriate substitutions, no term in the previous equations is
divided by k̄.
Furthermore the source terms and the eddy viscosity are computed by using the
variable ω̃r instead of ω̃. The variable ω̃r can be obtained from ω̃ by the impo-
sition of some realizability conditions. In particular, the positivity of the normal
turbulent stresses 2.39 and the Schwarz inequality for the shear turbulent stresses
2.40 are imposed, following the approach of Bassi et al.[20]:
00 2
ρui ≥ 0 (2.39)
2
00 2 00 2
(2.40)
00 00
ρui uj ≤ ρui · ρuj
These requirements are satisfied thanks to the definition of a lower bound ω̃r0 for
ω̃:
ω̃r = max(ω̃, ω̃r0 ) (2.41)
The lower bound ω̃r0 can be obtained by substituting the modeled turbulent
stresses (Eq.2.30)in Eq.2.39 and Eq. 2.40:
2 1 ∂uk
ρk̄ − 2µ̄t Sii − ≥0 i = 1,2 (2.42)
3 3 ∂xk
2 1 ∂uk 2 1 ∂uk
2
(−2µ̄t Sij ) ≤ ρk̄ − 2µ̄t Sii − ρk̄ − 2µ̄t Sjj −
3 3 ∂xk 3 3 ∂xk (2.43)
i = 1,2 i=
/ j
Recalling the definition of the turbulent viscosity (Eq. 2.32) it is possible to obtain
ω̃
the following set of realizability inequalities expressed in terms of the unknown αe ∗ :
eω̃ 1 ∂uk
− 3 Sii − ≥0 i = 1,2 (2.44)
α∗ 3 ∂xk
2
eω̃ 2 ∂uk
ω̃
e
− 3 Sii + Sjj − +
α ∗ 3 ∂xk α∗
(2.45)
1 ∂uk 1 ∂uk
− 9 Sij − Sii −
2
Sjj − ≥0 i = 1,2 i=
/ j
3 ∂xk 3 ∂xk
In the following, the maximum value between the zeros of Eqs. 2.44 and 2.45
ω̃ ω̃
(the unknown is αe ∗ ) will be denoted as â. If αe ∗ > â then Eqs. 2.44 and 2.45 are
18
2.3 – Reynolds Averaged Navier-Stokes equations
both satisfied. The lower bound ω̃r0 that guarantees realizable turbulent stresses
can be obtained by:
eω̃0
= â (2.46)
α∗
Since the low Re version of the k − ω model is considered here, α∗ depends on
the local turbulent Reynolds number Rek according to Eq. 2.33. In conclusion,
ω̃r0 can be obtained by the solution of the following second degree equation:
ω̃r0 2 ρk̄Reref âρk̄Reref
+ ∗
− âα0 eω̃r0 − =0 (2.47)
e
µRk µRk
Figure 2.3. Skin friction coefficient on flat plate: transition from laminar to tur-
bulent. Blue=Blasius solution, Light blue=turbulent correlation, Green= imple-
mented Wilcox k − ω low Re model
19
2 – Physical models
20
2.3 – Reynolds Averaged Navier-Stokes equations
∂E ∂ ∂ ∂ui µ kL
+ (uj (E + P )) = [ui τ̂ij − qj ] − τij + β ∗ ρk̄eω̃r − ρνL S 2 + 2
∂t ∂xj ∂xj ∂xj Reref d2
(2.50)
∂ ∂ ∂ui ∂ µ ∂k
(ρk) + (ρuj k) = τij − β ∗ ρk̄eω̃r + + σk µ̄t + ρR
∂t ∂xj ∂xj ∂xj Reref ∂xj
(2.51)
∂ ∂ α ∂ui µ ∂ ω̃ ∂ ω̃
(ρω̃) + (ρuj ω̃) = τij − βρeω̃r + + σω µ̄t +
∂t ∂xj k̄ ∂xj Reref ∂xk ∂xk
(2.52)
∂ µ ∂ ω̃
+ + σω µ̄t
∂xj Reref ∂xj
∂ ∂ ∂ µ ∂kL µ kL
(ρkL ) + (ρuj kL ) = + ρνL S 2 − 2 − ρR (2.53)
∂t ∂xj ∂xj Reref ∂xj Reref d2
21
2 – Physical models
R = C2 f2 ωβ ∗ kL (2.57)
The constant C2 regulates the intensity of the energy transfer from kL to k and
is set as C2 = 0.3. The constant C4 represents a threshold for the activation of
transition and
√ it is set as C4 = 10. This threshold is compared with the variable
Ry = Reref kd/ν which can be seen as a local Reynolds number based on the
turbulent kinetic energy k and the wall distance d. Finally, the constant C3 is set
as C3 = 8.
Heat fluxes and shear stresses are computed following the same approach used for
the k − ω model.
22
2.4 – Boundary conditions
The Euler equations are dominated by the presence of wave propagation effects.
It is possible to find characteristic lines in the space-time along which signals are
transported. In order not to violate physics, BCs have to be imposed coherently
with the propagation of these signals. In particular, the number of BCs which can
be imposed is equal to the number of signals which enter in the computational
domain.
Inlet and outlet boundaries are treated by defining a ghost state with some infor-
mation from the computational domain and some from the external environment,
according to the number of characteristic signals which enter in the domain. In this
work, total temperature, total pressure and flow direction are imposed at subsonic
inlets. All the data are imposed at supersonic inlets. Pressure is the only quantity
imposed at subsonic outlets. Alternatively, the incoming signals can be directly
imposed in subsonic inlets or outlets in order to obtain a non-reflecting boundary
condition.
If the boundary is a solid wall then the tangency condition is enforced by defining a
ghost state characterized by a velocity vector specular with respect to the internal
velocity.
The previous considerations hold for the Euler equations but can also be used
for the computation of boundary convective fluxes (F and G) in Navier-Stokes or
RANS equations.
The presence of diffusive terms in the Navier-Stokes equations requires the intro-
duction of additive BCs with respect to the Euler equations. In particular, in the
presence of solid walls the no-slip condition can be imposed on the momentum
variables.
As far as the energy equation is concerned, it is possible to impose Dirichlet, Neu-
mann or Robin BCs depending on the properties of the wall.
23
2 – Physical models
u2τ
ωw = Sr (2.59)
ν
where the correlation Sr is
(
(50/kr+ )2 if kr+ < 25
Sr = (2.60)
100/kr+ if kr+ ≥ 25
Wilcox proposed to use the same approach also for smooth walls with the so-called
"slightly-rough-wall" boundary condition. In practice he suggested to substitute
the perfectly smooth wall surface with an hydraulically smooth surface. In this
way the boundary condition becomes:
ν
ωw = 2500 2 (2.61)
kr
where, according to Wilcox, kr should be low enough to guarantee that kr+ < 5,
i.e., it should ensure that the surface is hydraulically smooth with roughness peaks
lying within the viscous sublayer.
24
2.4 – Boundary conditions
An alternative approach for smooth walls was proposed by Menter [27] with
the following relation which links the wall specific dissipation (ωw ) to the distance
of the first grid point off the wall (y1 ):
6ν
ωw = 10 (2.62)
βy12
The condition described by Eq.2.62 means √ setting at the wall the analytical solution
computed at y = αM y1 where αM = 1/ 10.
A combination between Eq.2.61 and Eq.2.62 gives a linear relation between the
prescribed wall roughness (kr ) and the distance of the grid point nearest to the
wall (y1 ): r
kr = Cw y1 Cw = 2500αM 2 β0 = 1.77 (2.63)
6
where the constant Cw depends on the numerical scheme and the reconstruction
order. Hellsten [28] proposed to optimize the factor 10 of Menter’s formula by
means of an accurate near-wall numerical study of the ω solution and by comparing
skin friction distributions of flat plate flows computed on differently refined grids.
The value of the factor proposed by Hellsten is 1.25 instead of 10. With this value
the constant of Eq. 2.63 becomes Cw = 2.5. Another different optimal value
(Cw = 0.3) has been found by Bassi et al. [20].
Bassi et al. [29] performed a study in order to understand how the term αM
depends on the reconstruction order pe in the framework of discontinuous Galerkin
schemes. They proposed the following boundary condition:
6ν
ωw = Reref (2.64)
β(hαM )2
where Ppe 1
αM = e− n=1 n (2.65)
They suggested to set h equal to the distance between the wall and the centroid
of the element.
In this work, the boundary condition described by Eq. 2.64 has always been used
in the presence of smooth walls.
As far as the inlet is concerned, both k and ω have to be assigned. The inlet
turbulence intensity is usually known from experimental data and so kin can be
easily assigned as a function of the inlet turbulence level Tu :
2
3 2
Tu
k = qin (2.66)
2 100
where qin in the inlet velocity magnitude.
On the contrary, the specific dissipation rate ωin is usually not directly measured
25
2 – Physical models
26
Part II
Discretization
27
Chapter 3
Discontinuous Galerkin
spatial discretization
The Discontinuous Galerkin (DG) method was introduced first by Hill and Reed in
1973 [30] for the solution of the transport equation in neutronics. Nowadays they
are widely used for the numerical solution of conservation laws thanks to some of
their features.
Indeed, DG methods seem to join the main advantages of finite volumes (FV)
methods and finite elements (FE) methods. From FV methods they have inherited
several numerical fluxes which make it possible to define fluxes based on upwind
considerations: when hyperbolic partial differential equations are considered, this
approach obtains good results since it takes into account physical wave propagation
phenomena.
On the other hand, the strategy used to obtain high accuracy in the space dis-
cretization is very different in FV and DG methods. In FV methods the only
information that is known inside a cell is the average value of the conservative
variables and so high-order reconstructions can be obtained only through interpo-
lation of data coming from neighbouring cells. In contrast, DG methods obtain
high-order reconstructions introducing several degrees of freedom (DOFs) inside the
element. This alternative approach greatly simplify reconstruction since all the re-
quired information is already inside the element. Furthermore, all the integrals in
the governing equations can be easily calculated by mapping the generic element in
the physical space to a reference element in the computational space. This aspect
makes DG methods very similar to FE methods and so all the knowledge on ele-
ment mapping developed for FE methods can also be used for DG methods. This
topic is of considerable interest with regard to the proper treatment of boundary
conditions. Indeed high-order schemes require a careful representation of solid wall
29
3 – Discontinuous Galerkin spatial discretization
boundaries in order to preserve solution accuracy as was shown by Bassi and Rebay
in 1997 [31]. For this reason curvilinear elements have to be introduced at solid
walls.
Furthermore, the local and discontinuous nature of the DG reconstruction makes
it possible to easily introduce adaptive strategies as will be shown in Chapter 7.
Z Z Z Z Z
∂uh ∂Fh ∂Gh
Rh νdxdy = νdxdy+ νdxdy+ νdxdy− Qνdxdy = 0 ∀ν ∈ Vh
Ωe Ωe ∂t Ωe ∂x Ωe ∂y Ωe
(3.5)
30
3.2 – Basis functions
Z Ne Z Z
X ∂ ũi ∂Φj ∂Φj
Φi Φj dxdy + (F̂h nx + Ĝh ny )Φj ds − ( Fh + Gh )dxdy+
Ωe i=1 ∂t ∂Ωe Ωe ∂x ∂y
Z
− QΦj dxdy = 0 1 ≤ j ≤ Ne
Ωe
(3.7)
The system can be rewritten in compact form through the introduction of the
element mass matrix ([M])
Z
[M]ij = Φi Φj dxdy (3.8)
Ωe
Z Z Z
∂ũ ∂Φ ∂Φ
[M] =− (F̂h nx + Ĝh ny )Φds + ( Fh + Gh )dxdy + qΦdxdy
∂t ∂Ωe Ωe ∂x ∂y Ωe
(3.9)
31
3 – Discontinuous Galerkin spatial discretization
the accuracy of the numerical solution. In the DG framework there are several
possibilities about the choice of the element basis. Both nodal and modal basis
functions can be adopted. In this work, only modal basis have been considered
because of the freedom related to the choice of modal functions. In particular,
this makes it possible to choose a set of basis functions which shows two positive
features: hierarchy and orthonormality. In Chapter 7.2 the advantages related to
the use of a hierarchical basis will be explained.
The second important feature of the chosen bases is the fact that they are or-
thonormal. When the basis is orthonormal the element mass matrix is the identity
and so its condition number is one, independently from the shape of the element.
Furthermore, this choice helps to reduce the computational cost with explicit time
integration because it is not necessary to multiply the right hand side of (3.9) for
the inverse of the mass matrix (which is the identity) at each time step.
In order to obtain an orthonormal element basis the modified Gram-Schmidt pro-
cedure has been implemented, following the approach of Bassi et al. [32]. This
algorithm requires to be initialized with a starting basis. In this work, two differ-
ent starting bases have been implemented for this purpose. The first one is obtained
by a tensor product of Legendre polynomials defined on the reference square. With
this basis, an element with a reconstruction of order p contains Ne = (p+1)2 DOFs
in 2D. In the following of this work this basis will be referred to as BASIS A.
Alternatively, it is possible to define a starting basis from a set of monomials de-
fined in the physical space on a reference frame centered on the element’s center
of mass and aligned to its axis of inertia. This last choice has been proposed by
Bassi et al. [32] for general shaped elements. With this basis, an element with
a reconstruction of order p contains Ne = (p + 1)(p + 2)/2 DOFs in 2D. In the
following of this work this basis will be referred to as BASIS B.
32
3.3 – Mappings
3.3 Mappings
Integrals are approximated through the use of Gauss quadrature formulas (from
[33]) defined on the transformed reference element. The number of quadrature
points is chosen in order to exactly integrate polynomials of order 2p on the refer-
ence element.
3.3.1 Quadrilaterals
The mapping between the general curvilinear quadrilateral element (implemented
up to quartic elements) and the reference square are computed by the Serendipity
mappings (Figure 3.1) reported by Oñate [34].
The transformation is
Pnnod
x = Ni (ξ, η)xi
Pi=1
nnod
y = i=1 Ni (ξ, η)yi (3.10)
where nnod is the number of nodes which define the geometry of the element
and Ni are the shape functions.
1
Ni = (1 + ξi ξ)(1 + ηi η) ξi = ±1 ηi = ±1 (3.11)
4
33
3 – Discontinuous Galerkin spatial discretization
3.3.2 Triangles
Curvilinear triangular elements (implemented up to cubic elements) are trans-
formed into the reference triangle by standard mappings also from [34]. Consider
a point P inside a triangle with the vertices 1,2 and 3. This defines three sub-
areas A1 , A2 and A3 corresponding to the triangles P 23, P 13 and P 12. The area
coordinates L1 , L2 and L3 are defined as
A1 A2 A3
L1 = L2 = L3 = (3.15)
A A A
where A is the area of the triangle.
As it can be expected only two area coordinates are sufficient to define the position
34
3.4 – Choice of the basis
of a point inside the triangle. Indeed, the three coordinates are not independent:
L1 + L2 + L3 = 1 (3.16)
The mapping between the area coordinates and the physical coordinates is:
Pnnod
x = i=1 Ni (L1 , L2 , L3 )xi
Pnnod
y = i=1 Ni (L1 , L2 , L3 )yi (3.17)
In the following there are the shape functions for linear, parabolic and cubic ele-
ments.
Ni = Li 1≤i≤3 (3.18)
The position of the nodes on the reference triangle is described in [34]. Note that
the shape function N9 for cubic triangles reported in [34] contains a typo.
35
3 – Discontinuous Galerkin spatial discretization
ability to adapt to the geometry. On the other hand, quadrilateral elements with
the BASIS A can be very efficient in some problems, especially when structured
mesh are employed.
In order to show the effects related to the choice of the basis, some results on
the inviscid flow in a channel with a smooth bump are reported in the following.
More details on this test case can be found in Chapter 8.2.1. Two sequences of
meshes have been used for this experiment: a sequence of unstructured meshes
with quadrilateral elements and a sequence of unstructured meshes with triangular
elements. The elements at wall are cubic in all the meshes. A reconstruction order
p = 2 is assigned in all the elements and the Osher [35] numerical flux is used to
evaluate the convective fluxes. In Figure 3.3 and Figure 3.4 the initial meshes are
reported: finer meshes are obtained by isotropic splitting. In Figure 3.2 the Mach
field on one of the finest meshes is reported. In Figure 3.5 a plot of the L2 entropy
error versus the equivalent length scale is reported. The equivalent length scale h
is defined in Appendix B. Results are proposed for three different discretizations:
quadrilateral elements with BASIS A, quadrilateral elements with BASIS B and
triangular elements with BASIS B. It is clear that the BASIS A is much more
convenient than the BASIS B in the presence of quadrilateral elements.
The comparison between the results obtained with triangles and quadrilaterals
is more difficult, even in this simple test case. Indeed, when the nDOFs is low
the quadrilaterals with the BASIS A are significantly more convenient than the
triangles with the BASIS B. However, this behavior changes when the nDOFs is
increased. In conclusion, these results show that there is not a choice which is
always the best for all the situations. Triangles with BASIS B or quadrilaterals
with BASIS A can be both good choices, depending on the problem which is under
study. The only certain guidelines that can be obtained from this test is that
BASIS A is more efficient than BASIS B when quadrilaterals are employed.
Figure 3.2. Mach field for the inviscid subsonic flow in a channel.
36
3.4 – Choice of the basis
-3
10
Quad. BASIS A
Quad. BASIS B
-4 Tri. BASIS B
10
Entropy error
10-5
-6
10
37
3 – Discontinuous Galerkin spatial discretization
38
3.5 – Convective fluxes
Osher
LLF
Entropy error
-3
10
-4
10
0 1 2 3 4
p
Figure 3.6. Entropy error vs reconstruction order for Osher and Local
Lax-Friedrichs (LLF) fluxes.
39
40
Chapter 4
Diffusive fluxes
In the DG approach the global solution is not continuous but has jumps at the
interfaces between the elements. At first glance, these methods may seem quite
unsuitable for the discretization of elliptic equations because the discontinuous be-
havior of the numerical solution does not match well with the smoothness of the
solution of an elliptic problem. However, the application of the DG framework to
the solution of elliptic problems has proved to be remarkably successful. Several
approaches have been proposed for the study of elliptic problems in the DG frame-
work, see [46] for a comprehensive review. The first works related to these problems
appeared several years ago. Lions [47] proposed the use of a penalization approach
for the imposition of Dirichlet boundary conditions (BCs) in elliptic problems. His
idea was to substitute the exact Dirichlet BC with a weak BC which reproduces
the same effect of the original BC when a penalization factor tends to infinity.
Nitsche [48] proposed an improved technique which was proven to be consistent.
These ideas were subsequently adopted to impose inter-element continuity in the
context of internal penalization methods (see e.g. the work of Babuska and Zlamal
[49]) and were used to compute the diffusive fluxes exchanged between adjacent el-
ements. Bassi and Rebay [50] proposed a DG method (BR1) for the discretization
of the compressible Navier-Stokes equations which was subsequently generalized
by Cockburn and Shu [51] with the Local Discontinuous Galerkin (LDG) method.
Bassi, Rebay et al. [4] proposed also a second version of their scheme (BR2) in
which a compact stencil is obtained thanks to the use of lifting operators. Similar
motivations drove Peraire and Persson [?] to introduce the Compact Discontinuous
Galerkin (CDG) method which can be seen as a compact evolution of the LDG. A
contribution was also given by Baumann and Oden [52] with a method based on a
non-symmetric bilinear form. A different path was chosen by Gassner, Lorcher and
Munz [53] who proposed a numerical flux for the diffusion terms in finite volume
or DG schemes which is based on an exact solution of the diffusion equation with
41
4 – Diffusive fluxes
42
4.1 – BR2 method
boundary procedure is truly local and acts only on the boundary element. In
contrast, the original procedure [61] proposed for the RDG1x method needs infor-
mation also from the neighbouring elements.
The results obtained with the proposed discretization were compared not only with
the original RGD1x method but also with the widely used BR2 method, which rep-
resents a reference in this field.
Z
∂ũ
[M] =− F̂h (uh± , zh |± ± ±
∂e )nx + Ĝh (uh , zh |∂e )ny Φds+
∂t ∂Ωe
Z Z (4.1)
∂Φ ∂Φ
+ Fh (uh , zh ) + Gh (uh , zh ) dxdy + QΦdxdy
Ωe ∂x ∂y Ωe
In Eq. 4.1 the dependence of the diffusive fluxes on the element solution (uh )
and on the modified gradients (zh and zh |± ∂e ) is stated. In the BR2 method the
fluxes across the faces of the element (F̂h and Ĝh ) are computed in a central way
as:
−
F (uh+ , zh |+
σ ) + F (uh , zh |σ )
−
F̂h = (4.2)
2
−
σ ) + G(uh , zh |σ )
G(uh+ , zh |+ −
Ĝh = (4.3)
2
where σ is a generic face of the element and the data from the two side of the face
are denoted by ±.
43
4 – Diffusive fluxes
zh = ∇ h u h + R zh |σ = ∇h uh + ησ rσ (4.4)
The previous equation shows that the gradients are obtained by the gradient of
the element solution (∇h uh ) augmented by the global (R) or local (rσ ) lifting
operators. The coefficient ησ is a penalty parameter which should be chosen larger
than the average number of faces of the elements sharing the interface σ on which
the flux is evaluated.
For each face of the element a local lifting operator rσ : [L2 (σ)]2 → [Pp2 (Th )]2 is
defined by the following integral relation:
τ + + τh−
Z Z
τh · rσ (v)dxdy = − ( h ) · vds ∀τh ∈ [P2k (Th )]2 (4.5)
Ωe σ 2
44
4.2 – Original recovery method
Z Z
u Φn dxdy =
r
uh Φn dxdy 1 ≤ n ≤ NB (4.7)
ΩB ΩB
A set of basis functions Ψ with Nr degrees of freedom can be introduced for the
recovered solution:
Nr
X
ur = ũr · Ψ = ũrj (t)Ψj (x, y) (4.8)
j=1
Substituting (4.8) and (3.3) into (4.7) the following two sets of linear equations are
obtained:
Z
[RB ]nj = Ψj Φn dxdy 1 ≤ n ≤ NB , 1 ≤ j ≤ Nr . (4.10)
ΩB
Introducing the interface recovery matrix [R], the set of equations (4.9) can be
expressed in a more compact form:
[RA ] r [MA ] 0
A
ũ
ũ = [R]ũ =
r
. (4.11)
[RB ] 0 [M B ] ũB
If an orthonormal basis is used, the mass matrix within each element is the identity,
and so the matrix multiplication on the right hand side can be removed,
A
ũ
[R]ũ =
r
. (4.12)
ũB
From the previous derivation it can be seen that the recovery matrix [R] has
dimension (NA + NB ) × Nr . The most difficult task in the recovery approach is
the choice of the recovery basis Ψ.
Van Leer and Lo [61] considered the case in which NA = NB , and they set
Nr = (NA +NB ). They introduced a provisional recovery basis Ψ which makes the
recovery matrix non singular. The elegance of their idea is related to the next step.
45
4 – Diffusive fluxes
They used the columns of the inverse recovery matrix to define a final recovery basis
Ψ̂ which is in the weak sense indistinguishable from the elements discontinuous
basis (van Leer and Lo [62]). In this way the degrees of freedom of the two elements
which share an interface can be used to put in evidence both the discontinuous
hyperbolic nature or the continuous parabolic nature of the underlying equations
simply by switching from a basis (Φ) to another (Ψ̂).
NA
X NB
X
ur = j Ψ̂j +
ũA j Ψ̂NA +j .
ũB (4.13)
j=1 j=1
46
4.3 – Enhanced stability recovery method
47
4 – Diffusive fluxes
interface. Three cases will be described depending on the order of the two ele-
ments. Consider a reference frame centered on the mid-point of the interface and
with the axis aligned to the normal and tangential directions (ξ, η) as shown in
Figure 4.1:
η ξ
Figure 4.1. Interface reference frame for constructing the recovery basis.
1
ξ η
ξ2 ξη η2
ξ3 ξ2η ξη2
Figure 4.2. Preliminary recovery basis before orthonormalization for the case
pA = pB = 2, in the Enhanced Recovery approach.
1 ξ ξ ξ3 ξ4 ξ5
η ηξ ηξ2 ηξ3
η2 η2ξ
Figure 4.3. Preliminary recovery basis with the original recovery approach
for the case pA = pB = 2.
• pA = pB = p
First of all we consider the case in which the two elements have the same
order p. The starting recovery basis for the initialization of the orthonormal-
ization procedure is obtained by considering the monomial basis of order p in
the variables (ξ, η) and adding all the monomials with order p + 1 in which
ξ appears. In other words these additive functions consist in the first p + 1
monomials of the (p + 1)th row of the Pascal triangle. The tests done in this
work have shown that these additive functions make the difference. Indeed,
the preliminary experiments showed that if the additive functions are not
used or if only the term ξ p+1 is included, the convergence rate of the scheme
can be compromised.
48
4.3 – Enhanced stability recovery method
Since the order of the recovery reconstruction is reduced with respect to the
original recovery approach, it is easier to control the condition number of the
recovery matrix. Moreover, this choice is related to the improvement in the
stability limit observed in the numerical experiments presented below.
An example of the proposed starting basis in the case p = 2 is shown in
Figure 4.2. For the sake of comparison, Figure 4.3 reports the provisional
basis for p = 2 obtained according to the original recovery approach.
• |pA − pB | = 1
The starting recovery basis is obtained by considering the monomial basis
of order p̃ = max(pA , pB ) and adding all the monomials of order p̃ + 1 in
which ξ appears. It is possible to use the maximum order between pA and
pB if there is enough information in the union of the two elements to obtain
a recovered solution with this accuracy, i.e. Nr ≤ NA + NB . This condition
is satisfied if min(pA , pB ) ≥ 1. Thus, the p-adaptive strategy avoids the use
of elements with p = 0.
• |pA − pB | > 1
It could happen that a p-adaptive algorithm introduces a jump of two or
more orders between neighbouring elements. In this case it is impossible
to choose the recovery basis with p̃ = max(pA , pB ). Indeed, in the case
|pA − pB | > 1, the recovery degrees of freedom would be more than the
sum of the degrees of freedom in the two elements if p̃ = max(pA , pB ).
For this reason, the order of the recovery is locally reduced, choosing p̃ =
max(pA , pB ) − 1, i.e. at the interface between elements with a different
accuracy, the algorithm chooses an intermediate value for the degree of the
polynomial being reconstructed. This reflects the fact that the adaptive
algorithm assigns a jump in the accuracy across the interface, so it seems
reasonable to choose an intermediate state at the interface. Thus, in this case,
the starting basis is built from a monomial basis of order p̃ = max(pA , pB )−1
plus all the monomials of order p̃ + 1 in which ξ appears. In the performed
tests it was found that the presence of strong jumps in the order distribution
across the domain should be prevented whenever possible (see Section 7.2.1).
For this reason, the condition |pA − pB | > 1 should be avoided during the
simulations by choosing a more regular order distribution. However, if the
condition is verified the algorithm is able to manage this case, as described
above.
Therefore, the starting recovery basis has always Nr = (p̃ + 1)(p̃ + 2)/2 + (p̃ + 1)
degrees of freedom, where p̃ is equal to p if a uniform order distribution is used.
Otherwise p̃ can be set equal to max(pA , pB ) or max(pA , pB ) − 1, depending on
49
4 – Diffusive fluxes
ble 4.1. The data refer to the interface between the two distorted elements shown
in Figure 4.4 for the case pA = pB . Orthonormalization is applied on the element
basis functions in both cases, but only in the second case it is also applied to the
recovery basis. These results suggest that the use of orthonormalization on the
proposed recovery basis becomes fundamental when high-order reconstructions are
employed on irregular meshes. The condition number of the matrix was estimated
with the free software package GNU Octave [65].
It can be expected that the use of the orthonormalization procedure on the recov-
ery basis can be useful also for other recovery-based schemes, since they all involve
the definition of a recovery procedure which is influenced by the behavior of the
recovery basis.
50
4.3 – Enhanced stability recovery method
Figure 4.4. Interface between two distorted elements for the test of Table 4.1.
51
4 – Diffusive fluxes
4.3.2 Extension to 3D
In this Section some considerations on the extension of the method to 3D are re-
ported. In particular it is necessary to define how to build the recovery basis in 3D.
Consider a reference frame with the origin in the geometric center of the interface.
Its axis are aligned with the normal and tangential directions (ξ, η, ζ).
First of all, the case pA = pB = p̃ is studied. The starting recovery basis can be
obtained by considering the monomial basis of order p̃ and adding all the monomi-
als with order p̃ + 1 in which ξ appears. With this approach the size of the recovery
basis is Nr = (p̃ + 1)(p̃ + 2)(p̃ + 3)/6 + (p̃ + 1)(p̃ + 2)/2.
The cases |pA − pB | = 1 and |pA − pB | > 1 can be managed in a way similar to the
2D approach.
The same problems described for p = 0 in the 2D context are present also in 3D.
Another important issue which can become important in 3D is the memory re-
quirement. In Section 4.3.6 there are suggestions on implementation details which
can help in saving memory. Future work will be devoted to the assessment of the
method in 3D.
From a practical point of view, it can be shown that the use of strong Dirichlet
BCs can introduce stability limitations and spurious oscillations in the numerical
solution (see for example [67]). Furthermore several discretization methods allow
the weak imposition of Dirichlet BCs in a natural way. For example, in the BR2
scheme this is simply done through the definition of a proper ghost state in all
the boundary quadrature points. The extension to this approach in recovery-based
52
4.3 – Enhanced stability recovery method
schemes could be non trivial. Indeed, the recovery procedure is applied to the
union of two elements and so a ghost element would be required in this case, not
just a local ghost state. The definition of the proper values in the ghost element
can be obtained through symmetry considerations between the boundary element
and the ghost element. For example Borrel and Ryan use this approach in their
paper [58] on the elastoplast method. The problem is that this procedure may
become ambiguous in the presence of curvilinear elements, because in this case the
boundary curve is not a symmetry axis between the boundary element and the
ghost element.
Another path was followed by van Leer, Nomura and van Raalte [61]. They pro-
posed to impose the BCs on the recovery solution. They substitute the missing
information in the boundary element with data from one or more interior elements.
They observed that this procedure may reduce the stability range of the method.
Furthermore this approach is not trivial when unstructured meshes are used, be-
cause there are multiple possible choices.
Two of the main reasons for the success of DG methods are the compactness
of the reconstruction and the simplification in the treatment of BC’s when high
order reconstructions are employed. In order to keep these positive features, an
alternative approach has been developed in this work which makes it possible to
impose both strong or weak Dirichlet BC’s in recovery-based DG methods, without
the need to use ghost elements or data from other interior elements.
i=1
where umw represents the prescribed wall value in the quadrature point m.
If the procedure is forced to be conservative the mean value has to be preserved
(∆ũ1 = 0). In this way the system (4.16) has Ne − 1 unknowns which describe
the perturbation of the elements degrees of freedom (∆ũi , 2 ≤ i ≤ Ne ). In general
53
4 – Diffusive fluxes
Ne
X
min(|∆ũ|2 ) = min( ∆ũ2i ). (4.17)
i=2
"N M Ne
!#
e
∂ X X X
∆ũ2i + µm um
w − (ũi + ∆ũi )Φi (xq )
m
= 0. (4.18)
∂∆ũi i=2 m=1 i=1
In other words it is necessary to look for the smallest perturbation which is able to
satisfy the BC’s. The set of equations (4.18) and (4.16) defines the linear system
(4.19) in which there are (Ne − 1 + M ) equations and (Ne − 1 + M ) unknowns:
the perturbations of the element degrees of freedom (with the exception of ∆ũ1
which is set to zero and is already known) plus the Lagrange multipliers. The
boundary matrix [B] and the boundary vector {W} are explicitly written in (4.20)
and (4.21):
∆u2
..
.
∆uNe
B = W (4.19)
µ1
..
.
µM
54
4.3 – Enhanced stability recovery method
0
..
.
0
W = (4.21)
PNe .
uw1 − i=1 ũi Φi (xq1 )
..
.
PNe
uwM − i=1 ũi Φi (xq )
M
The solution of this system gives the perturbations which have to be applied to
the element. In particular, the Lagrange multipliers are not needed and they can
be eliminated. Thus it is possible to define a reduced boundary matrix [B̂] such
that: 1 PNe
∆u2 uw − i=1 ũi Φi (xq )
1
.. ..
. = B̂ . = B̂ Ŵ . (4.22)
∆uNe
M PNe
uw − i=1 ũi Φi (xq )
M
The reduced boundary matrix [B̂] can be obtained by the first Ne − 1 rows and the
last M columns of the inverse of [B]. At this point the gradient required by the
boundary fluxes can be computed with the product between the perturbed degrees
of freedom and the gradient of the element basis functions.
55
4 – Diffusive fluxes
All numerical results obtained with the ESR method which are presented in the
following were computed with this weak enforcement of BC’s.
In the RDG1x scheme the recovery coefficients ũr coincide with the degrees of
freedom inside the two elements and so the gradient can be obtained as
n Ao
∇u = [Dr ] ũũB .
Thus, the cost for each interface is proportional to M ×2×2Ne also in this case.
56
4.3 – Enhanced stability recovery method
• ∇u = [D]ũ
In each quadrature point the fluxes are computed using the internal element
solution. The cost is proportional to L × 2 × Ne . The matrix with the
derivatives of the element basis functions [D] can be precomputed since it
depends only on the mesh.
The cost for the RDG1x method is related to the following operations:
PNF
• ∇u = N1F i=1 [Dr ]i ũir
In each quadrature point the gradient is computed as an average between
all the gradients obtained by the several available recovery solutions (one for
each face of the element). In this case the cost is proportional to L × NF ×
2 × 2Ne where NF is the number of faces of the element. Lo and van Leer
[60] proposed also another approach which improves accuracy but is more
involved. In practice they use the recovery solution only for evaluating the
derivative in the coordinate normal to the interface and, since there are more
directions than dimensions, they introduce a least square approach. This
implies that, in each internal quadrature point, a least square problem has
to be solved. The cost in this case is greater than in the previous approach
and the implementation is significantly more involved.
The previous considerations suggest that the main difference between the cost
of the ESR method and the RDG1x method is related to the computation of the
volume integral. Indeed, in the described implementation the cost per interface
is the same for the two methods even if they use recovery bases with a different
size. However, the RDG1x method requires more work than the ESR method in
the volume integral, because it uses all the several recovery functions defined in
the element (one for each face). In contrast, the ESR method is based on a very
simple evaluation of the volume integral since it directly uses the gradient of the
element solution. From a practical point of view, the CPU time per iteration re-
quired by the two methods might be similar but it is strongly influenced by the
implementation (cache effects can significantly alter the speed) and by possible
memory limitations which can forbid the storage of precomputed matrices.
Since the test cases considered in this work are 2D, there are no memory limita-
tions, and all quantities that can be precomputed will be stored in memory at the
beginning of each computation. However, memory requirements can become an
important issue in 3D problems. In order to reduce memory usage it is useful to
57
4 – Diffusive fluxes
avoid the storage of the interface recovery matrix ([R̃]). Indeed, it is more conve-
nient to pre-compute and store the product between the matrix of the derivatives
of the recovery basis functions ( [Dr ]) and the recovery matrix ([R̃]), for each
quadrature point.
In the example described in this Section a scalar problem is studied. If a system of
equations is considered (i.e. Navier-Stokes) the recovery approach gives the gradi-
ents of the conservative variables. In order to compute the fluxes it is necessary to
switch to the gradients of the primitive variables. This can be done by computing
the values of the conservative recovered variables at the interface. In this case too,
it is possible to save memory, avoiding the storage of the recovery matrix and stor-
ing the product between the matrix containing the recovery functions, evaluated
at the interface, and the recovery matrix.
The previous analysis considers only a problem with a fixed grid. If deforming
meshes are employed, the recovery functions and the related matrices have to be
re-computed during the simulation. This additional cost can be significant for
both the RDG1x and the ESR methods. In this kind of problems recovery-based
methods might be less efficient than other existing approaches, like, for example,
the BR2 method.
Van Leer et al. [64] reported a comparison between several schemes (with p = 1 and
forward Euler) for this test case. In Table 4.2 the dimensionless time step ν∆t/∆x2
obtained for the ESR method are reported and compared with the stability limit
for the BR2 and then RDG1x methods from [64]. Table 4.3 shows the L2 error on
the temperature and the convergence order obtained in the present implementation
for RDG1x, BR2 (ηBR2 = 1) and the proposed ESR scheme. All results shown in
the table, were obtained with p = 1 and forward Euler time integration.
Particular attention was dedicated to the BC’s procedures originally proposed by
the different authors. In particular for the RDG1x scheme, BC’s are imposed on
the recovery solution, exploiting information from the boundary and the first two
elements close to it, as in [61]. For the BR2 scheme a proper ghost state computed
as a function of the BC’s is defined. For the ESR method the weak minimization
58
4.4 – Tests and comparisons for the ESR method
Mesh RDG1x L2 error Order BR2 L2 error Order ESR L2 error Order
8 8.90E-04 - 3.06E-02 - 5.48E-02 -
16 4.24E-05 4.39 8.67E-03 1.82 1.44E-02 1.93
32 2.18E-06 4.28 2.25E-03 1.95 3.69E-03 1.96
64 1.21E-07 4.17 5.66E-04 1.99 9.35E-04 1.98
exp(10x) − exp(10)
u(x) = . (4.25)
1 − exp(10)
59
4 – Diffusive fluxes
Several computations were performed with the RDG1x, the BR2 and the ESR
methods (p = 1) and the first order forward Euler time integration scheme. Three
non uniform meshes with 5, 10 and 20 elements were used. The meshes are clustered
in order to reproduce the aspect of the typical grids used in Navier-Stokes boundary
layer simulations. The size of the element near the boundary x = 1 is ∆x =
0.08, 0.04 and 0.02 for the different meshes. In Table 4.4 the L2 -errors are reported
for the three schemes. While in the previous test case the RDG1x scheme gave
errors which are several orders of magnitude lower than the other schemes, now
the errors for the different methods are significantly closer. The ratio between the
error of the ESR and the RDG1x methods is equal to approximately 3-4 for the
different meshes. Furthermore the stability limit of the discretization is dominated
by the diffusive terms and so the ESR method can benefit from its double time
step with respect to the RDG1x (the data in Table 4.2 still hold). These results
are limited to a scalar linear problem with p = 1 but they suggest that when
convective effects appear in the equations, the global errors obtained by the ESR
and the RDG1x methods become closer because the bottle neck is represented by
the convective discretization. This difference could become even smaller in high
Reynolds number industrial flows, in which the convective terms are particularly
strong and the meshes are often highly distorted.
T = 0 on x = 1, y = 0 and y = 1
(4.26)
T = sin(kw πy) on x = 0.
For the ESR method, BC’s were imposed with the weak approach, based on
the minimization procedure of Section 4.3.5. The parameter kw is an integer which
represents the number of semi-waves in the y-direction. In this test it was set to
60
4.4 – Tests and comparisons for the ESR method
Figure 4.5. Exact temperature field for the 2D heat diffusion problem.
The test was also performed with the widely used BR2 scheme in order to
compare the behavior of the two methods. The stabilization parameter associated
with this last scheme was set to ηBR2 = 4 ( ηBR2 > NF according to [32]). The
BC’s for the BR2 scheme are weakly imposed by means of proper ghost values on
the boundary quadrature points.
The mesh refinement analysis is reported in Table 4.5. It can be seen that even
with few elements, both schemes reach quickly the theoretical convergence order.
In Figure 4.6 a direct comparison of the two methods is presented. The error is
given as a function of the equivalent length scale (h), which depends on the number
of total degrees of freedom (nDOF s): h = (nDOF s)−0.5 . The plot shows that the
error for the ESR method is greater than the error for the BR2 method but, when
the order is increased, the two schemes give comparable errors.
These numerical experiments were performed with a time marching approach in
which explicit integration schemes were employed. The stability limits for the ESR
method and the BR2 method are reported in Table 4.6. It is interesting to see that
the allowed time step for the ESR method is approximately 4 times larger than
the allowed time step for the BR2 method when p = 1. The ratio tends to grow
when the order is increased and it is near 8 for p = 6. This behavior, together with
the fact that for high orders the two schemes give comparable errors, suggest that
61
4 – Diffusive fluxes
Scheme Mesh Error ESR Order ESR Error BR2 Order BR2
DG1 2 × (2 × 2) 7.33E-02 - 2.98E-02 -
2 × (4 × 4) 2.02E-02 1.86 1.23E-02 1.28
2 × (8 × 8) 4.92E-03 2.04 3.88E-03 1.66
DG2 2 × (2 × 2) 2.15E-02 - 8.79E-03 -
2 × (4 × 4) 2.00E-03 3.43 9.77E-04 3.17
2 × (8 × 8) 2.47E-04 3.02 1.14E-04 3.10
DG3 2 × (2 × 2) 1.75E-03 - 1.08E-03 -
2 × (4 × 4) 9.17E-05 4.25 7.38E-05 3.87
2 × (8 × 8) 5.32E-06 4.11 4.79E-06 3.95
DG4 2 × (2 × 2) 1.45E-04 - 1.23E-04 -
2 × (4 × 4) 4.90E-06 4.89 4.25E-06 4.86
2 × (8 × 8) 1.45E-07 5.08 1.41E-07 4.91
DG5 2 × (2 × 2) 1.51E-05 - 1.24E-05 -
2 × (4 × 4) 2.96E-07 5.67 2.12E-07 5.87
2 × (8 × 8) 4.53E-09 6.03 3.44E-09 5.95
DG6 2 × (2 × 2) 1.25E-06 - 8.82E-07 -
2 × (4 × 4) 9.74E-09 7.00 7.60E-09 6.86
2 × (8 × 8) 7.79E-11 6.97 6.15E-11 6.95
Table 4.5. L2 -norm of the temperature error for the ESR and the BR2 methods.
Table 4.6. Stability limit with explicit time integration for 2D heat diffu-
sion on unstructured meshes.
the ESR method becomes competitive for explicit time integration of high order
reconstructions. On the other hand, the fact that the BR2 method gives a lower
error for all the reconstruction orders considered here, makes it a general purpose
scheme, with a wider applicability than the ESR method.
It is very hard to compare the efficiencies of the different schemes. A possible
approach might be to evaluate the total computational cost required to obtain a
certain error level. However, the CPU time obtained is strongly related to the
62
4.4 – Tests and comparisons for the ESR method
particular implementation chosen, and to the nature of the problem under study.
Indeed, the presence of memory limitations (typically in 3D) or deforming grids
can dramatically increase the computational cost, since several quantities cannot be
stored but have to be re-computed during the simulation. Furthermore, the choice
of the time integration scheme can enhance or cancel some benefits of the different
methods. For example, in steady state problems, implicit integration schemes are
commonly used. Their large stability domain can reduce the advantages observed
in the explicit time integration with the ESR method.
10-1
-3
10
DG1-ESR
-5 DG2-ESR
10
Error
DG3-ESR
DG4-ESR
DG5-ESR
DG6-ESR
10-7 DG1-BR2
DG2-BR2
DG3-BR2
-9 DG4-BR2
10 DG5-BR2
DG6-BR2
-11
10
0.05 0.1 0.15 0.2
h
Figure 4.6. L2 -norm of the temperature error vs the equivalent length scale h.
63
4 – Diffusive fluxes
proposed by Bassi and Colombo was used. It can be downloaded from the Work-
shops website (file a1-125-2s.msh, [11]). This grid contains 560 quadrilateral ele-
ments. The distance between the inlet and the leading edge is 1.25. The distance
between the freestream and the plate is 2. The size of the elements near the wall
is 3.75 · 10−4 in the normal direction. The most stretched element in the domain
has a length/thickness ratio equal to 877.
A p-refinement study was performed on this mesh in order to evaluate the
convergence of the solution. The simulations make it possible to compare the
results with those presented by several groups at the workshop, which are reported
in [68]. In Figure 4.7 the wall friction coefficient distribution is shown for several
orders of accuracy. Also, Blasius’ incompressible solution is reported. The effect of
p-refinement can be easily seen in the region near the leading edge. We performed
a second set of simulations with a lower free-stream Mach number (M∞ = 0.2)
in order to understand the influence of compressibility. In Table 4.7 the drag
coefficient (CD ) is reported as a function of the total number of degrees of freedom
per equation (nDOF s/eq). Even when the computations were performed using
one of the meshes with less elements between those proposed at the Workshop,
the p-refinement quickly obtained a converged solution. The ESR method behaves
well also in the presence of highly clustered meshes with very stretched elements.
10-1
Blasius
DG1
DG2
DG3
DG4
DG5
-2
10
cf
-3
10
-5 -4 -3 -2 -1 0
10 10 10 10 10 10
x
Figure 4.7. Wall friction coefficient (cf ) for the flat plate (Re∞ = 106 , M∞ = 0.2)
64
4.5 – Considerations on implicit time integration
ũA
∇u = [D]ũ = [D][R̃]
r
. (4.28)
ũB
The terms in the jacobian related to this contribution can be immediately computed
from the constant terms in the previous relation. On the other hand, if the interface
65
4 – Diffusive fluxes
Again, the contribution to the jacobian can be directly obtained from the constant
terms which appear in the previous relation.
A performance test was carried out on the 2D heat diffusion problem of Section
4.4.3. In particular an unstructured mesh with 512 triangles is considered. All
the elements are fifth order accurate (p = 4). The solution is initialized with a
uniform field and time integration is performed with both the RK4-LS explicit
scheme and the backward Euler (BE) implicit scheme. In Figure 4.8 the L2 norm
of the residuals is reported as a function of the computational time. As expected,
the plot shows the significant advantage offered by the implicit approach for steady
problems.
2
10
0
10
10-2
-4
10 RK4LS σ=0.035
Residual
-6 BE σ=10
10 BE σ=100
BE σ=1000
-8
10
-10
10
-12
10
-14
10
0 50 100 150
CPU time [s]
66
Chapter 5
Time discretization
Several time integration methods have been tested during the research activity.
During the first year both explicit multistep and explicit Runge-Kutta algorithms
have been implemented. Multistep methods [70] require the computation of fluxes
only once for each time step but they need to keep in the memory the numerical
solution at several previous steps. Furthermore, their stability limit becomes lower
when the order of accuracy is increased. On the other hand, Runge-Kutta methods
introduce several stages inside each step but they show a larger stability domain
when the order is increased.
Some experiments have also been performed with the ADER scheme [71]: it is
based on a particular procedure which gives a time dependent solution for the
fluxes at the interfaces between elements. The time evolution of the solution is
then obtained by a proper quadrature of the time dependent fluxes.
In order to increase the performances of the code in steady problems the implicit
backward Euler scheme has been implemented.
It is interesting to note that there are current trends in the literature which suggest
the use of implicit time integration schemes also for unsteady problem. A method
which seems to be very promising has been proposed by Nigro et al. [72].
In the following, only the implemented explicit Runge-Kutta methods and the
backward Euler scheme are described because most of this work has been performed
with these methods.
In Chapter 3 the discontinuous Galerkin semidiscrete formulation (Eq. 3.9) has
been derived for a generic element. It describes the evolution in time of the degrees
of freedom of the element. The global set of equations for all the elements in the
domain can be expressed as:
dũ
[M] = −R(ũ) (5.1)
dt
67
5 – Time discretization
where [M] is the block diagonal global mass matrix and ũ is the global vector of
degrees of freedom. The vector R(ũ) is the global vector of the residuals obtained by
the boundary and volume integrals of Eq. 3.9. In order to simplify the notation, the
different methods will be presented by considering a reference problem described
by an equivalent system of ordinary differential equations:
du
= L(u) (5.2)
dt
In all the simulations a global time stepping strategy is employed. In the
general case in which convection-diffusion equations are considered the diffusion
and convection stability limits are evaluated separately in each element:
He2
∆td = CF L (5.3)
κ(2pe + 1)
He
∆tc = CF L (5.4)
c(2pe + 1)
where CF L, c, κ, He and pe are the stability coefficient, maximum signal speed,
diffusivity coefficient and element characteristic size and order. Then, the minimum
allowable time step is chosen in all the domain and it is used as global time step.
Cockburn [73] reports that a CFL number equal to 1 can be used in Eq. 5.4
for convection problems when a DG reconstruction of order p is integrated by an
explicit Runge-Kutta algorithm with an accuracy order equal to p + 1.
u(1) = un + ∆tL(un )
1 n 1 (1) 1
un+1 = u + u + ∆tL(u(1) ) (5.6)
2 2 2
68
5.2 – Implicit methods
u(1) = un + ∆tL(un )
3 n 1 (1) 1
u(2) = u + u + ∆tL(u(1) )
4 4 4
1 n 2 (2) 2
un+1 = u + u + ∆tL(u(2) ) (5.7)
3 3 3
Fourth-order accuracy has been obtained with three different Runge-Kutta al-
gorithms: the classical four stages method [75], the Strong Stability Preserving
(SSP) five stages method [76] and the low memory five stages method [77].
Most of the simulations have been performed with the SSP RK4 which is reported
in the following. Notice that the presence of the fifth stage requires a greater com-
putational effort in comparison with the classical fourth-order/four stages scheme,
but this is paid by a larger allowable time step.
u(1) = un + 0.39175222700392∆tL(un )
u (2)
= 0.44437049406734un + 0.55562950593266u(1) + 0.36841059262959∆tL(u(1) )
u(3) = 0.62010185138540un + 0.37989814861460u(2) + 0.25189177424738∆tL(u(2) )
u(4) = 0.17807995410773un + 0.82192004589227u(3) + 0.54497475021237∆tL(u(3) )
un+1 = 0.00683325884039un + 0.51723167208978u(2) + 0.12759831133288u(3) +
+ 0.34833675773694u(4) + 0.08460416338212∆tL(u(3) ) +
+ 0.22600748319395∆tL(u(4) ) (5.8)
ũn+1 − ũn
[M] = − R(ũn ) + [J](ũn+1 − ũn ) (5.9)
∆t
where the matrices [J] and [M] are the jacobian matrix and the global mass matrix.
The global mass matrix is a block diagonal matrix in which each block is obtained
by an element mass matrix. The jacobian matrix is a block sparse matrix which
contains the derivatives of the residual with respect to the degrees of freedom:
∂Ri
Jij = (5.10)
∂ ũj
69
5 – Time discretization
In PEq. 5.9 ũ represents the global vector of degrees of freedom which has size
nele
M i=1 Ni , where M , nele and Ni are the number of governing equations, the
number of elements and the number of degrees of freedom in the element i, re-
spectively. The equation can be rewritten in order to put in evidence the following
linear system:
1
[M] + [J] (ũn+1 − ũn ) = −R(ũn ) (5.11)
∆t
70
5.2 – Implicit methods
where the coefficients min and rel are usually chosen equal to 10−10 and 10−8 . A
similar approach has been proposed by Brown and Saad [79].
where Ri0 and Ri are the residuals of the i-th equation at the first time step and
at the current iteration. M is the number of governing equations which depends
on the chosen physical model and the dimensionality of the problem.
if x ≤ 1
( CF L
xα ,
0
CF L = CF L
α CF L −CF0 Lexp (1−x) (5.15)
CF Lexp + (CF L0 − CF Lexp )e 0 , if x > 1
71
5 – Time discretization
where CF L0 , CF Lexp and α are the minimum CFL number, the maximum allow-
able CFL number of explicit schemes and a parameter (usually ≤ 1) which controls
the growing rate, respectively. The chosen CF L number is then limited under a
maximum value (usually CF Lmax = 1010 − 1020 ). The variable x is defined as:
(
min(xL2 ,1) if xL∞ ≤ 1
x= (5.16)
xL ∞ if xL∞ > 1
where β is a user-defined coefficient (β > 1) which controls the growing rate. Also
a monotonic variant of this algorithm has been considered by setting the exponent
of Eq. 5.18 to zero when |Rn |L2 > |Rn−1 |L2 .
72
Chapter 6
Shock capturing
73
6 – Shock capturing
limiters share the need to know information from neighbouring cells and so they re-
quire special treatment for boundary elements or hanging-nodes meshes. A further
way of dealing with discontinuities is to filter the numerical solution by reducing
high-order modal coefficients, which are responsible for oscillations. This operation
shows results similar to those obtained by the artificial viscosity approach but does
not introduce any additional stability restriction for explicit integration. Further-
more, the filter acts only on the element solution and does not require information
from neighbouring elements. It is possible to apply filtering directly to the solu-
tion modal coefficients ([94]), but also to the time derivatives of these coefficients
[95]. In any case the main problem is to understand how much filtering is needed:
enough to avoid spurious oscillations but not so much as to degrade accuracy. In
order to give a more precise answer to this question, a feedback filtering procedure
has been developed during the research activity. It is described in Section 6.1. The
aim of the proposed approach is to maintain the locality of the algorithm and to
make it as problem independent as possible.
Both limiters and filters work well in time-accurate calculations but they can in-
troduce convergence problems in steady flows.
r n
σ = e(−αη )
ηn = (6.2)
p
where n is the degree of the generic basis function and p is the order of the re-
construction inside the element. The extension to 2D is performed in the following
way:
n m
ηn = ηm = (6.4)
p p
74
6.1 – Feedback filtering
where n and m are the degrees of the basis function in the two coordinate variables.
The parameters r (filter order) and α (filter intensity) have to be chosen carefully
in order to eliminate oscillations while preserving the accuracy of the numerical
solution in smooth regions. In the literature there are several works (see e.g. Hes-
thaven and Warburton [97]) which suggest to set α = −log(eps) where eps is the
machine precision (for double precision α ' 36). Other indications are given by
Boyd [98] who suggests the use of high-order filters in smooth regions and low-order
filters in the proximity of discontinuities.
The numerical experiments performed in this work show that the choice of α =
−log(eps) degrades significantly the solution accuracy, even when high-order fil-
ters are used. These results are in line with the work previously carried out by
Ueckermann and Lermusiaux [99]. They introduced a function which measures the
smoothness of the numerical solution inside each cell: the signal obtained by this
function is compared to a threshold and, if the signal is greater than the threshold,
an exponential filter is applied in the considered cell. In their computations they
set α = −log(0.01) ' 4.6.
In the simulations performed in this work, this kind of approach appears to be not
very robust since the choice of α and the threshold has to be done very carefully.
Indeed, the optimal values for these parameters depend on the particular problem
which is under study and depend also on the reconstruction order. For this reasons
an adaptive procedure has been introduced in order to automatically adjust the
filter intensity.
(u − ū)2 dxdy
R
SΩe = RΩe 2 (6.5)
Ωe
u dxdy + ε
In 1D problems the test variable ū is obtained by truncating the reconstruction at
the first N̄e = p modes and is compared with the complete u obtained by all the
75
6 – Shock capturing
Ne = p + 1 modes.
This is generalized to 2D by setting N̄e = p2 , Ne = (p + 1)2 for BASIS A and
N̄e = p(p + 1)/2 and Ne = (p + 1)(p + 2)/2 for BASIS B.
N̄e
X Ne
X
ū = ũi Φi u= ũi Φi (6.6)
i=1 i=1
In this way the sensor gives a signal which quantifies the smoothness of the
numerical solution in each element. Numerical experiments on discontinuous prob-
lems show that the order of magnitude of the signal changes significantly when
moving from smooth regions to the elements near a discontinuity. For this reason
the logarithm of the smoothness indicator signal (SI) is monitored:
Compute SI
do while (SI > SR)
Apply weak filter
Compute SI
end do
In this way the number of parameters which have to be calibrated is halved in com-
parison to the approach of Ueckermann and Lermusiaux: it is only necessary to set
a requirement for the solution smoothness and the filter intensity will be adjusted
automatically in order to satisfy it. This is the concept of feedback filtering: the
76
6.1 – Feedback filtering
filter influences the smoothness of numerical solution but this in turn influences
the filter intensity.
It is useful to say few words about idempotent filters (Kanevsky et al. [100]). If
a filter is applied repeatedly to a solution providing always the same results, inde-
pendently on how many times it is applied, the filter is referred to as idempotent.
In other words an idempotent filter does not show cumulative effects when it is
applied repeatedly. The exponential filter is not idempotent but if it is used inside
the proposed feedback procedure, an idempotent filtering operation is obtained.
Indeed when the procedure is applied for the first time the solution is filtered in
order to satisfy the smoothness requirement: any subsequent application of the
procedure does not change the solution, since it already satisfies the requirement.
Some guidelines about the choice of the smoothness threshold SR can be given.
In their work Persson and Peraire [86] observe that if the solution is based on a
Fourier expansion the sensor SΩe provides a signal which depends on the recon-
struction order p according to the following relation:
g
SΩe = (6.8)
p4
where g is a constant. They assume that this relation holds also for polynomial re-
constructions. They use this result to adjust the artificial viscosity of their scheme.
In the present work the Eq. 6.8 is used to understand how the threshold SR should
depend on the reconstruction order. If the logarithm of Eq. 6.8 is considered the
77
6 – Shock capturing
in which the constant g is the only parameter which the user has to adjust.
Results obtained for four different test cases are presented in the following. The
first two are characterized by the presence of discontinuities, both in 1D (Section
6.1.4) and 2D (Section 6.1.5). In the third test case (Section 6.1.6) a smooth flow is
studied and the numerical solution is compared with the existing analytical solution
in order to test whether feedback filtering preserves solution accuracy in smooth
regions. In the fourth test case (Section 6.1.7) the transonic flow field around an
airfoil is studied and results are compared with reference values from the literature.
In order to verify the robustness of the proposed approach the same law is used
for the smoothness requirement SR in all test cases :
78
6.1 – Feedback filtering
After the computation of these constant fields it is possible to find the exact solu-
tion inside the expansion fan by the use of compatibility relations. Further details
can be found in Toro [87] and Shapiro [88].
Numerical results obtained by DG0, DG1, DG2 and DG3 schemes are com-
pared in the following. Time integration was performed by Runge-Kutta schemes
described in Section 5.1 in order to obtain the same accuracy order in space and
time. The number of DOFs per equation was kept approximately equal to 100
in all simulations in order to make a fair comparison between different schemes.
For this reason a uniform mesh with 100 elements was used for the DG0 scheme
while coarser meshes were used for higher-order schemes. The numerical solution
is represented by plotting in each element a number of points equal to the number
of DOFs in that element.
First of all, some computations were performed with the exponential filter (α = 36,
r = 2) activated in all the elements. In Figure 6.1 the density field at time t = 0.4
is reported. The results show clearly the effects of over-filtering. The accuracy
of high-order reconstructions is completely lost. Indeed, the DG0 solution on the
finest mesh is more accurate than all the others high-order solutions on the coarser
meshes.
A second set of simulations was performed with the proposed feedback filtering
procedure. Results are reported in Figure 6.2. In this case the global solution
shows that high-order schemes achieve a significant improvement over the DG0
scheme. This is particularly evident in the contact surface and at the edges of the
expansion fan. A detail of the contact surface is presented in Figure 6.4. It can be
seen that results obtained bt DG1, DG2 and DG3 schemes are very close and show
a significant improvement with respect to the DG0 results. However, high-order
schemes produce a weak undershoot near the discontinuity. Figure 6.3 shows a
detail of the captured shock. The filtered high-order schemes introduce a slight
deterioration in the quality of the captured shock with respect to the DG0 results.
This behavior can be compensated by the introduction of an adaptive h-refinement
strategy in order to increase shock resolution.
In conclusion this first test shows how feedback filtered high-order DG methods
can capture discontinuities and keep spurious oscillations under control.
79
6 – Shock capturing
DG0
0.8 DG1
DG2
DG3
Exact
Density ρ
0.6
0.4
0.2
80
6.1 – Feedback filtering
Figure 6.3. Detail of the contact surface in the Sod problem (Feedback filtering).
Figure 6.4. Detail of the shock in the Sod problem (Feedback filtering).
81
6 – Shock capturing
Region ρ P u v
A 3.81 × 100 1.00 × 101 2.58 × 100 0.00 × 100
B 1.00 × 100 1.00 × 100 0.00 × 100 0.00 × 100
C 1.00 × 10−1 1.00 × 100 0.00 × 100 0.00 × 100
82
6.1 – Feedback filtering
Schlieren image. Results can be compared with those reported by Cada and Tor-
rilhon [9] and obtained by their third-order finite volume scheme. They use a very
fine cartesian mesh with 1700x500 cells. The solution quality was evaluated by
performing a simulation with the feedback filtered DG2 scheme on a 567x167 ele-
ments grid, in order to maintain approximately the same number of DOFs of the
simulation carried out by Cada and Torrilhon. Results obtained by feedback fil-
tering show the expected behavior: the evolution of the contact surface can clearly
be seen in the sequence reported in Figure 6.6. A comparison between the struc-
tures visible in Figure 6.7 and those obtained by Cada and Torrilhon [9] shows
that the discontinuities captured by the feedback filtered DG scheme have a less
sharp profile than those captured by its finite volume counterpart. This is in line
with the results obtained in the Sod test case, in which the filtered DG2 scheme
captures the shock with a slight less sharp profile than the DG0 scheme. However,
the feedback filtered DG method shows its accuracy in the description of contact
surfaces and smooth regions. This feature permitted a good representation of the
main structures of this flow. In Figure 6.6 it can be seen that the normal shock
wave is followed by two numerical starting waves which appear at the beginning
of the simulation. This numerical phenomenon is common also in finite volume
computations and its origin is explained by Leveque [44].
83
6 – Shock capturing
84
6.1 – Feedback filtering
1 1 1 1 1 + ā
J= + 3 + 5 − ln (6.14)
ā 3ā 5ā 2 1 − ā
γ−1 2
r
ā = 1− q̄ (6.15)
2
2
ρ̄ = ā γ−1 (6.16)
In the previous relations q̄, ā and ρ̄ are non-dimensional velocity magnitude, speed
of sound and density. Here they are referred to the stagnation values of speed
of sound and density respectively. Notice that in all the rest of this work, the
normalization described in the Appendix A is used.
Figure 6.8. Ringleb flow: constant speed lines (dashed) and computational domain Ω.
85
6 – Shock capturing
Table 6.2. Ringleb flow: entropy accuracy test for feedback filtered DG methods.
86
6.1 – Feedback filtering
Table 6.3. Ringleb flow: pressure accuracy test for feedback filtered DG methods.
boundaries were fixed at 20 chords from the airfoil. This distance is too small
to obtain results which are independent from the boundary distance. However,
the main purpose of this test is to study the shock capturing properties of the
proposed approach. A more accurate study (with freestream distance greater than
2000 chords) can be found in Sections 7.3.1.
The chosen mesh has 50 quartic curvilinear elements on both the pressure side and
the suction side of the airfoil. In total the mesh contains 200x50 elements.
In Figure 6.9 and Figure 6.10 the Mach field for DG1 and DG5 simulations is
reported. The DG1 results on this very coarse mesh show a significant generation
of spurious entropy at wall which disappears in the DG5 results. On the other
hand, the DG5 results show some oscillations behind the stronger shock. These
oscillations are related to jumps in entropy production where the shock moves from
an element to another. This behavior is probably related to the fact that the filter
removes the higher-order modes in the elements crossed by the shock and so the
solution in this region is nearly piecewise constant. It is interesting to observe that
in the test case of Section 6.1.5 there are strong curvilinear shock waves but there
are not significant oscillations in the region behind the shocks. However, in that
case a very fine grid was employed while in this problem the mesh is relatively
coarse. These considerations suggest that the use of local grid refinement in the
shock region could help in reducing this kind of post-shock oscillations.
In Figure 6.11 and Figure 6.12 the wall pressure coefficient (Cp) distribution for
the DG1 and DG5 computations is reported. For the purpose of comparison, DG5
results obtained by Barter [102] with the artificial viscosity approach of Persson
and Peraire [86] are also plotted. It can be seen that the shock on the pressure
87
6 – Shock capturing
side appears very similar with the two approaches, since in both cases there is an
undershoot. On the other hand, the shock on the suction side is captured more
sharply by the artificial viscosity approach. The magnitude of the post-shocks
oscillations are comparable to those obtained by other common shock capturing
DG schemes reported in the ADIGMA report [85] for this test case. The lift and
drag coefficients reported in Table 4 converge when the order is increased. They
are in good agreement with the reference values obtained by Vassberg and Jameson
[103] with a second order finite volume method on a very fine grid (4096x4096).
Figure 6.9. Mach field on the NACA0012 airfoil (M∞ = 0.8,α∞ = 1.25o ):
feedback filtered DG1 scheme.
Figure 6.10. Mach field on the NACA0012 airfoil (M∞ = 0.8,α∞ = 1.25o ):
feedback filtered DG5 scheme.
88
6.1 – Feedback filtering
89
6 – Shock capturing
90
6.2 – Artificial viscosity
flow over a flat plate showed that the implemented artificial viscosity can signif-
icantly alter the velocity profile in the boundary layer if the parameter 0 is set
to the value used for the transonic NACA0012 problem (see Chapter 7.3.1). This
means that this artificial viscosity approach is strongly problem dependent.
An alternative approach could be the shock capturing term proposed by Bassi et al.
[82]. This method introduces an artificial viscosity which depends on the inviscid
residuals of the discretization. This approach makes the scheme consistent to the
Euler equations but only asymptotically consistent to Navier-Stokes equations or
RANS equations.
Hartmann [90] proposed an artificial viscosity approach which is based on the full
residuals and so it is consistent also for Navier-Stokes and RANS equations. The
introduction of these shock capturing approaches could bring several benefits.
91
92
Chapter 7
Adaptive algorithms
93
7 – Adaptive algorithms
On the other hand, p-adaptive algorithms are not the best approach in the
presence of singular solutions. Indeed, the increase in the reconstruction order
gives small benefits on shock waves or near singular geometries. In these cases the
numerical convergence order is far from the theoretical one. For this reason, it is
more convenient to keep the reconstruction order constant and to reduce the size
of the elements. However, the error convergence rate obtained by this approach is
not exponential but only algebraic.
Finally, it is possible to use mixed approaches in which both p-adaptive and h-
adaptive strategies are employed. Several works are concerned with these algo-
rithms in the framework of discontinuous Galerkin methods. An overview of some
techniques is presented in the book which summarizes the results of the ADIGMA
European project [104].
Some "feature-based" sensors have been implemented as first step. They control
some specific features of the solution which are indicative of the most interesting
regions in the domain. These sensors are very easy to implement but are problem
dependent. They have been used in this work mainly to test the behavior of the
ESR method when the reconstruction order varies from an element to its neigh-
bours. These algorithms are based on a sensor and a control law. The choice of the
sensor depends on the particular set of equations which is considered. For example
it can be related to the intensity of a variable or to its gradient.
94
7.2 – p-adaptive algorithm
Residual-based error indicators try to estimate the discretization error on the con-
servative variables and so they target at resolving all flow features, not only those
related to a particular target function. Furthermore, they are very cheap because
they make use of the residual of the governing equations which are already avail-
able. In this work, a residual-based error indicator has been implemented following
the approach of Leicht and Hartmann [106]. In particular, here the error indicator
ηe has been implemented for inviscid flows in the following way:
p
ηe = he |R(uh )|e + he |r∂e (uh )|∂e (7.1)
where he is the characteristic element size while R(uh ) and r∂e (uh ) are the volume
and surface residual defined as:
∂Fh ∂Gh
R(uh ) = − − (7.2)
∂x ∂y
95
7 – Adaptive algorithms
positive number which controls the distribution of the order in the domain: the
lower the αp , the larger the number of elements in which high order reconstructions
are employed. The chosen law helps in avoiding strong jumps in the order between
neighbouring elements.
T
y
x
Figure 7.1. Temperature field for the 2D heat equation problem, with kw = 5.
In the plot of Figure 7.3 the L2 -norm of the temperature error is reported as
a function of the total number of degrees of freedom. DG1 and DG5 denote data
obtained by a uniform order of accuracy, namely p = 1 and p = 5. The other data
are obtained by the p-adaptive strategy (with pmin = 1 and pmax = 5). The con-
trol law defined by Eq.7.4 is used for this test. It can be seen that the p-adaptive
96
7.2 – p-adaptive algorithm
1
p
0.8 5
4
3
0.6 2
1
y
0.4
0.2
-1
10
-2
10
-3
10
Error
-4
10
DG1
-5 DG5
10
p-adapt. (α=0.1)
p-adapt. (α=0.2)
p-adapt. (α=0.3)
-6 p-adapt. (α=0.5)
10
2 3 4
10 10 10
nDOFs
Figure 7.3. L2 -norm of the temperature error vs total number of DOF’s
(possible orders: pe = 1,2,3,4,5).
97
7 – Adaptive algorithms
-1
10
-2
10
-3
10
Error
-4
10
DG1
-5 DG5
10
p-adapt. (α=0.1)
p-adapt. (α=0.2)
p-adapt. (α=0.3)
-6 p-adapt. (α=0.5)
10
2 3 4
10 10 10
nDOFs
Figure 7.4. L2 -norm of the temperature error vs total number of DOF’s
(possible orders: pe = 1,3,5)
98
7.2 – p-adaptive algorithm
Another test was performed in order to study the effects of the proposed dis-
cretization for the case |pA − pB | > 1, which is described in Section ??. In par-
ticular, the control law (Eq.7.4) was modified in such a way that the algorithm
can choose only the following reconstruction orders: pe = 1, pe = 3 or pe = 5. In
this way, when there is a jump in the order across an interface, the jump is always
greater or equal than 2. The results for this somewhat artificial case are reported in
Figure 7.4. A comparison with Figure 7.3 shows clearly that the presence of strong
jumps in the order distribution is not convenient. For this reason, it is important
to use a control law which chooses a smooth distribution of the order and which
discourages the occurrence of the case |pA − pB | > 1.
99
7 – Adaptive algorithms
Table 7.1. Average drag coefficient and Strouhal number for cylinder flow
(Re∞ = 102 , M∞ = 0.2).
Author Average CD St
Norberg [107] - 0.164
Tritton [108] 1.26 0.157-0.164
Wieselsberger [109] 1.43 -
Williamson [110] 1.33 0.160-0.164
Table 7.2. Experimental results from the literature for cylinder flow (Re∞ = 102 )
Table 7.1 reports the results obtained as a function of the total number of
degrees of freedom per equation. Note that in the case of p-adaptivity the reported
number of degrees of freedom refers to the range spanned in a period. The average
drag coefficient and the Strouhal number are in line with the experimental data
available in the literature (see Table 7.2). It can be seen from these results that
the strong clustering of the mesh makes it difficult to resolve the wake in regions
far from the cylinder. The natural remedy for this problem is the use of a hybrid
hp-adaptive algorithm, which will be described in Section 7.4.
100
7.2 – p-adaptive algorithm
Figure 7.5. Distribution of the reconstruction order with the entropy sensor.
p
4
3
2
1
Figure 7.6. Distribution of the reconstruction order with the sensor based
on velocity gradients.
101
7 – Adaptive algorithms
p
4
3
2
1
Figure 7.7. Distribution of the reconstruction order using both the entropy and
the velocity gradient sensors.
Figure 7.8. Entropy field around a circular cylinder with p-adaptivity (Re∞ = 102 ).
102
7.3 – h-adaptive algorithm
103
7 – Adaptive algorithms
(7.5)
The flow is characterized by the presence of two shock waves: a strong shock
wave on the suction side and a weak shock wave on the pressure side. Furthermore,
the sharp trailing edge introduces a singularity in the solution.
In order to efficiently use the backward Euler implicit integration scheme, the arti-
ficial viscosity approach described in Section 6.2 is chosen. The artificial viscosity
parameter is set as 0 = 0.004 in all the simulations for this test case. Convective
fluxes are approximated by the Osher numerical flux [35] while diffusive fluxes are
approximated by the ESR method [2].
The computational domain is reported in Figure 7.14. The freestream boundaries
are at more than 2000 chords from the airfoil, according to the suggestions reported
on the Workshop website [69].
In Figure 7.10 the initial mesh is reported: it is a very coarse mesh with 1060
triangular elements. Wall elements have curvilinear cubic edges. Since this is a
steady problem, the adaptation process refines the initial mesh recursively, without
the need to re-agglomerate elements.
In order to accelerate convergence, the solution is obtained through a sequence of
progressively higher-order reconstructions according to the strategy described in
Section 8.1. The adaptation procedure is performed when the final reconstruction
order is reached. At each refinement step the algorithm splits 20 % of the elements
which are characterized by the largest values of the error indicator. After that, a
further check and splitting is performed in order to avoid too large jumps in the
mesh size distribution. This last step is required by the employed visualization
subroutines (see Appendix C) which are not able to deal with too large jumps in
the mesh. However, it is not required by the numerical discretization and can be
avoided by the use of an updated visualization subroutine.
When a wall element is refined, his sons are still curvilinear cubic elements:
the extra points required to define the wall geometry are obtained by Eq.7.5. In
Figure 7.11 the adapted mesh after 5 refinement steps is reported. The Mach field
on the initial and the adapted meshes is reported in Figure 7.12 and Figure 7.13,
respectively. A comparison between Figure 7.13 and Figure 7.11 shows that the
error indicator identifies correctly the main sources of error in the flow: the leading
edge, the trailing edge, the shocks and the contact surface downstream of the
profile.
The performances of the algorithm are evaluated for p = 1 and p = 2 by
computing the errors on the lift (CL ) and drag (CD ) coefficients. The errors are
evaluated by taking the RWTH values from the second edition of the Workshop
[11] (Cl = 3.52914010−1 ;Cd = 2.27463610−2 ) as reference. In Figure 7.16 and
104
7.3 – h-adaptive algorithm
Figure 7.15 the errors on the lift and drag coefficients are reported as a function
of the equivalent length scale. It can be seen that the convergence behavior is
quite irregular. This is in line with the results obtained by other groups and is
due to the presence of singularities in the solution. Furthermore, the results show
that, with the setup chosen for this test, there is no advantage in using uniform
high-order reconstructions in the presence of discontinuities. Indeed, the results
for p = 1 and p = 2 are quite close in Figure 7.15 while in Figure 7.16 the p = 1
reconstruction performs better than the p = 2 scheme. A similar behavior can be
seen in Figure 7.15 and Figure 7.16 where the errors are plotted as a function of
the work units. These results suggest the introduction of an hybrid hp-adaptive
strategy, which will be described in the following Section.
105
7 – Adaptive algorithms
106
7.3 – h-adaptive algorithm
Figure 7.12. Transonic NACA0012: Mach field on the initial mesh (p=1).
107
7 – Adaptive algorithms
2000
1000
0
y
-1000
-2000
The previously described test case on the NACA0012 airfoil is considered here
as example. Since the flow is steady and the initial mesh is very coarse then the
algorithm performs only element splitting and there is no need to agglomerate
elements.
The approach chosen for this work can be summarized by the following steps:
• Select a fraction of the total elements (e.g. 20%) with the largest error
108
7.4 – hp-adaptive algorithm
used for the feedback filtering algorithm (see Section 6.1). The threshold chosen
for this test case is:
SR = −2.5 − 4 log10 (pe ) (7.6)
where pe is the reconstruction order inside the element. If SI > SR then h-
refinement is chosen. Otherwise, the order of the element in increased to the level
pe + 1.
The results reported in Figure 7.15, Figure 7.16, Figure 7.17 and Figure 7.18
show clearly the advantages of the hp-adaptive algorithm over the h-adaptive al-
gorithm, both in terms of equivalent length scale and work units.
-3
10
|Cd error|
-5
10
-6
10
0.005 0.01 0.015 0.02
h
p=1 h-adapt
p=2 h-adapt
hp-adapt
10-3
|Cl error|
-4
10
109
7 – Adaptive algorithms
-3
10
p=1 h-adapt
p=2 h-adapt
hp-adapt
|Cd error|
10-4
-5
10
0 1 2
10 10 10
Work units
-2
10
p=1 h-adapt
p=2 h-adapt
hp-adapt
|Cl error|
10-3
-4
10 0 1 2
10 10 10
Work units
110
Part III
Numerical results
111
Chapter 8
Performances
First of all, implicit time integration schemes can be quite effective in damping
the transient. This is particularly true when the physical model contains equations
with stiff terms, which can represent a severe bottle-neck for explicit time integra-
tion schemes. For example, in Section 4.5 the advantages of the implicit approach
over the explicit RK4 scheme are clearly shown in a heat diffusion problem, as can
be seen in Figure 4.8. Similar advantages can be found in more complex system of
equations, like for example Navier-Stokes equations or RANS equations. However,
in this case the benefits are reduced by the presence of non-linear terms which can
introduce a limit on the maximum allowable CFL number, even with implicit time
113
8 – Performances
integration schemes. For example, the presence of moving shock waves inside the
domain introduces a severe limitation on the CFL number.
In this work, the robustness of the implicit time integration is increased by the
introduction of some positivity checks on pressure and density: after each time
step, the sign of pressure and density in the quadrature points is checked. If a neg-
ative value is found, then the last update is removed and the solution is brought
back to the previous time step. After that a smaller time step is chosen and the
procedure is repeated. This approach is used together with several CFL evolution
laws, which are described in Section 5.2.3. It is important to keep in mind that a
small variation in the parameters which control the CFL evolution law can change
the order of magnitude of the total computational time. Clearly, a compromise
between speed and robustness has to be chosen.
Finally, it is necessary to remember the main drawback of implicit schemes: the
large memory requirements. Indeed, the jacobian matrix which results from the
implicit discretization is very large and its storage in the memory can be pro-
hibitively expensive in complex 3D problems.
An effective technique which can reduce the computational time in steady prob-
lems is the multigrid method. This approach is commonly used in the framework
of finite volume methods. The solution is advanced in time on several levels of
nested grids: the idea is that the low frequency oscillations which characterized
the transient on the original grid can be be damped more quickly on a coarser
grids, where they appear as high frequency oscillations. The described approach
can be referred to as h-multigrid, where the "h" indicates that the acceleration is
obtained by exploiting different grids.
In the framework of discontinuous Galerkin methods, an alternative approach can
be chosen: the p-multigrid method. The idea is to substitute the different level of
grids with different reconstruction orders. Furthermore, if the solution is described
by a hierarchical basis, it is very easy to reduce and extend the solution from a
level to the next. Several works have been done on this topic (see for example
[111], [112], [113]). However, some authors have found that p-multigrid techniques
applied to DG discretization are not very efficient if the time integration is per-
formed by explicit schemes [112]. For this reason, p-multigrid DG methods are
usually associated with implicit time integration, at least for the coarser level of
the solution which involve less degrees of freedom and so less memory require-
ments. This behavior is in contrast to what happens in the framework of finite
volume methods in which h-multigrid methods are efficiently used together with
explicit RK schemes.
In this work, the multigrid approach has not been implemented yet but a simpler
(but less effective) approach is used. In particular, the hierarchical nature of the
employed modal bases is exploited to perform a sequence of computations in which
the reconstruction order p is increased from p = 0 to the final p. In this way, a
114
8.1 – Acceleration for steady problems
100
-1
10
10-2 DG2+RK3
p refinement
-3
10
Residual ratio
-4
10
10-5
-6
10
10-7
-8
10
10-9
The approach becomes even more convenient in problems in which there are
shock waves. Indeed, the initial transient is usually characterized by the presence
of moving shock waves which limit the maximum CFL number. However, if the
computation is started with a p = 0 reconstruction then an approximate solution in
which the shock waves are at rest is quickly obtained. Then the expensive higher-
order reconstructions are activated and they can benefit of a larger time step since
the shock waves are already close to the final position.
115
8 – Performances
Y
Z X
The lower and upper boundaries are described by the following laws:
2
y = 0.0625e−25x − 1.5 ≤ x ≤ 1.5 (8.1)
116
8.2 – Workshop test problems
They are treated as solid walls. The left side is a subsonic inlet in which total
temperature, total pressure and velocity angle are imposed (Tin 0
= 1, Pin0
= 1 and
αin = 0 ). The right side is a subsonic outlet in which the static pressure is im-
o
posed in order to obtain the prescribed exit Mach number (Mexit = 0.5).
The flow field was initialized with a uniform flow field at M = 0.5. The computa-
tions were carried on until the L2-norm of the density residual was reduced by 10
orders of magnitude with respect to the initial value. In particular, the residuals
of the first modal coefficient (constant basis function) were monitored.
The quality of the numerical results was evaluated by the computation of the
L2-norm of the entropy error as a function of the equivalent length scale. The
performances of the code were evaluated by measuring the work units required to
obtain the steady solution (defined as the solution obtained after a reduction of 10
orders of magnitude in the density residuals).
The results submitted by the author to the Second Edition of the Workshop
were obtained by a preliminary version of the code. In particular, that version
could perform only explicit time integration by means of Runge-Kutta schemes.
For this reason, it was very slow in steady problems like the described one.
In order to accelerate the convergence to the steady solution, a sequence of increas-
ing order reconstructions are employed. This approach introduces a small benefit
as is shown in Figure 8.1 of Section 8.1.
These simulations were carried out by using an element basis obtained by a tensor
product of Legendre polynomials. The orthonormalization of the basis was not
available in that preliminary version of the code.
The domain was discretized by a sequence of structured meshes (16x4, 32x8, 64x16,
128x32). The elements at wall had curvilinear edges (up to quartic elements) while
the internal elements were linear.
117
8 – Performances
Figure 8.3. Channel with smooth bump: entropy error vs equivalent length scale.
Figure 8.4. Channel with smooth bump: entropy error vs work units.
118
8.2 – Workshop test problems
119
8 – Performances
generated by a free code [114] and curved by an in-house tool. The solution inside
each element is described by a tensor product of Legendre polynomials.
The accuracy of the simulations was evaluated by computing the L2-norm of the
entropy error on the steady solution.
In Figure 8.10 the error is reported as a function of the equivalent length scale for
p = 1,2,3 reconstructions. In the plot there is only one point for the p = 1 recon-
struction. This is due to the fact that a shockless solution was obtained only on
the finest mesh (72x48) with p = 1. In contrast, the higher-order reconstructions
are able to give the shockless solution even on the coarsest meshes. The observed
convergence rate for p = 2 and p = 3 is very close to the theoretical value. Further-
more, the error level is good if compared to the results of the other participants.
As far as the performances are concerned, these computations were performed at
the end of the first year and so only explicit time integration schemes were available
in the code. In particular, explicit Runge-Kutta schemes are employed in order to
obtain the same discretization order in space and time. In Figure 8.11 the error
is reported as a function of the work units for the different reconstruction orders.
From this plot it is not possible to understand clearly which is the most conve-
nient reconstruction order. This irregular behavior is probably due to the fact
that different convergence criterias are used when the residuals are too close to the
machine precision. Furthermore, the performances of the higher-order schemes in
this test case can be positively affected by the use of an implicit time integration
scheme.
However, the main achievement of this test case is the confirm that the proposed
discretization is able to describe the shockless transition: this is a quite severe test
according to the literature [115].
120
8.2 – Workshop test problems
Figure 8.6. Mach field for the transonic Ringleb flow: initial solution.
Figure 8.7. Mach field for the transonic Ringleb flow: spurious shock.
Figure 8.8. Example of structured mesh for the transonic Ringleb flow.
121
8 – Performances
Figure 8.10. Transonic Ringleb flow: entropy error vs equivalent length scale.
122
8.2 – Workshop test problems
x − 0.5 −r2 /2
δv = u∞ β̄ e (8.4)
R
2
δT = 0.5(u∞ β̄)2 e−r /Cp (8.5)
(x − 0.5)2 + (y − 0.5)2
p
r= (8.6)
R
123
8 – Performances
Also for this test case, the element basis was obtained by a tensor product of
Legendre polynomials without orthonormalization. Time integration is performed
by means of explicit Runge-Kutta algorithms (described in Section 5.1) chosen in
order to match the orders of accuracy in space and in time.
A first set of simulations was performed on cartesian (regular) structured meshes
(24x24, 48x48, 96x96) for p = 1,2,3. In Figure 8.12 the distribution of the y-
component of the velocity is reported at the end of the simulation. The results are
reported for the p = 1 computation on the 64x64 mesh and for the p = 3 compu-
tation on the 32x32 mesh. This two computations require the same total number
of degrees of freedom but the results are significantly different. Indeed, while the
p = 3 reconstruction describes accurately the vortex, the p = 1 reconstruction
shows a large error.
In Figure 8.13 the error is reported as a function of the equivalent length scale. It
can be seen that the p = 1 reconstruction is very far from the asymptotic range and
so its convergence rate is very low. In contrast, the p = 2 and p = 3 reconstructions
reach quickly a convergence rate very close to the theoretical value. These results
show that the higher-order reconstructions are significantly more convenient than
the p = 1 scheme, for this kind of problems.
The same conclusions can be found from the plot of the work units. Indeed, Fig-
ure 8.14 shows that the work units required by the higher-order schemes to obtain
a given level of error are significantly lower than the work units required by the
second order scheme (p = 1).
124
8.2 – Workshop test problems
0.01
DG1 64x64
DG3 32x32
Exact
0.005
V/U ∞
0
-0.005
-0.01
Figure 8.13. Vortex transport: error vs equivalent length scale on regular meshes.
δM AX = 0.15h (8.7)
125
8 – Performances
length scale and work units for the simulations on the perturbed meshes. The
results do not show significant differences with respect to the results on the regular
meshes: this means that the proposed discretization is not very sensitive to the
quality of the mesh and so it can be interesting for the use on irregular meshes
obtained by general purpose mesh generator for complicate geometries.
126
8.2 – Workshop test problems
Figure 8.16. Vortex transport: error vs equivalent length scale on perturbed meshes.
127
8 – Performances
v(x, y) = 0 P (x, y) =
P∞ ρ(x, y) = ρ∞
u∞ d > δ , (8.8)
u(x, y) =
2δ ) d ≤ δ
u∞ sin( πd
where u and v are the cartesian velocity components, d is the distance to the
nearest wall and δ is a constant equal to 5% of the chord length.
Two mixed structured-unstructured grids with 2101 and 8404 elements were
used. Quadrilaterals were used near the airfoils and triangles in the rest of the
domain. Elements with cubic edges were employed at solid walls. Here the size
of the first layer of elements was equal to 0.005 chords in the direction normal to
wall for the finest mesh. Figure 8.18 shows a detail of the finest mesh near the two
bodies.
Figure 8.18. Detail of the finest mesh used for the tandem airfoils test.
The drag coefficient of the trailing airfoil was monitored during the first 20
convective times. Several simulations were performed by changing the reconstruc-
tion order from DG1 to DG5 on both meshes. Time integration was performed by
RK4LS.
The flow field is characterized by the stall of the leading airfoil. The vortices which
128
8.2 – Workshop test problems
are generated in the separation region strongly interact with the trailing airfoil.
A plot of the entropy field at the end of the simulation is reported in Figure 8.19
for DG5 on the finest mesh. The time evolution of the drag and lift coefficient for
the trailing airfoil is reported in Figure 8.20 and Figure 8.21 for p = 3,4,5 on the
finest mesh.
It is clear from these results that the flow is not periodic, at least in the time
interval considered here. The chaotic aperiodic evolution of the vortices makes it
difficult to perform a deterministic study. The results obtained by the different
simulations tend to overlap for the first part of the computation but after a certain
time they follow a different evolution. It can be seen that when the number of
degrees of freedom is increased (with both mesh refinement or order refinement)
the time interval in which the different solutions overlap becomes more extended.
In particular the plots show that the DG4 method follows well the DG5 solution
up to time = 11. In contrast, the DG3 prediction follows the higher order solutions
only up to time = 5. A similar behavior can be seen in the results reported by
other groups on the website of the First edition of the Workshop [68]. This test
case showed that the proposed discretization is able to deal with strong unsteady
wall-vortex interactions.
Figure 8.19. Entropy field for the tandem airfoils test at the end of the
simulation (DG5RK4LS finest mesh)
129
8 – Performances
0.2
0.15 DG3RK4LS
DG4RK4LS
DG5RK4LS
0.1
0.05
Cd
-0.05
-0.1
-0.15
-0.2
0 5 10 15 20
Time
Figure 8.20. Drag coefficient for the trailing airfoil (finest mesh p=3,4,5).
1.5 DG3RK4LS
DG4RK4LS
DG5RK4LS
1
0.5
Cl
-0.5
-1
-1.5
0 5 10 15 20
Time
Figure 8.21. Lift coefficient for the trailing airfoil (finest mesh p=3,4,5).
130
Chapter 9
Aerospace propulsion
examples and validation
The Reynolds number Re2is is based on the blade chord c and the isentropic exit
conditions.
The Spalart-Allmaras model is used in fully-turbulent mode. Indeed, the modified
turbulent viscosity at the inlet is set as ν̃ = 3ν, according to [17].
The computations were carried out with the basis A and a reconstruction order
p = 1 is chosen. Shock capturing was performed by means of the feedback filtering
algorithm proposed in Section 6.1. Time integration was performed by an explicit
RK2 algorithm. A set of refined meshes was employed in order to evaluate the
grid dependence behavior. The final mesh contains 19866 elements. It is an hybrid
mesh in which there is a structured O-type zone near the blade. The surrounding
region is filled with an unstructured quadrilateral mesh, as Figure 9.1 shows. Wall
elements have parabolic edges. The size of the elements near the wall is 5 × 10−4 c
131
9 – Aerospace propulsion examples and validation
in the normal direction. The distance between the leading edge and the inlet is
equal to one chord. The same distance is adopted between the trailing edge and
the outlet.
In Figure 9.2 the computed Mach field is reported. The results show clearly the
presence of the two shock waves which are generated by the trailing edge. Further-
more, it is possible to see on the suction side the interaction between the boundary
layer and the shock wave which is coming from the next blade. In particular, the
incoming shock wave generates two reflected shock waves due to the presence of a
small separation bubble in the impinging point.
In Figure 9.3 the wall isentropic Mach number distribution is reported and com-
pared with experimental data from [116]. The plot shows that the simulation is
able to detect the main features of the distribution. In particular, the position of
the shock on the suction side is correctly computed.
132
9.2 – T106c turbine cascade
1.5
1
Mis
0.5
0
0 0.2 0.4 0.6 0.8 1
x/c x
133
9 – Aerospace propulsion examples and validation
134
9.2 – T106c turbine cascade
easily on a structured mesh. However, the tests done in this work have showed that
the evaluation of this parameter (which controls the production term in the LKE
equation) is quite problematic. Indeed, if the topology of the grid is changed (from
O to H or C) or the direction of the grid lines in the structured region is altered
then the results can be affected and it is necessary to tune again the calibration
constant C1 which appears in Eq. 2.54. In this work the constant C1 is set to 0.009
while the original value C1 = 0.01 is suggested in [15].
In Figure 9.11 the computed wall isentropic Mach number distribution is reported
and compared with the experimental results from [119]. The simulations are able
to correctly predict how the separation region changes when the Reynolds number
is reduced. In particular, the extension of the plateau in the distribution on the
suction side and the reduction of the maximum Mach number are related to the ex-
tension of the separation. The Mach field, the laminar kinetic energy distribution
and the turbulent kinetic energy distribution are reported in Figure 9.5, 9.6, 9.7,
9.8 , 9.9, 9.10 for M2s = 185000 and M2s = 80000, respectively. Again, the pictures
show clearly the dramatic variation in the separation region when the Reynolds
number is reduced to 80000.
135
9 – Aerospace propulsion examples and validation
136
9.2 – T106c turbine cascade
Figure 9.7. T106c cascade: laminar kinetic energy at Re2s = 185000, M2s = 0.65
Figure 9.8. T106c cascade: laminar kinetic energy at Re2s = 80000, M2s = 0.65
137
9 – Aerospace propulsion examples and validation
Figure 9.9. T106c cascade: turbulent kinetic energy at Re2s = 185000, M2s = 0.65
Figure 9.10. T106c cascade: turbulent kinetic energy at Re2s = 80000, M2s = 0.65
138
9.2 – T106c turbine cascade
0.8
0.6
Exp. Re=80000
Mis
Exp. Re=185000
0.4 Num.
0.2
0
0 0.2 0.4 0.6 0.8 1
x /c x
Figure 9.11. T106c cascade: wall isentropic Mach distribution (M2s = 0.65).
139
140
Chapter 10
Conclusions
This thesis describes the main activities performed during the research project.
The reader can found an evolution in the complexity of the reported test cases
across the Chapters. Through all the work it is possible to find a mix between
numerical problems and physical modeling issues. The numerical issues dominated
the first part of the work because initially there was the need to build a solid nu-
merical platform. Several work has been done on the evaluation of the numerical
accuracy and on the performance comparison with other groups. These aspects
have also driven the development of the two proposed algorithms (Feedback Fil-
tering and Enhanced Stability Recovery) which can show both advantages and
drawbacks over other existing methods, depending on the problem.
The developed numerical platform, together with the set of physical models in-
troduced in the second part of the work, can be used to predict the behavior of
industrial flows in the aerospace field.
Several aspects can be improved. First of all, the code is parallelized only for
shared memory systems. The support for distributed memory systems should be
introduced.
As far as the implicit integration scheme is concerned, an analytic evaluation of
the jacobian should be introduced also for Navier-Stokes and RANS equations in
order to improve performances and make easier the parallelization.
Since aerospace propulsion systems are characterized by compressible flows, further
work should be devoted to shock capturing techniques. In particular, the imple-
mentation of the artificial viscosity schemes [82] and [90] would be interesting, like
the implementation of WENO limiters[93] in the DG framework.
Finally, all the simulations performed in this work are 2D and so the next step
is the extension to 3D. This would make it possible to perform LES and DNS
simulations, provided that a massive parallelization is introduced.
141
142
Appendix A
Adimensionalization
All the equations reported in Chapter 2 and implemented in the code are adimen-
sionalized with respect to the following reference values:
• LENGTH Lref
• TEMPERATURE Tref
• PRESSURE Pref
• DENSITY ρref
• SPEED uref =
p
RTref
Also the data which define all the studied test cases are normalized with respect
to the previous value.
143
144
Appendix B
Normalization of
performances
The work units (W U s) are a measure of the total computational time which is
normalized in order to make possible a comparison between simulations performed
on different machines:
∆t
WUs = (B.2)
τref ncore
where ∆t is the wall clock time required by the simulation, τref is the reference time
and ncore is the number of employed cores. The reference time τref is obtained by
the TauBench program which can be downloaded from [68], [11] or [69]. TauBench
has to be run in serial, since the number of cores is already taken in account by
ncore .
145
146
Appendix C
High-order visualizations
147
C – High-order visualizations
Y
Y
Z X
Z X
148
Appendix D
Meshes
The meshes used during the research activity were generated in several ways.
An elliptic mesh generator developed by Professor Larocca at Politecnico di Torino
was employed for H, C or O structured meshes. This approach makes it possible
to obtain grid lines which are normal to the wall.
However, the meshes obtained by this tool are linear. In order to obtain higher-
order curvilinear meshes a specific tool has been developed. The tool reads the
linear meshes in PLOT3D format and then adds the points required to define
the curvilinear elements. Only the elements near the boundary of the domain are
curved. The tools requires a parametric representation of the solid wall. A possible
alternative approach is based on agglomeration of linear meshes [32].
Unstructured meshes were obtained by Gmsh [120]. Both the Delaunay and
the Delaunay for quads algorithms have been successfully employed, for both tri-
angular and quadrilateral meshes.
Some simulations of the flow around airfoils were performed by mixed structured-
unstructured meshes. In particular, it is useful to introduce a structured region
near the airfoil in order to use high-aspect ratio elements in the boundary layer.
Furthermore, the structured nature of the mesh in this zone is useful to simplify the
evaluation of the vorticity thickness if the LKE transition model (Section 2.3.3) is
chosen. On the other hand, unstructured meshes are very useful for the discretiza-
tion of the space far from the airfoil because the local size of the elements can be
chosen with more freedom.
In order to obtain this kind of meshes, a tool has been developed. The tool reads
the geometry of the airfoil and then projects the geometry points far from the
wall in order to define an external boundary for the structured zone. The curves
generated in this way are used to define an input file for Gmsh, which produce the
149
D – Meshes
150
Appendix E
List of symbols
In the following the list of the main symbols used through the text is reported.
Model variables
a = Speed of sound
c = Maximum signal speed
cf = Wall friction coefficient
cP = Wall pressure coefficient
E = Total energy (internal+kinematic) per unit volume
F, G = Physical fluxes
k = Turbulent kinetic energy
kL = Laminar kinetic energy
lt = Turbulence length scale
u = Generic conservative variable
Mis = Isentropic Mach number
M∞ = Freestream Mach number
P = Pressure
P ◦ = Total pressure
P r = Prandtl number
P rt = Turbulent Prandtl number
Q = Source term in the heat equation
q = Velocity magnitude
qx , qy = Cartesian components of heat flux
Reref = Reference Reynolds number obtained by adimensionalization
Re∞ = Freestream Reynolds number
S = Entropy
Sij = Mean strain rate tensor
T = Temperature
151
E – List of symbols
T ◦ = Total temperature
Tu = Turbulence level
u, v = Cartesian component of velocity
uτ = Wall friction velocity
α∞ = Freestream angle of attack
γ = Specific heat ratio
µ = Dinamyc viscosity
ν = Kinematic viscosity
λ = Heat conductivity
τw = Wall shear stress
ω = Specific dissipation rate
ρ = Density
τij = Laminar stress tensor
τ̄ij = Turbulent stress tensor
τ̂ij = Total (laminar+turbulent) stress tensor
cb1 , σ, cb2 , κ, cw1 , cw2 , cw3 , cv1 , ct1 , ct2 , ct3 , ct4 , rlim , cv2 , cv3 = Constants for the Spalart-
Allmaras model
σk , σω , β0∗ , β0 , α0 , α0∗ , Rk = 6, Rω = Constans for the low-Re Wilcox k − ω model
C1 , C2 , C3 , C4 = Constants for the laminar kinetic energy model
Geometry
d = Distance from the closest solid wall
L1 , L2 , L3 = Area coordinates for triangle
nx , ny = Cartesian components of normal unit vector
x, y = Cartesian coordinates in physical space
ξ, η = Cartesian coordinates on the reference quadrilateral and local coordinates
for interface reference frame
h iDiscretization
B̂ = Boundary matrix for Dirichlet BC’s with the ESR method
CF L = Stability coefficient for time integration
[D] = Element derivative matrix
[Dr ] = Recovery derivative matrix
Fh , Gh = Physical fluxes computed as a function of uh
F̂h , Ĝh = Interface numerical fluxes
g = User defined constant in the feedback filtering procedure
H = Element characteristic size
h = Equivalent length scale which depends on nDOF s
[J] = Jacobian matrix for implicit scheme
[M] = Element mass matrix
[M] = Global mass matrix
152
N = Number of degrees of freedom in an element
NF = Number of faces in an element
nDOF s = Total number of degrees of freedom per equation
p = Reconstruction order in space
R = Element residual of the discretization
R = Global residual of the discretization
[R] = Recovery matrix
R̃ = Interface recovery matrix
r = Filter order in the feedback fitlering procedure
rσ , R = Local and global lifting operators for BR2 method
SΣe = Smoothness sensor for element e
SI = Smoothness indicator in the feedback filtering procedure
SR = Smoothness requirement in the feedback filtering procedure
se = Element sensor for adaptivity
uh = Element solution for the conservative variable u
ur = Recovery solution for the conservative variable u
u = Vector of degrees of freedom
{W} = Boundary vector for Dirichlet BC’s with the ESR method
zh = Modified gradient for BR2 method
αiter = Filter intensity in the feedback filtering procedure
η0 = Penalty parameter for BR2 method
ηe = Residual-based error indicator
Φ = Element vasis function
Ψ = Recovery vasis function
153
154
Bibliography
155
Bibliography
[13] Wilcox D.C. Turbulence Modeling for CFD, 2nd edition, DCW Industries,
Inc., La Canada CA, 1998.
[14] Wilcox D.C. Turbulence Modeling for CFD, 3rd edition, DCW Industries, Inc.,
La Canada CA, 2006.
[15] Pacciani R., Marconcini M., Arnone A., Bertini F. An assessment of the lami-
nar kinetic energy concept for the prediction of high-lift, low-Reynolds number
cascade flows, Proc. IMechE Part A: J. of Power and Energy, Vol. 225 pp.
995-1003, 2011.
[16] Spalart P.R., Allmaras S.R. A One-Equation Turbulence Model for Aerody-
namic Flows, Recherche Aerospatiale, No. 1, pp. 5-21, 1994.
[17] NASA Turbulence Modeling Resource, http://turbmodels.larc.nasa.gov/spalart.html
(Accessed January 2015)
[18] Allmaras S.R., Johnson F.T.,and Spalart P.R. Modifications and Clarifications
for the Implementation of the Spalart-Allmaras Turbulence Model, Seventh
International Conference on Computational Fluid Dynamics (ICCFD7), Big
Island, Hawaii, 9-13 July 2012.
[19] Rumsey C.L., Spalart P.R. Turbulence Model Behavior in Low Reynolds Num-
ber Regions of Aerodynamic Flowfields, 38th AIAA Fluid Dynamics Conference
and Exhibit, June 23 - 26, 2008, Seattle, WA, AIAA Paper 2008-4403
[20] Bassi F., Crivellini A., Rebay S., Savini M. Discontinuous Galerkin solution of
the Reynolds-averaged Navier-Stokes and k-omega turbulence model equations,
Computers & Fluids, 34: 507-540, 2005.
[21] Langtry R.B., Menter F.R. Correlation-based transition modeling for unstruc-
tured parallelized computational fluid dynamics codes, AIAA Journal, 47(12),
pp. 2894-2906, 2009.
[22] Babajee J. Detailed numerical characterization of the separation-induced tran-
sition, in- cluding bursting, in a low-pressure turbine environment, Ecole Cen-
trale de Lyon; Institut von Karman de dynamique des uides (Rhode-Saint-
Genese, Belgique), PhD Thesis, 2013.
[23] Mayle R.E., Schulz A., The Path to Predicting Bypass Transition, ASME J.
Turbomach., 119(3), pp. 405-411, 1997.
[24] Walters D.K., Leylek J.H., A New Model for Boundary Layer Transition Using
a Single-Point RANS Approach, ASME J. Turbomach., 126(1), pp. 193-202,
2004,
[25] Lardeau S., Leschziner M.A., Li N., Modelling Bypass Transition With Low-
Reynolds-Number Non-Linear Eddy-Viscosity Closure, Flow,Turbul. Combust.,
73, pp. 49-76, 2004.
[26] Pacciani R., Marconcini M., Fadai-Ghotbi A., Lardeau S., Leschziner M.A.
Calculation of High-Lift Cascades in Low Pressure Turbine Conditions Using
a Three-Equation Model, Journal of Turbomachinery, Vol. 133, 2011.
[27] Menter F.R. Two-equation eddy-viscosity turbulence models for engineering
applications, AIAA Journal, 32(8):1598-605, 1994.
156
Bibliography
157
Bibliography
158
Bibliography
2010-1071, (2010).
[60] Lo M., van Leer B. Analysis and Implementation of Recovery-Based Discon-
tinuous Galerkin for Diffusion, AIAA Paper 2009-3786, (2009).
[61] van Leer B., Nomura S., van Raalte M. A discontinuous Galerkin Method for
Diffusion Based on Recovery, AIAA Paper 2007-4083, (2007).
[62] van Leer B., Lo M. Unification of Discontinuous Galerkin Methods for Advec-
tion and Diffusion, AIAA Paper 2009-400, (2009).
[63] Nourgaliev R., Theofanous T., Park H., Mousseau V., Knoll D. Direct Nu-
merical simulation of interfacial flows, AIAA Paper 2008-1453, (2008).
[64] van Leer B., Lo M., Gitik R., Nomura S. Adaptive High-order Methods in
Computational Fluid Dynamics. World Scientific: Singapore; 185-201.
[65] Eaton J.W., Bateman D., Hauberg S. GNU Octave version 3.0.1 manual: a
high-level interactive language for numerical computations. CreateSpace Inde-
pendent Publishing Platform, (2009).
[66] Riviére B. Discontinuous Galerkin methods for solving elliptic and parabolic
equations : theory and implementation. SIAM: Philadelphia, 66, (2008).
[67] Bazilevs Y., Hughes T.J.R. Weak imposition of Dirichlet boundary conditions
in fluid mechanics, Computers & Fluids, 36: 12-26, (2007).
[68] First International Workshop on High-Order CFD Methods, Nashville, Jan-
uary 7-8, 2012: http://zjwang.com/hiocfd.html (Accessed January 2015)
[69] Third International Workshop on High-Order CFD Methods, Orlando, Jan-
uary 3-4, 2015: https://www.grc.nasa.gov/hiocfd/ (Accessed January 2015)
[70] Quarteroni A., Sacco R., Salieri F. Matematica numerica, Springer, Milan,
(2008).
[71] Schwartzkopff T., Munz C.D., Toro E.F. ADER: High-order approach for
linear hyperbolic systems in 2D. Journal of Scientific Computing. Vol. 17, pages
231-240, (2002).
[72] Nigro A., Ghidoni A., Rebay S., Bassi F. Modified extended BDF scheme
for the discontinuous Galerkin solution of unsteady compressible flows, Int. J.
Numer. Meth. Fluids, 76:549-574, (2014).
[73] Cockburn B. Advanced Numerical Approximation of Nonlinear Hyperbolic
Equations, An Introduction to the Discontinuous Galerkin spatial discretiza-
tion Galerkin Method for Convection-dominated Problems, Lecture Notes in
Mathematics, Springer, pp. 151-268, (1998).
[74] Gottlieb S., Shu C-W. Total variation diminishing Runge-Kutta schemes,
Math. Comput. 67 (221), 73-85, (1998).
[75] Kaw A., Kalu E., Numerical Methods with Applications (1st ed.), (2008)
[76] Carpenter M.H., Kennedy C. Fourth-order 2N-storage Runge-Kutta schemes,
NASA Report TM 109112, NASA Langley Research Center, (1994).
[77] Spiteri R., Ruuth S., A new class of optimal high-order strong stability pre-
serving time discretization methods, SIAM Journal on Numerical Analysis, Vol.
40, pp. 469-491, (2002).
159
Bibliography
160
Bibliography
[92] Biswas R., Devine K., Flaherty J.E. Parallel adaptive finite element methods
for conservation laws, Applied Numerical Mathematics 14: 255-284, (1994).
[93] Li W., Ren Y-X. The multi-dimensional limiters for discontinuous Galerkin
method on unstructure grids, Seventh International Conference on Computa-
tional Fluid Dynamics, Hawaii, July 9-13, 2012.
[94] Hesthaven J.S., Kirby R.M. Filtering in Legendre spectral methods, Math.
Comput. 77(263):1425-1452, (2008).
[95] Allaneau Y., Jameson A. Connections between the filtered discontinuous
Galerkin method and the flux reconstruction approach to high-order discretiza-
tions, Comput. Methods Appl. Mech. Engrg. 200: 3628-3636, (2011).
[96] Gottlieb D., Hesthaven J.S. Spectral Methods for Hyperbolic Problems, J.
Comput. Appl. Math., 128, 83-131 (2001).
[97] Hesthaven J.S., Warburton T. Nodal Discontinuous Galerkin Methods, Texts
in Applied Mathematics, Springer (2008).
[98] Boyd J.P. The Erfc-Log Filter and the Asymptotics of the Euler and Vandeven
Sequence Accelerations, Houston Journal of Mathematics, (1996).
[99] Ueckermann M.P., Lermusiaux P.F.J. High-order schemes for 2D unsteady
biogeochemical ocean models, Ocean Dynamics, 60, 6, pp 1415-1445, (2010).
[100] Kanevsky A., Carpenter M.H., Hesthaven J.S. Idempotent filtering in spec-
tral and spectral element methods, J. Comput. Phys., 220: 41-58, (2006).
[101] Chiocchia G. Exact solutions to transonic and supersonic flows, Technical
Report AR-211, AGARD, (1985).
[102] Barter G.E. Shock Capturing with PDE-Based Artificial Viscosity for an
Adaptive, Higher-Order Discontinuous Galerkin Finite Element Method, PhD
Thesis, Massachusetts Institute of Technology, Massachusetts, (2008).
[103] Vassberg J.C., Jameson A. In Pursuit of Grid Convergence for Two-
Dimensional Euler Solutions, Journal of Aircraft, Vol. 47, pp. 1152-1166,
(2010).
[104] Kroll N., Bieler H., Deconinck H., Couaillier V., van der Ven H., Sorensen
K. ADIGMA - a European initiative on the development of adaptive higher-
order variational methods for aerospace applications. Notes on Numerical Fluid
Mechanics and Multidisciplinary Design, vol. 113. Springer, 2010.
[105] Hartmann R., Held J., Leicht T. Adjoint-based error estimation and adaptive
mesh refinement for the RANS and k-ω turbulence model equations, J. Comput.
Phys., Vol. 230, No. 11, pp. 4268-4284, (2011).
[106] Leicht T., Hartmann R. Error estimation and anisotropic mesh refinement
for 3d laminar aerodynamic flow simulations, Journal of Computational Physics
229: 7344-7360, (2010).
[107] Norberg C. Fluctuating lift on a circular cylinder: review and new measure-
ments, Journal of Fluids and Structures, 17: 57-96, (2003).
[108] Tritton DJ. Experiments on the flow past a circular cylinder at low reynolds
number, Journal of Fluid Mechanics, 6: 547-567, (1959).
161
Bibliography
162