advertisement

Accurate numerical solution of Euler equations by optimal control of dissipation SM Deshpande EMU, JNCASR, Bangalore [email protected] N Anil Omesh Reshi Dept. of Aerospace Engg. IISc, Bangalore L & T, Mumbai French-Indian workshop on “Numerical Simulation, Control and Design for Aeronautical and Space Applications”. INRIA, Sophia Antipolis, France, Nov 29-Dec 01, 2006. OUTLINE • Introduction to KFVS • Basic theory of m-KFVS • Numerical Results • Optimal control of dissipation • A numerical test case • Conclusions INTRODUCTION TO KFVS Consider the 1D Euler equations U G 0 t x which are moments of the 1D Boltzmann equation in the Euler limit F F v 0 t x where F - Maxwellian velocity distribution function F I0 2 exp v u I / I 0 INTRODUCTION TO KFVS The Euler equations can be written as U G F F , v 0 t x t x is the moment function vector 1 v I v / 2 2 T The inner product is defined as , f R R f v dvdI INTRODUCTION TO KFVS Using CIR splitting, 1D Boltzmann equation gives F v | v | F v | v | F 0 t 2 x 2 x Taking moments, we get KFVS Euler equations U G G 0 t x x The split fluxes are given by v | v | G FdvdI 2 R R INTRODUCTION TO KFVS Consider the CIR split Boltzmann equation F v | v | F v | v | F 0 t 2 x 2 x Using suitable finite difference approximations F v | v | Fj Fj 1 v | v | Fj 1 Fj 0 2 x 2 x t j The mpde analysis gives F F x 2 v | v | Fxx O x t x 2 KFVS – first order accurate and dissipative ! INTRODUCTION TO KFVS • Numerical dissipation can be reduced by using higher order upwind schemes • In the case of 1D, second order scheme requires 5 points in the stencil • Is it possible to develop a scheme which requires only 3 point stencil but still gives results better than first order and close to second order ? BASIC THEORY OF MKFVS MCIR Splitting The modified CIR splitting is defined as v | v | v | v | v 2 2 The mpde based on MCIR splitting is given by F F x 2 v | v | Fxx O x t x 2 BASIC THEORY OF MKFVS … Taking moments we get mpde at Euler level U G x 2 | v | F dvdI O x xx t x 2 RR The modified split fluxes are given by Gm , v | v | F 2 • 1 Gm Gkfvs • 0 Central differencing • By tuning we can control dissipation and order of accuracy BASIC THEORY OF MKFVS … Mathematical models for : Consider the mpde U G x 2 | v | F xx dvdI O x t x 2 R R When 1 2 u 2 t x x x | v | I0 2 R R 2 num x 2 2 exp v u I / I 0 dvdI BASIC THEORY OF MKFVS … num = Numerical kinematic viscosity num 2 x v u | v | e dv R 2 When 1 • Particles with c v u 0 contribute maximum to • Particles with | c | contribute very little to num num BASIC THEORY OF MKFVS … The choice e |v | • Low velocity particles for which | v | 0 - Contribute very little to num • High velocity particles for which | v | 1 - Contribute max. to num BASIC THEORY OF MKFVS … |v| Another choice e • Low velocity particles for which | v | 1 1 - Contribute max. to num • High velocity particles for which | v | 1 0 - Contribute very little to num BASIC THEORY OF MKFVS … Consider the steady 1D Boltzmann equation with a BGK model for the collision term f v A F f x Using the IF e Ax / v the solution is given by f x, v f x0 , v e A x x0 v x x0 A x x0 A F x e v dx, v 0 x Assuming F x to be constant over x0 x x f x, v f x0 , v e A x x0 v A x x0 F 1 e v BASIC THEORY OF MKFVS … • The low velocity molecules are almost always lost • While high velocity molecules are lost negligibly, i.e., they travel over x without any collision • The choice e |v | is consistent with the earlier argument but doesn’t have closed form expressions for the split fluxes • The second choice for split fluxes e |v| leads to much simpler formulae BASIC THEORY OF MKFVS … For e |v| the modified split fluxes are given by 2 S G 1 4 Gm e G u 2 2 2 e 2 S 4 G u 2 • G - full flux, G - kfvs fluxes, non - dimensional parameter • mkfvs fluxes are simpler and similar to kfvs fluxes • Takes almost the same amount of time as kfvs fluxes • Smooth for all Mach number range • Continuous and differentible functions BASIC THEORY OF MKFVS … Dissipation Analysis : The mpde for 1D Euler equations based on mkfvs is given by U U x 2 U A Gm Gm O x t x x 2 U x The dissipation matrix is given by x Gm Gm 2 U x Am Am 2 D BASIC THEORY OF MKFVS … Dissipation Analysis : The numerical kinematic viscosity is given by num x max D 2 • Here D are the eigenvalues of the matrix D • For large values of the eigenvalues D 0 BASIC THEORY OF MKFVS … Max of the matrix D for increase in NUMERICAL RESULTS 1D inviscid test cases: • Convergent Divergent nozzle problem • Shock tube problem 2D inviscid test cases: • Subsonic flow past Williams airfoil • Transonic flow past NACA 0012 airfoil • Supersonic flow past NACA 0012 airfoil NUMERICAL RESULTS … Convergent – divergent nozzle NUMERICAL RESULTS … Convergent – divergent nozzle test case: • Governing equations are quasi-one-dimensional • Steady flow • Number of grid points : 60 • Computations are performed with e |v| NUMERICAL RESULTS … Non-dimensional pressure along the nozzle using e |v| Non-dimensional value / along the nozzle using NUMERICAL RESULTS … Variation of density along the shock tube. No. of points = 500 NUMERICAL RESULTS … Non-dimensional value / along the shock tube NUMERICAL RESULTS … Variation of density for higher values of NUMERICAL RESULTS … Role of in numerical simulations: • Increase of • enhances accuracy has been used to suppress wiggles NUMERICAL RESULTS … Features of 2D cell centred FVM solver based on m-KFVS • m-KFVS fluxes for flux evaluation • modified kinetic wall and outer boundary conditions • Local time stepping • LUSGS for convergence acceleration NUMERICAL RESULTS … Subsonic flow past Williams airfoil M = 0.15 aoa = 0.0 Grid points = 50000 NUMERICAL RESULTS … KFVS Entropy contours of m-KFVS method are compared with KFVS and q-KFVS q-KFVS m-KFVS NUMERICAL RESULTS … KFVS Pressure contours of m-KFVS method are compared with KFVS and q-KFVS q-KFVS m-KFVS NUMERICAL RESULTS … Cp – distribution: kfvs, m-kfvs and exact Main airfoil Flap NUMERICAL RESULTS … Transonic flow past NACA 0012 airfoil M = 0.85 aoa = 1.0 320x120 structured grid NUMERICAL RESULTS … KFVS Pressure contours of m-KFVS method are compared with KFVS and q-KFVS q-KFVS m-KFVS NUMERICAL RESULTS … Cp-Plot of m-KFVS are compared with KFVS and q-KFVS NUMERICAL RESULTS … Pressure distribution on unstructured grid Cp-Plot of m-KFVS are compared with KFVS and q-KFVS NUMERICAL RESULTS … Supersonic flow past NACA 0012 airfoil M = 1.2, aoa = 0.0 320x120 structured grid NUMERICAL RESULTS … KFVS Pressure contours of m-KFVS method are compared with KFVS and q-KFVS q-KFVS m-KFVS NUMERICAL RESULTS … Comments on m-KFVS: • It gives results as accurate as second order accurate q-KFVS • It does not have spurious wiggles near shock, which are present in q-KFVS OPTIMAL CONTROL OF DISSIPATION • Consider the 2D subsonic flow past NACA 0012 airfoil • Accurate capture of suction peak depends on numerical entropy generated by the scheme • The low dissipative m-KFVS method captures the suction peak more accurately compared to KFVS • Further, by optimal control of dissipation parameter , we can get even better accuracy Optimisation Problem : Cost function = I U Sum of squares of entropy at cells Min I U OPTIMAL CONTROL OF DISSIPATION Discrete adjoint approach Minimise: The cost function I The discrete form of the cost function is given by N I U si 2 i 1 p / i where si change in entropy = ln p / U - Vector of conserved variables - Dissipation control variables vector N - Number of cells in the computational domain OPTIMAL CONTROL OF DISSIPATION Subject to: The governing state equations G1 G 2 R U , 0 x y Where G1 and G2 are the fluxes along coordinate directions Few observations: • The cost function doesn’t explicitly depend on • It depends on through its dependence on solution U • The number of design variables = N = Number of cells OPTIMAL CONTROL OF DISSIPATION The first variation in the cost function is given by I I U U N 4 I I l Ui i l i i 1 l 1 U i I 4 I l Ui l i 1 l 1 U i N The first variation in the state equation is given by R R R U 0 U OPTIMAL CONTROL OF DISSIPATION At any cell i the first variation is given by Ri R U i ,U j , i , j 0, j nbhd i nbhd i Ri Ri Ri Ri Ui i U j j 0 U i i j j 1 U j The above equation can be written in expanded notation l Ri Ri m Ri Ui i m i m 1 U i 4 nbhd i j 1 l l l 4 R l R m i i U j j 0, l 1 to 4 and m j m 1 U j i 1 to N OPTIMAL CONTROL OF DISSIPATION Introducing the vector of adjoint variables, V and using the state equation as a constraint N I I ViT Ri i 1 N 4 4 I l l l U V R i i i l U i 1 l 1 i i 1 l 1 N Collecting all the terms which are coefficients of U i and equating them to zero we get the adjoint euqtion for cell i R * T i nbhd i R j R I T T i Vi Vj 0, i 1...N U i U i U i j 1 where R* i is the adjoint residual for the cell i T OPTIMAL CONTROL OF DISSIPATION Further expanding R * l i m R j I Ri m l Vi l l U U U j 1 m 1 i i i m1 i 1 to N and T 4 m T nbhd i 4 T m Vj 0 l 1 to 4 Introducing a pseudo time stepping Vi * l Ai R , i 1 to N and l 1 to 4 i t l We have used TAPENADE to compute the gradients I R and V U U T OPTIMAL CONTROL OF DISSIPATION The adjoint variables are then substituted in the equation for cost function variation nbhd i R Ri T i I Vi i j i 1 j 1 j i nbhd i l l N 4 R R l i i Vi i j i 1 l 1 j 1 j i GT N Again TAPENADE is used to compute the gradient R OPTIMAL CONTROL OF DISSIPATION One of the early and simplest methods is steepest descent method in which G, 0 Using the above method the cost function will decrease since I G G G 0 for 0 T 2 Now better methods are available. We have here used the above steepest descent method as a first step The values of can be updated using i n1 i n Gi , >0 and i 1...N A NUMERICAL TEST CASE Comments on the m-KFVS-AD solver • Non-linear m-KFVS solver written in C++ • m-KFVS-AD solver written in FORTRAN 77 • TAPENADE is used to get the subroutines, which are used to compute the gradients in the AD solver A NUMERICAL TEST CASE Subsonic flow past NACA 0012 Airfoil • M = 0.63, aoa = 2.0o • Unstructured grid with 4733 points • Non-linear solver – 2D cell centred FVM based on m-KFVS A NUMERICAL TEST CASE Entropy contours of adjoint based m-KFVS solver is compared with KFVS Scheme Max. entropy KFVS 0.03129 m-KFVS-AD 0.00306 A NUMERICAL TEST CASE Surface pressure distribution A NUMERICAL TEST CASE Cost function variation w.r.to optimisation cycles A NUMERICAL TEST CASE Alpha contours after 35 design cycles A NUMERICAL TEST CASE Alpha contours near the leading edge A NUMERICAL TEST CASE Alpha contours near the suction peak A NUMERICAL TEST CASE Alpha contours near the trailing edge CONCLUSIONS • The m-KFVS method has dissipation control function which can be suitably chosen to reduce numerical dissipation or to reduce numerical entropy generated • The eigenvalues of dissipation matrix D can be made vanishingly small by increasing • Near the discontinuities plays the role of a limiter • m-KFVS code can be combined with adjoint method to obtain optimal control vector for minimal entropy and hence maximum accuracy of numerical solution Thank You