19
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.

Code verification and mesh uncertainty

  • Upload
    azure

  • View
    26

  • Download
    0

Embed Size (px)

DESCRIPTION

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 Simple tests (symmetry, conservation, Gallilean invariance) - PowerPoint PPT Presentation

Citation preview

PowerPoint Presentation

Code verification and mesh uncertaintyThe 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) includeSimple tests (symmetry, conservation, Gallilean invariance)Code to code comparisons.Discretization error quantification.Convergence tests.Order of accuracy tests.We will focus on 3,4 and 5 using a 2002 paper on comparing CFD simulations to published test results.

Truncation and discretization errorsIn 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 isThe truncation error decreases as the square of the time interval.The discretization error is the error in the final distance h(tf) However, it decreases approximately linearly with the time interval. Why?

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 hcoarse and hfine

If we know the errors (from an exact solution) we can solve for p.

Richardson extrapolationWhen we do not know what the error is, we can use Richardson extrapolation to estimate what our solution will be with an infinitely fine discretizationNow we need f values from three values of h to estimate p and f0Unfortunately, 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.

Top hat questionFor 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 orderf0=11, p=1.5f0=10.5, p=1f0=11, p=1f0=11.2, p=1.5AIAA 2002-5531OBSERVATIONS ON CFD SIMULATION UNCERTAINTIESSerhat Hosder, Bernard Grossman, William H. Mason, and Layne T. WatsonVirginia Polytechnic Institute and State University Blacksburg, VA

Raphael T. HaftkaUniversity of FloridaGainesville, FL

9th AIAA/ISSMO Symposium on Multidisciplinary Analysis and Optimization4-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.

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #Introduction Computational fluid dynamics (CFD) as an aero/hydrodynamic analysis and design toolCFD being used increasingly in multidisciplinary design and optimization (MDO) problemsDifferent levels of fidelity from linear potential solvers to RANS codesCFD results have an associated uncertainty, originating from different sourcesSources and magnitudes of the uncertainty important to assess the accuracy of the results

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

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #Objective of the PaperFinding 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 channelcomplex fluid dynamics problemaffordable for making multiple runs

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #

Transonic Diffuser Problem

Pe/P0iPe/P0iStrong shock case (Pe/P0i=0.72)Weak shock case (Pe/P0i=0.82)Separation bubble experimentCFDContour variable: velocity magnitudestreamlines

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #Uncertainty Sources (following Oberkampf and Blottner)

Physical Modeling UncertaintyPDEs 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 ErrorIterative Convergence ErrorProgramming Errors We show that uncertainties from different sources interact

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #Computational ModelingGeneral Aerodynamic Simulation Program (GASP)A commercial, Reynolds-averaged, 3-D, finite volume Navier-Stokes (N-S) codeHas 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 3rd order accurate Roe-Flux scheme Flux-limiters: Min-Mod and Van AlbadaTurbulence models (typical for turbulent flows) Spalart-Allmaras (Sp-Al)k- (Wilcox, 1998 version) with Sarkars compressibility correction

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #Grids Used in the Computations

Grid levelMesh Size (number of cells)140 x 25280 x 503160 x 1004320 x 2005640 x 400A single solution on grid 5 requires approximately 1170 hours of total node CPU time on a SGI Origin2000 with six processors (10000 cycles)

y/ht

Grid 2Grid 2 is the typical grid level used in CFD applications

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #Nozzle efficiencyNozzle efficiency (neff ), a global indicator of CFD results:

H0i : Total enthalpy at the inletHe : Enthalpy at the exitHes : Exit enthalpy at the state that would be reached by isentropic expansion to the actual pressure at the exit

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #Uncertainty in Nozzle Efficiency

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #the total variation in nozzle efficiency10%4%the discretization error6% (Sp-Al)3.5% (Sp-Al)the relative uncertainty due to the selection of turbulence model9% (grid 4)2% (grid 2)Uncertainty in Nozzle EfficiencyStrong ShockWeak ShockMaximum value of

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #Discretization Error by Richardsons Extrapolation

Turbulence modelPe/P0iestimate of p (observed order of accuracy)estimate of (neff)exactGrid levelDiscretization error (%)Sp-Al0.72(strong shock)1.3220.71950114.29826.79032.71641.086Sp-Al0.82(weak shock)1.5780.81086

18.00523.53931.18540.397k- 0.82(weak shock)1.6560.8288914.43221.45230.46140.146order of the method a measure of grid spacing grid level error coefficient

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #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 certainAs 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 convergenceDiscretization error magnitudes are different for different turbulence models. The magnitudes of numerical errors are affected by the physical models chosen.

AIAA 2002-55319th AIAA/ISSMO Symposium on MAO, 09/05/2002, Atlanta, GA #DiscussionWhat 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?