The authors present generalized finite-volume-based discretized loss functions integrated into pressure-linked algorithms for physics-based unsupervised training of neural networks (NNs). In contrast to automatic differentiation-based counterparts, discretized loss functions leverage well-developed numerical schemes of computational fluid dynamics (CFD) for tailoring NN training specific to the flow problems. For validation, neural network-based solvers (NN solvers) are trained by posing equations such as the Poisson equation, energy equation, and Spalart–Allmaras model as loss functions. The predictions from the trained NNs agree well with the solutions from CFD solvers while also providing solution time speed-ups of up to seven times. Another application of unsupervised learning is the novel hybrid loss functions presented in this study. Hybrid learning combines the information from sparse or partial observations with a physics-based loss to train the NNs accurately and provides training speed-ups of up to five times compared with a fully unsupervised method. Also, to properly utilize the potential of discretized loss functions, they are formulated in a machine learning (ML) framework (TensorFlow) integrated with a CFD solver (OpenFOAM). The ML-CFD framework created here infuses versatility into the training by giving loss functions access to the different numerical schemes of the OpenFOAM. In addition, this integration allows for offloading the CFD programming to OpenFOAM, circumventing bottlenecks from manually coding new flow conditions in a solely ML-based framework like TensorFlow.

1.
M.
Raissi
,
P.
Perdikaris
, and
G. E.
Karniadakis
, “
Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations
,”
J. Comput. Phys.
378
,
686
707
(
2019
).
2.
X.
Jin
,
S.
Cai
,
H.
Li
, and
G. E.
Karniadakis
, “
NSFnets (Navier-Stokes flow nets): Physics-informed neural networks for the incompressible Navier-Stokes equations
,”
J. Comput. Phys.
426
,
109951
(
2021
).
3.
P.
Garnier
,
J.
Viquerat
,
J.
Rabault
,
A.
Larcher
,
A.
Kuhnle
, and
E.
Hachem
, “
A review on deep reinforcement learning for fluid mechanics
,”
Comput. Fluids
225
,
104973
(
2021
).
4.
J.
Rabault
and
A.
Kuhnle
, “
Accelerating deep reinforcement learning strategies of flow control through a multi-environment approach
,”
Phys. Fluids
31
,
094105
(
2019
).
5.
H.
Ghraieb
,
J.
Viquerat
,
A.
Larcher
,
P.
Meliga
, and
E.
Hachem
, “
Single-step deep reinforcement learning for open-loop control of laminar and turbulent flows
,”
Phys. Rev. Fluids
6
,
053902
(
2021
).
6.
S.
Pawar
,
S. E.
Ahmed
,
O.
San
, and
A.
Rasheed
, “
Data-driven recovery of hidden physics in reduced order modeling of fluid flows
,”
Phys. Fluids
32
,
036602
(
2020
).
7.
P.
Pant
,
R.
Doshi
,
P.
Bahl
, and
A.
Barati Farimani
, “
Deep learning for reduced order modelling and efficient temporal evolution of fluid simulations
,”
Phys. Fluids
33
,
107101
(
2021
).
8.
S. A.
Renganathan
,
R.
Maulik
, and
V.
Rao
, “
Machine learning for nonintrusive model order reduction of the parametric inviscid transonic flow past an airfoil
,”
Phys. Fluids
32
,
047110
(
2020
).
9.
R.
Gupta
and
R.
Jaiman
, “
Three-dimensional deep learning-based reduced order model for unsteady flow dynamics with variable Reynolds number
,”
Phys. Fluids
34
,
033612
(
2022
).
10.
L.
Zhu
,
W.
Zhang
, and
G.
Tu
, “
Generalization enhancement of artificial neural network for turbulence closure by feature selection
,”
Adv. Aerodyn.
4
,
1
24
(
2022
).
11.
M.
Milano
and
P.
Koumoutsakos
, “
Neural network modeling for near wall turbulent flow
,”
J. Comput. Phys.
182
,
1
26
(
2002
).
12.
A.
Patil
,
J.
Viquerat
,
A.
Larcher
,
G. E.
Haber
, and
E.
Hachem
, “
Robust deep learning for emulating turbulent viscosities
,”
Phys. Fluids
33
,
105118
(
2021
).
13.
L.
Ma
,
K.
Lin
,
D.
Fan
,
J.
Wang
, and
M. S.
Triantafyllou
, “
Flexible cylinder flow-induced vibration
,”
Phys. Fluids
34
,
011302
(
2022
).
14.
R.
Gupta
and
R.
Jaiman
, “
A hybrid partitioned deep learning methodology for moving interface and fluid–structure interaction
,”
Comput. Fluids
233
,
105239
(
2022
).
15.
J.
Viquerat
,
J.
Rabault
,
A.
Kuhnle
,
H.
Ghraieb
,
A.
Larcher
, and
E.
Hachem
, “
Direct shape optimization through deep reinforcement learning
,”
J. Comput. Phys.
428
,
110080
(
2021
).
16.
F.-J.
Granados-Ortiz
and
J.
Ortega-Casanova
, “
Machine learning-aided design optimization of a mechanical micromixer
,”
Phys. Fluids
33
,
063604
(
2021
).
17.
Y.
Wang
,
J.
Joseph
,
T. A.
Unni
,
S.
Yamakawa
,
A.
Barati Farimani
, and
K.
Shimada
, “
Three-dimensional ship hull encoding and optimization via deep neural networks
,”
J. Mech. Des.
144
,
101701
(
2022
).
18.
A. G.
Baydin
,
B. A.
Pearlmutter
,
A. A.
Radul
, and
J. M.
Siskind
, “
Automatic differentiation in machine learning: A survey
,”
J. Mach. Learn. Res.
18
,
1
43
(
2018
).
19.
V.
Dwivedi
,
N.
Parashar
, and
B.
Srinivasan
, “
Distributed physics informed neural network for data-efficient solution to partial differential equations
,” arXiv:1907.08967 (
2019
).
20.
A. D.
Jagtap
,
E.
Kharazmi
, and
G. E.
Karniadakis
, “
Conservative physics-informed neural networks on discrete domains for conservation laws: Applications to forward and inverse problems
,”
Comput. Methods Appl. Mech. Eng.
365
,
113028
(
2020
).
21.
E.
Kharazmi
,
Z.
Zhang
, and
G. E.
Karniadakis
, “
hp-VPINNs: Variational physics-informed neural networks with domain decomposition
,”
Comput. Methods Appl. Mech. Eng.
374
,
113547
(
2021
).
22.
V.
Dwivedi
and
B.
Srinivasan
, “
Physics informed extreme learning machine (PIELM)—A rapid method for the numerical solution of partial differential equations
,”
Neurocomputing
391
,
96
118
(
2020
).
23.
K.
Li
,
K.
Tang
,
T.
Wu
, and
Q.
Liao
, “
D3M: A deep domain decomposition method for partial differential equations
,”
IEEE Access
8
,
5283
5294
(
2019
).
24.
Z. L.
Jin
,
Y.
Liu
, and
L. J.
Durlofsky
, “
Deep-learning-based surrogate model for reservoir simulation with time-varying well controls
,”
J. Pet. Sci. Eng.
192
,
107273
(
2020
).
25.
N.
Wang
,
H.
Chang
, and
D.
Zhang
, “
Efficient uncertainty quantification for dynamic subsurface flow with surrogate by theory-guided neural network
,”
Comput. Methods Appl. Mech. Eng.
373
,
113492
(
2021
).
26.
Y.
Zhu
and
N.
Zabaras
, “
Bayesian deep convolutional encoder–decoder networks for surrogate modeling and uncertainty quantification
,”
J. Comput. Phys.
366
,
415
447
(
2018
).
27.
N.
Geneva
and
N.
Zabaras
, “
Modeling the dynamics of PDE systems with physics-constrained deep auto-regressive networks
,”
J. Comput. Phys.
403
,
109056
(
2020
).
28.
L.
Sun
,
H.
Gao
,
S.
Pan
, and
J.-X.
Wang
, “
Surrogate modeling for fluid flows based on physics-constrained deep learning without simulation data
,”
Comput. Methods Appl. Mech. Eng.
361
,
112732
(
2020
).
29.
Y.
Zhu
,
N.
Zabaras
,
P.-S.
Koutsourelakis
, and
P.
Perdikaris
, “
Physics-constrained deep learning for high-dimensional surrogate modeling and uncertainty quantification without labeled data
,”
J. Comput. Phys.
394
,
56
81
(
2019
).
30.
J.
Chen
,
J.
Viquerat
,
F.
Heymes
, and
E.
Hachem
, “
A twin-decoder structure for incompressible laminar flow reconstruction with uncertainty estimation around 2d obstacles
,”
Neural Comput. Appl.
34
,
6289
6217
(
2022
).
31.
S.
Heinz
, “
Minimal error partially resolving simulation methods for turbulent flows: A dynamic machine learning approach
,”
Phys. Fluids
34
,
051705
(
2022
).
32.
C.
Gorlé
,
S.
Zeoli
,
M.
Emory
,
J.
Larsson
, and
G.
Iaccarino
, “
Epistemic uncertainty quantification for Reynolds-averaged Navier-Stokes modeling of separated flows over streamlined surfaces
,”
Phys. Fluids
31
,
035101
(
2019
).
33.
J.
Ling
,
A.
Kurzawski
, and
J.
Templeton
, “
Reynolds averaged turbulence modelling using deep neural networks with embedded invariance
,”
J. Fluid Mech.
807
,
155
166
(
2016
).
34.
C.
Rao
,
H.
Sun
, and
Y.
Liu
, “
Physics-informed deep learning for incompressible laminar flows
,”
Theor. Appl. Mech. Lett.
10
,
207
212
(
2020
).
35.
J.-T.
Hsieh
,
S.
Zhao
,
S.
Eismann
,
L.
Mirabella
, and
S.
Ermon
, “
Learning neural PDE solvers with convergence guarantees
,” arXiv:1906.01200 (
2019
).
36.
R.
Ranade
,
C.
Hill
, and
J.
Pathak
, “
DiscretizationNet: A machine-learning based solver for Navier–Stokes equations using finite volume discretization
,”
Comput. Methods Appl. Mech. Eng.
378
,
113722
(
2021
).
37.
S.
Patankar
and
D.
Spalding
, “
A calculation procedure for heat, mass and momentum transfer in three-dimensional parabolic flows
,”
Int. J. Heat Mass Transfer
15
,
1787
1806
(
1972
).
38.
H.
Jasak
,
A.
Jemcov
,
Z.
Tukovic
 et al, “
OpenFOAM: A C++ library for complex physics simulations
,” in
Proceedings of the International Workshop on Coupled Methods in Numerical Dynamics
(
IUC, Dubrovnik
,
Croatia
,
2007
), Vol.
1000
, pp.
1
20
.
39.
R.
Maulik
,
H.
Sharma
,
S.
Patel
,
B.
Lusch
, and
E.
Jennings
, “
Deploying deep learning in OpenFOAM with tensorflow
,” AIAA Paper No. 2021-1485,
2021
, p.
1485
.
40.
J. H.
Ferziger
,
M.
Perić
, and
R. L.
Street
,
Computational Methods for Fluid Dynamics
(
Springer
,
2002
), Vol.
3
.
41.
V.
Sekar
,
Q.
Jiang
,
C.
Shu
, and
B. C.
Khoo
, “
Fast flow field prediction over airfoils using deep learning approach
,”
Phys. Fluids
31
,
057103
(
2019
).
42.
M.
Xu
,
S.
Song
,
X.
Sun
, and
W.
Zhang
, “
A convolutional strategy on unstructured mesh for the adjoint vector modeling
,”
Phys. Fluids
33
,
036115
(
2021
).
43.
J.
Chen
,
E.
Hachem
, and
J.
Viquerat
, “
Graph neural networks for laminar flow prediction around random two-dimensional shapes
,”
Phys. Fluids
33
,
123607
(
2021
).
44.
F.
Ogoke
,
K.
Meidani
,
A.
Hashemi
, and
A. B.
Farimani
, “
Graph convolutional networks applied to unstructured flow field data
,”
Mach. Learn.: Sci. Technol.
2
,
045020
(
2021
).
45.
Y.
Liu
,
W.
Cao
,
W.
Zhang
, and
Z.
Xia
, “
Analysis on numerical stability and convergence of Reynolds averaged Navier–Stokes simulations from the perspective of coupling modes
,”
Phys. Fluids
34
,
015120
(
2022
).
46.
H.
Jasak
, “
Error analysis and estimation for the finite volume method with applications to fluid flows
,” Ph.D. thesis (
University of London, Imperial College London
,
1996
).
47.
D. P.
Kingma
and
J.
Ba
, “
Adam: A method for stochastic optimization
,” arXiv:1412.6980 (
2014
).
48.
U.
Ghia
,
K. N.
Ghia
, and
C.
Shin
, “
High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method
,”
J. Comput. Phys.
48
,
387
411
(
1982
).
49.
P.
Spalart
and
S.
Allmaras
, “
A one-equation turbulence model for aerodynamic flows
,” AIAA Paper No. 1992-439,
1992
, p.
439
.
50.
V.
Yakhot
,
S.
Orszag
,
S.
Thangam
,
T.
Gatski
, and
C.
Speziale
, “
Development of turbulence models for shear flows by a double expansion technique
,”
Phys. Fluids A
4
,
1510
1520
(
1992
).
51.
F. R.
Menter
, “
Two-equation eddy-viscosity turbulence models for engineering applications
,”
AIAA J.
32
,
1598
1605
(
1994
).
52.
J.-L.
Wu
,
H.
Xiao
, and
E.
Paterson
, “
Physics-informed machine learning approach for augmenting turbulence models: A comprehensive framework
,”
Phys. Rev. Fluids
3
,
074602
(
2018
).
53.
J.-X.
Wang
,
J.-L.
Wu
, and
H.
Xiao
, “
Physics-informed machine learning approach for reconstructing Reynolds stress modeling discrepancies based on DNS data
,”
Phys. Rev. Fluids
2
,
034603
(
2017
).
54.
C.
Sotgiu
,
B.
Weigand
,
K.
Semmler
, and
P.
Wellinger
, “
Towards a general data-driven explicit algebraic Reynolds stress prediction framework
,”
Int. J. Heat Fluid Flow
79
,
108454
(
2019
).
55.
R.
Maulik
,
H.
Sharma
,
S.
Patel
,
B.
Lusch
, and
E.
Jennings
, “
A turbulent eddy-viscosity surrogate modeling framework for Reynolds-averaged Navier-Stokes simulations
,”
Comput. Fluids
227
,
104777
(
2021
).
56.
See https://turbmodels.larc.nasa.gov/backstep_val_sa.html for
Turbulence Modeling Resource: 2D backward facing step, Spalart-Allmaras closure model
; accessed 16 October 2021.
57.
D. W.
Stephens
,
A.
Jemcov
, and
C.
Sideroff
, “
Verification and validation of the caelus library: Incompressible turbulence models
,” in
Proceedings of the Fluids Engineering Division Summer Meeting
(
American Society of Mechanical Engineers
,
2017
), Vol.
58059
, p.
V01BT11A010
.
58.
L.
Zhu
,
W.
Zhang
,
J.
Kou
, and
Y.
Liu
, “
Machine learning methods for turbulence modeling in subsonic flows around airfoils
,”
Phys. Fluids
31
,
015105
(
2019
).
59.
X.
Sun
,
W.
Cao
,
Y.
Liu
,
L.
Zhu
, and
W.
Zhang
, “
High Reynolds number airfoil turbulence modeling method based on machine learning technique
,”
Comput. Fluids
236
,
105298
(
2022
).
You do not currently have access to this content.