gradient based optimization of flow problems using the
play

Gradient-based optimization of flow problems using the adjoint - PowerPoint PPT Presentation

Gradient-based optimization of flow problems using the adjoint method and high-order numerical discretizations Matthew J. Zahr and Per-Olof Persson Applied, Computational, and Industrial Math Seminar Series San Jse State University, San


  1. Gradient-based optimization of flow problems using the adjoint method and high-order numerical discretizations Matthew J. Zahr † and Per-Olof Persson Applied, Computational, and Industrial Math Seminar Series San Jóse State University, San Jóse, CA May 8, 2017 † Luis W. Alvarez Postdoctoral Fellow Department of Mathematics Lawrence Berkeley National Laboratory University of California, Berkeley 1 / 39

  2. PDE optimization is ubiquitous in science and engineering Design : Find system that optimizes performance metric, satisfies constraints Aerodynamic shape design of automobile Optimal flapping motion of micro aerial vehicle 2 / 39

  3. PDE optimization is ubiquitous in science and engineering Control : Drive system to a desired state Boundary flow control Metamaterial cloaking – electromagnetic invisibility 3 / 39

  4. PDE optimization is ubiquitous in science and engineering Inverse problems : Infer the problem setup given solution observations Left : Material inversion – find inclusions from acoustic, structural measurements Right : Source inversion – find source of airborne contaminant from downstream measurements Full waveform inversion – estimate subsurface of Earth’s crust from acoustic 4 / 39 measurements

  5. Time-dependent PDE-constrained optimization • Introduction of fully discrete adjoint method emanating from high-order discretization of governing equations • Time-periodicity constraints • Extension to high-order partitioned solver for fluid-structure interaction • Solver acceleration via model reduction Volkswagen Passat • Applications: flapping flight, energy harvesting, MRI imaging LES flow past airfoil Micro aerial vehicle Vertical windmill 5 / 39

  6. Unsteady PDE-constrained optimization formulation Goal : Find the solution of the unsteady PDE-constrained optimization problem minimize J ( U , µ ) U , µ subject to C ( U , µ ) ≤ 0 ∂ U ∂t + ∇ · F ( U , ∇ U ) = 0 in v ( µ , t ) where • U ( x , t ) PDE solution • µ design/control parameters � T f � • J ( U , µ ) = j ( U , µ , t ) dS dt objective function T 0 Γ � T f � • C ( U , µ ) = c ( U , µ , t ) dS dt constraints T 0 Γ 6 / 39

  7. Nested approach to PDE-constrained optimization PDE optimization requires repeated queries to primal and dual PDE Optimizer Primal PDE Dual PDE 7 / 39

  8. Nested approach to PDE-constrained optimization PDE optimization requires repeated queries to primal and dual PDE Optimizer µ Primal PDE Dual PDE 7 / 39

  9. Nested approach to PDE-constrained optimization PDE optimization requires repeated queries to primal and dual PDE Optimizer J ( U , µ ) Primal PDE Dual PDE 7 / 39

  10. Nested approach to PDE-constrained optimization PDE optimization requires repeated queries to primal and dual PDE Optimizer µ J ( U , µ ) U Primal PDE Dual PDE 7 / 39

  11. Nested approach to PDE-constrained optimization PDE optimization requires repeated queries to primal and dual PDE Optimizer d J d µ ( U , µ ) J ( U , µ ) Primal PDE Dual PDE 7 / 39

  12. High-order discretization of PDE-constrained optimization • Continuous PDE-constrained optimization problem minimize J ( U , µ ) U , µ subject to C ( U , µ ) ≤ 0 ∂ U ∂t + ∇ · F ( U , ∇ U ) = 0 in v ( µ , t ) • Fully discrete PDE-constrained optimization problem minimize J ( u 0 , . . . , u N t , k 1 , 1 , . . . , k N t ,s , µ ) u 0 , ..., u Nt ∈ R N u , k 1 , 1 , ..., k Nt,s ∈ R N u , µ ∈ R n µ subject to C ( u 0 , . . . , u N t , k 1 , 1 , . . . , k N t ,s , µ ) ≤ 0 u 0 − ¯ u ( µ ) = 0 s � u n − u n − 1 − b i k n,i = 0 i =1 Mk n,i − ∆ t n r ( u n,i , µ , t n,i ) = 0 8 / 39

  13. Highlights of globally high-order discretization n da • Arbitrary Lagrangian-Eulerian formulation: N dA G , g , v X v Map, G ( · , µ , t ) , from physical v ( µ , t ) to reference V x 2 V x 1 X 2 � ∂ U X � + ∇ X · F X ( U X , ∇ X U X ) = 0 � X 1 ∂t � X Mapping-Based ALE • Space discretization : discontinuous Galerkin M ∂ u ∂t = r ( u , µ , t ) • Time discretization : diagonally implicit RK s DG Discretization � u n = u n − 1 + b i k n,i i =1 c 1 a 11 Mk n,i = ∆ t n r ( u n,i , µ , t n,i ) c 2 a 21 a 22 . . . ... . . . . . . • Quantity of interest : solver-consistency c s a s 1 a s 2 · · · a ss b 1 b 2 · · · b s F ( u 0 , . . . , u N t , k 1 , 1 , . . . , k N t ,s ) Butcher Tableau for DIRK 9 / 39

  14. Adjoint method to efficiently compute gradients of QoI • Consider the fully discrete output functional F ( u n , k n,i , µ ) • Represents either the objective function or a constraint • The total derivative with respect to the parameters µ , required in the context of gradient-based optimization, takes the form N t N t s d F d µ = ∂F ∂F ∂ u n ∂F ∂ k n,i � � � ∂ µ + ∂ µ + ∂ u n ∂ k n,i ∂ µ n =0 n =1 i =1 • The sensitivities, ∂ u n ∂ µ and ∂ k n,i ∂ µ , are expensive to compute, requiring the solution of n µ linear evolution equations • Adjoint method : alternative method for computing d F d µ that require one linear evolution evoluation equation for each quantity of interest, F 10 / 39

  15. Adjoint equation derivation: outline • Define auxiliary PDE-constrained optimization problem minimize F ( u 0 , . . . , u N t , k 1 , 1 , . . . , k N t ,s , µ ) u 0 , ..., u Nt ∈ R N u , k 1 , 1 , ..., k Nt,s ∈ R N u subject to R 0 = u 0 − ¯ u ( µ ) = 0 s � R n = u n − u n − 1 − b i k n,i = 0 i =1 R n,i = Mk n,i − ∆ t n r ( u n,i , µ , t n,i ) = 0 • Define Lagrangian N t N t s T R 0 − T R n − T R n,i � � � L ( u n , k n,i , λ n , κ n,i ) = F − λ 0 λ n κ n,i n =1 n =1 i =1 • The solution of the optimization problem is given by the Karush-Kuhn-Tucker (KKT) sytem ∂ L ∂ L ∂ L ∂ L = 0 , = 0 , = 0 , = 0 ∂ u n ∂ k n,i ∂ λ n ∂ κ n,i 11 / 39

  16. Dissection of fully discrete adjoint equations • Linear evolution equations solved backward in time • Primal state/stage, u n,i required at each state/stage of dual problem • Heavily dependent on chosen ouput T ∂F λ N t = ∂ u N t s T ∂F ∂ r ∂ u ( u n,i , µ , t n − 1 + c i ∆ t n ) T κ n,i � λ n − 1 = λ n + + ∆ t n ∂ u n − 1 i =1 s T ∂F ∂ r ∂ u ( u n,j , µ , t n − 1 + c j ∆ t n ) T κ n,j M T κ n,i = � + b i λ n + a ji ∆ t n ∂ k n,i j = i • Gradient reconstruction via dual variables N t s d F d µ = ∂F T ∂ ¯ u T ∂ r � � ∂ µ + λ 0 ∂ µ ( µ ) + ∆ t n κ n,i ∂ µ ( u n,i , µ , t n,i ) n =1 i =1 12 / 39

  17. Energetically optimal flapping under x -impulse constraint � 3 T � • Isentropic, compressible, minimize − f · v dS dt µ 2 T Γ Navier-Stokes � 3 T � subject to f · e 1 dS dt = q • Re = 1000, M = 0.2 2 T Γ • y ( t ) , θ ( t ) , c ( t ) parametrized via U ( x , 0) = ¯ u ( x ) periodic cubic splines ∂ U ∂t + ∇ · F ( U , ∇ U ) = 0 • Black-box optimizer: SNOPT l l/3 θ (t) c(t) y(t) Airfoil schematic, kinematic description 13 / 39

  18. Optimal control - fixed shape Fixed shape, optimal Rigid Body Motion (RBM), varied x -impulse Energy = 9.4096 Energy = 0.45695 Energy = 4.9475 x -impulse = -0.1766 x -impulse = 0.000 x -impulse = -2.500 Optimal RBM Optimal RBM Initial Guess J x = 0 . 0 J x = − 2 . 5 14 / 39

  19. Optimal control, time-morphed geometry Optimal Rigid Body Motion (RBM) and Time-Morphed Geometry (TMG), varied x -impulse Energy = 9.4096 Energy = 0.45027 Energy = 4.6182 x -impulse = -0.1766 x -impulse = 0.000 x -impulse = -2.500 Optimal RBM/TMG Optimal RBM/TMG Initial Guess J x = 0 . 0 J x = − 2 . 5 15 / 39

  20. Optimal control, time-morphed geometry Optimal Rigid Body Motion (RBM) and Time-Morphed Geometry (TMG), x -impulse = − 2 . 5 Energy = 9.4096 Energy = 4.9476 Energy = 4.6182 x -impulse = -0.1766 x -impulse = -2.500 x -impulse = -2.500 Optimal RBM Optimal RBM/TMG Initial Guess J x = − 2 . 5 J x = − 2 . 5 16 / 39

  21. Energetically optimal 3D flapping motions Goal : Find energetically optimal flapping motion that achieves zero thrust Energy = 1.4459e-01 Energy = 3.1378e-01 Thrust = -1.1192e-01 Thrust = 0.0000e+00 17 / 39

  22. Time-Periodic solutions desired when optimizing cyclic motion • To properly optimize a cyclic, or periodic problem, need to simulate a representative period • Necessary to avoid transients that will impact quantity of interest and may cause simulation to crash • Task : Find initial condition, ¯ u , such that flow is periodic, i.e. u N t = ¯ u 18 / 39

  23. Time-periodic solutions desired when optimizing cyclic motion Vorticity around airfoil with flow initialized from steady-state (left) and time-periodic flow (right) 0 0 power power − 20 − 2 − 40 − 4 − 60 0 2 4 0 2 4 time time Time history of power on airfoil of flow initialized from steady-state ( ) and from a time-periodic solution ( ) 19 / 39

  24. Newton-Krylov shooting method for time-periodic solutions • Apply Newton’s method to solve nonlinear system of equations R ( w ) = u N t ( w ) − w = 0 • Nonlinear iteration defined as w ← w − J ( w ) − 1 R ( w ) where J ( w ) = ∂ u N t ∂ w − I • ∂ u N t is a large, dense matrix and expensive to construct ∂ w • Krylov method to solve J ( w ) − 1 R ( w ) only requires matrix-vector products J ( w ) v = ∂ u N t ∂ w v − v 20 / 39

Recommend


More recommend