Presentation is loading. Please wait.

Presentation is loading. Please wait.

Code verification and mesh uncertainty The goal is to verify that a computer code produces the right solution to the mathematical model underlying it.

Similar presentations


Presentation on theme: "Code verification and mesh uncertainty The goal is to verify that a computer code produces the right solution to the mathematical model underlying it."— Presentation transcript:

1

2 Code verification and mesh uncertainty The goal is to verify that a computer code produces the right solution to the mathematical model underlying it. Tests detailed by Oberkampf and Roy (Section 5.1) include 1.Simple tests (symmetry, conservation, Gallilean invariance) 2.Code to code comparisons. 3.Discretization error quantification. 4.Convergence tests. 5.Order of accuracy tests. We will focus on 3,4 and 5 using a 2002 paper on comparing CFD simulations to published test results.

3 Truncation and discretization errors In Taylor series the truncation error is estimated by the last term. We have used this in the integration of the paper helicopter fall velocity to get the distance travelled For a given time increment, the truncation error is The truncation error decreases as the square of the time interval. The discretization error is the error in the final distance h(t f ) However, it decreases approximately linearly with the time interval. Why?

4 Order of accuracy Order of accuracy p is the power in the relationship between discretization error and interval size h For simple problems like integration of the paper helicopter distance we can estimate the order of accuracy analytically. For most complex problems we have to estimate it from different meshes, say h coarse and h fine If we know the errors (from an exact solution) we can solve for p.

5 Richardson extrapolation When we do not know what the error is, we can use Richardson extrapolation to estimate what our solution will be with an infinitely fine discretization Now we need f values from three values of h to estimate p and f 0 Unfortunately, the result is exact as h goes to zero, but you often cannot get near enough. In addition there is noise when fine meshes change boundaries compared to coarse mesh. So it is popular to reduce h by a factor of 2.

6 Top hat question For 4 meshes with h=1,0.5,0.25, and 0.125, the results were, 20, 14.5, 12.5, 11.7. Estimate the converged value and the order f0=11, p=1.5 f0=10.5, p=1 f0=11, p=1 f0=11.2, p=1.5

7 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 6 AIAA 2002-5531 OBSERVATIONS ON CFD SIMULATION UNCERTAINTIES Serhat Hosder, Bernard Grossman, William H. Mason, and Layne T. Watson Virginia Polytechnic Institute and State University Blacksburg, VA Raphael T. Haftka University of Florida Gainesville, FL 9 th AIAA/ISSMO Symposium on Multidisciplinary Analysis and Optimization 4-6 September 2002 Atlanta, GA Hosder, S. Grossman, B., Haftka, R. T., Mason, W. H., and Watson, L. T. (2006), “Quantitative Relative Comparison of CFD Simulation Uncertainties for a Transonic Diffuser,” Computers and Fluids, 35 (10), 1444-1458, December.

8 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 7 Introduction Computational fluid dynamics (CFD) as an aero/hydrodynamic analysis and design tool CFD being used increasingly in multidisciplinary design and optimization (MDO) problems Different levels of fidelity from linear potential solvers to RANS codes CFD results have an associated uncertainty, originating from different sources Sources and magnitudes of the uncertainty important to assess the accuracy of the results

9 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 8 Drag polar results from 1 st AIAA Drag Prediction Workshop (Hemsch, 2001)

10 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 9 Objective of the Paper Finding the magnitude of CFD simulation uncertainties that a well informed user may encounter and analyzing their sources We study 2-D, turbulent, transonic flow in a converging-diverging channel complex fluid dynamics problem affordable for making multiple runs

11 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 10 Transonic Diffuser Problem Pe/P0i Strong shock case (Pe/P0i=0.72) Weak shock case (Pe/P0i=0.82) Separation bubble experiment CFD Contour variable: velocity magnitude streamlines

12 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 11 Uncertainty Sources (following Oberkampf and Blottner) Physical Modeling Uncertainty PDEs describing the flow Euler, Thin-Layer N-S, Full N-S, etc. boundary conditions and initial conditions geometry representation auxiliary physical models turbulence models, thermodynamic models, etc. Discretization Error Iterative Convergence Error Programming Errors We show that uncertainties from different sources interact

13 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 12 Computational Modeling General Aerodynamic Simulation Program (GASP) A commercial, Reynolds-averaged, 3-D, finite volume Navier-Stokes (N-S) code Has different solution and modeling options. An informed CFD user still “ uncertain ” about which one to choose For inviscid fluxes (most commonly used options in CFD) Upwind-biased 3 rd order accurate Roe-Flux scheme Flux-limiters: Min-Mod and Van Albada Turbulence models (typical for turbulent flows) Spalart-Allmaras (Sp-Al) k-  (Wilcox, 1998 version) with Sarkar’s compressibility correction

14 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 13 Grids Used in the Computations Grid levelMesh Size (number of cells) 140 x 25 280 x 50 3160 x 100 4320 x 200 5640 x 400 A single solution on grid 5 requires approximately 1170 hours of total node CPU time on a SGI Origin2000 with six processors (10000 cycles) y/h t Grid 2 Grid 2 is the typical grid level used in CFD applications

15 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 14 Nozzle efficiency Nozzle efficiency (n eff ), a global indicator of CFD results: H 0i : Total enthalpy at the inlet H e : Enthalpy at the exit H es : Exit enthalpy at the state that would be reached by isentropic expansion to the actual pressure at the exit

16 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 15 Uncertainty in Nozzle Efficiency

17 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 16 the total variation in nozzle efficiency10%4% the discretization error 6% (Sp-Al) 3.5% (Sp-Al) the relative uncertainty due to the selection of turbulence model 9% (grid 4) 2% (grid 2) Uncertainty in Nozzle Efficiency Strong Shock Weak Shock Maximum value of

18 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 17 Discretization Error by Richardson’s Extrapolation Turbulence model Pe/P0iestimate of p (observed order of accuracy) estimate of (n eff ) exact Grid level Discretization error (%) Sp-Al 0.72 (strong shock) 1.3220.71950 114.298 26.790 32.716 41.086 Sp-Al 0.82 (weak shock) 1.5780.81086 18.005 23.539 31.185 40.397 k-  0.82 (weak shock) 1.6560.82889 14.432 21.452 30.461 40.146 order of the method a measure of grid spacing grid level error coefficient

19 AIAA 2002-5531 9 th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA 18 Major Observations on the Discretization Errors Grid convergence is not achieved with grid levels that have moderate mesh sizes. For the strong shock case, even with the finest mesh level we can afford, asymptotic convergence is not certain As a consequence of above result, it is difficult to separate physical modeling uncertainties from numerical errors Shock-induced flow separation, thus the flow structure, has a significant effect on grid convergence Discretization error magnitudes are different for different turbulence models. The magnitudes of numerical errors are affected by the physical models chosen.

20 Discussion What are the key ingredients of the Richardson extrapolation? Why do we get non-integer orders? Why do we reduce mesh sizes by factors of 2?


Download ppt "Code verification and mesh uncertainty The goal is to verify that a computer code produces the right solution to the mathematical model underlying it."

Similar presentations


Ads by Google