Title: Error Estimation and Control for Unsteady Flow Problems with Dynamic Meshes using a Discrete Adjoint
1Error Estimation and Control for Unsteady Flow
Problems with Dynamic Meshes using a Discrete
Adjoint Approach
- Dimitri Mavriplis
- Department of Mechanical Engineering
- University of Wyoming
2Motivation
- 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
3Overview
- 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
4NSU3DG CFL3D1,2 OverflowH,K,..
Grid Convergence All Solutions
5Drag Prediction Workshop Test Case
- Wing-Body Configuration
- 72 million grid points
- Transonic Flow
- Mach0.75, Incidence 0 degrees, Reynolds
number3,000,000
6Wing1-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
7Discrete 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
8Drag Minimization Problem
- DLR-F6 Wing body configuration
- Mach0.75, Incidence1o , Re3M
- 1.12M grid points, 4.2M cells
9Drag Minimization Problem
- Mach0.75, Incidence1o , CL0.673
- Convergence lt 500 MG cycles, 40 minutes on 16
cpus - Change Wing Shape to Reduce Drag
- Objective Drag Design Variables Surface
Grid Point Positions
10Drag 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
11Goal-Oriented Spatial Adaptivity
DG Discretization
p-adaptivity (Drag)
12Extension 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 - Roes flux model
- Linear multigrid for convergence acceleration
13Unsteady 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 ttfinal to
design variables - Do not use variational formulation
- Finite volume discretization
14Flow equations
Conservative form of Euler equations
Integrate over moving control volume to get
Arbitrary-Lagrangian-Eulerian (ALE) finite-volume
form
15Mesh Deformation
- Linear Tension Spring Analogy
- Mesh is a series of interconnected springs
- Kdxint dxsurf
- 2 independent force balance equations at each
node - Computational Mesh
- Unstructured triangular elements for inviscid
flows - 20,000 elements
- 289 surface nodes
16Basic Sensitivity Formulation
Objective function
Forward linearization
Need expressions for these 2 terms
Transpose reverse linearization
Easy to compute
17Details of Unsteady Adjoint
Flow constraint equation for BDF1 scheme
18Continued..
Flow Adjoint at n
19Continued
Mesh Motion constraint equation
Mesh adjoint at n
20Continued.
Will need expression from mesh constraint at n-1
Derivative of equation that prescribes geometry
motion
Will need expression from flow constraint at n-1
- Results in backward time-integration
- Solve one flow adjoint and one mesh adjoint at
each time-step - Recurrence stops at n0 via steady state
adjoint solution for problems initiated from a
steady state solution
21Typical 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
22Optimization Procedure
Run flow solver to obtain unsteady solution
forward time-integration
Deform airfoil surface as a function of D
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
23Case 1 Objective Formulation
24Time-Dependent Load Convergence/Comparison
25Unsteady Flow Solution
Pressure Contours for Pitching Airfoils Minf
0.755, a0 0.016o, amax 2.51o, w 0.1628, t0
to 54 27 time-steps with dt2.0
Optimized Airfoil
NACA0012 Baseline Airfoil
26Error 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)
27Sources of Error
Error in Time domain
Partial convergence error
Temporal resolution error
Flow equations
Mesh motion equations
Flow equations
Mesh motion equations
28Flow equations
Conservative form of Euler equations
Integrate over moving control volume to get
Arbitrary-Lagrangian-Eulerian (ALE) finite-volume
form
29Mesh Deformation
Linear Tension Spring Analogy Mesh is a series
of interconnected springs Kdxintdxsurf 2
independent force balance equations at each node
30Temporal Resolution Error
Fine level Taylor expansion of functional
objective L
h fine time domain Dt/2 H coarse time
domain Dt
31Evaluation of Flow Contribution to Temporal
Resolution Error
Fine level flow residual Taylor expansion
32Continued
33Continued
Adjoint equation over entire fine time domain
Recast on coarse time domain
34At 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)
35Continued
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
36Evaluation of Mesh contribution to Temporal
Resolution Error
37Continued
Contribution temporal resolution error from mesh
motion equations
Contribution temporal resolution error from flow
equations
38Summary 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
39Validation
- Adjoint is linearization about current state (16
time steps) to predict objective value on
modified state (32 time steps)
40Partial Convergence Error
Coarse level Taylor expansion about partial
solution functional
Partially converged flow and mesh solution
Fully converged flow and mesh solution
41Partial Convergence Error
Fine level flow residual Taylor expansion
non-zero due to partial convergence
42Continued
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
43Summary 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
44Validation
45Adaptation
- 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
46Adaptive Time Step and Convergence Criteria
Example
47Distribution of time steps and convergence limits
in the time domain after 6 adaptation cycles
Time steps
Flow limits
Mesh limits
48Distribution of Error Components
Flow convergence error
Mesh convergence error
Resolution error
49Conclusions
- 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