Automatic differentiation of a spectral difference code for sensitivity analysis
Résumé
The computational fluid dynamics code JAGUAR, developed jointly by ONERA (Toulouse) and CERFACS, is a high-order code based on spectral differences and intended for unsteady aerodynamic simulations. In order to extend its use for shape optimization and flow control, it is convenient to adapt the code so that computing flow sensitivities is an efficient yet flexible process that can be adapted to very different problems. For this reason, a fully discrete approach was chosen that relies on automatic differentiation. A test case was analyzed to validate our approach in an unsteady problem, allowing us to identify key modifications to be implemented on the code so as to streamline the differentiation process and ease its replication in other problems. Tangent and adjoint modes were used to differentiate the parallel version of the code with TAPENADE and the adjoinable MPI library. Execution times and coding strategies will be provided to illustrate the benefits and drawbacks of the different approaches.