338
11. Efficiency and Accuracy Improvement
programming which may pass the tests associated with estimation of iteration
and discretization errors.
One should first analyze the approximations used in the discretization
to determine the order of convergence of solutions towards a grid (or time
step) independent solution. This is the lowest-order truncation error in the
significant terms in the equations (but note that not all terms are equally
important - their importance depends on the problem). In some cases approximations of lower order may be used at a boundary than in the interior
without reducing the overall order. An example is the use of one-sided firstorder approximations a t boundaries while second-order central differences are
used in the interior; the overall convergence is second order. However, this
may not be true if low-order approximations are used with Neumann-type
boundary conditions.
Iteration errors should be analyzed next; as a first step, one should make
a calculation in which iterations are continued until their level is reduced
to the double-precision round-off level (this requires at least 12 orders of
magnitude reduction of the residual). A test case, which has a known steady
solution, must be selected. Otherwise, iterations may stop converging a t some
stage because iterations can be interpreted as pseudo-time steps and the
natural instability of the flow may not allow a steady solution. An example
is the case of flow around a circular cylinder around Reynolds-number 50.
Once an accurate solution is available, one can compare it with solutions
a t intermediate stages, thus evaluating the iteration error. The error can be
compared with estimates, or their reduction can be related t o the reduction of
the residual or the difference between successive iterates, as discussed above.
This should help to establish convergence criteria (both for inner iterations,
i.e. for linear equation solver, and for outer iterations, i.e. solution of the
non-linear equations).
Discretization errors should be analyzed by comparing solutions on a sequence of systematically refined grids and time steps. Systematic refinement
is easy for structured or block-structured grids: one creates e.g. three grids
of different sizes. For unstructured grids, this task is not as straight-forward,
but one can create grids with similar distributions of relative grid sizes but
different absolute sizes. Systematic refinement is crucial in regions of high
truncation errors, which act as sources of discretization errors, which are
both convected and diffused in the same way as the dependent variables
themselves. As a rule of thumb, the grid must be fine and systematically refined where the second and higher-order derivatives of the solution are large.
This is typically near walls and in shear layers and wakes.
Solutions with sufficiently small iteration errors should be obtained on
at least three grids and compared; both the order of convergence and the
discretization error can be estimated in this way if the grids are fine enough so
that monotonic convergence prevails. If this is not the case, further refinement
is necessary. If the computed order is not the expected one, errors have been
Précédent

- 348/431

Suivant