Elsevier

Computers & Fluids

Volume 223, 15 June 2021, 104947
Computers & Fluids

Output-based adaptive aerodynamic simulations using convolutional neural networks

https://doi.org/10.1016/j.compfluid.2021.104947Get rights and content

Highlights

  • A new approach for output error estimation and mesh adaptation using machine-learning techniques.

  • Physical-reference mapping extends convolutional neural networks to general computational domains.

  • Encoder-decoder type networks enable efficient models with high-dimensional CFD input and output.

  • Properly trained network model can effectively predict the error and drive the mesh adaptation in aerodynamic simulations.

Abstract

This paper presents a new method to perform output error estimation and mesh adaptation in computational fluid dynamics (CFD) using machine-learning techniques. The error of interest is the functional output error induced by the numerical discretization, including the finite computational mesh and approximation order. Given the data of adaptive flow simulations guided by adjoint-based error estimates, a surrogate model is trained to predict the output error and drive the mesh adaptation with only the low-fidelity solution as input. The goal is to generalize the error estimation and mesh adaptation knowledge from the simulation data at hand. The proposed method uses an encoder-decoder type convolutional neural network (CNN), supervised by both the adaptive error indicator field and the total output error, to capture both the local and global features related to the numerical error. To handle geometries and irregular meshes in adaptive simulations, topology mapping and local projection are introduced into traditional CNN models. The feasibility of the proposed machine-learning approach for error prediction and mesh adaptation is demonstrated in inviscid transonic flow simulations over airfoils. Both the output error and the localized adaptive indicators are well predicted by the trained CNN model, which is then used to drive the mesh adaptation as an alternative to standard adjoint-based methods. The good performance and relatively simple deployment encourage more study and development of the proposed method.

Introduction

Thanks to fast-paced increases in computing power and highly-developed numerical methods, computational fluid dynamics (CFD) has become commonplace in aerospace design and analysis over the last few decades. Although CFD simulations are now routinely carried out in aerospace applications, the resulting CFD solutions often come with low reliability, without active quantification of the numerical errors. The two main categories of numerical errors in CFD simulations are modeling errors due to assumptions or simplifications of the actual physics, and discretization errors induced by the finite-dimensional discretization of the continuous physical model. Both types of errors significantly affect the numerical solutions of CFD simulations, which can often lead to non-negligible errors in the outputs of interest such as drag and lift.

Typically, an appropriate model is chosen based on the best knowledge or the experience of the practitioner. This task is often highly problem-dependent and generally non-trivial for non-expert users. In order to reduce the error associated with physical models, calibration can be performed based on the data from experiments or direct numerical simulations, which remains an active research area [1], [2], [3], [4]. In this paper, we focus on the error caused by finite-dimensional discretizations of the continuous well-selected model, i.e., the governing equations are assumed to be accurate. Commonly used a priori meshes in CFD runs, even when generated with best practice guidelines, cannot guarantee accurate solutions [5]. Quantifying the uncertainty due to discretization errors is thus essential for the reliable use of CFD in practice. However, this liability cannot be managed easily for complex flow-fields, even by experienced practitioners.

Luckily, adjoint-based error estimation, also known as the dual-weighted residual method, provides a robust and effective approach to quantify the effect of discretization error on a chosen output of interest  [6], [7], [8]. The adjoint variables weight the local readily-available flow residual to form an error measure of the output, which can be used to provide error bounds or a pure signed correction for the output. The key feature of the adjoint-based error estimation is the ability to localize the output error and to identify the regions important for accurate output prediction. Solution-adaptive methods via adjoint-based output error estimation have dramatically improved the accuracy and efficiency of CFD [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19]. Despite the great success in CFD applications, the additional computational cost and implementation complexity associated with adjoint-based methods cannot be neglected. On the one hand, adjoint-based methods require solving a dual linear system, i.e., the adjoint equation set, which is of the same size as the flow problem or even larger when solving on an enriched space. This additional cost can be mitigated in problems where the adjoint solutions on the current space are solved regardless, such as gradient-based optimization with error estimation and mesh adaptation  [20], [21], [22], [23], [24]; yet for problems such as unsteady simulations, uncertainty quantification or gradient-free optimization, the extra cost associated with adjoint solutions compound and can be accumulated when the adjoint is repeatedly solved. On the other hand, the implementation of adjoint methods often requires the transpose of the residual Jacobian matrix, which is not always available in explicit solvers or Jacobian-free methods [25]. In these circumstances, either the continuous adjoint equations should be derived and directly discretized [26] or special implementation efforts are required [27], adding considerable costs and efforts in the development. Moreover, adjoint consistency [20], [28], [29], which is critical for effective adaptation, requires special treatment and imposes additional difficulties on the adjoint implementation. The additional computational costs associated with the adjoint solves, in addition to the implementation efforts, has largely hindered the effective use of adjoint-based error estimation and the corresponding adaptation techniques in practice.

In the past decade, error surrogate models based on machine learning techniques have received much attention, largely because of their non-intrusive nature and fast online evaluations. Several contributions have been made in error modeling for parameterized reduced-order models (ROMs) [30], [31], and the ideas have been extended to estimates of discretization-induced errors [32]. Efforts have also been devoted to predicting the errors in flow solutions and the outputs of interest obtained on coarse computational meshes [33], [34], and the models have also been used to guide the selection of a set of a priori meshes [35]. Nonetheless, in these studies, no output error indicator is provided to perform mesh adaptation. Manevitz et al. used neural networks to predict the solution gradients in time-dependent problems, which then provided an indicator to drive the mesh adaptation [36]. However, these feature-based adaptive indicators are generally not as effective as adjoint-based indicators, especially for functional outputs and problems with discontinuities [19], [37]. Furthermore, these works rely on a set of user-selected local features (feature engineering) to construct the model, requiring either expert knowledge or fine-tuning. Moreover, due to the local nature of the selected features (although some neighboring information comes in with the gradient features), these models either largely ignore the error transport such that they are not expected to be effective for convection-dominated problems, or still require the adjoint variables to bring in the global sensitivity information.

In this paper, we focus on inferring the output error for a CFD simulation, as well as the corresponding localized error indicator field to drive mesh adaptation, directly from the solution field. The latter task is more challenging as both the flow state field and the output error indicator field can be high-dimensional. Moreover, effective error indicators must take the error transport into account, especially for convection-dominated systems. Without solving for the output adjoint variables, we seek other approaches to discover the global output sensitivity accounting for the error transport. Formally, the adjoint solution can be regarded as a generalized Green’s function, which convolve the residual perturbation to produce an output perturbation (error estimate) [38]. In order to emulate the adjoint operator, we introduce convolutional neural networks (CNNs) to construct the surrogate error model. In particular, a set of discrete linear convolution operators is trained to approximate the generalized Green’s function which convolves the discretized solution field to produce the corresponding output error with respect to a refined space. In other words, the network can be regarded as an approximate adjoint-weighted-residual operator applied to the solution field, which produces the whole error indicator field as well as the total output error. On the other hand, the convolution operators preserve the spatial locality and are shared for the input solution field. As a result, the dimension of the free parameters in the network model scales well for large scale problems, making it well-suited for the high-dimensional map between the input solution and the output error indicator fields.

A CNN architecture that is especially efficient for this type of tasks is the encoder-decoder. It has shown excellent performance for image semantic segmentation and feature extraction in computer vision tasks  [39], [40], [41], [42], [43], and has recently been popularized in physical modeling applications  [44], [45], [46], [47] as well. The network is composed of two subnetworks: an encoder CNN that extracts a low-dimensional representation (code) from the input data, i.e., the solution field, followed by a decoder CNN that reconstructs the high-dimensional output field, i.e., the adaptive error indicator field. The ability of a CNN to automatically learn internal invariant features and multi-scale feature hierarchies alleviates the need for a tedious, hand-crafted feature engineering process, making this approach more flexible and robust. Instead of using the network output field to obtain the total output error, we connect the codes (low-dimensional representations) extracted from the input field to a fully-connected network (FCN) to predict the total output error. The network training is supervised by both the adaptive error indicator field and the total output error to capture both the local and global features related to the numerical error. Since the two regression tasks are trained simultaneously, separate models and additional training costs are avoided.

The remainder of this paper proceeds as follows. We introduce the standard adjoint-based output error estimation and mesh adaptation in Section 2. Section 3 presents the details of the proposed CNN model and the training procedure. The primary results are shown in Section 4. Section 5 concludes the present work and discusses potential future work.

Section snippets

Parameterized governing equations

In this work, we consider parameterized steady-state flow governing equations in a fully-discretized form,Rh(Uh(μ);μ)=0,where μRNμ is a vector of parameters sampled from the parameter space Dμ, characterizing the physics of the system, e.g., initial and boundary conditions, material properties, or shape parameters in a design optimization problem; UhRNu denotes the flow state vector, uniquely defining the continuous flow state field uhVh, where Vh is the approximation space defined by a

Surrogate model as a regression problem

The error surrogate model can be treated as two regression problems: given the input solution vector from a CFD simulation URNu, we would like to predict the scalar output error δJ as well as the adaptive error indicator field E over the entire mesh. Here we omit the subscript h for simpler exposition. The output and input dimensions can be very different. For example in a finite-element simulation, the state vector can be post-processed into several state components of the same dimension UT=[U

Results

We test our proposed model in inviscid transonic aerodynamic flow simulations over airfoils, which involve geometries and irregular computational domains. The Euler equations govern the flow, and these are discretized using a discontinuous Galerkin finite element method  [64], [65]. An element-based artificial viscosity [66] is adopted for shock capturing. We use the Roe approximate Riemann solver  [67] for the inviscid flux, and the second form of Bassi and Rebay treatment for the viscous flux 

Conclusion

Output error quantification and mesh adaptation are essential for the reliable use of CFD. However, they are in general non-trivial tasks, even for experienced users. Adjoint-based methods provide a robust approach to estimate and reduce the output error through effective error estimation and mesh adaptation. However, the reliance on the output adjoint solutions imposes both implementation and cost challenges in practice. We propose a new method to manage this liability with machine learning

CRediT authorship contribution statement

Guodong Chen: Conceptualization, Methodology, Software, Investigation, Data curation, Writing - original draft. Krzysztof J. Fidkowski: Conceptualization, Methodology, Writing - review & editing, Supervision, Project administration, Funding acquisition.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

The authors acknowledge support from the Department of Energy under grant DE-FG02-13ER26146/DE-SC0010341, and from The Boeing Company, with technical monitor Dr. Mori Mani. Guodong Chen’s work was also supported by the Michigan Institute for Computational Discovery and Engineering Fellowship, and the Rackham Graduate Student Research Grant from the University of Michigan.

References (71)

  • D. Li et al.

    Adjoint-based airfoil optimization with discretization error control

    Int J Numer Methods Fluids

    (2015)
  • D. Knoll et al.

    Jacobian-free Newton–Krylov methods: a survey of approaches and applications

    J Comput Phys

    (2004)
  • S. Nadarajah et al.

    A comparison of the continuous and discrete adjoint approach to automatic aerodynamic optimization

    38th aerospace sciences meeting and exhibit, AIAA paper 2000-667

    (2000)
  • R. Hartmann

    Adjoint consistency analysis of discontinuous Galerkin discretizations

    SIAM J Numer Anal

    (2007)
  • F. Rauser et al.

    Predicting goal error evolution from near-initial-information: a learning algorithm

    J Comput Phys

    (2011)
  • B.N. Hanna et al.

    Machine-learning based error prediction approach for coarse-grid computational fluid dynamics (CG-CFD)

    Prog Nucl Energy

    (2020)
  • H. Bao et al.

    A data-driven framework for error estimation and mesh-model optimization in system-level thermal-hydraulic simulation

    Nucl Eng Des

    (2019)
  • L. Manevitz et al.

    Neural network time series forecasting of finite-element mesh adaptation

    Neurocomputing

    (2005)
  • R. Balasubramanian et al.

    Comparison of adjoint-based and feature-based grid adaptation for functional outputs

    Int J Numer Methods Fluids

    (2007)
  • S. Bhatnagar et al.

    Prediction of aerodynamic flow fields using convolutional neural networks

    Comput Mech

    (2019)
  • A. Jameson

    Aerodynamic design via control theory

    J Sci Comput

    (1988)
  • P.-O. Persson et al.

    Sub-cell shock capturing for discontinuous Galerkin methods

    44th AIAA aerospace sciences meeting and exhibit, AIAA paper 2006-0112

    (2006)
  • E.N. Jacobs et al.

    The Characteristics of 78 Related Airfoil Sections from Tests in the Variable-Density Wind Tunnel

    Tech. Rep.

    (1933)
  • K. Duraisamy et al.

    Turbulence modeling in the age of data

    Annu Rev Fluid Mech

    (2019)
  • D.W. Levy et al.

    Data summary from the first AIAA computational fluid dynamics drag prediction workshop

    J Aircr

    (2003)
  • R. Becker et al.

    An optimal control approach to a posteriori error estimation in finite element methods

    Acta Numer

    (2001)
  • N.A. Pierce et al.

    Adjoint recovery of superconvergent functionals from PDE approximations

    SIAM Rev

    (2000)
  • M.B. Giles et al.

    Adjoint methods for PDEs: a posteriori error analysis and postprocessing by duality

    Acta Numer

    (2002)
  • M.A. Park

    Adjoint-based, three-dimensional error prediction and grid adaptation

    AIAA J

    (2004)
  • M. Nemec et al.

    Adjoint error estimation and adaptive refinement for embedded-boundary cartesian meshes

    18th AIAA computational fluid dynamics conference, AIAA paper 2007–4187

    (2007)
  • M. Nemec et al.

    Adjoint-based adaptive mesh refinement for complex geometries

    46th AIAA aerospace sciences meeting and exhibit

    (2008)
  • K.J. Fidkowski et al.

    Review of output-based error estimation and mesh adaptation in computational fluid dynamics

    AIAA J

    (2011)
  • J. Lu

    An a Posteriori Error Control Framework for Adaptive Precision Optimization Using Discontinuous Galerkin Finite Element Method

    (2005)
  • M. Nemec et al.

    Output error estimates and mesh refinement in aerodynamic shape optimization

    51st AIAA aerospace sciences meeting including the new horizons forum and aerospace exposition, AIAA paper 2013-865

    (2013)
  • J.E. Hicken et al.

    PDE-constrained optimization with error estimation and control

    J Comput Phys

    (2014)
  • Cited by (12)

    • SuperAdjoint: Super-resolution neural networks in adjoint-based error estimation

      2024, Journal of Computational and Applied Mathematics
    • LEARNING ROBUST MARKING POLICIES FOR ADAPTIVE MESH REFINEMENT

      2024, SIAM Journal on Scientific Computing
    View all citing articles on Scopus
    View full text