J. Fluid Mech.
(2023),
v
ol
.
963, A35, doi:10.1017/jfm.2023.331
Machine
learn
ing building-block-flow wall model
for large-eddy simulation
Adrián Lozano-Durán
1
,
†
and H. Jane Bae
2
1
Department of Aeronautics and Astronautics, Massachusetts Institute of Technology,
Cambridge, MA 02139, USA
2
Graduate Aerospace Laboratories, California Institute of Technology, Pasadena, CA 91125, USA
(Received 13 December 2022; revised 24 February 2023; accepted 31 March 2023)
Awall
model for large-eddy simulation (LES) is proposed by devising the flow as a
combination of building blocks. The core assumption of the model is that a finite set
of simple canonical flows contains the essential physics to predict the wall shear stress
in more complex scenarios. The model is constructed to predict zero/favourable/adverse
mean
pres
sure
gra
di
ent wall turbulence, separation, statistically unsteady turbulence with
mean
flow three-dimensionality, and laminar flow. The approach is implemented using
two types of artificial neural networks: a classifier, which identifies the contribution of
each building block in the flow
, and a predictor, which estimates the wall shear stress via
a combination of the building-block flows. The training data are
obtained
directly
from
wall
-
mod
elled
LES
(WMLES) optimised to reproduce the correct mean quantities. This
approach guarantees the consistency of the training data with the numerical discretisation
and the gridding strategy of the flow solver. The output of the model is accompanied
by a confidence score in the prediction
that aids the detection of regions where the
model underperforms. The model is validated in canonical flows (
e.g. laminar/turbulent
boundary layers, turbulent channels, turbulent
Poiseuille–Couette flow, turbulent
pipe)
and two realistic aircraft configurations: the NASA Common Research Model High-lift
and NASA Juncture Flow
exper
i
ment. It is shown that the building-block-flow
wall
model outperforms (or matches) the predictions by an equilibrium wall model. It is
also concluded that further improvements in WMLES should incorporate advances in
subgrid-scale modelling to minimise error propagation to the wall model.
Key words:
turbulence modelling, turbulence simulation, turbulent boundary layers
†
Email address for correspondence:
adrianld@mit.edu
© The Author(s), 2023. Published by Cambridge University Press. This is an Open Access article,
distributed under the terms of the Creative Commons Attribution licence (
http://creativecommons.org/
licenses/by/4.0
), which permits unrestricted re-use, distribution and reproduction, provided the original
article is properly cited.
963
A35-1
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
A. Lozano-Durán and H.J. Bae
1. Introduction
The use of computational fluid dynamics (CFD) for external aerodynamic applications has
been a key tool for aircraft design in the modern aerospace industry (Casey
et al.
2000
).
However, flow predictions from state-of-the-art solvers are still unable to comply with the
stringent accuracy requirements and computational efficiency demanded by the industry
(Mauery
et al.
2021
). In recent years, wall-modelled large-eddy simulation (WMLES)
has gained momentum as a high-fidelity tool for routine industrial design (Goc
et al.
2021
). In WMLES, only the large-scale motions in the outer region of the boundary layer
are resolved, which enables a competitive computational cost compared with other CFD
approaches (Chapman
1979
; Choi & Moin
2012
;Yang&Griffin
2021
). As such, NASA
has recognised WMLES as an important pacing item for ‘developing a visionary CFD
capability required by the notional year 2030’ (Slotnick
et al.
2014
). In the present work,
we introduce a wall model based on flow-state classification applicable to a wide variety
of flow regimes that also provides a confidence score for the prediction.
Several strategies for modelling the near-wall region have been explored in the literature,
and comprehensive reviews can be found in Cabot & Moin (
2000
), Piomelli & Balaras
(
2002
), Spalart (
2009
), Larsson
et al.
(
2016
)
and Bose & Park (
2018
). One of the most
widely used approaches for wall modelling is the
wall
flux approach (or approximate
boundary conditions), where the no-slip and thermal wall boundary conditions are
replaced with
shear
stress
and
heat
flux boundary conditions provided by the wall model.
This category of wall models utilises the large-eddy simulation (LES) solution at a given
location in the domain as input
, and returns the wall fluxes needed by the solver as
boundary conditions. Examples of the most popular approaches are those computing the
wall shear stress
using the law of the wall (Deardorff
1970
; Schumann
1975
; Piomelli
et al.
1989
), the full/simplified
Reynolds
-
aver
aged Navier–Stokes equations (Balaras, Benocci
& Piomelli
1996
; Wang & Moin
2002
; Bodart & Larsson
2011
; Kawai & Larsson
2013
;
Bermejo-Moreno
et al.
2014
; Park & Moin
2014
;Yang
et al.
2015
), structural vortex
models (Chung & Pullin
2009
)
or dynamic wall models (Bose & Moin
2014
;Bae
et al.
2019
). Despite the progress, recent results from the American Institute of Aeronautics
and Astronautics Workshop on high-lift prediction (Kiris
et al.
2022
) have evidenced
the deficiencies of state-of-the-art WMLES in realistic aircraft configurations. Even
simulations with over 350 million degrees of freedom, which are too costly for routine
industrial design cycle, are unable to
match
accu
rately the experimental results (Rumsey,
Carlson & Ahmad
2019
; GMGW-HLPW
2022
; Goc, Bose & Moin
2022
; Lozano-Durán,
Bose & Moin
2022
).
The need for improved predictions has incited the adoption of machine learning (ML)
tools to complement and enhance existing turbulence models. The reader is referred to the
multiple reviews in the literature for a comprehensive overview of ML for fluid mechanics
(Brenner, Eldredge & Freund
2019
; Duraisamy, Iaccarino & Xiao
2019
; Brunton, Noack
& Koumoutsakos
2020
; Pandey, Schumacher & Sreenivasan
2020
;Beck&Kurz
2021
;
Duraisamy
2021
; Vinuesa & Brunton
2022
; Vinuesa et al.
2022
). Most models follow the
supervised learning paradigm, i.e. the ML task of learning a function that maps an input
to an output based on known
input–output pairs. The first ML-based models for LES were
introduced in the form of subgrid-scale (SGS) models. Early approaches used artificial
neural networks (ANNs) to emulate and speed up a conventional, but computationally
expensive, SGS model (Sarghini, De Felice & Santini
2003
). More recently, SGS models
have been trained to predict the (so-called) perfect SGS terms using data from filtered
direct numerical simulation (DNS) (Gamahara & Hattori
2017
;Xie
et al.
2019
). Other
approaches include deriving SGS terms from optimal estimator theory (Vollant, Balarac
963
A35-2
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
ML building-block-flow wall model for LES
&Corre
2017
), deconvolution
oper
a
tors (e.g. Hickel
et al.
2004
; Maulik & San
2017
;
Fukami, Fukagata & Taira
2019
)
or optimised SGS tensor accounting for numerical errors
(Ling
et al.
2022
).
One of the first attempts at using supervised learning for wall models in LES can
be found in Yang
et al.
(
2019
). The authors noted that a model trained on turbulent
channel flow data at a single Reynolds number could be extrapolated to higher Reynolds
numbers in the same configuration. Similar approaches for data-driven wall models using
supervised learning were developed for various flow configurations
, such as a spanwise
rotating channel
flow (Huang, Yang & Kunz
2019
), flow over periodic hills (Zhou, He &
Yang
2021
), turbulent flows with separation (Zangeneh
2021
), and boundary layer flow
in the presence of
shock–boundary layer interaction (Bhaskaran
et al.
2021
)
, with mixed
results in
a posteriori
testing. The first attempt at semi-supervised learning for WMLES
can be found in Bae & Koumoutsakos (
2022
), where the authors used reinforcement
learning to train on turbulent channel flow data at relatively low Reynolds numbers. The
model was able to extrapolate to higher Reynolds numbers for turbulent channel flows and
zero
pres
sure
gra
di
ent turbulent boundary layers. The reinforcement learning
wall
model
has recently been extended to account for pressure gradient effects (Zhou
et al.
2022
).
Nonetheless, most of the models cited above rely on information about the flow that is
typically inaccessible in real-world applications, such as the
bound
ary
layer thickness, and
is limited to simple flow configurations. One exception is the ML
wall
model introduced by
Lozano-Durán & Bae (
2020
), which is
appli
ca
ble
directly to arbitrary complex geometries
and provides the foundations for the present modelling effort.
Currently, one major challenge for WMLES of realistic external aerodynamic
applications is achieving the robustness and accuracy necessary to model the
myr
iad
different flow regimes that are characteristic of these problems. Examples include
turbulence with
mean
flow three-dimensionality, laminar-to-turbulent transition, flow
separation, secondary flow motions at corners, and shock wave formation, to name a
few. The
wall
stress generation mechanisms in these complex scenarios differ from those
in
flat
-
plate turbulence. However, the most widespread wall models are built upon the
assumption of
sta
tis
ti
cally
in
equi
lib
rium wall-bounded turbulence without
mean
flow
three-dimensionality, which
applies
to
only a handful number of flows. The latter raises the
question of how to devise models capable of
account
ing
seam
lessly for such a vast and rich
collection of flow physics in a single unified approach. Another important consideration is
the data required for training the ML models and consistency with the numerical schemes
and grid generation strategy.
In this work, we develop a wall model for LES using building-block flows. The
model is formulated to account for various flow configurations, such as wall-attached
turbulence, wall turbulence under favourable/adverse pressure gradients, separated
turbulence, statistically unsteady turbulence, and laminar flow. The model comprises
two components: a classifier and a predictor. The classifier is trained to place the flows
into separate categories along with a confidence score, while the predictor outputs the
modelled wall stress based on the likelihood of each category. The training data are
obtained
directly
from
WMLES with an ‘exact’ model for mean quantities to guarantee
consistency with the numerical discretisation and grid structure. The model is validated in
canonical flows outside the training set and complex flows. The latter includes two realistic
aircraft configurations, namely, the NASA Common Research Model High-lift and NASA
Juncture Flow
exper
i
ment.
This paper is organised as follows. The formulation of the new model is discussed in
§
2
. The numerical approach and traditional wall models that serve as a comparison point
963
A35-3
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
A. Lozano-Durán and H.J. Bae
u
1
y
1
p
conf
% Freestream
% Laminar flow
% Separation
% APG
% ZPG
% FPG
% Unsteady
% Confidence
ν
a
1
y
1
3
ν
2
k
1
k
m
1
ν
u
2
y
2
ν
,
,
,,,
γ
12
,
γ
1
y
1
2
.
γ
1
w
{
{
}
Inputs
Predictor
Classifier
Confidence
Outputs
u
2
d
i
= min{||
x
input
–
x
train
||};
d
s
/
d
i
u
1
y
2
y
1
τ
w
y
1
μ
u
1
}
p
i
class
i
= 1, ..., 7
Figure 1. Schematic of the building-block flow wall model (BFWM). Details of the formulation are provided
in §
2
.
are introduced in §
3
. The model is validated in §
4
and compared with an equilibrium
wall model. The model limitations are discussed in §
5
. Finally, conclusions are offered
in §
6
.
2. Model formulation
The working principle of the proposed model is summarised in
figure 1
. The model is
referred to as the building-block-flow wall model (BFWM) and was first introduced by
Lozano-Durán & Bae (
2020
). The BFWM is comprised of two elements: a classifier
and a predictor. First, the classifier is fed data from the LES solver and quantifies the
similarities of the input with a collection of known building-block flows. The predictor
leverages the information of the classifier together with the input to generate the wall
shear stress prediction via a combination of the building-block flows from the database.
Each building block is dedicated to modelling different flow physics (e.g. wall-attached
turbulence, adverse/favourable pressure-gradient effects, separation, laminar flow
), and
the model provides a blending between flows using information from the classifier. A
confidence score is generated based on the similarity between the input data and the
building-block flows. If the input data
look
extra
ne
ous,
then the model prompts a low
confidence score, which essentially means that the flow is unknown and does not match any
knowledge from the database. In the following, we elaborate on the model requirements,
assumptions, input/output data, training data, and ANN architecture.
2.1.
Model requirements
We consider the following model requirements
.
(i) The wall model should be able to account for different flow physics (
e.g. laminar
flow, wall-attached turbulence, separated
flow) in a unified manner (i.e. the input
and output structure of the model must be identical regardless of the case).
(ii) The model must be scalable to incorporate additional building-block flows if needed
in future versions.
963
A35-4
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
ML building-block-flow wall model for LES
(ii) The model must provide a confidence score in the prediction at each point at the
wall.
(iv) The model formulation must be directly applicable to complex geometries
(e.g. realistic aircraft configuration) without any additional modifications. This
requirement will constrain the allowable input variables and the parameters used
for their non-dimensionalisation (i.e. they will need to be
local
in
space).
(v) The model must account for the numerical errors of the schemes employed to
integrate the LES equations. This implies that the input data used to train the model
must be consistent with the data from the LES solver rather than from filtered DNS.
(vi) The inputs and outputs of the model must be given in non-dimensional form to
comply with dimensional consistency.
(vii) The model must be invariant under constant space/time translations and rotations of
the frame of reference.
(viii) The model must be Galilean invariant.
2.2.
Model assumptions
The main modelling assumptions are
as
fol
lows.
(i) There is a finite set of simple flows (referred to as building-block flows) that contains
the essential flow physics to formulate generalisable wall models.
(ii) The effect of the (missing) near-wall
SGS in WMLES of complex flows
is representable by a linear combination of the near-wall behaviour of the
building-block flows.
(iii) A set of
N
non-dimensional model inputs based on local flow quantities is enough to
discern among building-block flows, where
N
is the minimum number of parameters
characterising the building-block flow collection.
(iv) The non-dimensional form of the model inputs/outputs that provides the best
predictive capabilities (i.e. interpolation/extrapolation between training cases) is
obtained by scaling the variables with the kinematic viscosity and the distance to
the wall.
(v) The flow information from two contiguous wall-normal locations is enough to
predict the wall shear stress in the vicinity of those locations.
(vi) History effects for the
SGS flow are captured using instantaneous accelerations
without the need for additional information from past times.
Assumptions (i) and (ii) imply that
the BFWM would provide accurate predictions
as long as the (non-universal) large-scale flow motions are resolved by the WMLES
grid
, and the (smaller-scale) near-wall dynamics resemble the building-block flows or
a combination of them. Assumption (iii) stems from the fact that the number of input
variables to distinguish among different cases in the building-block flow collection must
be, at least, equal to the number of non-dimensional groups required to
char
ac
terise
com
pletely the wall shear stress across all the building-block flows. For the building-block
flows chosen in this work, six parameters are needed to unambiguously identify the wall
shear stress from one particular case (as will be discussed in §
2.3
). These parameters
are global quantities not available to the model. Instead, six non-dimensional inputs
using local flow information are fed into
the BFWM to predict the wall shear stress.
However, there is no guarantee
that these inputs can be used to discern among all possible
building-block flows in a
uni
vo
cal manner at all times, and from there
comes the need for
assumption (iii).
963
A35-5
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
A. Lozano-Durán and H.J. Bae
(
a
)(
b
)(
c
)
(
d
)(
e
)(
f
)
Figure 2. Examples of building-block units taken as representative of different flow regimes
:(
a
)
freestream,
(
b
) laminar channel flow, (
c
) turbulent channel flow, (
d
) turbulent
Poiseuille–Couette flow for zero wall stress,
(
e
) turbulent
Poiseuille–Couette flow with a strong adverse mean pressure gradient, and (
f
) turbulent channel
flow with sudden imposition of spanwise
mean
pres
sure
gra
di
ent.
In
assump
tion (iv), it is assumed that the scaling proposed will be the best in all the
flow scenarios
that the model may encounter, which is not true in general. For example,
the current scaling choice will not provide the best performance in the presence of strong
compressibility effects, chemically reacting flows
or
mul
ti
phase
flows.
Assumptions (v) and (vi) are adopted for the sake of model simplicity. The choice is
informed by our previous work in Lozano-Durán & Bae (
2020
), where a
seven
-
point
stencil was used for the input variables compared to the simpler,
two
-
point stencil
selected in the present work. It was noted that the
seven
-
point stencil greatly complicated
the model implementation without providing important benefits in terms of model
performance. There are additional modelling assumptions that are not
stated
explic
itly
above. Nonetheless, points (i) to (vi) are the most critical assumptions affecting the model
performance.
2.3.
Building-block flows
Seven types of building-block flows are considered
, and examples are shown in
figure 2
.
All the cases entail an incompressible flow confined between two parallel walls
,with
the exception of the freestream flow. Cases with additional complexity, such as
aero
foils,
wings
and
bumps,
are
avoided
inten
tion
ally. The rationale behind this choice is that the
building blocks should encode the key flow physics to predict more complex scenarios.
Hence we intend to avoid case overfitting, i.e.
pre
dict
ing the flow over a wing
cor
rectly
merely because the model was also trained on similar wings instead
of
capturing the flow
physics
faith
fully.
For the building blocks, the streamwise, wall-
nor
mal and spanwise spatial coordinates
are denoted by
x
,
y
and
z
, respectively. The walls are separated by a distance 2
h
. The density
is
ρ
, and the dynamic and kinematic viscosities of the fluid are
μ
and
ν
, respectively.
963
A35-6
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
ML building-block-flow wall model for LES
In the following, we discuss the configuration and physical motivation behind each
building block. We also include in
paren
the
ses the label for each building-block
flow.
(1)
Freestream
(freestream). A uniform and constant velocity field is used as
representative of freestream flows. The main role of this building-block flow is to
identify near-wall regions with zero points per
bound
ary
layer thickness. In these
situations,
the BFWM applies a ZPG model (defined below) to estimate the wall
stress. The prediction is accompanied by a low confidence score as there is
not
enough information to provide reliable predictions.
(2)
Wall
-
bounded
lam
i
nar
flow
(lam
i
nar). The near-wall region of a laminar flow is
modelled using Poiseuille flow (i.e. parabolic mean velocity profile). The goal of this
building block is to allow the prediction of the wall stress in wall-attached laminar
scenarios. The case is characterised by the friction Reynolds number
Re
τ
=
u
τ
h
/ν
,
where
u
τ
is the friction velocity at the wall
,and
h
is the channel half-height.
The range of Reynolds numbers considered is from
Re
τ
=
5to
Re
τ
=
10
4
.A
parabolic mean velocity profile is used to
pre
dict
ana
lyt
i
cally the stress at the
wall.
(3)
Wall
-
bounded
tur
bu
lence
under
zero
mean
pres
sure
gra
di
ent (ZPG). Canonical
wall turbulence without mean pressure gradient effects is modelled using turbulent
channel flows as a building block. The
wall
stress predictions are provided by an
ANN trained for
Re
τ
=
100 to
Re
τ
=
10 000 using numerical data (Lozano-Durán
& Jiménez
2014
a
;Hoyas
et al.
2022
).
(4)
Wall
-
bounded
tur
bu
lence
under
favourable/adverse
mean
pres
sure
gra
di
ent
and
sep
a
ra
tion (FPG, APG
and
sep
a
ra
tion, respectively). We utilise the turbulent
Poiseuille–Couette flow as a simplified representation of wall-bounded turbulence
subject to favourable and adverse
mean
pres
sure
gra
di
ent effects. The bottom wall is
setatrest
, and the top wall
is
set at a constant velocity equal to
U
t
>
0. A streamwise
mean
pres
sure
gra
di
ent, denoted by
d
P
/
d
x
, is applied to the flow. Favourable
pressure gradient effects are obtained for values of
d
P
/
d
x
accelerating the flow in
the same direction as the top wall. Adverse pressure gradient conditions are achieved
for values of
d
P
/
d
x
that accelerate the flow in the
direc
tion
oppo
site
to
that
of the top
wall. Flow separation is represented by values of
d
P
/
d
x
at which the wall stress at the
bottom wall is zero. The different flow regimes are characterised by the two Reynolds
numbers
Re
P
=±
√
|
d
P
/
d
x
|
/ρ
h
/ν
and
Re
U
=
U
t
h
/ν
. The
wall
stress predictions
are provided by an ANN trained for
Re
P
from
−
1
.
2
×
10
3
to 1
.
2
×
10
3
,
and
Re
U
from
5
×
10
3
to 2
×
10
4
.New
DNS
runs were conducted for these cases using the
same numerical solver as in previous investigations by our group (Lozano-Durán,
Hack & Moin
2018
; Lozano-Durán & Bae
2019
a
).
(5)
Sta
tis
ti
cally
unsteady
wall
tur
bu
lence
with
three
-
dimen
sional
mean
flow
(unsteady).
The last building-block flow considered is a turbulent channel flow subject to
a sudden spanwise mean pressure gradient d
P
/
d
z
. The role of this case is to
capture out-of-equilibrium effects due to strong unsteadiness and
mean
flow
three-dimensionality, such as the decrease in the magnitude of the wall stress and the
misalignment between the
wall
stress vector and mean shear vector. Only the initial
transient of the flow, where non-equilibrium effects manifest, is considered. The
different flow regimes are characterised by the streamwise friction Reynolds number
Re
τ
=
u
τ
h
/ν
before the imposition of d
P
/
d
z
and the ratio of streamwise to spanwise
mean pressure gradients
Π
=
(
d
P
/
d
z
)/(
d
P
/
d
x
)
.
The
wall
stress predictions are
963
A35-7
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
A. Lozano-Durán and H.J. Bae
provided by an ANN trained for
Re
τ
=
100 to 1000 and
Π
=
5to100usingdata
from Lozano-Durán
et al.
(
2020
b
).
The wall shear stress from each case in the building-block flow collection considered
is
deter
mined
com
pletely by the specification of six parameters:
Re
τ
(or
Re
P
),
Re
U
,
Π
,
tu
τ
/
h
(non-dimensional time for
unsteady cases), turbulent/non-turbulent flow, and
laminar/freestream. Not all parameters are relevant for each case, yet they are required to
avoid ambiguities.
The DNS database for ZPG, FPG, APG,
sep
a
ra
tion
and
unsteady contains roughly 500
simulations.
Figure 3
contains examples of the DNS mean velocity profiles for a selection
of building-block flows. An advantage of the present building-block
set
-
up is that it allows
the generation of contiguous data from one flow regime to another without modifying the
geometry
, only varying the non-dimensional numbers defining the case (e.g. from FPG to
ZPG to APG to
sep
a
ra
tion by just changing the mean pressure gradient). This facilitates
the generation of training data filling the non-dimensional space of inputs, which translates
into a more reliable model. The latter is an important requirement, as the role of a model
should
be
not fitting one particular dataset but learning the scaling of the non-dimensional
inputs and outputs controlling the problem at hand.
2.4.
Input and output variables
The input variables are acquired using a two-point stencil as shown in
figure 1
. The stencil
contains the centre of the control volume attached to the wall (where the wall shear stress
is to be predicted) and the second control volume off the wall along the wall-normal
direction. Given that the model is intended to be used in complex geometries, the centres
do not need to align perfectly along the wall-normal direction. This misalignment is
considered during the model training. The information collected from the flow is
{
u
1
,
u
2
,γ
12
,
a
1
,
̇
γ
1
,
k
1
,
k
m
1
}
,
(2.1)
where
u
1
=|
u
1
|
and
u
2
=|
u
2
|
are the magnitude of the wall-parallel velocities relative
to the wall at the first and second control volumes, respectively,
γ
12
is the angle between
u
1
and
u
2
,
a
1
is the magnitude of the acceleration at the first control volume,
̇
γ
1
is the
time derivative of the angle of
u
1
in the wall-parallel direction,
and
k
1
and
k
m
1
are the
turbulent kinetic energy and mean kinetic energy, respectively
, at the first control volume
and relative to the wall. The mean velocity to compute
k
1
and
k
m
1
is obtained via an
exponential average in time (denoted by
(
̄
·
)
) with time scale 10
Δ/
√
k
m
1
, where
Δ
is
the characteristic grid size based on the
cube
root of the control volume. The quantities
predicted by the model are
{
τ
w
,γ
1
w
,
p
i
class
,
p
conf
}
,
(2.2)
where
τ
w
=|
τ
w
|
is the magnitude of the
wall
stress vector,
γ
1
w
is the angle between
u
1
and
τ
w
,
p
i
class
∈
[0
,
1] for
i
=
1
,...,
7 is the probability of the flow corresponding to each
building-block category, and
p
conf
∈
[0
,
1] is the model confidence score.
The input to the wall model comprises the non-dimensional groups formed by the set
u
1
y
1
ν
,
u
2
y
2
ν
,γ
12
,
a
1
y
3
1
ν
2
,
̇
γ
1
y
2
1
ν
,
k
1
k
m
1
.
(2.3)
963
A35-8
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
ML building-block-flow wall model for LES
0
50
–10
10
20
30
40
50
60
–5
–10
0
5
10
15
20
25
–60
–80
–40
–20
0
20
40
10
15
20
25
30
0.2
0.4
y
/
h
0.6
0.8
1.0
0
0.2
0.4
0.6
0.8
1.0
u
+
u
/
u
τ
,
ZPG
(
a
)
0
0.2
0.4
y
/
h
0.6
0.8
1.0
(
c
)
0
0.2
0.4
0.6
0.8
1.0
(
d
)
(
b
)
–
w
/
u
τ
,
ZPG
,
u
/
u
τ
,
ZPG
u
/
u
τ
,
ZPG
Figure 3. Mean velocity profiles for a selection of building-block flows. (
a
) Turbulent channel flows for (from
left to right)
Re
τ
=
180, 550, 950, 2000,
4200 and 10 000 (ZPG). (
b
) Turbulent
Poiseuille–Couette
flows with
favourable
mean
pres
sure
gra
di
ent (FPG) at
Re
U
=
6500 (dashed)
for
Re
P
=
0, 100, 150, 200, 250, 300 (from
left to right)
,and
Re
U
=
22 360 (solid) for
Re
P
=
0, 380, 550, 750, 800, 1000 (from left to right). (
c
) Turbulent
Poiseuille–Couette
flows with adverse
mean
pres
sure
gra
di
ent (APG) and separation at
Re
U
=
6500 (dashed)
for
Re
P
=
0,
−
100,
−
150,
−
200,
−
250,
−
300 (from right to left) and
Re
U
=
22 360 (solid) for
Re
P
=
0,
−
380,
−
550,
−
750,
−
800,
−
1000 (from right to left). (
d
) Turbulent channel
flows with the sudden imposition
of spanwise
mean
pres
sure
gra
di
ent for increasing time (from light to dark colour) for the streamwise (in blue)
and spanwise (in red) mean velocity profiles at
Re
τ
=
550 (solid) and
Re
τ
=
950 (dashed) for
Π
=
60. In
all cases,
u
τ,
ZPG
is the friction velocity of the same case without adverse/favourable/spanwise
mean
pres
sure
gradient.
The model applies the exponential averaged
(
̄
·
)
to the input variables, and this is accounted
for in the training. The non-dimensional output of the wall model is
τ
w
y
1
μ
̄
u
1
,γ
1
w
,
p
i
class
,
p
conf
.
(2.4)
We have
avoided
explic
itly the use of flow parameters such as freestream velocity
and bulk
velocity flow,
as they are not
iden
ti
fi
able
unam
bigu
ously for arbitrary geometries.
The non-dimensional groups in (
2.3
) are devised to enable the classification and
wall
stress prediction according to the building-block flows considered. All the inputs
contribute to the prediction of the outputs to some degree. However, it is possible to
highlight the main role played by each input variable. The first two inputs,
u
1
y
1
/ν
and
u
2
y
2
/ν
, represent the local Reynolds numbers at the first and second control volumes,
respectively. They are key drivers for the prediction of the wall shear stress in all cases by
detecting the shape of the mean velocity profile. They aid the distinction between turbulent
963
A35-9
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
A. Lozano-Durán and H.J. Bae
channel flow, turbulence with favourable/adverse mean pressure gradient, and separation.
The relative angle
γ
12
is used to detect three-dimensionality in the mean velocity profile.
The non-dimensional acceleration
a
1
y
3
1
/ν
2
and the angular
rate
of
change
̇
γ
1
y
2
1
/ν
facilitate
the prediction of the magnitude and direction of statistically unsteady effects in the wall
shear stress. Finally,
k
1
/
k
m
1
is leveraged to discern between turbulent flows (ZPG, APG,
FPG, etc.) and non-turbulent flows (freestream and
lam
i
nar). The wall stress at the output
is non-dimensionalised using the pseudo-wall-stress
μ
̄
u
1
/
y
1
, as it was found to minimise
the spread of the data between cases. This scaling improved the generalisability of the
model and facilitated learning the trends in the data by the ANNs.
2.5.
WMLES with optimised SGS/wall model
The training data (discussed in §
2.6
)
are generated using WMLES with SGS/wall models
optimised to obtain the exact values for the mean velocity profiles and wall stress
distribution in order to attain consistency with the numerical discretisation and gridding
strategy of the solver. This approach was preferred over filtered DNS data, as it is
known that the SGS tensor in implicitly filtered LES (
τ
SGS
ij
) does not coincide with the
Reynolds stress terms resulting from filtering the Navier–Stokes equations. The ambiguity
in the filter operator renders DNS data inadequate for the development of SGS models
because of inconsistent governing equations (Lund & Kaltenbach
1995
; Lund
2003
; Bae
& Lozano-Durán
2017
,
2018
,
2022
). This limitation is particularly relevant in the present
work, as the typical grid sizes utilised in WMLES of external aerodynamics are orders
of magnitude larger than the characteristic Kolmogorov
length
scale of the near-wall
turbulence. Consequently, numerical errors are comparable to modelling errors, and the
former must be accounted for in order to yield accurate predictions.
We introduce an exact-for-the-mean
SGS (ESGS)
model given by
τ
ESGS
ij
=
τ
base
ij
+
τ
SGS
ij
,
(2.5)
where
τ
base
ij
is the SGS stress tensor provided by the baseline (imperfect) SGS model
(in this case, the dynamic Smagorinsky model, albeit another model could have been
selected), and
τ
SGS
ij
is the SGS model correction such that the WMLES mean velocity
profiles match the DNS counterparts. In this approach, instantaneous DNS flow fields are
not needed
, and neither is a specific LES filter shape. The correction
τ
SGS
ij
is calculated
on the fly as the instantaneous force
∂τ
SGS
ij
/∂
x
j
required for
u
i
xz
=
u
DNS
i
xzt
, where
·
xz
denotes average over the homogeneous
direc
tions
x
and
z
,and
u
DNS
i
xzt
is the DNS
mean velocity profile for the
i
th velocity component averaged over
x
,
z
and
t
. If the DNS
flow is not statistically stationary (e.g.
the
unsteady building-block flow), then the average
is taken over
x
,
z
, and statistically equivalent realisations. At each wall-normal location,
the force
∂τ
SGS
ij
/∂
x
j
is
cal
cu
lated
numer
i
cally as the value required in the right-hand side
of the LES equations to match the DNS mean velocity profile in the next time step.
The boundary condition at the wall is also modified to reproduce the probability density
function (p.d.f.) of the wall shear stress from DNS
, and it is referred to as
the exact
boundary condition
(EBC). This was achieved by using an inverse probability integral
transform, which generates random numbers from an arbitrary probability distribution
given its cumulative distribution function (Devroye
2006
). During the runtime of WMLES
with
ESGS, random numbers are sampled from the uniform distribution and mapped onto
the p.d.f. of the wall shear stress
obtained
pre
vi
ously from DNS. The process is performed
for all wall locations at each time step.
963
A35-10
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press
ML building-block-flow wall model for LES
WMLES of all the building-block flows was conducted using ESGS with EBC
(hereafter, E-WMLES). The simulations were carried out in the same flow solver
used
later to implement the BFWM. This guarantees consistency of the training data with the
actual numerical errors of the solver and gridding structure under the assumption of an
SGS model able to
pre
dict
accu
rately the mean velocity profiles.
2.6.
E-WMLES training data, ANN architecture, and training method
Figure 4
offers an overview of the training workflow, which is divided into three steps
.
Step 1:
gen
er
a
tion of E-WMLES training database. The mean velocity profiles and the
p.d.f.s of the wall shear stress from DNS are used to generate the training database using
E-WMLES as described in §
2.5
. The E-WMLES database comprises the building-block
flows cases discussed in §
2.3
at isotropic grid resolutions
Δ
=
h
/
N
with
N
=
5, 10, 20,
40, 80, 160 and 380, which cover (by a wide margin) the grid
res
o
lu
tions encountered in
external aerodynamic applications. For grid resolutions finer than
Δ
=
h
/
380,
the BFWM
was trained with DNS data to ensure convergence to the no-slip boundary condition. For
each grid resolution, the E-WMLES data generated
are time-resolved with a varying
time
step such that the
Courant–Friedrichs–Lewy number is equal to 0.5. Time-resolved data
were required to compute accelerations and
time
aver
ages of the input variables
that are
representative of WMLES. The E-WMLES cases were run for 10 eddy-turnover times
(defined by
h
/
u
τ
). This time was sufficient to capture the statistical trends of the smallest
flow scales in the E-WMLES, which have lifetimes of the order of
Δ/
u
τ
(Lozano-Durán
& Jiménez
2014
b
). It was found that reducing the
time
length of the training data below
3 eddy-turnover times significantly reduced the performance of the ANNs. The
unsteady
cases
were
sim
u
lated
only for the period along which non-equilibrium effects are relevant
(i.e. between 0.5 and 2 eddy-turnover times). Each E-WMLES contains of the order of
1000 to 10 000 snapshots
, depending on the case. The training set was augmented by
performing E-WMLES in which the
x
direction (i.e. mean flow direction) was rotated
parallel to the wall by
−
45
◦
,
−
40
◦
,
−
35
◦
,...,
35
◦
,
40
◦
,
45
◦
.
Step 2:
train
ing the ANN for the classifier. The classifier is trained using the full
E-WMLES database and independently of the predictors. The classifier is an ANN with 5
hidden layers and 20 neurons per layer. The layers are connected with rectified linear units
(ReLUs) as the activation function. The input to the classifier is the set of non-dimensional
groups from (
2.3
). The last layer of the classifier is followed by the softmax activation
function, which provides the probabilities of belonging to each building-block flow
category (
p
i
class
,
i
=
1
,...,
7) such that
p
i
class
=
1. The ANN weights and biases of
the classifier are given by
w
c
=
argmin
w
c
7
i
=
1
N
j
=
1
−
p
i
,
true
class
,
j
log
p
i
,
predicted
class
,
j
, where
N
is the number of samples per category. The performance of the classifier after training
is evaluated in
figure 5
, which shows the normalised confusion matrix. The diagonal
of the matrix contains the
per
cent
ages of inputs that are
clas
si
fied
cor
rectly, whereas
off-diagonal values show the amount of misclassification among cases. The matrix shows
that most samples are
clas
si
fied
cor
rectly. There are a few misclassifications (off-diagonal
values) that are intentional to ensure a smooth transition between building blocks. This
is caused by the overlap between contiguous building blocks, such as
sep
a
ra
tion and
strong APG, mild APG and ZPG, ZPG and mild FPG, and ZPG and
unsteady. The only
unintentional misclassification is the larger number of ZPG samples classified as FPG.
However, this did not impact the performance of
the BFWM, as the
wall
stress
pre
dic
tions
for FPG and ZPG are comparable. Note that there is no ambiguity in the distinction
963
A35-11
https://doi.org/10.1017/jfm.2023.331
Published online by Cambridge University Press