Tools › Numerical Methods › Code Verification › Grid Convergence (GCI) › Method

Grid Convergence (GCI): Method

Open the free Grid Convergence Index (GCI) Calculator

Grid Convergence: Observed Order, Richardson Extrapolation and the Grid Convergence Index

The tool takes the value of one quantity (a drag coefficient, a peak stress, a pressure recovery) computed on two to eight grids or meshes of different fineness. It reports how fast the value is settling as the grid is refined, the value the sequence points to at zero spacing, and an uncertainty band on the grid values. It states numerical uncertainty estimates under the method's assumptions; it does not validate a model.

The idea

A numerical solution carries an error that shrinks as the grid spacing h shrinks. Once the grid is fine enough, the error of a method of order p behaves like a constant times hp: halve the spacing of a second-order method and the error falls to a quarter. Three grids give three equations for the three unknowns of that model (the value at zero spacing, the constant and the order), so the order can be observed from the results instead of being taken on trust, and the value at zero spacing can be estimated. The grid convergence index (GCI) turns the estimated error into a band with a factor of safety, so that studies made with different refinement ratios and orders can be reported in the same way.

The same square region on a coarse, a medium and a fine grid; the refinement ratio r is the spacing of one grid over the spacing of the next finer one, or the D-th root of the ratio of the cell counts

The equations

Grids are numbered from the finest: 1 fine, 2 medium, 3 coarse, with spacings h1 < h2 < h3 and values f1, f2, f3.

Refinement ratio. r21 = h2 / h1 and r32 = h3 / h2. If you enter cell, element or node counts N, the spacing is taken as N−1/D, so r21 = (N1 / N2)1/D, where D is the number of directions in which the grid was refined (the effective refinement ratio of the NASA page).

Kind of convergence. With the changes ε21 = f2 − f1 and ε32 = f3 − f2, the convergence ratio is R = ε21 / ε32. For a constant refinement ratio, 0 < R < 1 is monotonic convergence, R < 0 oscillatory convergence and R > 1 divergence (ITTC procedure 7.5-03-01-01). For unequal ratios the tool places the limit between convergence and divergence where the order becomes zero, R = ln r21 / ln r32, which is 1 when the ratios are equal.

Observed order. Writing f = fh=0 + C hp on each grid and subtracting,

ε32 / ε21 = r21p (r32p − 1) / (r21p − 1)

For a constant ratio r this gives the closed form on the NASA page, p = ln(ε32 / ε21) / ln(r). For unequal ratios the tool solves the same equation by repeating p = [ln(ε32 / ε21) + ln((r21p − 1) / (r32p − 1))] / ln r21 until p stops changing, and lists the steps; if the repetition does not settle it solves by bisection and says so.

Richardson extrapolation. fh=0 = f1 + (f1 − f2) / (r21p − 1). For p = 2 and r = 2 this is the familiar (4 f1 − f2) / 3.

Grid convergence index. GCI12 = Fs |ε21 / f1| / (r21p − 1) for the fine grid, and GCI23 = Fs |ε32 / f2| / (r32p − 1) for the medium grid from the coarser pair. The coarse-grid form, GCI12 r21p, gives the index of the medium grid from the finer pair. Without the factor of safety the index is the estimated fractional error of the grid value. The NASA page, following Roache, gives Fs = 1.25 when three or more grids were used to observe the order and Fs = 3 for a comparison of two grids at an assumed order; the tool applies those unless you enter your own. The band is also printed in the units of the value, Fs |ε21| / (r21p − 1), which stays meaningful when the value itself is near zero.

Asymptotic-range ratio. GCI23 / (r21p GCI12), which is 1 when both pairs of grids follow the same power law.

Spacing for a target index (Advanced). Because the index is proportional to hp, h* / h1 = (GCI* / GCI12)1/p. The NASA page writes the same relation from the medium grid.

More than three grids. Every consecutive triplet is analyzed and tabulated; the headline figures use the three finest grids.

On the example printed on the NASA Glenn page (pressure recovery 0.97050, 0.96854 and 0.96178 on spacings 1, 2 and 4) the tool returns the page's figures: order 1.786, extrapolated value 0.97130, indices 0.103 % and 0.356 %, ratio 1.002.

What it assumes

  • Each run has been iterated to convergence (and refined in time step, if unsteady), so that the differences between grids are discretization error and not solver residual. The NASA page gives a minimum refinement ratio of 1.1 for the same reason; the tool notes a smaller one.
  • The grids are refined in the same way everywhere (the same ratio in every direction, the same stretching and quality), so that one number h describes each grid.
  • The solution is smooth enough for a power-law error, and the grids are fine enough that one power dominates (the asymptotic range).
  • The quantity is not close to zero if the percentage form of the index is used.

When it misleads

  • The asymptotic ratio is nearly always close to 1. When the order is observed from the same three grids, the ratio equals |f1 / f2| exactly, whatever the grids are (substitute the equation for p into the two indices). It therefore shows that the fine and medium values are close, not that the order has settled. The tool prints this identity beside the ratio. Better signs of the asymptotic range are an observed order near the formal order, and the same order from each triplet when four or more grids are available.
  • An observed order far above the formal order (two changes that happen to be very different in size) gives a tiny index. The Advanced option "Observed, not above the formal order" shows what the index is with the order held at the formal value.
  • Oscillatory results can pass for monotonic ones. Three points taken from a wavy sequence can fall in a rising or falling run; the ITTC procedure notes this. A fourth grid helps.
  • Different quantities converge at different rates. An index computed for a force says little about a peak stress or a heat flux from the same grids. Enter each quantity of interest.
  • Shocks, contact, singular corners and limiters lower the order locally; a peak stress at a sharp re-entrant corner does not converge at all, however fine the mesh.
  • A small index is a statement about the grid, not about the model: turbulence models, boundary conditions and material data are outside it.

Common mistakes

  • Reporting the plain percentage change between two grids as the error. It ignores r and p: a refinement ratio close to 1 makes any change look small.
  • Using the ratio of cell counts as r. In three dimensions doubling the count refines the spacing by only 21/3 = 1.26.
  • Numbering the grids from the coarsest. Here grid 1 is the finest; the tool sorts the rows itself.
  • Entering rounded values. The order comes from the ratio of two small differences: a value rounded to three figures can change the order by a large amount.
  • Using Fs = 1.25 with two grids and an assumed order.
  • Taking the extrapolated value as exact. It is one order more accurate than the grid values only if the assumptions hold.

Related tools

This tool adds an error estimate for results that come from a grid: ODE and Nonlinear Equation Solver integrates an equation at a step size you choose, and its results at three step sizes can be entered here; Uncertainty Propagation carries input uncertainties through a formula, to which the numerical band found here can be added as one more term; Regression and Curve Fitting fits a power law by least squares when there are many grids and scatter.

Open the free Grid Convergence Index (GCI) Calculator