Abstract
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.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
More From: International Journal of Computational Fluid Dynamics
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.