numerical shape optimization and adjoint equations
play

Numerical shape optimization and adjoint equations Praveen. C - PowerPoint PPT Presentation

Numerical shape optimization and adjoint equations Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in TIFR-CAM 18 August, 2009 Praveen.


  1. Numerical shape optimization and adjoint equations Praveen. C praveen@math.tifrbng.res.in Tata Institute of Fundamental Research Center for Applicable Mathematics Bangalore 560065 http://math.tifrbng.res.in TIFR-CAM 18 August, 2009 Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 1 / 37

  2. Effect of shape on flow http://www.aerospaceweb.org Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 2 / 37

  3. Airfoils http://www.centennialofflight.gov Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 3 / 37

  4. Compressible flow and shocks speed of air Mach number, M = speed of sound Range, R = M a C L log W i c T C D W f Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 4 / 37

  5. Golf ball http://www.aerospaceweb.org Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 5 / 37

  6. Effect of shape on flow http://www.aerospaceweb.org Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 6 / 37

  7. Objectives and controls • Objective function I ( β ) = I ( β, Q ) mathematical representation of system performance • Control variables β ◮ Parametric controls β ∈ R n ◮ Infinite dimensional controls β : X → Y ◮ Shape β ∈ set of admissible shapes • State variable Q : solution of an ODE or PDE R ( β, Q ) = 0 = ⇒ Q = Q ( β ) Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 7 / 37

  8. Mathematical formulation • Constrained minimization problem min I ( β, Q ) subject to R ( β, Q ) = 0 β • Find δβ such that δ I < 0 (to first order) � ∂ I � δ I = ∂ I ∂β δβ + ∂ I ∂β + ∂ I ∂Q ∂QδQ = δβ ∂Q ∂β � �� � G • Steepest descent δβ = − ǫG ⊤ , ǫ > 0 δ I = − ǫGG ⊤ = − ǫ � G � 2 < 0 How to compute gradient G cheaply and accurately ? Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 8 / 37

  9. Elements of shape optimization Shape parameters Surface grid Volume grid CFD solution I Q β X s X d β = d I d I d X d X s d X d X s d β Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 9 / 37

  10. Adjoint approach • For shape optimization: I = I ( X, Q ) d X = ∂ I d I ∂X + ∂ I ∂Q ∂Q ∂X • Flow sensitivity ∂Q ∂X ; costly to evaluate • Differentiate state equation R ( X, Q ) = 0 ∂X + ∂R ∂R ∂Q ∂X = 0 ∂Q • Introducing an adjoint variable Ψ, we can write � ∂R � d X = ∂ I d I ∂X + ∂ I ∂Q ∂X + ∂R ∂Q ∂X + Ψ ⊤ ∂Q ∂Q ∂X Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 10 / 37

  11. Adjoint approach • Collect terms involving the flow sensitivity � ∂ I � ∂Q d X = ∂ I d I ∂X + Ψ ⊤ ∂R ∂Q + Ψ ⊤ ∂R ∂X + ∂Q ∂X • Choose Ψ so that flow sensitivity vanishes � ∂ I � ∂R � ⊤ � ⊤ ∂Q + Ψ ⊤ ∂R ∂ I ∂Q = 0 or Ψ + = 0 ∂Q ∂Q • Gradient d X = ∂ I d I ∂X + Ψ ⊤ ∂R ∂X Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 11 / 37

  12. Optimization steps • β = ⇒ X s = ⇒ X • Solve the flow equations to steady-state d Q d t + R ( X, Q ) = 0 = ⇒ Q, I ( X, Q ) • Solve adjoint equations to steady-state � ∂ I � ∂R � ⊤ � ⊤ dΨ d t + Ψ + = 0 = ⇒ Ψ ∂Q ∂Q • Compute gradient wrt grid X d X = ∂ I d I ∂X + Ψ ⊤ ∂R ∂X d β = d I d I d X d X s − β − ǫ d I = ⇒ β ← d X d X s d β d β Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 12 / 37

  13. Continuous and discrete approaches • Continuous approach (differentiate and discretize) PDE − → Adjoint PDE − → Discrete adjoint • Discrete approach (discretize and differentiate) PDE − → Discrete PDE − → Discrete adjoint • We use the discrete approach R ( X, Q ) = 0 represent the finite volume equations which are ◮ algebraic equations ◮ Use ordinary calculus to differentiate ◮ Need to compute � ∂R � ∂R � ⊤ � ⊤ ∂ I ∂ I ∂Q, ∂X , Ψ , Ψ ∂Q ∂X Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 13 / 37

  14. Automatic differentiation • Computer code available to compute I ( X, Q ) , R ( X, Q ) • Code is made of composition of elementary functions T 0 = X r ′ th line of program: T r = F r ( T r − 1 ) Y = F ( X ) = F p ◦ F p − 1 ◦ . . . ◦ F 1 ( T 0 ) ◮ Use differentiation by parts formula Y = F ′ ( X ) ˙ ˙ 1 ( T 0 ) ˙ X = F ′ p ( T p − 1 ) F ′ p − 1 ( T p − 2 ) . . . F ′ X ◮ Automated using AD tools: Algorithmic Differentiation Computer code New code Automatic ˙ Differentiation P P Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 14 / 37

  15. Reverse differentiation • Reverse mode computes transpose: ( X, ¯ → ¯ Y ) − X X = [ F ′ ( X )] ⊤ ¯ 2 ( T 1 )] ⊤ . . . [ F ′ p ( T p − 1 )] ⊤ ¯ ¯ Y = [ F ′ 1 ( T 0 )] ⊤ [ F ′ Y • Forward sweep and then reverse sweep T p − 1 T 1 T 2 Func: T 0 − → F 1 − → F 2 − → . . . − → F p ¯ ¯ ¯ T p − 2 T p − 3 T 0 T p − 1 , ¯ [ F ′ p ] T [ F ′ p − 1 ] T [ F ′ 1 ] T Grad: Y − → − → − → . . . − → Forward variables T j required in reverse order: store or recompute • Reverse mode useful to compute � ∂ I � ∂ I � ∂R � ⊤ � ⊤ � ∂R � ⊤ � ⊤ , , Ψ , Ψ ∂Q ∂X ∂Q ∂X Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 15 / 37

  16. Shape parameterization • Parameterize the � n deformations � � � x s � � n x � x (0) s = + h ( ξ ) A B y (0) ξ y s n y 1 s 0.9 0.8 m � 0.7 h ( ξ ) = β k B k ( ξ ) 0.6 k =1 h( ξ ) 0.5 0.4 • Hicks-Henne bump functions 0.3 0.2 q k = log(0 . 5) B k ( ξ ) = sin p ( πξ q k ) , 0.1 log( ξ k ) 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 ξ Exact derivatives d X s d β can be • Move points along normal to computed reference line AB Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 16 / 37

  17. Grid deformation Initial grid • Interpolate displacement of surface points to interior points using RBF ˜ f ( x, y ) = a 0 + a 1 x + a 2 y + N � r j | 2 log | � b j | � r − � r − � r j | j =1 Deformed grid where � r = ( x, y ) • Results in smooth grids d X • Exact derivatives d X s can be computed Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 17 / 37

  18. Test cases: airfoil shape optimization RAE2822: M ∞ = 0 . 729, α = 2 . 31 o min I = C d s.t. C l = C l 0 C d 0 Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 18 / 37

  19. RAE2822: Lift-constrained drag minimization 1.5 0.06 1 0.04 0.5 0.02 ipopt Initial -Cp 0 0 ipopt -0.02 Initial -0.5 -0.04 -1 -0.06 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 x/c Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 19 / 37

  20. Sensitivity to perturbations 0.04 Initial 200 Initial Optimized Optimized 0.03 150 Drag coefficient Lift/Drag 0.02 100 0.01 50 0 0 0.7 0.71 0.72 0.73 0.74 0.7 0.71 0.72 0.73 0.74 0.75 0.76 0.75 0.76 Mach number Mach number (a) (b) Variation of (a) drag coefficient and (b) L/D with Mach number for RAE2822 airfoil and optimized airfoil Need for robust aerodynamic optimization Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 20 / 37

  21. Wing optimization Initial shape Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 21 / 37

  22. Wing optimization Optimized shape Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 22 / 37

  23. ATR Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 23 / 37

  24. Planform optimization for propeller aircraft (Rakshith, JNCASR) Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 24 / 37

  25. Unmanned air vehicle Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 25 / 37

  26. Adjoint-based aposteriori error estimation • u h = numerical solution on grid h • Numerical analysis � u − u h � = O ( h p ) , p > 0 as h → 0+ How to choose the grid size ? • Functional of interest J ( u ) J ( u ) − J ( u h ) = O ( h p ) Choose grid so that error in J is small Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 26 / 37

  27. Cartesian Points NACA-0012 - coarse M ∞ = 1 . 2, α = 0 o 2 1.5 1 0.5 0 -0.5 -1 -1.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 Points Mach number (Mohan Varma) Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 27 / 37

  28. Cartesian Points NACA-0012 - coarse M ∞ = 1 . 2, α = 0 o 2 1.5 1 0.5 0 -0.5 -1 -1.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5 Points Mach number (Mohan Varma) Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 28 / 37

  29. PDE with homogeneous BC • Linear PDE Lu = f in D • Adjoint operator ( v, Lu ) = ( L ∗ v, u ) • Functional of interest J = ( g, u ) • Adjoint PDE L ∗ v = g • Primal-dual equivalence J = ( g, u ) ( L ∗ v, u ) = = ( v, Lu ) = ( v, f ) Praveen. C (TIFR-CAM) Shape Optimization TIFR, 18 Aug 2009 29 / 37

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend