Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article

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

Published: 01 October 2007 Publication History

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.

References

[1]
Balay, S., Gropp, W. D., McInnes, L. C. and Smith, B. F. (1997) Efficient management of parallelism in object oriented numerical software libraries. Proceedings of the Modern Software Tools in Scientific Computing, pp. 163-202. Birkhäuser Press, Boston
[2]
Carle, A., Fagan, M. and Green, L. L. (1998) Preliminary results from the application of automated adjoint code generation to CFL3D. AIAA Paper 1998-4807, pp. 1998-4807. 7th AIAA/USAF/NASA/ISSMO Symposium on Multidisciplinary Analysis and Optimization, St. Louis, MO
[3]
Carpenter, M. H., Gottlieb, D. and Abarbanel, S. (1994) Time-stable BC for finite-difference schemes solving hyperbolic systems: methodology and application to high-order compact schemes. J. Comput. Phys., 111:2, pp. 220-236.
[4]
Carpenter, M. H., Nordström, J. and Gottlieb, D. (1999) A stable and conservative interface treatment of arbitrary spatial accuracy. J. Comput. Phys., 148:2, pp. 341-365.
[5]
Cusdin, P. and Müller, J. D. (2005) On the performance of discrete adjoint CFD codes using automatic differentiation. Int. J. Numer. Methods Fluids, 47:6, pp. 939-945.
[6]
Driver, J. and Zingg, D. W. (2006) Optimized natural-laminar-flow airfoils. Proceedings of the 44th AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV
[7]
Dwight, R. P. and Brezillon, J. (2006) Proceedings of the 44th AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV
[8]
Fagan, M. and Carle, A. (2005) Reducing reverse-mode memory requirements by using profile-driven check-pointing. Future Generation Comp. Syst., 21:8, pp. 1380-1390.
[9]
Forth, S. A. and Evans, T. P. (2002) Aerofoil optimisation via automatic differentiation of a multigrid cell-vertex Euler flow solver. Automatic Differentiation: From Simulation to Optimization, pp. 153-160. Springer-Verlag, New York
[10]
Gaitonde, D. V. (2005) Simulation of local and global high-speed flow control with magnetic fields. Proceedings of the 43rd AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV
[11]
Giering, R. and Kaminski, T. (2002) Applying TAF to generate efficient derivative code of Fortran 77-95 programs. Proceedings of the GAMM 2002, Augsburg, Germany
[12]
Giering, R., Kaminski, T. and Slawig, T. (2005) Generating efficient derivative code with TAF: adjoint and tangent linear Euler flow around an airfoil. Future Generation Comp. Syst., 21:8, pp. 1345-1355.
[13]
Giles, M. B. and Pierce, N. A. (2000) An introduction to the adjoint approach to design. Flow Turb. Comb., 65, pp. 393-415.
[14]
Gockenbach, M. S. (2000) Understanding Code Generated by TAMC, Department of Computational and Applied Mathematics, Rice University, Texas, USA
[15]
Griewank, A. (2000) Evaluating Derivatives, SIAM, Philadelphia
[16]
Hascoët, L. and Pascual, V. (2005) Extension of TAPENADE towards Fortran 95. Automatic Differentiation: Applications, Theory, and Tools, Springer-Verlag, New York
[17]
Heimbach, P., Hill, C. and Giering, R. (2005) An efficient exact adjoint of the parallel MIT general circulation model, generated via automatic differentiation. Future Generation Comp. Syst., 21:8, pp. 1356-1371.
[18]
Horwedel, J. E. (1991) GRESS: a preprocessor for sensitivity studies on Fortran programs. Automatic Differentiation of Algorithms: Theory, Implementation and Application, pp. 243-250. SIAM, Philadelphia, PA
[19]
Jameson, A. (1988) Aerodynamic design via control theory. J. Sci. Comput., 3:3, pp. 233-260.
[20]
Lee, K. H., Alonso, J. J. and Van der Weide, E. (2006) Mesh adaptation criteria for unsteady periodic flows using a discrete adjoint time-spectral formulation. Proceedings of the 44th AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV
[21]
Marta, A. C. and Alonso, J. J. (2006) Discrete adjoint formulation for the ideal MHD equations. Proceedings of the 3rd AIAA Flow Control Conference, San Francisco, CA
[22]
Marta, A. C. and Alonso, J. J. (2006) High-speed MHD flow control using adjoint-based sensitivities. Proceedings of the 14th AIAA/AHI International Space Planes and Hypersonic Systems and Technologies Conference, Canberra, Australia
[23]
Martins, J. R. R. A., Sturdza, P. and Alonso, J. J. (2001) The connection between the complex-step derivative approximation and algorithmic differentiation. Proceedings of the 39th Aerospace Sciences Meeting, Reno, NV
[24]
Martins, J. R. R. A., Sturdza, P. and Alonso, J. J. (2003) The complex-step derivative approximation. ACM Trans. Math. Softw., 29:3, pp. 245-262.
[25]
Martins, J. R. R. A., Alonso, J. J. and Reuther, J. J. (2004) High-fidelity aerostructural design optimization of a supersonic business jet. J. Aircraft, 41:3, pp. 523-530.
[26]
Martins, J. R. R. A., Alonso, J. J. and Reuther, J. J. (2005) A coupled-adjoint sensitivity analysis method for high-fidelity aero-structural design. Optim. Eng., 6:1, pp. 33-62.
[27]
Martins, J. R. R. A., Alonso, J. J. and Van der Weide, E. (2006) An automated approach for developing discrete adjoint solvers. Proceedings of the 2nd AIAA Multidisciplinary Design Optimization Specialist Conference, Newport, RI
[28]
Martins, J. R. R. A., Mader, C. A. and Alonso, J. J. (2006) ADjoint: an approach for rapid development of discrete adjoint solvers. Proceedings of the 11th AIAA/ISSMO Multidisciplinary Analysis and Optimization Conference, Portsmouth, VA
[29]
Mattsson, K. and Nordström, J. (2004) Summation by parts operators for finite difference approximations of second derivatives. J. Comput. Phys., 199:2, pp. 503-540.
[30]
Mattsson, K., Svärd, M. and Nordström, J. (2004) Stable and accurate artificial dissipation. J. Sci. Comput., 21:1, pp. 57-79.
[31]
Mohammadi, B., Malé, J. M. and Rostaing-Schmidt, N. (1996) Automatic differentiation in direct and reverse modes: application to optimum shapes design in fluid mechanics. Computational Differentiation: Techniques, Applications, and Tools, pp. 309-318. SIAM, Philadelphia, PA
[32]
MPI (1994) A message-passing interface standard. Int. J. Supercomputer Appl. High Perform. Comput., 8:34, pp. 159-416.
[33]
Naumann, U. and Riehme, J. (2005) A differentiation-enabled Fortran 95 compiler. ACM Trans. Math. Softw., 31:4, pp. 458-474.
[34]
Nemec, M. and Zingg, D. W. (2004) Multipoint and multi-objective aerodynamic shape optimization. AIAA J., 42:6, pp. 1057-1065.
[35]
Pironneau, O. (1974) On optimum design in fluid mechanics. J. Fluid Mech., 64, pp. 97-110.
[36]
Reuther, J., Alonso, J. J., Jameson, A., Rimlinger, M. and Saunders, D. (1999) Constrained multipoint aerodynamic shape optimization using an adjoint formulation and parallel computers: part I. J. Aircraft, 36:1, pp. 51-60.
[37]
Reuther, J., Alonso, J. J., Jameson, A., Rimlinger, M. and Saunders, D. (1999) Constrained multipoint aerodynamic shape optimization using an adjoint formulation and parallel computers: part II. J. Aircraft, 36:1, pp. 61-74.
[38]
Saad, Y. and Schultz, M. H. (1986) GMRES: a generalized minimal residual algorithm for solving nonsymmetric linear systems. SIAM J. Sci. Stat. Comput., 7:3, pp. 856-869.
[39]
Sherman, L. L., Arthur, C., Taylor, I., Green, L. L., Newman, P. A., Hou, G. W. and Korivi, V. M. (1996) First- and second-order aerodynamic sensitivity derivatives via automatic differentiation with incremental iterative methods. J. Comput. Phys., 129:2, pp. 307-331.
[40]
Van der Weide, E., Kalitzin, G., Schluter, J. and Alonso, J. J. (2006) Unsteady turbomachinery computations using massively parallel platforms. Proceedings of the 44th AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV

Recommendations

Comments

Information & Contributors

Information

Published In

cover image International Journal of Computational Fluid Dynamics
International Journal of Computational Fluid Dynamics  Volume 21, Issue 9-10
October 2007
68 pages
ISSN:1061-8562
EISSN:1029-0257
Issue’s Table of Contents

Publisher

Taylor & Francis, Inc.

United States

Publication History

Published: 01 October 2007

Author Tags

  1. Adjoint solver
  2. Automatic differentiation
  3. Discrete adjoint
  4. Gradient-based optimization
  5. Partial differential equations
  6. Sensitivities

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 03 Sep 2024

Other Metrics

Citations

View Options

View options

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media