Adaptive Mesh Refinement
Theory: refine only where error is large
Overview
Stress at the inside corner of an L-shaped part won't converge, even when I refine everything.
An inside corner is, ideally, a singularity where stress becomes infinite. The solution changes sharply nearby, so refining everything uniformly leaves most of the error sitting near the corner. Adaptive meshing estimates per-element error from the solution, refines only the worst elements and re-solves, repeatedly — reducing overall error efficiently without a huge element count. But remember: the stress at the singularity itself never converges, however fine you go.
Error indicator and refinement rule
The energy-norm error is split into element contributions $\eta_K$, and elements at or above $\theta$ times the maximum (0.5 in the example) are split. Real analyses lack an exact solution, so $\eta_K$ is estimated from residuals or stress-smoothing differences.
Convergence rate
When the gradient diverges at a point, as for $x^{2/3}$, uniform refinement reduces error only with the 1/6 power of element size. Adaptive refinement recovers the element-count−¹ rate of smooth problems.
The idea of estimating error
Estimating the error of a finite element solution without knowing the exact solution traces back to Babuška and Rheinboldt's residual-based estimate in 1978. In 1987 Zienkiewicz and Zhu published a practical method estimating error from the difference with smoothed stresses, adopted in many commercial codes. Being able to estimate error made adaptive methods that refine the mesh automatically possible.
Worked example: a 1D problem with a divergent gradient
A problem on (0, 1) with solution $u = x^{2/3}$ (the same singularity strength as near a re-entrant corner) was solved with linear elements. In 1D nodal values are exact, so energy-norm error can be computed element by element precisely:
| Uniform refinement | Relative energy error |
|---|---|
| 10 elements | 34.2% |
| 100 elements | 23.3% |
| 1,000 elements | 15.9% |
| 10,000 elements | 10.8% |
| 100,000 elements | 7.4% |
| Adaptive refinement | Elements needed | Smallest element |
|---|---|---|
| 20% error | 11 | 2.0×10⁻³ |
| 10% error | 18 | 1.5×10⁻⁵ |
| 5% error | 35 | 3.7×10⁻⁹ |
| 1% error | 169 | 8.9×10⁻¹⁶ |
Uniform refinement gives 7.4% at 100,000 elements, yet adaptive reaches 5% with 35!
Because nearly all the error gathers in a few elements next to the singularity. Uniform refinement spends huge numbers of elements where error is already small; extrapolating, reaching 5% uniformly would need about a million. But look at the right column: for 1% accuracy, the element next to the singularity reached 10⁻¹⁵, near the limit of machine precision. Real structures have a small fillet at the corner, so it's more realistic to model the fillet and refine down to its size.
Analysis workflow
- Decide the quantity of interest (peak stress, displacement, reaction) and choose a matching error measure.
- Solve on a coarse mesh and inspect the error distribution to locate problems.
- Set the refinement fraction (e.g. at least half the maximum) and a floor on element size, then iterate.
- Confirm values at singularities don't converge; evaluate away from them or with the real fillet modelled.
- Finally confirm the quantity of interest no longer changes with refinement.
“Auto-refinement never finished”
With adaptive meshing enabled, a stress analysis kept refining past millions of elements without finishing. The cause was a load concentrated on a single node. A point load is a singularity with infinite stress, so the error indicator never drops. Distributing the load over the real contact area let refinement settle within a few cycles. Adaptive meshing also honestly points out artificial singularities in your model.
Common mistakes
Mistakes and fixes
| Mistake | Effect | Fix |
|---|---|---|
| Trying to converge stress at a singularity | Refinement never ends | Model fillets or evaluate away |
| Point loads or point constraints | Artificial singularities | Distribute over areas |
| No floor on element size | Element count explodes | Set a floor |
| Indicator mismatched to goal | Target quantity doesn't improve | Goal-oriented indicator |
| Judging convergence by uniform refinement only | Slow convergence misread | Compare with adaptive |
I'd like to learn related topics.
Try convergence order with the Richardson extrapolation tool. Related pages include h-refinement, p-refinement, singularities and meshing, Richardson extrapolation, three-grid GCI and mesh quality metrics.
Related Topics
Experience the theory firsthand with the interactive simulator for this field
All Simulators