Optimization with Gradient and Hessian Information Calculated Using Hyper-Dual Numbers

Similar documents
Studies of the Continuous and Discrete Adjoint Approaches to Viscous Automatic Aerodynamic Shape Optimization

Single and multi-point aerodynamic optimizations of a supersonic transport aircraft using strategies involving adjoint equations and genetic algorithm

Airfoil shape optimization using adjoint method and automatic differentiation. Praveen. C

Aerodynamic Inverse Design Framework using Discrete Adjoint Method

An Optimization Method Based On B-spline Shape Functions & the Knot Insertion Algorithm

Analysis of the Adjoint Euler Equations as used for Gradient-based Aerodynamic Shape Optimization

Improvements to a Newton-Krylov Adjoint Algorithm for Aerodynamic Optimization

Debojyoti Ghosh. Adviser: Dr. James Baeder Alfred Gessow Rotorcraft Center Department of Aerospace Engineering

(c)2002 American Institute of Aeronautics & Astronautics or Published with Permission of Author(s) and/or Author(s)' Sponsoring Organization.

Solution of 2D Euler Equations and Application to Airfoil Design

Computational Fluid Dynamics for Engineers

Introduction to CFX. Workshop 2. Transonic Flow Over a NACA 0012 Airfoil. WS2-1. ANSYS, Inc. Proprietary 2009 ANSYS, Inc. All rights reserved.

State of the art at DLR in solving aerodynamic shape optimization problems using the discrete viscous adjoint method

High-fidelity Multidisciplinary Design Optimization for Next-generation Aircraft

Development of a Consistent Discrete Adjoint Solver for the SU 2 Framework

An efficient method for predicting zero-lift or boundary-layer drag including aeroelastic effects for the design environment

Modeling External Compressible Flow

Express Introductory Training in ANSYS Fluent Workshop 04 Fluid Flow Around the NACA0012 Airfoil

AERODYNAMIC SHAPES DESIGN ON THE BASE OF DIRECT NEWTON TYPE OPTIMIZATION METHOD

39th AIAA Aerospace Sciences Meeting and Exhibit January 8 11, 2001/Reno, NV

Introduction to Aerodynamic Shape Optimization

Multi-Mesh CFD. Chris Roy Chip Jackson (1 st year PhD student) Aerospace and Ocean Engineering Department Virginia Tech

Non-Stationary Covariance Models for Discontinuous Functions as Applied to Aircraft Design Problems

Introduction to ANSYS CFX

NIA CFD Seminar, October 4, 2011 Hyperbolic Seminar, NASA Langley, October 17, 2011

Limiters for Unstructured Higher-Order Accurate Solutions of the Euler Equations

A new multidimensional-type reconstruction and limiting procedure for unstructured (cell-centered) FVs solving hyperbolic conservation laws

1.2 Numerical Solutions of Flow Problems

Airfoil Design Optimization Using Reduced Order Models Based on Proper Orthogonal Decomposition

Numerical Simulations of Fluid-Structure Interaction Problems using MpCCI

Computation of Sensitivity Derivatives of Navier-Stokes Equations using Complex Variables

A High-Order Accurate Unstructured GMRES Solver for Poisson s Equation

SHOCK WAVES IN A CHANNEL WITH A CENTRAL BODY

MATH 573 Advanced Scientific Computing

Aerodynamic optimization using Adjoint methods and parametric CAD models

Techniques for Using the Method of Manufactured Solutions for Verification and Uncertainty Quantification of CFD Simulations Having Discontinuities

Automatic design procedures that use Computational Fluid Dynamics(CFD) combined with gradientbased

Module 1 Lecture Notes 2. Optimization Problem and Model Formulation

Multi-Element High-Lift Configuration Design Optimization Using Viscous Continuous Adjoint Method

Contents. I Basics 1. Copyright by SIAM. Unauthorized reproduction of this article is prohibited.

THE EFFECTS OF THE PLANFORM SHAPE ON DRAG POLAR CURVES OF WINGS: FLUID-STRUCTURE INTERACTION ANALYSES RESULTS

41st AIAA Aerospace Sciences Meeting and Exhibit Jan 6 9, 2003/Reno, Nevada

Numerical and Mesh Resolution Requirements for. Accurate Sonic Boom Prediction of Complete Aircraft. configurations.

Aerofoil Optimisation Using CST Parameterisation in SU2

Case C3.1: Turbulent Flow over a Multi-Element MDA Airfoil

Automatic Differentiation Adjoint of the Reynolds-Averaged Navier Stokes Equations with a Turbulence Model

Grid Dependence Study of Transonic/Supersonic Flow Past NACA Air-foil using CFD Hemanth Kotaru, B.Tech (Civil Engineering)

ADJOINT methods for sensitivity analysis involving partial

CONFORMAL MAPPING POTENTIAL FLOW AROUND A WINGSECTION USED AS A TEST CASE FOR THE INVISCID PART OF RANS SOLVERS

The Development of a Navier-Stokes Flow Solver with Preconditioning Method on Unstructured Grids

AERODYNAMIC DESIGN AND OPTIMIZATION TOOLS ACCELERATED BY PARAMETRIC GEOMETRY PREPROCESSING

Faculty of Mechanical and Manufacturing Engineering, University Tun Hussein Onn Malaysia (UTHM), Parit Raja, Batu Pahat, Johor, Malaysia

SONIC-BOOM PREDICTION USING EULER CFD CODES WITH STRUCTURED/UNSTRUCTURED OVERSET METHOD

RESPONSE SURFACE BASED OPTIMIZATION WITH A CARTESIAN CFD METHOD

Application of Jetstream to a Suite of Aerodynamic Shape Optimization Problems. Karla Telidetzki

Daedalus - A Software Package for the Design and Analysis of Airfoils

Model Reduction for Variable-Fidelity Optimization Frameworks

NUMERICAL 3D TRANSONIC FLOW SIMULATION OVER A WING

OPTIMIZATIONS OF AIRFOIL AND WING USING GENETIC ALGORITHM

Optimization of aerodynamic and acoustic performance of supersonic civil transports

AERODYNAMIC DESIGN OF FLYING WING WITH EMPHASIS ON HIGH WING LOADING

Prediction, Minimization and Propagation of Sonic Boom from Supersonic Bodies

A Systematic Study on the Impact of Dimensionality for a Two-Dimensional Aerodynamic Optimization Model Problem

Introduction to Optimization Problems and Methods

An Unsteady Discrete Adjoint Formulation for Two-Dimensional Flow Problems with Deforming Meshes

Semi-automatic transition from simulation to one-shot optimization with equality constraints

AIR LOAD CALCULATION FOR ISTANBUL TECHNICAL UNIVERSITY (ITU), LIGHT COMMERCIAL HELICOPTER (LCH) DESIGN ABSTRACT

Subsonic Airfoils. W.H. Mason Configuration Aerodynamics Class

Lift Superposition and Aerodynamic Twist Optimization for Achieving Desired Lift Distributions

Abstract. Introduction

Case C1.3: Flow Over the NACA 0012 Airfoil: Subsonic Inviscid, Transonic Inviscid, and Subsonic Laminar Flows

AN INVERSE DESIGN METHOD FOR ENGINE NACELLES AND WINGS

A Multigrid Block LU-SGS Algorithm for Euler Equations on Unstructured Grids

Geometry Parameterization Using Control Grids

Theoretical Concepts of Machine Learning

The Continuous Adjoint Method for the Computation of First- and Higher-Order Sensitivities

AERODYNAMIC DESIGN FOR WING-BODY BLENDED AND INLET

Aerodynamic Analysis of Forward Swept Wing Using Prandtl-D Wing Concept

A Hybrid Cartesian Grid and Gridless Method for Compressible Flows

Grid. Apr 09, 1998 FLUENT 5.0 (2d, segregated, lam) Grid. Jul 31, 1998 FLUENT 5.0 (2d, segregated, lam)

Case C2.2: Turbulent, Transonic Flow over an RAE 2822 Airfoil

Design of a Low-Boom Supersonic Business Jet Using Cokriging Approximation Models

EXPLICIT AND IMPLICIT TVD AND ENO HIGH RESOLUTION ALGORITHMS APPLIED TO THE EULER AND NAVIER-STOKES EQUATIONS IN THREE-DIMENSIONS RESULTS

HPC Usage for Aerodynamic Flow Computation with Different Levels of Detail

Supersonic Wing Design Method Using an Inverse Problem for Practical Application

EFFICIENT SOLUTION ALGORITHMS FOR HIGH-ACCURACY CENTRAL DIFFERENCE CFD SCHEMES

INVERSE METHODS FOR AERODYNAMIC DESIGN USING THE NAVIER-STOKES EQUATIONS

Evaluation of Flow Solver Accuracy using Five Simple Unsteady Validation Cases

김태희, 권형일 1, 최성임 2* T.H. Kim, H.I. Kwon, and S.I. Choi

Multidisciplinary design optimization (MDO) of a typical low aspect ratio wing using Isight

Ail implicit finite volume nodal point scheme for the solution of two-dimensional compressible Navier-Stokes equations

Mesh refinement and modelling errors in flow simulation

SONIC BOOM MINIMIZATION OF AIRFOILS THROUGH COMPUTATIONAL FLUID DYNAMICS AND COMPUTATIONAL ACOUSTICS

Adjoint-Based Sensitivity Analysis for Computational Fluid Dynamics

Geometric Analysis of Wing Sections

CAD-BASED WORKFLOWS. VSP Workshop 2017

CFD Analysis of conceptual Aircraft body

A DRAG PREDICTION VALIDATION STUDY FOR AIRCRAFT AERODYNAMIC ANALYSIS

Subsonic Airfoils. W.H. Mason Configuration Aerodynamics Class

Development of mesh refinement methods at CFD codes for computational fluid mechanics problems DIPLOMA THESIS

Transcription:

Optimization with Gradient and Hessian Information Calculated Using Hyper-Dual Numbers Jeffrey A. Fike and Juan J. Alonso Department of Aeronautics and Astronautics, Stanford University, Stanford, CA 94305, U.S.A. Sietse Jongsma and Edwin van der Weide Department of Engineering Technology, University of Twente, the Netherlands 29th AIAA Applied Aerodynamics Conference Honolulu, Hawaii June 29, 2011

Outline 2/42 Introduction Derivative Calculation Methods Hyper-Dual Numbers Supersonic Business Jet Design Optimization Problem Formulation Comparison of Derivative Calculation Methods Computational Fluid Dynamics Codes Differentiation of the Solution of a Linear System Approach for Iterative Procedures Transonic Inviscid Airfoil Shape Optimization Problem Formulation Comparison of Derivative Calculation Methods Conclusions

Outline Introduction Derivative Calculation Methods Hyper-Dual Numbers Supersonic Business Jet Design Optimization Problem Formulation Comparison of Derivative Calculation Methods Computational Fluid Dynamics Codes Differentiation of the Solution of a Linear System Approach for Iterative Procedures Transonic Inviscid Airfoil Shape Optimization Problem Formulation Comparison of Derivative Calculation Methods Conclusions

Introduction 4/42 Numerical optimization methods systematically vary the inputs to an objective function in order to find the maximum or minimum Requires many function evaluations Methods that use first derivative information typically converge in fewer iterations Using second derivatives can provide a further benefit Tradeoff between convergence and having to compute derivatives Newton s Method converges quadratically, but requires the gradient and Hessian Steepest Descent converges linearly, but requires only the gradient Quasi-Newton methods converge super-linearly, using the gradient to build an approximation to the Hessian

Introduction 5/42 Need a good method for computing second derivatives Accurate Computationally Efficient Easy to Implement Methods that work well for first derivatives may not have the same beneficial properties when applied to second derivatives

Outline Introduction Derivative Calculation Methods Hyper-Dual Numbers Supersonic Business Jet Design Optimization Problem Formulation Comparison of Derivative Calculation Methods Computational Fluid Dynamics Codes Differentiation of the Solution of a Linear System Approach for Iterative Procedures Transonic Inviscid Airfoil Shape Optimization Problem Formulation Comparison of Derivative Calculation Methods Conclusions

Finite Difference Formulas 7/42 Forward-difference (FD) Approximation: f (x) x j = f (x + he j) f (x) h + O(h) Central-Difference (CD) approximation: f (x) = f (x + he j) f (x he j ) + O(h 2 ) x j 2h Subject to truncation error and subtractive cancellation error Truncation error is associated with the higher order terms that are ignored when forming the approximation. Subtractive cancellation error is a result of performing these calculations on a computer with finite precision.

Complex Step Approximation 8/42 Taylor series with an imaginary step: f (x + ih) = f (x) + ihf (x) 1 2! h2 f (x) i h3 f (x) +... 3! ( f (x+ih) = f (x) 1 ) ( 2! h2 f (x) +... +ih f (x) 1 ) 3! h2 f (x) +... First-Derivative Complex-Step Approximation: f (x) = Im [ f (x + ihej ) ] + O(h 2 ) x j h First derivatives are subject to truncation error but are not subject to subtractive cancellation error. Martins, Sturdza, and Alonso, The complex-step derivative approximation, ACM Trans. Math. Softw., 2003

Accuracy of First-Derivative Calculations 9/42 10 0 Error in the First Derivative Error 10 5 10 10 Complex Step Forward Difference Central Difference Hyper Dual Numbers 10 15 10 20 10 0 10 10 Step Size, h e x f (x) = sin(x) 3 + cos(x) 3 10 20 10 30

Accuracy of Second-Derivative Calculations 10/42 10 20 10 10 Error in the Second Derivative Complex Step Forward Difference Central Difference Hyper Dual Numbers Error 10 0 10 10 10 20 10 0 10 10 Step Size, h 10 20 10 30

Hyper-Dual Numbers 11/42 Hyper-dual numbers have one real part and three non-real parts: x = x 0 + x 1 ɛ 1 + x 2 ɛ 2 + x 3 ɛ 1 ɛ 2 ɛ 2 1 = ɛ2 2 = 0 ɛ 1 ɛ 2 0 ɛ 1 ɛ 2 = ɛ 2 ɛ 1 0 Taylor series truncates exactly at second-derivative term: f (x+h 1 ɛ 1 +h 2 ɛ 2 +0ɛ 1 ɛ 2 ) = f (x)+h 1 f (x)ɛ 1 +h 2 f (x)ɛ 2 +h 1 h 2 f (x)ɛ 1 ɛ 2 No truncation error and no subtractive cancellation error Fike and Alonso, AIAA 2011-886

Hyper-Dual Numbers 12/42 Evaluate a function with a hyper-dual step: f (x + h 1 ɛ 1 e i + h 2 ɛ 2 e j + 0ɛ 1 ɛ 2 ) Derivative information can be found by examining the non-real parts: f (x) = ɛ [ 1part f (x + h1 ɛ 1 e i + h 2 ɛ 2 e j + 0ɛ 1 ɛ 2 ) ] x i h 1 f (x) = ɛ [ 2part f (x + h1 ɛ 1 e i + h 2 ɛ 2 e j + 0ɛ 1 ɛ 2 ) ] x j h 2 2 f (x) = ɛ [ 1ɛ 2 part f (x + h1 ɛ 1 e i + h 2 ɛ 2 e j + 0ɛ 1 ɛ 2 ) ] x i x j h 1 h 2

Hyper-Dual Number Implementation 13/42 To use hyper-dual numbers, every operation in an analysis code must be modified to operate on hyper-dual numbers instead of real numbers. Basic Arithmetic Operations: Addition, Multiplication, etc. Logical Comparison Operators:,, etc. Mathematical Functions: exponential, logarithm, sine, absolute value, etc. Input/Output Functions to write and display hyper-dual numbers Hyper-dual numbers are implemented as a class using operator overloading in C++ and MATLAB. Change variable types Body and structure of code unaltered Implementation available from http://adl.stanford.edu/

Computational Cost 14/42 Hyper-Dual number operations are inherently more expensive than real number operations. Hyper-Dual addition: 4 real additions Hyper-Dual multiplication: 9 real multiplications and 5 additions One HD operation up to 14 times a real operation Forming both the gradient and Hessian of f (x), for x R n, requires n first-derivative calculations and n(n+1) 2 second-derivative calculations. Forward-Difference: (n + 1) 2 function evaluations Central-Difference: 2n(n + 2) function evaluations Hyper-Dual Numbers: n(n+1) 2 hyper-dual function evaluations Approximately 7 times FD and 3.5 times CD For some functions this can be greatly reduced.

Outline Introduction Derivative Calculation Methods Hyper-Dual Numbers Supersonic Business Jet Design Optimization Problem Formulation Comparison of Derivative Calculation Methods Computational Fluid Dynamics Codes Differentiation of the Solution of a Linear System Approach for Iterative Procedures Transonic Inviscid Airfoil Shape Optimization Problem Formulation Comparison of Derivative Calculation Methods Conclusions

Supersonic Business Jet Optimization 16/42 Optimization of a Supersonic Business Jet (SSBJ) design using Newton s method Objective Function a weighted combination of aircraft range and sonic boom strength at the ground 33 Design Variables describing geometry, interior structure and operating conditions of the SSBJ Low-Fidelity Conceptual-Design-Level Analysis Routines Compare runtimes for Hyper-Dual numbers, Forward Difference, and Central Difference Modify part of the objective function to decrease the cost of using hyper-dual numbers

SSBJ Analysis Tools 17/42 Breguet Range Equation: ( L R = M a D ) ( 1 SFC ) ( ( log 1 W )) f W t Propulsion routine calculates engine performance and weight Weight routine calculates weights and stuctural loads Aerodynamics routine calculates lift and drag Sonic Boom Procedure: Calculate an Aircraft Shape Factor [Carlson, NASA-TP-1122, 1978] Use this shape factor to create a near-field pressure signature Propagate signature to ground using the Waveform Parameter Method [Thomas, NASA-TN-D-6832, 1972]

Comparison of Derivative Calculation Methods 18/42 Three methods used to compute gradient and Hessian Execution time for hyper-dual numbers is 7 times Forward-Difference time Execution time for hyper-dual numbers is 3.6 times Central-Difference time Reasonable based on earlier discussion Modify one routine in the sonic boom calculation procedure Execution time for hyper-dual numbers is 0.9 times Forward-Difference time Execution time for hyper-dual numbers is 0.46 times Central-Difference time

Modification for Performance Improvement 19/42 An aircraft shape factor was found during the sonic boom calculation procedure This involved finding the location of the maximum effective area 200 Effective Area Distribution 150 Ae, ft 2 100 50 0 0 20 40 60 80 100 120 140 160 180 x, ft Maximum found using golden-section line search Could have used any number of alternatives, including sweeping through at fixed intervals Inner workings of the method should not affect derivatives

Method for Iterative Procedures 20/42 This suggests a method for reducing the computational cost of using hyper-dual numbers: Find location of maximum value using real numbers Then perform one evaluation using hyper-dual numbers to calculate derivatives For this particular situation, computational cost reduced by a factor of 8 This can be extended to general objective functions involving iterative procedures Converge the procedure using real numbers Then perform one iteration using hyper-dual numbers to calculate derivatives

Outline Introduction Derivative Calculation Methods Hyper-Dual Numbers Supersonic Business Jet Design Optimization Problem Formulation Comparison of Derivative Calculation Methods Computational Fluid Dynamics Codes Differentiation of the Solution of a Linear System Approach for Iterative Procedures Transonic Inviscid Airfoil Shape Optimization Problem Formulation Comparison of Derivative Calculation Methods Conclusions

Residual Equations 22/42 Drive the flux residuals to zero, b(q, x) = 0 A(x)dq(x) = b(x) Differentiating both sides with respect to the i th component of x gives A(x) dq(x) + A(x) dq(x) = b(x) x i x i x i Differentiating this result with respect to the j th component of x gives 2 A(x) dq(x)+ A(x) x j x i x i dq(x) x j + A(x) x j dq(x) +A(x) 2 dq(x) = 2 b(x) x i x j x i x j x i

Residual Equations 23/42 This can be solved as: A(x) 0 0 0 A(x) x i A(x) 0 0 A(x) x j 0 A(x) 0 A(x) 2 A(x) x j x i A(x) x j A(x) x i dq(x) dq(x) x i dq(x) x j 2 dq(x) x j x i = b(x) b(x) x i b(x) x j 2 b(x) x j x i Or A(x) 2 dq(x) x j x i A(x) dq(x) x i A(x) dq(x) x j = 2 b(x) x j x i 2 A(x) A(x)dq(x) = b(x) = b(x) x i = b(x) x j A(x) dq(x) x i A(x) dq(x) x j dq(x) A(x) x j x i x i dq(x) x j A(x) dq(x) x j x i

Start from Converged Solution 24/42 For a converged solution, dq(x) 0. This simplifies the procedure to: A(x) 2 dq(x) x j x i A(x) dq(x) x i A(x) dq(x) x j = 2 b(x) x j x i = b(x) x i = b(x) x j A(x) dq(x) x i x j A(x) dq(x) x j x i If we now assume that we have converged the first derivative terms, then the second-derivative equation reduces to A(x) 2 dq(x) x j x i = 2 b(x) x j x i

Initial Tests 25/42 This approach is applied to the CFD code JOE Parallel, unstructured, 3-D, multi-physics, unsteady Reynolds-Averaged Navier-Stokes code Written in C++, which enables the straightforward conversion to hyper-dual numbers Can use PETSc to solve the linear system Derivatives converge at same rate as flow solution No benefit to starting with a converged solution? JOE uses an approximate Jacobian Need the exact Jacobian

Outline Introduction Derivative Calculation Methods Hyper-Dual Numbers Supersonic Business Jet Design Optimization Problem Formulation Comparison of Derivative Calculation Methods Computational Fluid Dynamics Codes Differentiation of the Solution of a Linear System Approach for Iterative Procedures Transonic Inviscid Airfoil Shape Optimization Problem Formulation Comparison of Derivative Calculation Methods Conclusions

Flow Solver 27/42 2D Euler solver Written in C++ using templates Cell-centered finite-volume discretization Roe s approximate Riemann solver MUSCL reconstruction via the Van Albada limiter Last few iterations use the exact Jacobian found using the automatic differentiation tool Tapenade Optimization performed using IPOPT Provide gradients and Hessians of the objective function and the constraints Uses BFGS to build an approximation to the Hessian if only the gradients are provided

Convergence of Flow Solver 28/42 Convergence for a NACA-0012 airfoil at M = 0.78 and α = 1.2

Geometric Design Variables 29/42 The shape of the airfoil is parametrized using a fifth order (with rational basis functions of degree four) NURBS curve with 11 control points The trailing edge is fixed at (x, y) = (1, 0) Position and weight of the remaining 9 control points gives 27 design variables. Combined with the angle of attack, this results in a total of 28 design variables

Constraints 30/42 Lift Constraint: c l = 0.5 Geometric Constraints: Location of the leading edge at (x, y) = (0, 0) Maximum curvature must be smaller than a user-prescribed value Maximum thickness must be larger than a user-prescribed value Trailing edge angle must be larger than a user-prescribed value Regularity constraints on the location of the control points

Results 31/42 Inviscid drag minimization at M = 0.78 Baseline: NACA-0012 airfoil at M = 0.78 and α = 1.2 For the baseline, the shock on the suction side is clearly visible, leading to a c d = 1.307 10 2

Non-Unique Solution 32/42 Optimal design using different optimization software, SNOPT Optimal geometries are different Shock has completely disappeared Resulting drag is solely caused by the discretization error

Hyper-Dual Number Implementation 33/42 The method for efficiently using Hyper-Dual Numbers is followed. The code uses templates, which allows the variable type to be changed arbitrarily The exact Jacobian is computed and used for the last few iterations of the flow solver The LU decomposition of the exact Jacobian is stored One iteration is needed to solve for each first derivative, and one iteration is required for each second derivative. In general, the cost of obtaining a derivative is identical to the cost of one Newton iteration of the flow field For this particular case, because a direct solver is used for which the LU decomposition is stored, the derivative information is obtained for a fraction of the cost of a Newton iteration

Methods for Computing Second Derivatives 34/42 The required second-derivative calculations were carried out using three different techniques. Hyper-Dual Numbers Central-Difference Approximation Complex-Step/Finite-Difference Hybrid 2 f (x) = Im [f (x + ih 1e j 2h 2 e k )] Im [f (x + ih 1 e j + 2h 2 e k )] + x j x k 12h 1 h 2 ( ) Im [f (x + ih1 e j + h 2 e k )] Im [f (x + ih 1 e j h 2 e k )] 2 +O ( h1 2 + h 4 ) 2 3h 1 h 2

Accuracy of Derivative Calculations 35/42 The central-difference and complex-step/finite-difference hybrid require appropriate values for the step size. 1 10 0 10-1 10-2 10-3 relative error Value of second derivative 20 10 10-4 10-5 10-6 0-20 -40-60 Finite difference Complex step Hyper-dual Finite difference Complex step 10-7 10-8 10-8 10-7 10-6 10-5 10 Magnitude of disturbance Relative error and value of -4-80 10-8 10-7 10-6 10-5 Magnitude of disturbance 2 cl α2 as the step size is varied. 10-4

Accuracy of Derivative Calculations 36/42 Optimal step size more sensitive for angle of attack than other design variables Complex-Step/Finite-Difference Hybrid: The magnitude of the imaginary disturbance h 1 is typically chosen of the order 10 30 or even smaller. For the real valued disturbance h 2 the choice is more critical. h 2 = 1.0 10 8 appears suitable for α h 2 = 1.0 10 7 is more suited for the other variables Central-Difference Formula: h = 1.0 10 7 for α h = 1.0 10 6 otherwise

Optimization Comparison 37/42 Optimization is carried out using the three methods for explicitly computing the Hessian, and a Quasi-Newton method using a limited memory BFGS Very similar convergence behavior Explicit Hessian methods coincide for first 6 iterations Explicit Hessian methods smoother than BFGS

Execution Time Comparison 38/42 Method of Hessian matrix computation Normalized duration L-BFGS approximation 1.00 Hyper-Dual Numbers 1.37 Central-Difference approximation 1.18 Complex-Step/Finite-Difference Hybrid 1.95 BFGS is the fastest, it avoids explicitly computing the Hessian The finite-difference method requires nine flow solutions to compute the entries in the Hessian each of which requires three Newton iterations to be performed to obtain a converged flow solution. Using Hyper-Dual Numbers requires only one additional flow solution, involving two Newton iterations, for each entry of the Hessian matrix.

Outline Introduction Derivative Calculation Methods Hyper-Dual Numbers Supersonic Business Jet Design Optimization Problem Formulation Comparison of Derivative Calculation Methods Computational Fluid Dynamics Codes Differentiation of the Solution of a Linear System Approach for Iterative Procedures Transonic Inviscid Airfoil Shape Optimization Problem Formulation Comparison of Derivative Calculation Methods Conclusions

Conclusions 40/42 Hyper-Dual numbers can be used to compute exact gradients and Hessians The computational cost can be greatly reduced for some objective functions, including those involving iterative procedures. For iterative procedures, an efficient strategy is to converge the procedure using real numbers, and then perform one iteration using hyper-dual numbers to compute the derivatives. Optimization of a Supersonic Business Jet Design: Computational cost reduced by a factor of 8 Makes hyper-dual numbers both more accurate and less expensive to use than finite differences

Conclusions 41/42 Application of Hyper-Dual numbers to a CFD code Differentiation of the solution of a linear system Simplified if start with a converged solution Get derivatives in one or two Newton iterations Initial testing indicated no benefit Need to use exact Jacobian Inviscid Transonic Airfoil Optimization 2D Euler code with the exact Jacobian Accuracy of the Hessian had little impact on the convergence of the optimization Cost of using Hyper-Dual numbers not unreasonable Avoids searching for a good step size

Questions?

Backup Slides

JOE Results 44/42

JOE Results 45/42