DEVELOPMENT OF A 2 D DISRETE TURBULENT ADJOINT SOLVER USING AUTOMATIC DIFFERENTIATION

This paper presents an implementation of discrete adjoint solver using an automatic differentiation tool for a two-dimensional Reynolds Averaged Navier-Stokes (RANS) finite volume solver. Moreover, automatic differentiation tool is also utilized calculating flux Jacobian required by implicit finite volume solver. The developed RANS adjoint solver is computationally efficient and accurate. In the present implementation, the time required for the calculation of adjoint variables is comparable to the time required for one iteration of the flow solver. The RANS adjoint is verified with a brute force method. Finally, the aerodynamic shape optimization capability of the developed RANS adjoint solver is demonstrated by optimizing a RAE 2822 airfoil in terms of drag at constant lift coefficient. INTRODUCTION Aerodynamic shape optimization studies generally depend on computational fluid dynamics (CFD) analyses that enable to asses a large number of alternative design configurations within a relatively short time. However, when there are numerous design variables, gradientbased methods also require numerous CFD analyses to calculate sensitivities of objective functions with respect to design variables. Gradient-free optimization methods will also require many analyses to search a wide range and a large dimensional design space. To address this issue, adjoint solvers provide a solution. An adjoint solver accomplishes the remarkable feat of calculating the sensitivities with respect to a large number of design variables simultaneously via single computation. Thus, computational cost of an adjoint solver is independent of the number of design variables. Therefore, the contribution of incorporating an adjoint capability to a solver is remarkable. To incorporate an adjoint capability to a solver, partial derivatives of residuals should be computed. However, in many cases, they are prohibitively complex to derive, and the coding process is time-consuming and error-prone. Automatic differentiation (AD) tools offer a robust method to overcome this issue. To make use of automatic differentiation to calculate the partial derivatives of the residuals allows handling arbitrary complexity without difficulty. 1 PhD. Candidate, Aerospace Engineering Department, Email: e134851@metu.edu.tr 2 Professor, Aerospace Engineering Department, Email: ismail.h. tuncer@ae.metu.edu.tr 3 Guidance, Navigation and Control Senior Specialist Engineer, UAV Group, Email: htiftikci@tai.com. tr AIAC-2019-205 Kaya, Tuncer & Tiftikçi 2 Ankara International Aerospace Conference In this paper, it is intended to incorporate into a two-dimensional in-house finite volume RANS solver, a discrete adjoint [Giles et al., 2003] solver capability by utilizing an automatic differentiation tool. METHOD Governing Equations The two-dimensional Navier-Stokes equations can be stated as follows (1). ∂ ∂t ∫ WdΩ + Ω ∮ (Fc − Fv). n ∂Ω ds = 0 1 The conservative state variable vector W and the inviscid flux vector Fc are defined as follows (2), (3). W = [ ρ ρu ρv ρE ], Fc = fi + gj 2 f = [ ρu ρu + p ρuv ρ(E + p)u ] , g = [ ρv ρuv ρv + p ρ(E + p)v ] 3 The static pressure p is calculated by the ideal gas assumption (4). p = (γ − 1)ρ [E − u + v 2 ] 4 The viscous flux vector Fv is defined as follows Fv = [ 0 τxx τyx Θx ] i + [ 0 τxy τyy Θy ] j 5 where τ is the stress tensor defined as follows. τij = λ θδij + 2μεij 6 θ is the volumetric dilatation rate (7), and ε is the rate of angular deformation (8).