# Efficient and accurate derivatives for a software process chain in airfoil shape optimization.

## Keywords

## Abstract

When using a Newton-based numerical algorithm to optimize the shape of an airfoil with respect to certain design parameters, a crucial ingredient is the derivative of the objective function with respect to the design parameters. In large-scale aerodynamics, the objective function is typically given by a computer program written in a high-level programming language such as Fortran or C, and numerical differentiation is commonly used to approximate the derivatives. For a particular two-dimensional airfoil design problem, we apply automatic differentiation instead to compute derivatives that are accurate up to machine precision. In automatic differentiation, a given program is transformed into another program capable of computing the original function together with its derivatives. In the problem at hand, the objective function consists of a sequence of programs: a MATLAB program followed by two Fortran 77 programs. It is shown how automatic differentiation is applied to a sequence of programs while keeping the computational complexity within reasonable limits. The derivatives computed by automatic differentiation are compared with approximations based on divided differences.