1 / 49

Dimitri Mavriplis Department of Mechanical Engineering University of Wyoming

Error Estimation and Control for Unsteady Flow Problems with Dynamic Meshes using a Discrete Adjoint Approach. Dimitri Mavriplis Department of Mechanical Engineering University of Wyoming. Motivation. Complex simulations have multiple error sources

maughan
Download Presentation

Dimitri Mavriplis Department of Mechanical Engineering University of Wyoming

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. Error Estimation and Control for Unsteady Flow Problems with Dynamic Meshes using a Discrete Adjoint Approach Dimitri Mavriplis Department of Mechanical Engineering University of Wyoming

  2. Motivation • Complex simulations have multiple error sources • Engineering simulations concerned with specific output objectives • Adjoint methods / Goal Oriented Approach • Methodical approach for constructing discrete adjoint • Use for a posteriori error estimation • Spatial error • Temporal error • Other error sources • Use to drive adaptive process

  3. Overview • Discrete Adjoint formulation for steady aerodynamics • Design Optimization problem (3D) • Discrete Adjoint construction for unsteady “multiphysics” problem • Dynamically deforming meshes • Unsteady flow solution • Unsteady design optimization • Unsteady error estimation

  4. NSU3D=G CFL3D=1,2 Overflow=H,K,.. Grid Convergence – All Solutions

  5. Drag Prediction Workshop Test Case • Wing-Body Configuration • 72 million grid points • Transonic Flow • Mach=0.75, Incidence = 0 degrees, Reynolds number=3,000,000

  6. Wing1-Wing2 Grid Convergence Study (DPW3) • NSU3D delivers consistent grid convergence provided: • Flow is mostly attached • Sequence of refined grids originate from same family with same relative resolution distributions

  7. Discrete Adjoint Approach • Solution of adjoint problem enables: • Rapid calculation of sensitivities for design-optimization • Error estimation based on functional outputs (lift, drag…) • Sensitivity of local errors to output of interest … adaptive meshing/time stepping • Sensitivity can be obtained by: • Finite Difference (perturb input, rerun) • Tangent Problem: Solve linearization of analysis problem • Suitable for single design variable (input), many objectives (outputs) • Adjoint Problem: Transpose of Tangent problem or linearization • Suitable for many design variables, few outputs (objective) • Discrete adjoint constructed using modular linearization of individual solver subroutines • Flow Adjoint, Mesh Motion Adjoint • Adjoint Problems Solved using line-implicit multigrid scheme • Similar convergence as analysis problem (same eigenvalues) • Formulation enables extension to unsteady and multidisciplinary problems

  8. Drag Minimization Problem • DLR-F6 Wing body configuration • Mach=0.75, Incidence=1o , Re=3M • 1.12M grid points, 4.2M cells

  9. Drag Minimization Problem • Mach=0.75, Incidence=1o , CL=0.673 • Convergence < 500 MG cycles, 40 minutes on 16 cpus • Change Wing Shape to Reduce Drag • Objective= Drag Design Variables = Surface Grid Point Positions

  10. Drag Minimization Problem • Total Optimization Time for 15 Design Cycles: 6 hours on 16 cpus of PC cluster • Flow Solver: 150 MG cycles • Flow Adjoint: 50 Defect-Correction cycles (x 4 MG) • Mesh Adjoint: 25 MG cycles • Mesh Motion: 25 MG cycles

  11. Goal-Oriented Spatial Adaptivity h-adaptivity (Drag) DG Discretization p-adaptivity (Drag)

  12. Extension to Unsteady Problems • ALE finite-volume formulation (cell-centered) • Satisfies Geometric Conservation Law (GCL) • Unstructured triangular meshes • 2nd-order spatial accuracy • Gradient based reconstruction for 2nd-order accuracy • Temporally 2nd-order accurate (BDF2) • Mesh deformation via linear tension spring analogy • Roe’s flux model • Linear multigrid for convergence acceleration

  13. Unsteady Discrete Adjoint • Using chain rule linearization • New time-step values depend on previous time step values • Integrate linearized equation in time (tangent problem) • Transpose all to get adjoint (and reverse order of matrix multiplication) • Integrate backwards in time (Flow and Mesh Motion) • Gives sensitivity of solution at time t=tfinal to design variables • Do not use variational formulation • Finite volume discretization

  14. Flow equations Conservative form of Euler equations: Integrate over moving control volume to get Arbitrary-Lagrangian-Eulerian (ALE) finite-volume form:

  15. Mesh Deformation • Linear Tension Spring Analogy: • Mesh is a series of interconnected springs • [K]dxint = dxsurf • 2 independent force balance equations at each node • Computational Mesh: • Unstructured triangular elements for inviscid flows • ~20,000 elements • 289 surface nodes

  16. Basic Sensitivity Formulation Objective function Forward linearization Need expressions for these 2 terms Transpose = reverse linearization Easy to compute

  17. Details of Unsteady Adjoint Flow constraint equation for BDF1 scheme

  18. Continued….. Flow Adjoint at n:

  19. Continued… Mesh Motion constraint equation Mesh adjoint at n:

  20. Continued…. Will need expression from flow constraint at n-1 Will need expression from mesh constraint at n-1 Derivative of equation that prescribes geometry motion • Results in backward time-integration • Solve one flow adjoint and one mesh adjoint at each time-step • Recurrence stops at n=0 via steady state adjoint solution for problems initiated from a steady state solution

  21. Typical Multigrid Convergence Mesh motion Flow equations Mesh adjoint Flow adjoint • All systems converge within 100 MG cycles • Flow equations & adjoint ~ 45 seconds each • Mesh equations & adjoint ~ 10 seconds each Formulated as duality preserving iterative scheme

  22. Optimization Procedure Deform airfoil surface as a function of D Run flow solver to obtain unsteady solution: forward time-integration Compute objective function Lg Perturb D by dD Set dD = 0 Check Lg start stop Compute design variable perturbation as: Run adjoint solver to compute sensitivities: backward time-integration

  23. Case 1: Objective Formulation

  24. Time-Dependent Load Convergence/Comparison

  25. Unsteady Flow Solution Pressure Contours for Pitching Airfoils Minf = 0.755, a0 = 0.016o, amax = 2.51o, w = 0.1628, t=0 to 54 27 time-steps with dt=2.0 Optimized Airfoil NACA0012 Baseline Airfoil

  26. Error Estimation Test Case Description Sinusoidally pitching airfoil Functional scalar is Lift after 1 period Easily extended to estimate error in time-integrated Lift history (future work)

  27. Sources of Error Error in Time domain Partial convergence error Temporal resolution error Flow equations Mesh motion equations Flow equations Mesh motion equations

  28. Flow equations Conservative form of Euler equations: Integrate over moving control volume to get Arbitrary-Lagrangian-Eulerian (ALE) finite-volume form:

  29. Mesh Deformation Linear Tension Spring Analogy: Mesh is a series of interconnected springs [K]dxint=dxsurf 2 independent force balance equations at each node

  30. Temporal Resolution Error Fine level Taylor expansion of functional objective L: h = fine time domain : Dt/2 H = coarse time domain : Dt

  31. Evaluation of Flow Contribution to Temporal Resolution Error Fine level flow residual Taylor expansion

  32. Continued…

  33. Continued… Adjoint equation over entire fine time domain: Recast on coarse time domain:

  34. At each time level n for BDF1: Discrete form for BDF1: Can be solved by block backsubstitution = backward recurrence relation in time (backward integral in time)

  35. Continued… Contribution to temporal resolution error from flow equations Remaining temporal resolution error (due to mesh motion equations, but also feeds into flow state ) Intepret as sum of dot products of adjoint and residual at each time step

  36. Evaluation of Mesh contribution to Temporal Resolution Error

  37. Continued… Contribution temporal resolution error from mesh motion equations Contribution temporal resolution error from flow equations

  38. Summary of Temporal Resolution Error Evaluation • Compute unsteady flow solution on coarse time domain • Compute adjoint variables on coarse time domain • Integrating backward in time • Project adjoint variables, flow solution and mesh solution onto fine time domain • Temporal resolution error is then dot product of adjoint with corresponding non-zero residual on fine time domain • Distribution in time is used to drive adaptation

  39. Validation • Adjoint is linearization about current state (16 time steps) to predict objective value on modified state (32 time steps)

  40. Partial Convergence Error Coarse level Taylor expansion about partial solution functional: Partially converged flow and mesh solution Fully converged flow and mesh solution

  41. Partial Convergence Error Fine level flow residual Taylor expansion non-zero due to partial convergence

  42. Continued… Same adjoint equations as those for temporal resolution error Partial convergence error due to flow equations: Non-zero residuals due to partial convergence Partial convergence error due to mesh equations:

  43. Summary of Total Error Evaluation and Decomposition • Compute partially converged flow and mesh solution on coarse time domain • Compute adjoint variables on coarse domain using partially converged solution • Compute partial convergence error on coarse level time domain • Inner product of adjoint with partially converged (non-zero) residual • Project partially converged solution and adjoint variables onto fine time domain • Evaluate fine level error estimate as previously • Combined temporal resolution and partial convergence error • Determine temporal resolution error by subtracting partial convergence error from total error estimate on fine time domain

  44. Validation

  45. Adaptation • Compute time-integrated averages of error component distributions • Adapt where error is greater than time-integrated average • Time resolution error: divide time step by 2 • Convergence error: tighten tolerance by predetermined factor

  46. Adaptive Time Step and Convergence Criteria Example

  47. Distribution of time steps and convergence limits in the time domain after 6 adaptation cycles Time steps Flow limits Mesh limits

  48. Distribution of Error Components Flow convergence error Mesh convergence error Resolution error

  49. Conclusions • Rigorous procedure for determining global error • Identifies individual error contributions from each set of governing equations • Distribution of each component available and can be used for adaptation • Can be extended to problems involving multiple sets of governing equations such as conjugate heat transfers, structural equations etc. • Address other errors such as coupling errors • Aero-structural coupling • Further extensions to incorporate space adaptivity non-trivial • Space-time formulations most obvious path forward

More Related