Computing Library › Numerical Methods
Numerical Methods

Convergence and Error Analysis

Convergence studies confirm that a numerical solution approaches the true one as resolution increases, and measure the rate at which it does.

Does the method actually work?

A numerical method is only trustworthy if its solution approaches the exact one as the grid is refined or the step is shrunk. Convergence analysis establishes this and quantifies the order: the power of the mesh size h (or step) at which the error decreases. A second-order method's error falls by four when h halves.

Consistency plus stability

Kronos motion — which application

The Lax equivalence theorem captures the central principle for linear problems: a consistent scheme (whose truncation error vanishes as h goes to zero) converges if and only if it is stable (errors do not amplify unboundedly). Neither property alone suffices; convergence is their combination. This unifies the analysis of finite-difference and related methods.

Measuring order in practice

When the exact solution is known, one solves on a sequence of refined meshes and fits the error to C h^p to estimate p. When it is unknown, comparing successive refinements or using a highly resolved reference gives the observed order. A manufactured solution, constructed so a known source makes it exact, is a rigorous way to verify code order.

python
import numpy as np
def observed_order(hs, errs):
    hs, errs = np.array(hs), np.array(errs)
    return np.polyfit(np.log(hs), np.log(errs), 1)[0]  # slope = order

Verification versus validation

Verification asks whether the equations are solved correctly (a code and numerics question); validation asks whether the equations describe reality (a physics and experiment question). Convergence studies are the heart of verification. Reporting a result without a grid-convergence study leaves its numerical error unknown.

Grid-convergence and manufactured-solution verification are standard practice for building confidence in the breeder Hyperion simulation codes before their results inform design.