View
217
Download
4
Category
Tags:
Preview:
Citation preview
July 11, 2006
Comparison of Exact and Approximate Adjoint for Aerodynamic Shape
Optimization
ICCFD 4 July 10-14, 2006, Ghent
Giampietro Carpentieri and Michel J.L. van Tooren Delft University of Technology
Barry Koren Centre for Mathematics and Computer science, Amsterdam
July 11, 2006
Introduction
• Flow solver
• Adjoint solver
• Gradient computation
• Shape Optimization
July 11, 2006
Median-dual discretization
Control volumefor node i
On each control volume/node ( + BC)
N nodes, semi-discrete form
Conserved variables vector
Residual vector ( )
DUAL OF THE MESH
MESH
July 11, 2006
MUSCL reconstruction on each edge
Primitive variables reconstruction at edge mid-point:
Least-squares or Green-Gauss gradient
Numerical flux: Roe’s approximate Riemann solver
2nd order accuracy: evaluate flux with reconstructed variables
Venkatakrishnan’s limiter
July 11, 2006
Adjoint equations
Shape parameter
Functional ( e.g. lift,drag )
State of system ( e.g. residuals)
Gradient/sensitivity computed as:
: adjoint variables, obtained from adjoint equation:
July 11, 2006
Discrete Adjoint for MUSCL scheme
Reconstructed left and right states
Second order fluxes
Three vectors of length E, the number of edges(N is number of nodes)
Dummy matrix ( E x N )
Diagonal matrices, differentiated flux ( E x E )
Reconstruction matrices ( N x E )
Chain rule + transposition
Dependence residual vector on conservative variables:
To compute consider:
July 11, 2006
At each time step linear system is solved iteratively :
Time marching flow/adjoint equations
Flow equations
Adjoint equations
Backward Euler scheme:
Symmetric Gauss-Seidel preconditioner (Matrix-free) is used
July 11, 2006
Geometric sensitivities
Mesh coordinates
Mesh metrics
Boundary deformations
Limiter vector
Gradient vector
To compute consider:
Coordinates depend on shape parameter:
Residuals depend on coordinates:
Each term is computed using source code generated by Automatic Differentiation tool Tapenade
Chain rule
July 11, 2006
Shape parameterization and mesh deformation
Chebyschev polynomials used to parameterize shape of airfoil
Mesh deformations computed with spring analogy solved by Jacobi iterations.
Boundary deformation implies mesh update
is stiffness of edge ij, inverse of edge length
July 11, 2006
Shape optimization
Objective function, scaled drag coefficient
Relative maximum thickness constraint
Upper nose radius constraint
Lower nose radius constraint
Trailing edge angle constraint
Lift equality constraint
Minimize function with equality and inequality constraints and bounds on variables
July 11, 2006
Optimization Algorithms
It is necessary to use constrained minimization techniques !
Unconstrained minimization techniques that treat constraints as penalty terms could be used. However, they are ill-conditioned and inaccurate.
Two algorithms used in this work:
Sequential Quadratic Programming (SQP)
Search direction found by solving sub-problem with quadratic objective and linearized constraints.Line search is performed using Lagrangian function.Hessian of Lagrangian updated by BFGS (or other) formulas.
Sequential Linear Programming (SLP)
Method of centers is used. Hypersphere fitting into linearized design space found by solving Linear Programming sub-problem. Design updated by moving in the center of the sphere.No second order information is collected.
July 11, 2006
Exact and approximate Discrete Adjoint
• Edge-based assembly
• Exact Discrete Adjoint
• Approximations
July 11, 2006
Edge-based assemblyMatrix-vector products with transposed residual Jacobians are assembled directly on edges similarly to the residuals assembly:
Two loops on the edges
July 11, 2006
Differentiation of flux and reconstruction
Roe’s flux Jacobian
Reconstruction matrix
Five matrices (M) come from differentiation of .
Reconstruction contribution amounts to two transformation matrices and a diagonal matrix which contains limiter and gradient derivatives.
EXACT ADJOINT !
July 11, 2006
Approximations
Approximation 1 neglect differentiation of limiter
Approximation 2 neglect differentiation of Roe matrix
Differentiation of limiter is complicated due to construction phase (muldi-dimensional limiter)
Differentiation of Roe matrix is very difficult, symbolic differentiation is used.
For both approximations, compared to exact adjoint, a relative error of 0.1-2.5% in computed gradient is found.
July 11, 2006
Approximations
Approximation 3 neglect reconstruction operator
Ignoring reconstruction operator makes implementation of adjoint trivial. Only simple loop on edges is required. Error in computed gradient increases to 10-30% .
Two loops on the edges
One loop on the edges
July 11, 2006
Optimization test cases
• NACA64A410 (SQP)
• RAE2822 (SQP)
• NACA0012 (SLP)
July 11, 2006
NACA64A410 =0, Mach =0.75
Pressure contours
Drag (scaled) vs gradient iterations
Initial values
Lift
Relative max thickness
Upper nose radius
Lower nose radius
Trailing edge angle
July 11, 2006
NACA64A410 =0, Mach =0.75
EXACT ( 19 gradients )
APPROX 1 ( 17 gradients )
APPROX 2 ( 34 gradients )
APPROX 3 ( stalled )
July 11, 2006
NACA64A410 =0, Mach =0.75
Lift Thickness
Nose U. Nose L. TE Angle
EXACT -9.9x10-
6 < 10-8 -0.724 -0.126 -0.350
APPROX 1
4.6x10-
7
< 10-8 -0.782 -0.172 -0.032
APPROX 2
7.3x10-
6
< 10-8 -0.693 -4.1x10-7 -0.3
Constraint values show that airfoils satisfy design problem accurately
Lift constraint h = -9.9x10-6 means that final Lift coefficient is:
CL = (1 + h) CL0 = (1 - 9.9x10-6 ) CL0
Thickness constraint is always critical
July 11, 2006
MESH 2 : 30000 nodes
MESH 1 : 12000 nodes
NACA64A410 =0, Mach =0.75 CHECK IF MESH 1 IS CAPABLE OF CAPTURING WEAK SHOCK
Mach number distributions do not change on second mesh
EXACT APPROX 1 APPROX 2
July 11, 2006
NACA64A410 =0, Mach =0.75
Mach number
Three airfoils have differences in geometry of order 10-3
July 11, 2006
RAE2822 =2, Mach =0.73
Lift
Relative max thickness
Upper nose radius
Lower nose radius
Trailing edge angle
Pressure contours
Drag (scaled) vs gradient iterations
Initial values
July 11, 2006
RAE2822 =2, Mach =0.73
EXACT ( 15 gradients )
APPROX 1 ( 20 gradients )
APPROX 2 ( 10 gradients ) APPROX 3 ( stalled)
July 11, 2006
RAE2822 =2, Mach =0.73
Lift Thickness
Nose U. Nose L. TE Angle
EXACT -1.3x10-
6 < 10-8 -0.416 -3.347 10-8
APPROX 1
-4.4x10-
6
< 10-8 -0.481 -1.964 9x10-8
APPROX 2
-6.2x10-
7
< 10-8 -0.589 -0.292 < 10-8
Constraint values show that airfoils satisfy design problem accurately
Thickness and trailing edge angle constraints are critical for the 3 airfoils
July 11, 2006
RAE2822 =2, Mach =0.73
Differences in geometry of order of 10-3
July 11, 2006
NACA0012 =2, Mach =0.75
Lift
Relative max thickness
Upper nose radius
Lower nose radius
Trailing edge angle
Pressure contours Drag (scaled) vs gradient
iterations
July 11, 2006
NACA0012 =2, Mach =0.75
EXACT, APPROX 1, APPROX 2 APPROX 3
Lift Thickness
Nose U. Nose L. TE Angle
EXACT -4.8x10-
6 -0.012 -0.04 -4.17 -0.44
APPROX 1
1.5x10-
6
-0.013 -0.04 -4.12 -0.432
APPROX 2
3.6x10-
6
-0.013 -0.036 -4.22 -0.438
July 11, 2006
NACA0012 =2, Mach =0.75
Differences in y-coordinates are of order 10-4 only
July 11, 2006
Conclusions and future work
• Adjoint codes with approximation in the differentiation of fluxes and reconstruction operator, approximations 1 and 2, can be effective for shape optimization;
• When approximations are used, at least with SQP algorithm, the optimization can converge to different airfoils. The SLP algorithm has appeared to be insensitive to the approximations and converged to a unique airfoil;
• When the reconstruction operator is ignored, approximation 3, the adjoint code is not effective. The optimization with SQP and SLP algorithms stall and shock-waves are not removed completely from the airfoil.
July 11, 2006
Thank you for your interest
Recommended