A methodology for the development of discrete adjoint solvers using automatic differentiation tools

A methodology for the rapid development of adjoint solvers for computational fluid dynamics (CFD) models is presented. The approach relies on the use of automatic differentiation (AD) tools to almost completely automate the process of development of discrete adjoint solvers. This methodology is used to produce the adjoint code for two distinct 3D CFD solvers: a cell-centred Euler solver running in single-block, single-processor mode and a multi-block, multi-processor, vertex-centred, magneto-hydrodynamics (MHD) solver. Instead of differentiating the entire source code of the CFD solvers using AD, we have applied it selectively to produce code that computes the transpose of the flux Jacobian matrix and the other partial derivatives that are necessary to compute sensitivities using an adjoint method. The discrete adjoint equations are then solved using the Portable, Extensible Toolkit for Scientific Computation (PETSc) library. The selective application of AD is the principal idea of this new methodology, which we call the AD adjoint (ADjoint). The ADjoint approach has the advantages that it is applicable to any set of governing equations and objective functions and that it is completely consistent with the gradients that would be computed by exact numerical differentiation of the original discrete solver. Furthermore, the approach does not require hand differentiation, thus avoiding the long development times typically required to develop discrete adjoint solvers for partial differential equations, as well as the errors that result from the necessary approximations used during the differentiation of complex systems of conservation laws. These advantages come at the cost of increased memory requirements for the discrete adjoint solver. However, given the amount of memory that is typically available in parallel computers and the trends toward larger numbers of multi-core processors, this disadvantage is rather small when compared with the very significant advantages that are demonstrated. The sensitivities of drag and lift coefficients with respect to different parameters obtained using the discrete adjoint solvers show excellent agreement with the benchmark results produced by the complex-step and finite-difference methods. Furthermore, the overall performance of the method is shown to be better than most conventional adjoint approaches for both CFD solvers used.

[1]  O. Pironneau On optimum design in fluid mechanics , 1974 .

[2]  Y. Saad,et al.  GMRES: a generalized minimal residual algorithm for solving nonsymmetric linear systems , 1986 .

[3]  Antony Jameson,et al.  Aerodynamic design via control theory , 1988, J. Sci. Comput..

[4]  Message P Forum,et al.  MPI: A Message-Passing Interface Standard , 1994 .

[5]  D. Gottlieb,et al.  Time-stable boundary conditions for finite-difference schemes solving hyperbolic systems: methodology and application to high-order compact schemes , 1994 .

[6]  Message Passing Interface Forum MPI: A message - passing interface standard , 1994 .

[7]  William Gropp,et al.  Efficient Management of Parallelism in Object-Oriented Numerical Software Libraries , 1997, SciTools.

[8]  Gene Hou,et al.  First- and Second-Order Aerodynamic Sensitivity Derivatives via Automatic Differentiation with Incremental Iterative Methods , 1996 .

[9]  Alan Carle,et al.  Preliminary Results from the Application of Automated Adjoint Code Generation to CFL3D , 1998 .

[10]  M. J. Rimlinger,et al.  Constrained Multipoint Aerodynamic Shape Optimization Using an Adjoint Formulation and Parallel Computers , 1997 .

[11]  D. Gottlieb,et al.  A Stable and Conservative Interface Treatment of Arbitrary Spatial Accuracy , 1999 .

[12]  Mark S. Gockenbach,et al.  Understanding code generated by TAMC , 2000 .

[13]  S. Forth,et al.  Aerofoil optimisation via AD of a multigrid cell-vertex Euler flow solver , 2000 .

[14]  Niles A. Pierce,et al.  An Introduction to the Adjoint Approach to Design , 2000 .

[15]  Joaquim R. R. A. Martins,et al.  THE CONNECTION BETWEEN THE COMPLEX-STEP DERIVATIVE APPROXIMATION AND ALGORITHMIC DIFFERENTIATION , 2001 .

[16]  T. Pulliam,et al.  Multipoint and Multi-Objective Aerodynamic Shape Optimization , 2002 .

[17]  Joaquim R. R. A. Martins,et al.  High-Fidelity Aerostructural Design Optimization of a Supersonic Business Jet , 2002 .

[18]  Thomas Kaminski,et al.  Applying TAF to generate efficient derivative code of Fortran 77‐95 programs , 2003 .

[19]  Joaquim R. R. A. Martins,et al.  The complex-step derivative approximation , 2003, TOMS.

[20]  Magnus Svärd,et al.  Stable and Accurate Artificial Dissipation , 2004, J. Sci. Comput..

[21]  J. Nordström,et al.  Summation by Parts Operators for Finite Difference Approximations of Second-Derivatives with Variable Coefficients , 2004, Journal of Scientific Computing.

[22]  Laurent Hascoët,et al.  TAPENADE 2.1 user's guide , 2004 .

[23]  Alan Carle,et al.  Reducing reverse-mode memory requirements by using profile-driven checkpointing , 2005, Future Gener. Comput. Syst..

[24]  Patrick Heimbach,et al.  An efficient exact adjoint of the parallel MIT General Circulation Model, generated via automatic differentiation , 2005, Future Gener. Comput. Syst..

[25]  J. Alonso,et al.  A Coupled-Adjoint Sensitivity Analysis Method for High-Fidelity Aero-Structural Design , 2005 .

[26]  Datta Gaitonde Simulation of local and global high-speed flow control with magnetic fields , 2005 .

[27]  Jens-Dominik Müller,et al.  On the performance of discrete adjoint CFD codes using automatic differentiation , 2005 .

[28]  Uwe Naumann,et al.  A differentiation-enabled Fortran 95 compiler , 2005, TOMS.

[29]  Thomas Slawig,et al.  Generating efficient derivative code with TAF: Adjoint and tangent linear Euler flow around an airfoil , 2005, Future Gener. Comput. Syst..

[30]  Juan J. Alonso,et al.  Mesh Adaptation Criteria for Unsteady Periodic Flows Using a Discrete Adjoint Time-Spectral Formulation , 2006 .

[31]  Juan J. Alonso,et al.  High-Speed MHD Flow Control Using Adjoint-Based Sensitivities , 2006 .

[32]  Joaquim R. R. A. Martins,et al.  An automated approach for developing discrete adjoint solvers , 2006 .

[33]  Discrete Adjoint Formulation for the Ideal MHD Equations , 2006 .

[34]  J. Alonso,et al.  ADjoint: An Approach for the Rapid Development of Discrete Adjoint Solvers , 2006 .

[35]  D. Zingg,et al.  Optimized Natural-Laminar-Flow Airfoils , 2006 .

[36]  Georgi Kalitzin,et al.  Unsteady turbomachinery computations using massively parallel platforms , 2006 .