Error Estimation — Theory and Variables
Error estimation is available in the Adaption and Error Estimation section of the Stationary, Eigenfrequency, and Frequency Domain study step types.
Theory Background
A common approach to adaptive finite elements is to use the dual weighted residual method (DWR). The method is based on a posteriori error estimates for a functional together with some adaptive approach for the mesh in space and time. The framework was originally developed in Ref. 1 and Ref. 2. For stationary problems or problems cast in a Galerkin formulation, the starting point is the exact error representation
(20-1)
where J is a (linear) functional and the primal approximate solution is defined by a variational formulation
and the exact dual solution z by
For simplicity, nonlinearity has been omitted. For nonlinear functionals and for nonlinear variational formulations, the dominating part of the error can be estimated by approximating the above (dual) weighted residual. In those cases, the dual is computed for problems obtained by linearizing around the primal solution. The error representation is often taken to a local form by using integration by parts. This is straightforward when the equation form is strong but is not applicable for physics implemented using the weak form. Instead, the error estimation algorithm uses a method that can estimate the residual for the weak form directly. It works through assembling the algebraic residual for the current solution mapped to a higher-order finite-element representation. The method introduces an extension mapping from the current finite-element space to a higher-order finite-element space. Instead of the strong form variant, it uses
where the residual is computed by standard finite element method assembling (using numerical quadrature) for the higher-order finite-element space. This residual is then used to compute a normalized element-wise norm for each equation (here defined by the fields and their components). This technique is the same as when using mesh adaptation (see The Adaptive Mesh Refinement Solver). Also for the error estimation, the method separates the error contribution from different equations:
where j is an equation index, and where the equations are defined from the field components.
(20-2)
where is the estimated maximum norm of the residual for the equation j and mesh element K. Furthermore,
(20-3)
where is the estimated maximum norm of the error for the dual solution to equation j and mesh element K. Since the exact dual solution is often not known, the weight function − πhz must be approximated by some method. For Lagrange basis functions, the method uses the polynomial-preserving recovery technique (built-in through the ppr operator) to estimate the dual solution and thereby the error
(20-4)
where xl are a number of coordinates in the mesh element K. These coordinates are a union of Lagrange points and Gauss points. For non-Lagrange basis functions, the polynomial-preserving recovery (PPR) technique is not supported, and the method uses a less accurate method based on the dual solution gradient and the following estimate of the dual solution error:
(20-5)
Accuracy
Ideally, since the error representation (Equation 20-1) is exact, the error estimate above has the potential of being very accurate. The method is not fail-safe, however. For example, the underlying PDE problem needs to be well-posed and its solution sufficiently regular. Sufficiently regular means that not only is the solution bounded in some norm, but also a number of derivatives need to be bounded in some norm. Well-posedness for the dual problem and sufficient regularity for the dual solution are also required.
Furthermore, the following guidelines should be kept in mind when using the estimates:
The error estimate described here is the truncation error (also sometimes called the Galerkin error for the finite element method). It does not take into account:
-
The quadrature error made by using numerical methods to approximate the finite element integrals.
-
The geometrical approximation error made by representing the actual geometry by a polynomial representation (which is a sort of integration error for elements adjacent to or on a curved boundary).
-
The algebraic error obtained by terminating the solvers prematurely (or by using a sloppy tolerance).
In most situations, however, the Galerkin error is the dominating error in a finite element calculation.
Due to the independent maximum norms used for the dual error and the residual within each mesh element, the error estimate is normally an upper bound. When the error is very localized (to only a few elements) — for example, when a field value in a point is used as the functional — the discrepancy between the actual error and the estimated error tends to be larger than for cases where the error is less localized. For cases when the ppr method can be used, a rule-of-thumb is that the error estimate is accurate within a factor five when the error is not so localized and one order of magnitude larger when the error is very localized. When the gradient-based dual error estimation is used, the discrepancy can be much larger. This difference in accuracy occurs because this estimate does not have the correct asymptotic behavior (the correct convergence rate when the mesh size is diminished). A warning is given when the gradient method is used for a dependent variable.
Error Variables and Error Evaluation
The residual and dual weights (Equation 20-2 and Equation 20-3) for a component comp1.u are stored in dependent variables called comp1.res.u and comp1.dualw.u, respectively. The error variable is defined as the product of these and is accessible as comp1.err.u. These variables are accessible for plotting under Plot Group>Expression and then, for example, Component 1>Solid Mechanics>Error estimation>err.u - Error estimate u. For a sum of all error estimates for all components, use Model>Error_estimation>stat.errtot - Total error estimate - Stationary.
You can access the residual and dual weights directly through the dependent variable names. For a Stationary study step called stat (similarly for a Frequency Domain study step), the total global error summed over all mesh elements is stat.errEst, and the error contribution from a variable comp1.q is comp1.stat.errEst.q. The error contribution from comp1.q can be evaluated under Results>Derived Values by adding a Global Evaluation node, and then under Expression selecting Global Definitions>Error estimation>stat.errEst - Error estimate global - Stationary. The error contribution from comp1.q can be evaluated by selecting Component1>Global Definitions>Error estimation>stat.errEst.q - Error estimate q.
References for Error Estimation
1. R. Becker and R. Rannacher, “An optimal control approach to a posteriori error estimation in finite element methods”, Acta Numerica, pp. 1–102, vol. 10, 2001.
2. K. Eriksson, D. Estep, P. Hansbo, and C. Johnsson, “Introduction to adaptive methods for differential equations”, Acta Numerica, pp. 105–158, 1995.