Automatic Differentiation of Large-Scale Simulation Codes is no Illusion C. H. Bischof 1 , H. M. B¨ ucker 1 , B. Lang 2 , A. Rasch 1 , E. Slusanschi 1 1 Institute for Scientific Computing, RWTH Aachen University, D–52056 Aachen, Germany 2 Applied Computer Science and Scientific Computing, Bergische Universit¨ at Wuppertal, D–42097 Wuppertal, Germany Abstract Derivatives are a crucial ingredient to a broad variety of computa- tional techniques in science and engineering. While numerical approaches for evaluating derivatives suffer from truncation error, automatic differen- tiation is accurate up to machine precision. The term automatic differenti- ation comprises a set of techniques for mechanically transforming a given computer program to another one capable of evaluating derivatives. A common misconception about automatic differentiation is that this tech- nique only works on local pieces of fairly simple code. Here, it is shown that automatic differentiation is not only applicable to small academic codes, but scales to advanced industrial software packages. In particu- lar, the general-purpose computational fluid dynamics software package FLUENT is transformed by automatic differentiation. Approximating derivatives by finite differences is a subtle, and often annoy- ing, task. In particular, it usually takes several runs of the program until a suitable stepsize is found. And even then it is difficult to estimate the trun- cation error that is inherent to this kind of evaluating derivatives. Therefore we would like to have an efficient and easy-to-use alternative that eliminates the concept of a stepsize and does not involve any truncation error at all. In fact there is a technique called automatic or algorithmic differentiation (AD) is capable of efficiently evaluating accurate derivatives of functions implemented by arbitrarily complex computer programs. In applying AD to FLUENT , one of the leading commercial computational fluid dynamics (CFD) software packages, we show that AD is not only applicable to small academic programs, but scales to large industrial simulation codes. Thus, by providing derivatives without truncation error, AD accelerates the transition from large-scale simulation to optimization. A shift from a pure simulation to a systematic approach of determining design variables or model 1