PetroCalcHub

Engineering lesson

Mesh convergence and residuals in an annular CFD calculation

A small nonlinear residual shows that a discrete system was solved. Mesh convergence asks whether a quantity of interest approaches a stable value as spatial resolution improves. These checks address different errors.

By PetroCalcHub Team · Updated October 24, 2026 · Free to read and use

Separate algebraic and discretization error

A coarse mesh can have a tiny residual and a biased flow rate. Refining the mesh changes the approximation space, while tightening solver tolerance changes how accurately that discrete problem is solved.

The example uses an explicitly manufactured convergence table to teach the distinction. It is not labelled as measured runtime results from the site's CFD engine.

Compare a defined quantity of interest

Choose flow rate, wall stress or pressure gradient and keep boundary conditions, rheology and geometry fixed. Report both absolute values and changes under refinement.

The linked annular CFD workflow includes its documented mixed formulation and verification diagnostics. Its internal checks are not a user-selectable mesh-refinement study.

Use independent verification where possible

Analytical limiting cases, manufactured solutions and conservation checks can reveal errors that successive-mesh agreement alone misses.

A mesh-independent answer to an inappropriate physical model is still inappropriate. Numerical verification and physical validation remain separate tasks.

Explore the example

Original manufactured convergence exercise with an explicitly known limit. No CFD runtime result or measured convergence order is claimed.

16

Select one of 5 recorded scenarios. Intermediate states are not interpolated.

Selected scenario

Resolution count n = 16. Quantity of interest Qh: 1.00390625; Discrete residual: 1e-10; Relative error (%): 0.390625.

Selected result00.5311.0643464Scenario input
  • Quantity of interest Qh
  • Discrete residual
Quantity of interest Qh versus Resolution count n. Green marks the selected row. Lines connect recorded points for orientation; exact solved values are tabulated below.

Worked example

Manufactured refinement sequence with a known limit

Teaching quantity Qh = 1 + h², exact limit Q = 1, h = 1/n. Every manufactured discrete residual is 10⁻¹⁰.

Relation and unit basis

Qh = 1 + 1/n²; relative error = (Qh − 1)/1

n is a nominal resolution count. This table is manufactured, not a recorded annular CFD mesh study.

  1. 1. Define the baseline

    Resolution count n = 16

    Teaching quantity Qh = 1 + h², exact limit Q = 1, h = 1/n. Every manufactured discrete residual is 10⁻¹⁰.

  2. 2. Select the relation

    Qh = 1 + 1/n²; relative error = (Qh − 1)/1

    n is a nominal resolution count. This table is manufactured, not a recorded annular CFD mesh study.

  3. 3. Substitute the values

    At n = 16: Qh = 1 + 1/256 = 1.00390625; error = 0.390625%; residual remains 10⁻¹⁰

    Retain intermediate precision. The displayed values are rounded only after evaluation.

  4. 4. Read the result

    Quantity of interest Qh = 1.00390625; Discrete residual = 1e-10; Relative error (%) = 0.390625

    Identical small residuals coexist with different discretization errors, exposing the distinction between the two checks.

Result and interpretation

Quantity of interest Qh = 1.00390625; Discrete residual = 1e-10; Relative error (%) = 0.390625

Identical small residuals coexist with different discretization errors, exposing the distinction between the two checks.

The transparent manufactured sequence has a known limiting value and deliberately tiny residuals at every resolution.

Exact scenario data

Original manufactured convergence exercise with an explicitly known limit. No CFD runtime result or measured convergence order is claimed.

Exact recorded values for Manufactured refinement sequence with a known limit. Units are included in the headers.
Resolution count nQuantity of interest QhDiscrete residualRelative error (%)
41.06251.0000e-106.25
81.0156251.0000e-101.5625
161.0039061.0000e-100.390625
321.0009771.0000e-100.09765625
641.0002441.0000e-100.02441406

Scroll the table to see all columns. The highlighted row is the worked baseline. Downloads retain full numerical precision.

Test your understanding

Work through the question before revealing its answer. Use the stated assumptions and include units in every numerical step.

  1. 1. Does a residual of 10⁻¹⁰ prove mesh independence?

    Show the worked answer

    No. It measures the discrete solve, not the spatial approximation error.

  2. 2. Reproduce the baseline Quantity of interest Qh without rounding intermediate values.

    Show the worked answer

    At n = 16: Qh = 1 + 1/256 = 1.00390625; error = 0.390625%; residual remains 10⁻¹⁰. Quantity of interest Qh = 1.00390625. Identical small residuals coexist with different discretization errors, exposing the distinction between the two checks.

  3. 3. Compare the first and last recorded scenarios. Which input changes?

    Show the worked answer

    Resolution count n changes from 4 to 64. Other controls remain as stated in the premise. Quantity of interest Qh changes from 1.0625 to 1.00024414.

  4. 4. What would be needed to apply this example to a different physical system?

    Show the worked answer

    Replace the synthetic controls with compatible documented inputs and check the relation's assumptions. n is a nominal resolution count. This table is manufactured, not a recorded annular CFD mesh study. Identical small residuals coexist with different discretization errors, exposing the distinction between the two checks.

Before using the result

  • Fix the quantity of interest.
  • Keep physical inputs unchanged across meshes.
  • Separate residual, refinement and physical validation.

Identical small residuals coexist with different discretization errors, exposing the distinction between the two checks.

Continue in the calculator with your documented inputs →

Continue learning

Start with the broader workflow guide

Sources and method

The explanation and synthetic examples are original PetroCalcHub teaching material. The references below support the definitions and model context. They do not supply field validation for the synthetic scenarios.

Report a correction · Read the calculation review method