V&V Home
Archive
Tutorial
## Examining Spatial (Grid) Convergence## Introduction The examination of the spatial convergence of a simulation
is a straight-forward method for
determining the As the grid is refined (grid cells become smaller and the number of cells in the flow domain increase) and the time step is refined (reduced) the spatial and temporal discretization errors, respectively, should asymptotically approaches zero, excluding computer round-off error. Methods for examining the spatial and temporal convergence of CFD simulations are presented in the book by Roache. They are based on use of Richardson's extrapolation. A summary of the method is presented here. A general discussion of errors in CFD computations is available for background. We will mostly likely want to determine the error band for the engineering quantities obtained from the finest grid solution. However, if the CFD simulations are part of a design study that may require tens or hundreds of simulations, we may want to use one of the coarser grids. Thus we may also want to be able to determine the error on the coarser grid. ## Grid Considerations for a Grid Convergence Study The easiest approach for generating the series of grids is to
generate a grid with what one would consider
where The WIND code has a grid sequencing control that will solve the solution on the coarser grid without having to change the grid input file, boundary condition settings, or the input data file. Further, the converged solution on the coarser grid then can be used directly as the initial solution on the finer grid. This option was originally used to speed up convergence of solutions; however, can be used effectively for a grid convergence study. It is not necessary to halve the number of grid points in each
coordinate direction to obtain the coarser grid. ## Order of Grid ConvergenceThe order of grid convergence involves the behavior of the solution error defined as the difference between the discrete solution and the exact solution, where A CFD code uses a numerical algorithm that will provide a
Neglecting higher-order terms and taking the logarithm of both sides of the above equation results in: The order of convergence A more direct evaluation of The ## Asymptotic Range of Convergence Assessing the accuracy of code and caluculations requires that the grid
is sufficiently refined such that the solution is in the asymptotic
range of convergence. The asymptotic range of convergence is obtained
when the grid spacing is such that the various grid spacings
Another check of the asymptotic range will be discussed in the section on the grid convergence index. ## Richardson ExtrapolationRichardson extrapolation is a method for obtaining a higher-order estimate of the continuum value (value at zero grid spacing) from a series of lower-order discrete values. A simulation will yield a quantity
where g, and _{2}g
are independent of the grid spacing. The quantity _{3}f is
considered "second-order" if g. The
_{1} = 0.0f is the continuum value at zero grid spacing._{h=0} If one assumes a second-order solution and has computed h with
_{2}h being the finer (smaller) spacing, then one can
write two equations for the above expansion, neglect third-order and
higher terms, and solve for _{1}f to estimate the
continuum value,_{h=0}where the grid refinement ratio is:
The Richardson extrapolation can be generalized for a Traditionally, Richardson extrapolation has been used with grid
refinement ratios of In theory, the above equations for the Richardson extrapolation will
provide a fourth-order estimate of f and _{1}f
were computed using exactly second-order methods. Otherwise, it will
be a third-order estimate. In general, we will consider _{2}f
to be _{h=0}p+1 order accurate. Richardson extrapolation can be applied
for the solution at each grid point, or to solution functionals, such
as pressure recovery or drag. This assumes that the solution is
globally second-order in addition to locally second-order and that the
solution functionals were computed using consistent second-order
methods. Other cautions with using Richardson extrapolation
(non-conservative, amplification of round-off error, etc...) are
discussed in the book by Roache. For our purposes we will assume f
in the limit as the grid spacing goes to zero. One use of
f is to report the value as the an improved estimate of
_{h=0}f from the CFD study; however, one has to understand the caveats
mentioned above that go along with that value. _{1} The other use of f obtained from the CFD. This use
will now be examined. The difference between f is one error estimator;
however, this requires consideration of the caveats attached to
_{h=0}f._{h=0} We will focus on using f
to obtain an error estimate.
Examining the generalized Richardson extrapolation equation above, the
second term on the right-hand side
can be considered to be an an error estimator of _{2}f.
The equation can be expressed as:_{1}
where
and f defined as:_{1}where the relative error is defined as: This quantity should not be used as an error estimator since
it does not take into account The estimated fractional error ordered error estimator and a good approximation of the
discretization error on the fine grid if f and
_{1}f were obtained with good accuracy (i.e.
_{2}E). The value of _{1}<1E may be
meaningless if _{1}f and _{1}f are zero
or very small relative to _{h=0}f. If such
is the case, then another normalizing value should be used in place of
_{2}-f_{1}f._{1} If a large number of CFD computations are to be performed (i.e for
a DOE study), one may wish to use the coarser grid with
The estimated fractional error for Richardson extrapolation is based on a Taylor series representation as indicated in Eqn. \ref{eq:series}. If there are shocks and other discontinuities present, the Richardson extrapolation is invalid in the region of the discontinuity. It is still felt that it applies to solution functionals computed from the entire flow field. ## Grid Convergence Index (GCI) Roache suggests a grid
convergence index A consistent numerical analysis will provide a result which approaches the actual result as the grid resolution approaches zero. Thus, the discretized equations will approach the solution of the actual equations. One significant issue in numerical computations is what level of grid resolution is appropriate. This is a function of the flow conditions, type of analysis, geometry, and other variables. One is often left to start with a grid resolution and then conduct a series of grid refinements to assess the effect of grid resolution. This is known as a grid refinement study. One must recognize the distinction between a numerical result which approaches an asymptotic numerical value and one which approaches the true solution. It is hoped that as the grid is refined and resolution improves that the computed solution will not change much and approach an asymptotic value (i.e. the true numerical solution). There still may be error between this asymptotic value and the true physical solution to the equations. Roache has provided a methodology
for the uniform reporting of grid refinement studies. "The basic idea
is to approximately relate the results from any grid refinement test to
the expected results from a grid doubling using a second-order method.
The The The where F for comparisons of two grids and
_{s}=3.0F for comparisons over three or more grids.
The higher factor of safety is recommended for reporting purposes and
is quite conservative of the actual errors._{s}=1.25 When a design or analysis activity will involve many CFD simulations
(i.e. DOE study), one may want to use the coarser grid GCI for
the coarser grid is defined as: It is important that each grid level yield solutions that are in the
asymptotic range of convergence for the computed solution. This can be
checked by observing two
## Required Grid ResolutionIf a desired accuracy level is known and results from the grid resolution study are available, one can then estimate the grid resolution required to obtain the desired level of accuracy, ## Independent Coordinate Refinement and Mixed Order Methods The grid refinement ratio assumes that the refinement ratio
## Effective Grid Refinement RatioIf one generates a finer or coarser grid and is unsure of the value of grid refinement ratio to use, one can compute an effective grid refinement ratio as: where ## Example Grid Convergence Study The following example demonstrates the application of the above
procedures in conducting a grid convergence study. The objective of
the CFD analysis was to determine the pressure recovery for an inlet.
The flow field is computed on three grids, each with twice the number
of grid points in the
The figure below shows the plot of pressure recoveries with varying grid spacings. As the grid spacing reduces, the pressure recoveries approach an asymptotic zero-grid spacing value. We determine the order of convergence observed from these results,
The theoretical order of convergence is We now can apply Richardson extrapolation using the two finest grids to obtain an estimate of the value of the pressure recovery at zero grid spacing,
= 0.97050 + 0.00080 = 0.97130 This value is also plotted on the figure below. The grid convergence index for the fine grid solution can now be computed.
A factor of safety of p. The GCI for grids 1
and 2 is:
The
We can now check that the solutions were in the asymptotic range of convergence,
which is approximately one and indicates that the solutions are well within the asymptotic range of convergence. Based on this study we could say that the pressure recovery for the
supersonic ramp is estimated to be ## VERIFY: A Fortran program to Perform Calculations Associated with a Grid Convergence StudyThe Fortran 90 program verify.f90 was written to carry out the calculations associated with a grid convergence study involving 3 or more grids. The program is compiled on a unix system through the commands:
It reads in an ASCII file (prD.do) through the
standard input unit (5) that contains a list of pairs of grid size and
value of the observed quantity
It assumes the values from the finest grid are listed first. The output is then written to the standard output unit (6) prD.out. The output from the of {\tt verify} for the results of Appendix A are: --- VERIFY: Performs verification calculations --- Number of data sets read = 3 Grid Size Quantity 1.000000 0.970500 2.000000 0.968540 4.000000 0.961780 Order of convergence using first three finest grid and assuming constant grid refinement (Eqn. 5.10.6.1) Order of Convergence, p = 1.78618479 Richardson Extrapolation: Use above order of convergence and first and second finest grids (Eqn. 5.4.1) Estimate to zero grid value, f_exact = 0.971300304 Grid Convergence Index on fine grids. Uses p from above. Factor of Safety = 1.25 Grid Refinement Step Ratio, r GCI(%) 1 2 2.000000 0.103080 2 3 2.000000 0.356244 Checking for asymptotic range using Eqn. 5.10.5.2. A ratio of 1.0 indicates asymptotic range. Grid Range Ratio 12 23 0.997980 --- End of VERIFY --- ## Examples of Grid Converence Studies in the ArchiveA grid convergence study is performed in the Supersonic Wedge case.## Examples of Grid Converence Studies in LiteratureOther examples of grid convergence studies that use the procedures outlined above can be found in the book by Roache and the paper by Steffen et al.. ## NPARC Alliance Policy with Respect to Grid Converence StudiesFor the WIND verification and validation effort, it is suggested that the above procedures be used when conducting and reporting results from a grid convergence study. Last Updated: Thursday, 17-Jul-2008 09:46:07 EDT |