A Crash-Course on the Adjoint Method for Aerodynamic Shape Optimization

Similar documents
A COUPLED-ADJOINT METHOD FOR HIGH-FIDELITY AERO-STRUCTURAL OPTIMIZATION

An Investigation of the Attainable Efficiency of Flight at Mach One or Just Beyond

COMPLETE CONFIGURATION AERO-STRUCTURAL OPTIMIZATION USING A COUPLED SENSITIVITY ANALYSIS METHOD

Challenges and Complexity of Aerodynamic Wing Design

AERO-STRUCTURAL WING DESIGN OPTIMIZATION USING HIGH-FIDELITY SENSITIVITY ANALYSIS

Adjoint Formulations for Topology, Shape and Discrete Optimization

Aerodynamic Inverse Design and Shape Optimization via Control Theory

Control Theory Approach to Aero Shape Optimization

Industrial Applications of Aerodynamic Shape Optimization

Active Flutter Control using an Adjoint Method

Applications of adjoint based shape optimization to the design of low drag airplane wings, including wings to support natural laminar flow

Numerical Optimization Algorithms

Feedback Control of Aerodynamic Flows

An Investigation of the Attainable Efficiency of Flight at Mach One or Just Beyond

A Multi-Dimensional Limiter for Hybrid Grid

Application of a Non-Linear Frequency Domain Solver to the Euler and Navier-Stokes Equations

High-Fidelity Aero-Structural Design Optimization of a Supersonic Business Jet

Sensitivity Analysis AA222 - Multidisciplinary Design Optimization Joaquim R. R. A. Martins Durand

A Non-Intrusive Polynomial Chaos Method For Uncertainty Propagation in CFD Simulations

Airfoil shape optimization using adjoint method and automatic differentiation

Is My CFD Mesh Adequate? A Quantitative Answer

( ) A i,j. Appendices. A. Sensitivity of the Van Leer Fluxes The flux Jacobians of the inviscid flux vector in Eq.(3.2), and the Van Leer fluxes in

Paul Garabedian s Contributions to Transonic Airfoil and Wing Design

DG Methods for Aerodynamic Flows: Higher Order, Error Estimation and Adaptive Mesh Refinement

High-Fidelity Multidisciplinary Design Using an Integrated Design Environment

DG Methods for Aerodynamic Flows: Higher Order, Error Estimation and Adaptive Mesh Refinement

Eigenmode Analysis of Boundary Conditions for the One-dimensional Preconditioned Euler Equations

AProofoftheStabilityoftheSpectral Difference Method For All Orders of Accuracy

Application of Dual Time Stepping to Fully Implicit Runge Kutta Schemes for Unsteady Flow Calculations

Effects of the Jacobian Evaluation on Direct Solutions of the Euler Equations

Divergence Formulation of Source Term

Optimum aerodynamic design using the Navier-Stokes equations

A Coupled-Adjoint Sensitivity Analysis Method for High-Fidelity Aero-Structural Design

Edwin van der Weide and Magnus Svärd. I. Background information for the SBP-SAT scheme

TAU Solver Improvement [Implicit methods]

A HARMONIC BALANCE APPROACH FOR MODELING THREE-DIMENSIONAL NONLINEAR UNSTEADY AERODYNAMICS AND AEROELASTICITY

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Error Estimation for High Speed Flows Using Continuous and Discrete Adjoints

Nonlinear Frequency Domain Methods Applied to the Euler and Navier-Stokes Equations p.1/50

Complete Configuration Aero-Structural Optimization Using a Coupled Sensitivity Analysis Method

Numerical Methods. King Saud University

Further Studies of Airfoils Supporting Non-unique Solutions in Transonic Flow

Wings and Bodies in Compressible Flows

Supersonic Aerodynamics. Methods and Applications

Jun 22-25, 2009/San Antonio, TX

An Optimization-based Framework for Controlling Discretization Error through Anisotropic h-adaptation

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Solving the Euler Equations!

A hybrid adjoint approach applied to RANS equations

Progress in Mesh-Adaptive Discontinuous Galerkin Methods for CFD

Simultaneous Robust Design and Tolerancing of Compressor Blades

Applied Computational Fluid Dynamics. in Marine Engineering

A high-order discontinuous Galerkin solver for 3D aerodynamic turbulent flows

Derivatives for Time-Spectral Computational Fluid Dynamics using an Automatic Differentiation Adjoint

Determination of Feasible Directions by Successive Quadratic Programming and Zoutendijk Algorithms: A Comparative Study

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

Block-Structured Adaptive Mesh Refinement

Lecture V: The game-engine loop & Time Integration

Drag Characteristics of a Low-Drag Low-Boom Supersonic Formation Flying Concept

DESIGN OPTIMIZATION OF HIGH-LIFT CONFIGURATIONS USING A VISCOUS ADJOINT-BASED METHOD

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

Efficient Hessian Calculation using Automatic Differentiation

OpenFOAM Simulations for MAV Applications

A COUPLED-ADJOINT METHOD FOR HIGH-FIDELITY AERO-STRUCTURAL OPTIMIZATION

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

Simulation of low Mach number flows

PHYS 410/555 Computational Physics Solution of Non Linear Equations (a.k.a. Root Finding) (Reference Numerical Recipes, 9.0, 9.1, 9.

MULTIGRID CALCULATIONS FOB. CASCADES. Antony Jameson and Feng Liu Princeton University, Princeton, NJ 08544

Unsteady Optimization Using a Discrete Adjoint Approach Applied to Aeroacoustic Shape Design

Discretization Error Reduction through r Adaptation in CFD

Zonal modelling approach in aerodynamic simulation

41st AIAA Aerospace Sciences Meeting and Exhibit January 6 9, 2003/Reno, NV

Solution Algorithms for Viscous Flow

[N175] Development of Combined CAA-CFD Algorithm for the Efficient Simulation of Aerodynamic Noise Generation and Propagation

CE 191: Civil and Environmental Engineering Systems Analysis. LEC 05 : Optimality Conditions

Implicit Solution of Viscous Aerodynamic Flows using the Discontinuous Galerkin Method

Integration, differentiation, and root finding. Phys 420/580 Lecture 7

FOR many computational fluid dynamics (CFD) applications, engineers require information about multiple solution

Numerical Methods I Solving Nonlinear Equations

CHAPTER 7 SEVERAL FORMS OF THE EQUATIONS OF MOTION

Drag of a thin wing and optimal shape to minimize it

Adjoint-based aerodynamic shape optimization

Reliability of LES in complex applications

Concepts. 3.1 Numerical Analysis. Chapter Numerical Analysis Scheme

Bindel, Spring 2012 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 16. f(x) dx,

LEAST-SQUARES FINITE ELEMENT MODELS

Basic Aspects of Discretization

AERODYNAMIC CHARACTERIZATION OF A CANARD GUIDED ARTILLERY PROJECTILE

Discrete and continuous adjoint method for compressible CFD J. Peter ONERA

Numerical Solution of Partial Differential Equations governing compressible flows

8. Introduction to Computational Fluid Dynamics

Introduction. Finite and Spectral Element Methods Using MATLAB. Second Edition. C. Pozrikidis. University of Massachusetts Amherst, USA

5. FVM discretization and Solution Procedure

Numerical Simulation of Flow Field around an Inflatable Vehicle during a Reentry Demonstration Flight considering Membrane Deformation

Constrained optimization: direct methods (cont.)

Resolving the dependence on free-stream values for the k-omega turbulence model

arxiv: v1 [physics.comp-ph] 18 May 2018

Compressible Potential Flow: The Full Potential Equation. Copyright 2009 Narayanan Komerath

First, Second, and Third Order Finite-Volume Schemes for Diffusion

Transcription:

A Crash-Course on the Adjoint Method for Aerodynamic Shape Optimization Juan J. Alonso Department of Aeronautics & Astronautics Stanford University jjalonso@stanford.edu Lecture 19 AA200b Applied Aerodynamics II, March 10, 2005 1

Outline Introduction to Optimization Survey of available optimization methods Approaches to sensitivity analysis Performance of direct vs. adjoint method Theory of the adjoint method The adjoint system for the Euler equations Reduced gradient formulation Some results and examples AA200b Applied Aerodynamics II, March 10, 2005 2

Introduction to Optimization minimize I(x) x R n subject to g m (x) 0, m = 1, 2,..., N g I: objective function, output (e.g. structural weight). x n : vector of design variables, inputs (e.g. aerodynamic shape); bounds can be set on these variables. g m : vector of constraints (e.g. element von Mises stresses); in general these are nonlinear functions of the design variables. AA200b Applied Aerodynamics II, March 10, 2005 3

Optimization Methods Intuition: decreases with increasing dimensionality. Grid or random search: the cost of searching the design space increases rapidly with the number of design variables. Evolutionary/Genetic algorithms: good for discrete design variables and very robust; are they feasible when using a large number of design variables? Nonlinear simplex: simple and robust but inefficient for more than a few design variables. Gradient-based: the most efficient for a large number of design variables; assumes the objective function is well-behaved. Convergence only guaranteed to a local minimum. AA200b Applied Aerodynamics II, March 10, 2005 4

Gradient-Based Optimization: Design Cycle!" #%$'&(*)+(,'-. /102/43657/ Analysis computes objective function and constraints (e.g. aero-structural solver) Optimizer uses the sensitivity information to search for the optimum solution (e.g. sequential quadratic programming) Sensitivity calculation is usually the bottleneck in the design cycle, particularly for large dimensional design spaces. Accuracy of the sensitivities is important, specially near the optimum. AA200b Applied Aerodynamics II, March 10, 2005 5

Sensitivity Analysis Methods Finite Differences: very popular; easy, but lacks robustness and accuracy; run solver N x times. df f(x n + h) f(x) dx n h + O(h) Complex-Step Method: relatively new; accurate and robust; easy to implement and maintain; run solver N x times. df Im [f(x n + ih)] dx n h + O(h 2 ) Algorithmic/Automatic/Computational Differentiation: accurate; ease of implementation and cost varies. (Semi)-Analytic Methods: efficient and accurate; long development time; cost can be independent of N x. AA200b Applied Aerodynamics II, March 10, 2005 6

Finite-Difference Derivative Approximations From Taylor series expansion, f(x + h) = f(x) + hf (x) + h 2f (x) 2! Forward-difference approximation: + h 3f (x) 3! +.... df(x) dx f(x + h) f(x) = h + O(h). f(x) 1.234567890123484 f(x + h) 1.234567890123456 f 0.000000000000028 f(x) f(x+h) AA200b Applied Aerodynamics II, March 10, 2005 7 x x+h

Complex-Step Derivative Approximation Can also be derived from a Taylor series expansion about x with a complex step ih: f(x + ih) = f(x) + ihf (x) h 2f (x) 2! ih 3f (x) 3! +... f (x) = Im [f(x + ih)] h + h 2f (x) 3! +... f (x) Im [f(x + ih)] h No subtraction! Second order approximation. AA200b Applied Aerodynamics II, March 10, 2005 8

Simple Numerical Example Normalized Error, Complex-Step Forward-Difference Central-Difference Estimate derivative at x = 1.5 of the function, f(x) = e x sin3 x + cos 3 x Relative error defined as: ε = f f ref f ref Step Size, h AA200b Applied Aerodynamics II, March 10, 2005 9

Challenges in Large-Scale Sensitivity Analysis There are efficient methods to obtain sensitivities of many functions with respect to a few design variables - Direct Method. There are efficient methods to obtain sensitivities of a few functions with respect to many design variables - Adjoint method. Unfortunately, there are no known methods to obtain sensitivities of many functions with respect to many design variables. This is the curse of dimensionality. AA200b Applied Aerodynamics II, March 10, 2005 10

Outline Introduction to Optimization Survey of available optimization methods Approaches to sensitivity analysis Performance of direct vs. adjoint method Theory of the adjoint method The adjoint system for the Euler equations Reduced gradient formulation Some results and examples AA200b Applied Aerodynamics II, March 10, 2005 11

Symbolic Development of the Adjoint Method Let I be the cost (or objective) function where I = I(w, F) w = flow field variables F = grid variables The first variation of the cost function is δi = I T δw + I T δf w F The flow field equation and its first variation are R(w, F) = 0 AA200b Applied Aerodynamics II, March 10, 2005 12

[ ] [ ] R R δr = 0 = δw + δf w F Introducing a Lagrange Multiplier, ψ, and using the flow field equation as a constraint δi = I w { = T I w δw + I T {[ ] R δf ψ T F w ] } { δw + T ψ T [ R w I F T [ ] } R δf F [ ] } R ψ T δf F δw + By choosing ψ such that it satisfies the adjoint equation [ ] T R ψ = I w w, we have δi = { I F T [ ] } R ψ T δf F AA200b Applied Aerodynamics II, March 10, 2005 13

This reduces the gradient calculation for an arbitrarily large number of design variables at a single design point to One Flow Solution + One Adjoint Solution AA200b Applied Aerodynamics II, March 10, 2005 14

Design Cycle Flow Solver Adjoint Solver Gradient Calculation Aerodynamics sections planform Structure Design Cycle repeated until Convergence Shape & Grid Modification AA200b Applied Aerodynamics II, March 10, 2005 15

Outline Introduction to Optimization Survey of available optimization methods Approaches to sensitivity analysis Performance of direct vs. adjoint method Theory of the adjoint method The adjoint system for the Euler equations Reduced gradient formulation Some results and examples AA200b Applied Aerodynamics II, March 10, 2005 16

Design Using the Euler Equations In a body-fitted coordinate system, the Euler equations can be written as where and W t + F i ξ i = 0 in D, (1) W = Jw, F i = S ij f j. Assuming that the surface being designed, B W, conforms to the computational plane ξ 2 = 0, the flow tangency condition can be written as U 2 = 0 on B W. (2) AA200b Applied Aerodynamics II, March 10, 2005 17

Formulation of the Design Problem Introduce the cost function I = 1 2 B W (p p d ) 2 dξ 1 dξ 3. A variation in the shape will cause a variation δp in the pressure and consequently a variation in the cost function δi = B W (p p d ) δp dξ 1 dξ 3. (3) Since p depends on w through the equation of state the variation δp can be determined from the variation δw. Define the Jacobian matrices A i = f i w, C i = S ij A j. (4) AA200b Applied Aerodynamics II, March 10, 2005 18

The weak form of the equation for δw in the steady state becomes D ψ T ξ i δf i dd = B (n i ψ T δf i )db, where δf i = C i δw + δs ij f j. Adding to the variation of the cost function δi = (p p d ) δp dξ 1 dξ 3 B W ( ) ψ T δf i dd D ξ i ( + ni ψ T ) δf i db, (5) B which should hold for an arbitrary choice of ψ. In particular, the choice AA200b Applied Aerodynamics II, March 10, 2005 19

that satisfies the adjoint equation ψ t CT i ψ ξ i = 0 in D, (6) subject to far field boundary conditions and solid wall conditions n i ψ T C i δw = 0, S 21 ψ 2 + S 22 ψ 3 + S 23 ψ 4 = (p p d ) on B W, (7) yields and expression for the gradient that is independent of the variation in the flow solution δw: δi ψ T = δs ij f j dd D ξ i (δs 21 ψ 2 + δs 22 ψ 3 + S 23 ψ 4 ) p dξ 1 dξ 3. B W (8) AA200b Applied Aerodynamics II, March 10, 2005 20

Outline Introduction to Optimization Survey of available optimization methods Approaches to sensitivity analysis Performance of direct vs. adjoint method Theory of the adjoint method The adjoint system for the Euler equations Reduced gradient formulation Some results and examples AA200b Applied Aerodynamics II, March 10, 2005 21

The Reduced Gradient Formulation Consider the case of a field mesh variation with a fixed boundary. Then, δi = 0, but there is a variation in the transformed flux, δf i = C i δw + δs ij f j. Here the true solution is unchanged, so the variation δw is due to the field mesh movement δx. Therefore δw = w δx = w x j δx j (= δw ), and since ξ i δf i = 0, AA200b Applied Aerodynamics II, March 10, 2005 22

it follows that D ψ T (δs ij f j ) dd = ψ T (C i δw ) dd. (9) ξ i D ξ i A similar relationship has been derived in the general case with boundary movement and the complete derivation will be presented in un upcoming conference paper. Now D ψ T δrdd = = ψ T D B D ξ i C i (δw δw ) dd ψ T C i (δw δw ) db ψ T ξ i C i (δw δw ) dd. (10) By choosing ψ to satisfy the adjoint equation (6) and the adjoint boundary AA200b Applied Aerodynamics II, March 10, 2005 23

condition (7), we have finally the reduced gradient formulation δi = + ψ T (δs 2j f j + C 2 δw ) dξ 1 dξ 3 B W (δs 21 ψ 2 + δs 22 ψ 3 + S 23 ψ 4 ) p dξ 1 dξ 3, (11) B W which only involves surface integrals. We have tested this formulation in two- and three-dimensional flows and the results are encouraging for both direct gradient comparisons and actual optimization. AA200b Applied Aerodynamics II, March 10, 2005 24

0.4 0.3 Comparison of Adjoint and Finite Difference Gradients Original Adjoint Reduced Adjoint Finite Difference 0.2 0.1 Gradients 0 0.1 0.2 0.3 0.4 0.5 0 20 40 60 80 100 120 140 Number of Control Parameter ( Bump Using 3 Mesh Points) Figure 1: Euler Drag Minimization for RAE2822: Comparison of Original Adjoint, Reduced Adjoint and Finite-Difference Gradients Using 3 Mesh-Point Bump as Design Variable. AA200b Applied Aerodynamics II, March 10, 2005 25

BOEING 747 WING-BODY Mach: 0.930 Alpha: 0.962 CL: 0.360 CD: 0.01681 CM:-0.1564 Design: 0 Residual: 0.1245E+01 Grid: 193X 33X 33 Cp = -2.0 Tip Section: 88.1% Semi-Span Cl: 0.319 Cd:-0.01804 Cm:-0.1608 Cp = -2.0 Cp = -2.0 Root Section: 16.1% Semi-Span Cl: 0.306 Cd: 0.04773 Cm:-0.1533 Mid Section: 50.4% Semi-Span Cl: 0.535 Cd: 0.01931 Cm:-0.2665 AA200b Applied Aerodynamics II, March 10, 2005 26

BOEING 747 WING-BODY Mach: 0.930 Alpha: 1.117 CL: 0.360 CD: 0.01141 CM:-0.1448 Design: 15 Residual: 0.6726E-01 Grid: 193X 33X 33 Cp = -2.0 Tip Section: 88.1% Semi-Span Cl: 0.353 Cd:-0.02390 Cm:-0.1744 Cp = -2.0 Cp = -2.0 Root Section: 16.1% Semi-Span Cl: 0.304 Cd: 0.04729 Cm:-0.1411 Mid Section: 50.4% Semi-Span Cl: 0.526 Cd: 0.00681 Cm:-0.2288 AA200b Applied Aerodynamics II, March 10, 2005 27

Adjoint Design Software The adjoint for the Euler and Navier-Stokes equations has been implemented into the following codes: SYN87: Wing-alone Euler C-H mesh. SYN88: Wing-body Euler C-H mesh. SYN107: Wing-body N-S C-H mesh. SYN87-MB: Arbitrary configuration, Euler, multiblock mesh. SYN107-MB: Arbitrary configuration, N-S, multiblock mesh. SYNPLANE: Arbitrary configuration, Euler, unstructured mesh. AA200b Applied Aerodynamics II, March 10, 2005 28

Adjoint Design Projects Adjoint methods (Euler and/or N-S) have been used with the following configurations: Boeing 747-200 McDonnell Douglas MDXX Raytheon Premier I NASA High Speed Civil Transport Reno Air Racer IPTN N2130 Other projects at BAE, DLR, NLR, etc. Research configurations (subsonic, transonic, supersonic) AA200b Applied Aerodynamics II, March 10, 2005 29