# Mesh and Time Step Sensitivity Studies

### Assignment :

Go to the ANGEL web site and complete Reading Assignment 1.  Come prepared to discuss what you've read.
Start HW5

Most rigorous studies to quantify error associated with the selected mesh or time step sizes are based on Richardson Extrapolation.  This started as a means of improving the accuracy of numerical solutions to differential equations, but also can be used as a basis for estimating errors associated with selection of the mesh and time step size.  Without understanding these errors, speculation on the quality of various physical models associated with a reactor safety code is on shaky ground.  If your mesh is reasonably fine, and you know the order of accuracy of your method, you can use Richardson Extrapolation and results from two different grids (or two different time steps) to say something about the error.  If you don't know the methods accuracy, or don't have confidence that your mesh is fine enough, you need a study with at least three different spatial divisions (or time step sizes).

Mesh and time step sensitivity studies lead to an estimate of error associated with discretization, and are also important in procedures used to detect software errors.  Roache and Oberkampf  have good discussions of this error analysis.  It basically boils down to fitting a curve to a sequence of results and extrapolating beyond those results to estimate the limiting answer with zero mesh length or time step.  Consider a sequence of three mesh lengths or time step sizes (from smallest to largest) h1, h2, and h3.  Normally the sequence is generated with a constant refinement ratio:

r= h3/ h2 =  h2/h1.

Let f1, f2, and f3  be the computed results at the same point in space and time for the three corresponding values of h.  Taking a clue from truncation error analysis, we look for an expression for f as a function of h in the form:

f(h) = fexact + a hp

hence,

subtracting the equations in pairs gives

hence

Note that if the scaling ratio r is constant not constant (h3/h2 is not equal to h2/h1), we can solve for p, but it is much more difficult.  Also notice that if values of f are not monotonic, the formula won’t work.  Although it is possible to have non-monotonic convergence, you will need results on more than three grids (or time steps) to convince me of any error estimate in such situations.

Given a value of p, equations for the two finest meshes can be solved for the remaining unknowns.

As a result the error on the finest mesh can be estimated as:

Note that if you have faith in the value of p obtained from a Taylor series truncation error analysis, you can use this expression with results from just two meshes to give an error estimate.  However, this is a dangerous approach.  With just two meshes (or time step sizes) you can’t always be certain that your spacing is small enough that higher order terms in the Taylor expansion are insignificant.

These formulas for error and order of accuracy are relatively easy to implement for time step sensitivity and finite difference mesh sensitivity studies where the refined grids contain the points evaluated on the coarser grids.  However, for finite volume, if I double the number of volumes, the volume centers don’t match between two levels of refinement.  Since f1 and f2 must be compared at the same points in space and time interpolation is required on one of the grids.  Be careful that your interpolation is sufficiently accurate that the calculated value of p tells you about the order of accuracy of your finite volume approximation rather than the order of accuracy of your interpolator.

Roache notes that the above equation is not always a reliable bound on error.  He recommends multiplying any such error estimate by a “Factor of Safety” (Fs).  Values of this factor would range from a high of 3 for a two mesh study to a low of 1.25 for a three mesh study confirming convergence of the mesh.  Use of 3 corresponds to replacement of an error estimate for a second order method with one for a first order method.  Roache also recommends reporting of error in terms of a Grid Convergence Index (GCI):

### Some References:

Roache, P.J., “Verification and Validation in Computational Science and Engineering,” Hermosa Publishers, pp. 403-412, 1998.

Oberkampf, W. L. and Trucano, T. G., “Verification and validation in Computational Fluid Dynamics, Sandia National Laboratory Report SAND2002-059, 2002.

# Back to List of Lectures / Home

Maintained by John Mahaffy : jhm@psu.edu