1 / 100

Karthik Mani Department of Mechanical Engineering University of Wyoming Ph.D. Defense

Application of the Discrete Adjoint Method to Coupled Multidisciplinary Unsteady Flow Problems for Error Estimation and Optimization. Karthik Mani Department of Mechanical Engineering University of Wyoming Ph.D. Defense March 27, 2009. Outline. Motivation Background Goals

marv
Download Presentation

Karthik Mani Department of Mechanical Engineering University of Wyoming Ph.D. Defense

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Application of the Discrete Adjoint Method to Coupled Multidisciplinary Unsteady Flow Problems for Error Estimation and Optimization Karthik Mani Department of Mechanical Engineering University of Wyoming Ph.D. Defense March 27, 2009

  2. Outline • Motivation • Background • Goals • Analysis problem • Adjoint gradient and optimization results • Adjoint error estimates and adaptation results • Concluding remarks

  3. Motivation – Part 1 • Began with shape optimization in unsteady flow problems • Evolved to address multiple coupled unsteady disciplines • Airfoil design for unsteady applications such as dynamic stall , flutter control, highly unsteady flows such as rotorcraft forward flight, rotor-stator interactions in turbomachines etc • Primary mechanism – use adjoint equations for computing gradient vector CFX ONERA NLR ONERA

  4. Motivation – Part 2 • Adjoint variables can also be used for goal-based error estimation • Can be used to drive adaptive solutions • Spatial goal-based adaptation for steady-state problems has been done • Time-dependent adjoint variables now available. Can we adapt time-domain in unsteady problems? Vendetti & Darmofal MIT FUN3D - NASA Langley

  5. Background: Gradient-based Optimization Minimization of a functional by modifying inputs Output functional Function Input parameters dL/dD L D

  6. Background:Computation of the Gradient • F = Flow equations or discrete flow solution (CFD-code) • D = parametric representation of geometry • L = functional of interest (ex: lift,drag etc) Change D (i.e shape) to change L (Ex: lift) => need gradient dL/dD => how? Finite difference Input D CFD Code Output L Input D+e CFD Code Output Lnew dL/dD ~ DL/DD = (Lnew – L)/e • e is heuristically determined • Large -> wrong slope due to nonlinear effects • Small -> machine error Multiple D => multiple evaluations of F

  7. Background:Differentiating F for Gradient Possible to directly differentiate analytic F to obtain expression for analytic dL/dD Continuous Linearization L = F(D) dL/dD = dF(D)/dD Can also sequentially differentiate operations in CFD code which computes L=F(D) Input D CFD Code Output L d CFD Code dL/dD dD Discrete Linearization

  8. Background:Continuous vs. Discrete Linearization

  9. Background:Adaptive Solutions - Spatial Domain • Goal is to efficiently use of computational resources • Add points to the mesh on-the-fly only where it is important • But which areas are important? High gradients? Local error? Boundary layers? Shock waves? Venditti MIT Wakes? Stagnation points? • Whatever is relevant to our functional of interest (Ex: lift, drag) is what is important ! • Same argument in time domain. • Adjoint equations establish a relationship between the functional and the regions of the mesh that are relevant to it

  10. Goals: • Develop a unified framework for computing adjoint variables for coupled unsteady equations • Compute functional gradients using adjoint variables and demonstrate shape optimization for aeroelastic problems • Extend utility of adjoint variables for estimating functional relevant temporal discretization error and algebraic error • Demonstrate adaptation of the time-domain and adaptation of convergence tolerances • Do this in an unstructured framework with finite-volume formulation applied to dynamic meshes.

  11. Analysis Problem:Flow Equations Conservative form of Euler equations Integrate over a moving control volume • Spatial discretization uses second-order accurate matrix dissipation scheme • Temporal discretization uses second-order accurate BDF2 scheme Define flow residual as: Newton solver

  12. Analysis Problem Mesh Motion Equations Approximate edges as springs Overall linear system: relates interior displacements to boundary displacements 2 Spring equations (x and y) for each node that can be solved as Solve using Gauss-Seidel or linear multigrid

  13. Analysis Problem:Structural Equations Equations of motion Airfoil with 2 pitch and plunge degrees-of-freedom Matrix form: Transform as: Structure residual: Newton solver:

  14. Analysis Problem:Geometry Parameterization Hicks-Henne Sine bump function: node displacement bump magnitude node location bump location Valid for: Bump magnitudes amax are the design variables D

  15. Analysis Problem:Coupled Aeroelastic Solution Coupled residual equations: Coupled iterative solution Coupled iterations convergence

  16. Analysis Problem:Overall Solution Procedure Read flow parameters and mesh Steady-State solution from freestream conditions Deform mesh to correct AOA Deform mesh to prescribed orientation at current time-step Initiate unsteady solution using steady-state solution Unsteady aeroelastic solution initiated by prescribed unsteady solution Flow solution at current time-step Prescribed unsteady time-integration Time-integration with coupled iterative aeroelastic solution at each time-step

  17. Adjoint-based Gradient:A Simple Steady-State Example Consider a functional L evaluated using solution state U: state sensitivity to D is a matrix Linearize for gradient: Linearization of scalar – easily computable

  18. Adjoint-based Gradient:A Simple Steady-State Example Residual equation used to obtain solution U Residual has to evaluate to zero at all points, therefore derivative is also zero • Limiting case of a single D, this is a linear system that can be solved to be obtain state sensitivity (vector) • For multiple D, multiple linear solutions required to construct state sensitivity one column at a time • Better than finite-difference in terms of accuracy, but no better in cost

  19. Adjoint-based Gradient:A Simple Steady-State Example Transpose to obtain adjoint linearization: Rearrange state sensitivity expression: Substitute into adjoint linearization and introduce adjoint variable: Linear adjoint equation • No dependence on D during linear solution • Effect of D confined to final matrix-vector product

  20. Generalized Form for Multidisciplinary Unsteady Coupled Equations m coupled disciplines=> L is a functional computed using multidisciplinary solution set: Linearize using chain rule with respect to D: Inner-product form: Tranpose for adjoint total sensitivity:

  21. Generalized Form for Multidisciplinary Unsteady Coupled Equations Linearize with respect to D: Residual equations for m disciplines: Write in combined matrix form:

  22. Generalized Form for Multidisciplinary Unsteady Coupled Equations Transpose and rearrange for vector of state sensitivity matrices:

  23. Generalized Form for Multidisciplinary Unsteady Coupled Equations Substitute into adjoint total sensitivity equation:

  24. Generalized Form for Multidisciplinary Unsteady Coupled Equations Define vector of disciplinary adjoint variables: Rearrange to recover linear adjoint system:

  25. Generalized Form for Multidisciplinary Unsteady Coupled Equations General Jacobian matrix when expanded discretely in time is lower triangular due to hyperbolic nature of time: Swap rows and columns to obtain an upper triangular linear system that can be solved by back substitution

  26. Generalized Form for Multidisciplinary Unsteady Coupled Equations Finally, substitute vector of disciplinary adjoint variables into total sensitivity equation to obtain gradient

  27. Unsteady Aeroelastic Problem Functional based on solution to unsteady flow, structure and mesh equations Linearize, tranpose, and write in inner-product form for adjoint total sensitivity: Tap flow, structure and mesh residuals for state variable sensitivity matrix expression Mesh residual is function of structural state

  28. Unsteady Aeroelastic Problem Linearize residuals: Combined matrix form:

  29. Unsteady Aeroelastic Problem Substitute expression for vector of state variables sensitivity matrices into adjoint total sensitivity equation and define adjoint variables:

  30. Unsteady Aeroelastic Problem Now determine form of discrete temporal expansion of Jacobians Flow residual at time-step n: Tri-diagonal for both residual to flow state and residual to mesh coordinate sensitivity

  31. Unsteady Aeroelastic Problem Mesh residual at time-step n: All Jacobians are diagonal since there is no dependence beyond time-step n: Structure residual:

  32. Unsteady Aeroelastic Problem Substitute expanded Jacobians back into adjoint system:

  33. Unsteady Aeroelastic Problem Swap rows and columns to form an upper triangular system: • Each diagonal block represents one time-step • Diagonal block is coupled – requires solution procedure similar to analysis problem • Backward sweep in time with coupled iterative solution at each time step

  34. Unsteady Aeroelastic Problem Segregated form at an arbitrary time-step: When adjoint variables are available, substitute back into total sensitivity equation: Complete gradient then:

  35. Uncoupled Unsteady Problem Functional based on only time-dependent flow and mesh coordinates: Linearize, tranpose and convert to inner-product form: Residual equations: Linearize, combine into matrix form, tranpose and rearrange for vector of state variable sensitivity matrices

  36. Uncoupled Unsteady Problem Substitute into total sensitivity and define vector of adjoint variables: Discretely expand in time using definitions for Jacobians from before:

  37. Uncoupled Unsteady Problem Rearrange to form upper triangular adjoint system Note: Diagonal blocks are also upper triangular => uncoupled equations Segregated form: First solve flow adjoint then solve mesh adjoint Substitute adjoint variables into total sensitivity.

  38. Steady-State Problem Adjoint system is same as the uncoupled unsteady problem. No discrete temporal expansion since solutions span only space. Solve directly by forward substitution First solve flow adjoint as: Then mesh adjoint as: Mesh residual for steady-state: Final gradient then becomes:

  39. Validation of Adjoint-based Gradient • Forward linearization is first verified against finite-difference • Dual consistency between transpose operations is used to verify adjoint gradient Primal operation Dual operation Dual consistency requires: Comparison of adjoint gradient with finite-difference

  40. Steady-State Shape Optimization Lift constrained drag minimization of a NACA0012 in transonic flow Mach number = 0.8, AOA = 1.25 degrees Functional: Computational mesh ~ 20,000 elements • L-BFGS-B algorithm for optimization • Uses gradient and builds approximate Hessian on-the-fly using history • 32 bump functions – 16 on upper surface and 16 lower surface • Magnitudes of bumps form vector design variables

  41. Steady-State Shape Optimization

  42. Steady-State Shape Optimization

  43. Steady-State Shape Optimization Entropy Contours

  44. Uncoupled Unsteady ProblemTime-Dependent Load Matching AGARD test case No.5: Mach number = 0.755, a=0.016o, kc=0.0814, am=2.51o • L-BFGS-B Optimization Algorithm • 290 design variables • Bump at each surface node • Same mesh as steady-state problem • Target load is that of NACA64210

  45. Uncoupled Unsteady ProblemTime-Dependent Load Matching

  46. Uncoupled Unsteady ProblemTime-Dependent Load Matching

  47. Uncoupled Unsteady ProblemTime-Dependent Load Matching

  48. Uncoupled Unsteady ProblemTime-Dependent Pressure Distribution Matching Same unsteady problem and global functional formulation. Local functional at each time-step is the difference between pressures • Inverse design in unsteady flow from NACA0012 to NACA64210 • Target airfoil is NACA64210 “type” airfoil • Target is closest match possible using the parameterization of the geometry • 290 design variables (Convergence stalls) • Reduced to 14 design variables and true optimum achieved in 28 iterations

  49. Uncoupled Unsteady ProblemTime-Dependent Pressure Distribution Matching 290 design variables 14 design variables

  50. Uncoupled Unsteady ProblemTime-Dependent Pressure Distribution Matching 290 design variables case

More Related