Abstract
In the context of discontinuous Galerkin spectral element methods (DGSEM), \(\tau \)-estimation has been successfully used for p-adaptation algorithms. This method estimates the truncation error of representations with different polynomial orders using the solution on a reference mesh of relatively high order. In this paper, we present a novel anisotropic truncation error estimator derived from the \(\tau \)-estimation procedure for the traditional DGSEM. We exploit the tensor product basis properties of the numerical solution to design a method where the total truncation error is calculated as a sum of its directional components. We show that the new error estimator is cheaper to evaluate than previous implementations of the \(\tau \)-estimation procedure and that it obtains more accurate extrapolations of the truncation error for representations of a higher order than the reference mesh. The robustness of the method allows performing the p-adaptation strategy with coarser reference solutions, thus further reducing the computational cost. The proposed estimator is validated using the method of manufactured solutions in a test case for the compressible Navier–Stokes equations.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
High-order discontinuous Galerkin (DG) methods are becoming a popular alternative to low-order methods for solving partial differential equations (PDEs) because of their high accuracy and flexibility [8, 48]. Among those, the traditional discontinuous Galerkin spectral element method (DGSEM) [21, 23] is a nodal (collocation) version of the DG method on hexahedral meshes which allows p-anisotropic representations and has been used in a wide range of applications [9, 13, 23, 27, 35]. In the DG approach, the continuity constraint on element interfaces is relaxed, allowing for discontinuities in the numerical solution. This feature makes them more robust than continuous methods for describing advection-dominated problems, like the ones usually encountered in fluid dynamics. Moreover, DG methods can handle non-conforming meshes with hanging nodes and/or different polynomial orders efficiently, as is necessary for mesh adaptation strategies [12, 23, 37].
Error estimates are a powerful tool in computational sciences as they quantify how accurately a numerical solution satisfies the governing mathematical equations [28, 38, 40]. A precise assessment of the numerical errors is useful for defect correction (a technique that enables high accuracy by correcting the numerical solution using an estimation of the error [24, 38]), or for guiding mesh adaptation strategies [25, 26, 49]. The former requires highly accurate estimates of the discretization error and, therefore, a significant amount of computational resources is usually invested in computing them [32]. The latter has been broadly studied in the literature. In particular, the most common approaches are the adjoint-based adaptation [10, 16, 17, 34, 47], where the numerical error of a functional (e.g. lift or drag) is estimated, which involves a high computational cost; the feature-based adaptation, which relies on on easy-to-compute adaptation criteria, such as the assessment of jumps across element interfaces in the case of DG discretizations [36], or the identication of large gradients [1, 29]; and the local-error-based adaptation [3, 14, 19, 20, 25, 26, 44, 45], which depends on the assessment of any measurable local error in all the cells of the domain. A detailed comparison of the different approaches for error estimation and adaptation can be found in [14] in the context of finite volumes or [20] for high-order DG schemes. The local-error-based adaptation methods are interesting since, in contrast to feature-based methods, they provide a way to predict and control the overall accuracy, and are computationally cheaper than adjoint-based schemes [19, 20]. The topic of our work is the development of an accurate and cheap local error estimator to drive p-anisotropic adaptation in the DGSEM.
Two different errors are particularly relevant. On the one hand, the discretization error is the most important, but also the most difficult error to estimate [32]. It is defined as the difference between the exact and numerical solutions to the problem and can be approximated by means of solving the discretization error transport equation (DETE) [27], an auxiliary PDE whose approximation involves the investment of further computational resources. Some of the first works using estimations of the local discretization error in high-order methods were proposed by Mavriplis [25, 26], who developed hp-adaptation techniques for the spectral element method, and Casoni et al. [11], who used a similar approach to evaluate where to add artificial viscosity for shock capturing in discontinuous Galerkin discretizations.
On the other hand, the truncation error is defined as the difference between the discrete partial differential operator and the exact partial differential operator,
and is usually evaluated for the exact solution of the PDE [19, 20, 32, 42]. The truncation error is related to the discretization error through the DETE [40], where it acts as a local source term. This relation makes it useful as an indicator for mesh adaptation methods [7, 44] since refining the mesh where the truncation error is high reduces the discretization error in all the mesh [42], with an additional advantage: the truncation error estimation requires less computational effort. Furthermore, in hyperbolic problems the discretization error is strongly advected, i.e. it is transmitted downstream from under-resolution areas, but the truncation error is only weakly advected. Therefore, an adaptation procedure based on the truncation error targets specifically the under-resolved areas, whereas one based on the discretization error targets the under-resolved areas and the zones downstream of them [42, 43]. This makes the truncation error more suitable for adaptation purposes than the discretization error. Finally, it has been shown that controlling the truncation error targets the numerical accuracy of all functionals at once [19], ensuring that adapting a mesh using the truncation error leads necessarily to an error decrease in any other functional (e.g. lift or drag). For all these reasons, we focus on truncation error estimators in this paper.
From a practical point of view, the truncation error can be estimated using a hierarchy of meshes. On the one hand, Venditti and Darmofal [47] and Phillips et al. [30, 33] studied the possibility of estimating the truncation error by evaluating a coarse grid solution in the partial differential operator of a fine grid, an approach known as the coarse-to-fine approach. On the other hand, the fine-to-coarse approach, also known as the \(\tau \)-estimation method, was introduced by Brandt [5] and consists in estimating the local truncation error by using a fine grid solution interpolated to the coarse grid. Phillips [31] showed that the fine-to-coarse (\(\tau \)-estimation) method produces more accurate results than the coarse-to-fine approach and, therefore, it is the one retained in this work.
The \(\tau \)-estimation approach has been successfully used for adaptation purposes in low-order finite difference [3] and finite volume schemes [14, 44, 45]. Moreover, Rubio et al. extended it to high-order methods using a continuous Chebyshev collocation method [41] and later the DGSEM [42]. In that work, they studied the quasi-a priori truncation error estimation, which allows estimating the truncation error without having fully converged fine solutions, and introduced the concept of isolated truncation error (valid only for DG formulations), which only considers inner elemental contributions to the error and neglects the upwind contributions. More recently, Kompenhans et al. [19] applied these estimators to perform p-anisotropic adaptation for the Euler and Navier–Stokes equations, and compared \(\tau \)-based to featured based adaption, showing better performance for the former [20]. The adaptation strategy consisted in converging a high order representation (reference mesh) to a specified global residual and then performing a single error estimation followed by a corresponding p-adaptation process. Even though their methodology is very promising, we will show that it produces a large underestimation of the error for polynomial orders that are higher than the ones in the original reference mesh. This fact makes necessary to compute the initial solution in a very refined reference mesh to avoid inaccuracies.
In this paper, we extend the work on high-order \(\tau \)-estimators by Rubio et al. [41,42,43], and formulate a new anisotropic truncation error estimator that exploits the tensor product basis expansion of the traditional DGSEM. The new error estimator is shown to be suitable for performing anisotropic p-adaptation, and to have two main advantages over existing truncation error estimators; first, that it requires fewer operations to estimate the truncation error of all possible combinations of polynomial orders; and second, that it yields more accurate estimations of the truncation error for representations of a higher order than the reference mesh. This feature allows using reference meshes of a lower polynomial order, hence reducing the computational cost. We also analyze the properties of the traditional non-isolated truncation error and the isolated truncation error. To the authors’ knowledge, this is the first time that a high-order truncation error estimator based on the \(\tau \)-estimation method is formulated in an anisotropic/decoupled way, analyzed and tested.
The paper is organized as follows. In Sect. 2, we present the mathematical background. First, the DGSEM is briefly summarized; then, we detail the existing techniques for approximating the truncation error of isotropic and anisotropic representations using the \(\tau \)-estimation method. In Sect. 3, the proposed anisotropic \(\tau \)-estimator is introduced and analyzed. In Sect. 4, we present a validation of the assumptions needed for formulating the new approach and study the properties of the proposed method by means of a manufactured solutions test case of the compressible Navier–Stokes equations. Finally, the conclusions are summarized in Sect. 5.
2 Mathematical Background
In Sect. 2.1, we describe briefly the DGSEM approach. Section 2.2 contains the error definitions that will be used throughout the paper and provides an insight into the convergence properties of the different error measures. In Sect. 2.3, we review the \(\tau \)-estimation method for DGSEM schemes, and then we explain in Sect. 2.4 how it has been used in the literature for obtaining anisotropic error extrapolations.
2.1 The Discontinuous Galerkin Spectral Element Method (DGSEM)
We consider the approximation of systems of conservation laws,
where \({\mathbf {q}}\) is the vector of conserved variables, \({\mathscr {F}}\) is the flux dyadic tensor which depends on \({\mathbf {q}}\), and \({\mathbf {s}}\) is a source term. This system represents, among others, the compressible Navier–Stokes equations, as detailed in “Appendix C”. Multiplying Eq. 2 by a test function \({\mathbf {v}}\) and integrating by parts over the domain \({\varOmega }\) yields the weak formulation:
where \({\mathbf {n}}\) is the normal unit vector on the boundary \(\partial {\varOmega }\). Let the domain \({\varOmega }\) be approximated by a tessellation \({\mathscr {T}} = \lbrace e \rbrace \), a combination of K finite elements e of domain \({\varOmega }^e\) and boundary \(\partial {\varOmega }^e\). Moreover, let \({\mathbf {q}}\), \({\mathbf {s}}\), \({\mathscr {F}}\) and \({\mathbf {v}}\) be approximated by piece-wise polynomial functions (that are continuous in each element) defined in the space of \(L^2\) functions
where \({\mathscr {P}}^N({\varOmega }^e)\) is the space of polynomials of degree at most N defined in the domain of the element e. We remark that the functions in \({\mathscr {V}}^N\) may be discontinuous at element interfaces and that the polynomial order N may be different from element to element. Equation 3 can then be rewritten for each element as:
where the superindex “e”’ refers to the functions as evaluated inside the element e, i.e. \({{\mathbf {q}}^e}^N = {{\mathbf {q}}^N}|_{{\varOmega }^e}\); whereas the superindex “−” refers to the value of the functions on the external side of the interface \(\partial {\varOmega }^e\). The numerical flux function, \({{\mathscr {F}}^*}\), allows to uniquely define the flux at the element interfaces and to weakly prescribe the boundary data as a function of the conserved variable on both sides of the boundary/interface (\({{\mathbf {q}}^{e}}^N\) and \({{\mathbf {q}}^{-}}^N\)) and the normal vector (\({\mathbf {n}}\)). Multiple choices for the numerical flux functions can be found in the literature [46]. In the present work, we use Roe [39] as the advective Riemann solver and Bassi–Rebay 1 [2] as the diffusive Riemann solver. We remark that the numerical flux must be computed in a specific manner when the representation is non-conforming [23].
Since \({\mathbf {q}}^N\), \({\mathbf {s}}^N\), \({\mathbf {v}}^N\) and \({\mathscr {F}}^N\) belong to the polynomial space \({\mathscr {V}}^N\), it is possible to express them inside every element as a linear combination of basis functions \(\phi _n \in {\mathscr {P}}^N({\varOmega }^e)\),
Therefore, Eq. 5 can be expressed in a discrete form as
where \({\mathbf {Q}}^e=({\mathbf {Q}}^e_1, {\mathbf {Q}}^e_2, \ldots , {\mathbf {Q}}^e_n, \ldots )^T\) is the local solution that contains the coefficients of the linear combination for the element e; \({\mathbf {Q}}=({\mathbf {Q}}^1,{\mathbf {Q}}^2, \ldots , {\mathbf {Q}}^K)^T\) is the global solution that contains the information of all elements; \([{\mathbf {M}}]^e\) is known as the elemental mass matrix, and \({\mathbf {F}}^e(\cdot )\) is a nonlinear spatial discrete operator on the element level:
Note that the operator \({\mathbf {F}}^e\) is applied on the global solution, since it is the responsible for connecting the elements of the mesh (weakly). Assembling the contributions of all elements into the global system we obtain:
In the traditional DGSEM [21], the tesselation is performed with non-overlapping hexahedral elements of order \(N=(N_1,N_2,N_3)\) (independent in every direction) and the integrals are evaluated numerically by means of a Gaussian quadrature that is also of order \(N=(N_1,N_2,N_3)\). For complex geometries, it is most convenient to perform the numerical integration in a reference element and transform the results to the physical space by means of a high-order mapping of order \(M=(M_1,M_2,M_3)\):
where the order of \({x}^e_i\) is at most \(N_i^e\) (subparametric or at most isoparametric mapping). The differential operators can be expressed in the reference element in terms of the covariant (\({\mathbf {a}}_i\)) and contravariant (\({\mathbf {a}}^i\)) metric tensors:
Under these mappings, the gradient and divergence operators become:
where the Jacobian of the transformation can be expressed in terms of the covariant metric tensor:
For details on how to compute the metric terms for 2D and 3D geometries, see [22]. Botti [4] showed that the reference-to-physical mapping deteriorates the convergence rate of a DG representation and suggested the use of physical frame complete polynomial expansion basis functions. However, we retain the reference-to-physical high-order mapping of the traditional DGSEM since the method exposed in this paper exploits that the polynomial basis functions (\(\phi _n\) in Eq. 6) are tensor product reconstructions of Lagrange interpolating polynomials on quadrature points in each of the Cartesian directions of the reference element:
Therefore, \({\mathbf {Q}}_n={\mathbf {Q}}_{i,j,k}\) are simply the nodal values of the solution, and \([{\mathbf {M}}]\) is a diagonal matrix containing the quadrature weights and the mapping terms. In the present work, we make use of the Legendre–Gauss quadrature points [21].
2.2 Definition of Errors
In this section, we define some measures of the error that will be used throughout the paper.
Definition 1
(Interpolation error) The difference between a function and its polynomial interpolant of order N:
where \({\mathbf {I}}^N{\mathbf {q}}\) is the function that can be reconstructed using the polynomial expansion with coefficients \({\mathbf {Q}}_i\) (Eq. 6). For sufficiently smooth functions, in the asymptotic range the interpolation error in an element e behaves as:
where \(C^e_0\) and \(\eta ^e_0\) are constants that depend on the local smoothness of the function \({\mathbf {q}}\) [6, 18] and \(N^e\) is the local polynomial order in the element e. In the DGSEM, the use of tensor-product bases in d dimensions allows decoupling the interpolation error in directional components, each of which depends solely on the polynomial order in the corresponding direction:
As a consequence, in the p-anisotropic DGSEM, the interpolation error exhibits a tensor-product-type error bound in d dimensions inside every element [42],
Definition 2
(Discretization error) The difference between the exact solution to the problem, \(\bar{{\mathbf {q}}}\), and the one obtained with a discretization of order N, \(\bar{{\mathbf {q}}}^N\):
The discretization error in an element is influenced by other elements because of the advection properties of the PDE. In fact, we will decouple the discretization error in locally-generated and externally-generated contributions for every element:
In the p-isotropic DGSEM, it can be assumed that the discretization error in each element behaves as [42, 43]:
where K is the number of elements, \(C^e_{\epsilon }\) and \(\eta ^e_{\epsilon }\) are constants that depend on the smoothness of the solution in the element e [6, 18], and \(C^{*k}_{\epsilon }\) and \(\eta ^{*k}_{\epsilon }\) are constants that depend both on the smoothness of the solution and the advection properties of the PDE. The first term on the right-hand side corresponds to the bound of the locally-generated discretization error (\(\epsilon ^N_{{\varOmega }}\)), whereas the second term is the bound of the externally-generated discretization error (\(\epsilon ^N_{\partial {\varOmega }}\)) which gathers the errors that are introduced through the Riemann solver. Note that \(\varepsilon ^N\) is the minimum possible (lower bound of) \(\epsilon ^N\). For an anisotropic representation in d dimensions, the expression becomes [15, 42, 43]:
Definition 3
(Quadrature error) The quadrature error, also referred to as the numerical integration error, is the difference between the exact integral of a function and its approximation by a Gaussian quadrature:
where the superindex N on the integral indicates that it is approximated using a Gaussian quadrature of order N,
and \(w_j\) are the quadrature weights.
Definition 4
(Non-isolated truncation error) We define the non-isolated truncation error of a discretization of order N as the difference between the discrete partial differential operator of order N and the exact partial differential operator applied to the exact solution:
The exact partial differential operator can be derived from Eq. 2 as
and the discrete partial differential operator is obtained from the analysis of Sect. 2.1 as
Since for steady state, \({\mathcal {R}}(\bar{{\mathbf {q}}})=0\), the non-isolated truncation error yields
Equation 29 is the discretization error transfer equation (DETE [40]), which for linear operators reduces to
Notice that the truncation error acts as a source term for the discretization error. The discrete partial differential operator in discrete (sampled) form is derived from Eq. 10 as
where \(\pmb {{\mathcal {R}}}^N\) contains the sampled values of \({\mathcal {R}}^N\) in all the nodes of the domain and \(\pmb {I}^N\) is a sampling operator. \({\mathcal {R}}^N\) is reconstructed from \(\pmb {{\mathcal {R}}}^N\) element-wise with Eq. 6. The non-isolated truncation error can be then computed inserting Eq. 31 into 26 as
The dependence of the non-isolated truncation error on the discretization error is obtained by using Definition 2 and expanding Eq. 32 as a Taylor series:
Equation 33 is the DETE in discrete form. Taking into account Eqs. 33 and 23, and based on previous numerical results [42, 43], Kompenhans et al. [19] stated that the truncation error in an element is bounded by
This expression was validated experimentally [19, 20]. The first term in Eq. 34 is the bound of the locally-generated truncation error, whereas the second term is the bound of the externally-generated truncation error that enters through the Riemann solver and does not depend on the local polynomial orders. The second term is a consequence of the dependence of the discretization error on the solution in other elements.
Definition 5
(Isolated truncation error) The isolated truncation error is defined as [42]
where \(\mathcal {{\hat{R}}}^N(\cdot )\) is the isolated discrete partial differential operator, which is derived in the same manner as \({\mathcal {R}}^N(\cdot )\), but \({\mathscr {F}}\) is not substituted by \({\mathscr {F}}^*\) during the process (Eq. 5). Therefore, the sampled form of the discrete isolated partial differential operator yields
where the elemental contribution to the nonlinear discrete operator is
This change eliminates the influence of the neighboring elements and boundaries in the truncation error of each element. The dependence of the isolated truncation error on the interpolation error of the fluxes inside an element (\(\varepsilon ^N_{{\mathscr {F}},e}\)) can be expressed as (see “Appendix A” and [42]):
This shows that \({\hat{\tau }}\) indeed depends only on the discrete representation of the numerical solution in the element e. Rubio et al. [42] pointed out that the isolated truncation error might be a better sensor for adaptation algorithms for hyperbolic PDEs than its non-isolated counterpart or the discretization error, since unlike the last two, the first one is not affected by neighbors’ errors. Notice that Eq. 38 resembles the linear DETE (Eq. 30 [40]). In this case, the isolated truncation error acts as a source term for the interpolation error. In consequence, decreasing the isolated truncation error reduces the interpolation error.
Finally, it is important to note that the spectral convergence of the isolated truncation error is similar to the non-isolated truncation error [42, 43] and can be expressed as
Let us remark that, because of the reasons exposed above, in this case there is no externally-generated truncation error. The hat notation will be dropped from now on since, unless explicitly stated, the formulations in this paper are valid for both the non-isolated and the isolated truncation errors.
2.3 \(\tau \)-Estimation Method
Since in general the exact solution to the problem is not available, we are interested in using an estimation for Eqs. 32 and 36. The \(\tau \)-estimation method makes use of an approximate solution on a reference mesh of order \(P>N\) instead of the exact one. The most straightforward methodology is to converge this high-order solution to a low residual near machine round-off, \(\bar{{\mathbf {Q}}}^P\). This is known as the a posteriori approach. In practice, one can also use a non-converged solution, \({{\tilde{\mathbf{Q}}}}^P\). This is known as the quasi-a priori approach. In this paper, we use the following formulation, which is valid for the a posteriori method and the quasi a priori approach without correction:
where \({\mathbf {I}}_P^N\) is an interpolation operator from order P to order N. For compactness, the notation of this work omits the interpolation matrix such that \(\pmb {{\mathcal {R}}}^N\left( {\mathbf {Q}}^P\right) = \pmb {{\mathcal {R}}}^N\left( {\mathbf {I}}_P^N{\mathbf {Q}}^P\right) \). Equation 40 is valid for both the isolated (inserting the hats) and the non-isolated truncation error. Note that the truncation error estimation can be easily performed for anisotropic polynomial representations of d dimensions. For instance, in a 2D anisotropic case, Eq. 40 can be rewritten as:
2.4 Low-Order Extrapolation of the Truncation Error Estimations
In this section, we review the method proposed by Kompenhans et al. [19] to extrapolate the \(\tau \)-estimations of anisotropic representations. This method was successfully used to perform a p-adaptation strategy [19, 20]. We will show that their strategy can be classified as a low-order extrapolation. In order to do so, let us first introduce the concept of truncation error map.
Definition 6
(Truncation error map) The graphical representation of the truncation error behavior inside an element with respect to the polynomial order, i.e. a \((d+1)\)-dimensional plot of \(\log \left|\left|\tau ^N\right|\right|_{\infty }\) as a function of the polynomial order in every direction of the reference element \(N=(N_1,\ldots ,N_d)\), where d is the number of dimensions.
We are interested in generating an approximation to the truncation error map with the \(\tau \)-estimation method (Sect. 2.3). Two regions of the estimated map can be distinguished:
Definition 7
(Inner truncation error map) The portion of the truncation error map that is obtained using the \(\tau \)-estimation method. In other words, if a reference mesh of order P is used for the estimation, the inner truncation error map is the region estimated for \(N_i < P_i\).
Definition 8
(Outer truncation error map) The portion of the truncation error map that is obtained using extrapolations of the inner truncation error map. In the case that a reference mesh of order P is used for the estimation, the outer truncation error map is the region estimated for \(N_i \ge P_i\).
Since the numerical solution on a reference mesh of order P involves the investment of computational resources, it is of interest to have an accurate and efficient way of generating the outer truncation error map.
Because of the spectral convergence of the truncation error in the asymptotic range, the one-dimensional (or isotropic d-dimensional) map turns out to be a discrete scatter plot of points that describe a linear function with a negative slope (the convergence rate \(\eta \)), as shown in Fig. 1a.
Kompenhans et al. [19] used the estimated truncation error map to adapt the polynomial orders of a given mesh using a specified maximum permitted error threshold, \(\tau _{max}\). The method for estimating the map consists of four steps:
-
1.
Generate an inner map for \(N_i<P_i\) using Eq. 41. This requires \(n_{eval}\) evaluations of the discrete partial differential operator \({\mathcal {R}}^N\), where
$$\begin{aligned} n_{eval} = \prod _{i=1}^d (P_i - 1). \end{aligned}$$(42)The estimated points of the inner map are marked as blue triangles in Fig. 1.
-
2.
Use the inner map to look for a combination of polynomial orders that fulfills the specified error threshold. If a combination fulfills \(\tau _{max}\), adapt the polynomial order and exit the adaptation process. Otherwise, additional considerations are required.
-
3.
Compute \(\log ||\tau ^{N_iN_j}||\) and perform a linear regression analysis in the direction i in order to describe the behavior of \(\log \left|\left|\tau \right|\right|_{\infty }\) as a function of \(N_i\) (\(N_j=P_j-1\)). The result of the linear regression is marked with a dashed line in Fig. 1.
-
4.
Use the linear regression to generate part of the outer truncation error map for \(N_i \ge P_i\), and select the value of \(N_1\) and \(N_2\) independently from these extrapolations. The extrapolated values of the truncation error are marked with red squares in Fig. 1. In other words, \(N_1\) and \(N_2\) are selected so that the values of both red squares fall below the specified threshold, \(\tau _{max}\).
This procedure is performed for every element in all the Cartesian directions to adapt the mesh. For further details, refer to the original paper by Kompenhans et al. [19] and to our example in Sect. 4.2.
2.4.1 Analysis of the Low-Order Extrapolation
Two remarks can be made about the described four-step procedure:
Remark 1
Steps 3 and 4 assume that the spectral convergence observed in 1D extends to higher dimensions along iso-\(N_i\) lines of the truncation error map.
Remark 2
For the non-isolated truncation error, the behavior shown in Fig. 1 can only be expected for the locally-generated component (see Eq. 34). This means that the extrapolation procedure may predict unexpected behaviors if the truncation error in neighboring elements is high, i.e., if the \(\tau \)-estimation procedure is not performed element-wise while keeping the polynomial order in other elements sufficientlyFootnote 1 high.
As stated in the Remark 1, the extrapolation procedure assumes that the truncation error decreases exponentially along iso-\(N_i\) lines of the truncation error map. That is the same as saying that the truncation error map is a plane for \(d=2\), and in general that it is a hyperplane of dimension \(d+1\). In Fig. 2 we present an illustration that resembles the hyperplane behavior in two dimensions for perfect spectral convergence. The described methodology consists in constructing d iso-\(N_i\) lines on the hyperplane, which should contain the values of the truncation error for \(N_j=P_j-1 \ \forall \ N_i\) (red line with triangular markers and black line with circular markers in Fig. 2). In that scenario, selecting \(N_i\) independently can be regarded as a conservative criterion, since in the hyperplane we have:
-
In 2D:
$$\begin{aligned} \tau ^{N_1N_2}&\le \tau ^{P_1N_2}, \\ \tau ^{N_1N_2}&\le \tau ^{N_1P_2}. \end{aligned}$$ -
In 3D:
$$\begin{aligned} \tau ^{N_1N_2N_3}&\le \tau ^{P_1N_2N_3}, \\ \tau ^{N_1N_2N_3}&\le \tau ^{N_1P_2N_3}, \\ \tau ^{N_1N_2N_3}&\le \tau ^{N_1N_2P_3}. \end{aligned}$$
for \(N_i \ge P_i\). See Fig. 2.
Hereinafter, the method by Kompenhans et al. shall be referred to as the low-order extrapolation method, since it supposes that the truncation error map (\(\log ||\tau ||\)) has a linear behavior. In light of the analysis in Sect. 3, we will be able to formulate a high order extrapolation method that provides extrapolated estimations with increased accuracy.
3 New Anisotropic Truncation Error Estimation
In this section, we present the new anisotropic truncation error estimator, discuss some of its properties and compare them with the error estimators that have been used in the literature for performing anisotropic p-adaptation. The formulation of this new estimator involved a mathematical proof based on specific assumptions that is detailed in Sect. 3.1. In Sect. 3.2, we analyze the convergence behavior of the anisotropic estimator. In Sect. 3.3, we describe how the new estimator can be used for approximating the truncation error of higher-order representations, and prove that it is superior to existing \(\tau \)-estimators at obtaining these approximations.
3.1 Anisotropic \(\tau \)-Estimation
The anisotropic \(\tau \)-estimator is a generalization of the ideas reviewed in Sect. 2.3 and is based on four assumptions that are explained first. For the sake of readability and without loss of generality, all the mathematical statements in this section are for 2D formulations, where \(N=(N_{\xi },N_{\eta }) = (N_1,N_2)\) are the polynomial orders in the 2 directions of the reference element. However, all the statements and proofs can be directly generalized to d dimensions.
3.1.1 Assumptions
Following assumptions are a consequence of the tensor product basis functions of the DGSEM and hold for sufficiently smooth solutions in the asymptotic range. The assumptions are:
-
(a)
The truncation error has an anisotropic behavior and, therefore, can be decoupled in its directional components:
$$\begin{aligned} \tau ^{N_1N_2} \approx \tau _1^{N_1N_2} + \tau _2^{N_1N_2}. \end{aligned}$$(43)Here, it is important to note that \(\tau _i\) is the projection of the global truncation error, \(\tau \), into the local direction, i.
-
(b)
The locally-generated truncation error in each direction depends only on the polynomial order in that direction:
$$\begin{aligned} \tau _{{\varOmega },i}^{N_1N_2} \approx \tau _{{\varOmega },i}^{N_1N_2}(N_i) \end{aligned}$$(44)
Assumptions (a) and (b) follow from the work of Rubio et al. [42, 43]. Furthermore, assumption (b) relates to the anisotropic spectral convergence behavior of the truncation error (Eqs. 34 and 39).
Proposition 1
For sufficiently smooth solutions, the truncation error of a DGSEM discretization of order \((N_1,N_2)\) can be approximated from a semi-converged solution of order \((P_1,P_2)\), such that \(P_i > N_i\), as the sum of the directional \(\tau \)-estimations obtained by coarsening in the different space dimensions:
Proof
This proof is specific for the isolated truncation error. We refer to “Appendix B” for a brief proof that Proposition 1 also holds for the non-isolated truncation error under additional assumptions.
Let us note that assumptions (a) and (b) are consistent with the dependence of the isolated truncation error on the interpolation error (Eq. 38) and the anisotropic behavior of the latter (Eq. 19).
We start by obtaining the analytical expression for the isolated\(\tau \)-estimation. To that end, we use the same procedure as in “Appendix A”. The estimate of the isolated truncation error in the DGSEM can be expressed for any basis function \(\phi \) in an element e as
In this case, instead of the exact solution to the problem, \(\bar{{\mathbf {q}}}\), we use a solution on a higher order mesh, \(\bar{{\mathbf {q}}}^P\). Therefore, using the definition of interpolation error (Eq. 16) and discretization error (Eq. 20), the flux is
and the source term is
Inserting Eqs. 47 and 48 into 46, and integrating by parts we obtain
Let us note that although the isolated truncation error of an element does not depend on external sources, its approximation by \(\tau \)-estimation is affected by the discretization error of the reference mesh, \(\epsilon ^{P}\). This translates into a weak influence of external (upwind) errors transmitted through the Riemann solver. In the two-dimensional case and coarsening in only one direction [here the direction (1)], Eq. 49 becomes
Now, we rewrite Eq. 50 decoupling the interpolation error in directional components and taking into account that \(\varepsilon _2^{N_1P_2} = \varepsilon _2^{P_1P_2}\) (Eq. 18):
Notice that all terms on the right-hand side, except for the first one and the quadrature error, are of the order of errors on the higher-order mesh. If the solution is smooth, the discretization and interpolation errors on the high order mesh of order P are smaller than the errors on the analyzed mesh N. Therefore, and taking into account that we are coarsening in the direction (1), for sufficiently smooth solutions we can expect the first term on the right-hand side to be the leading term. Simplifying, the directional \({\hat{\tau }}\)-estimation provides
On the other hand, inserting Eq. 18 into 38, the isolated truncation error of a representation of order \(N=(N_1,N_2)\) yields
Notice, again, that the directional components of the interpolation error only depend on the polynomial order in the corresponding direction (Eq. 18). Therefore, neglecting additional quadrature errors, we recover Eq. 45 for the isolated truncation error by combining Eqs. 52 and 53:
\(\square \)
From the previous analysis we can conclude that, when the \(\tau \)-estimation method is performed coarsening only in the direction i, the result is an approximation to the i-directional component of the truncation error, \(\tau _i\). We can also arrive at this conclusion intuitively if we realize that \({\mathbf {Q}}^{P_1P_2}\) cannot be better than \({\mathbf {Q}}^{N_1P_2}\) at describing the solution in the direction (2).
Proposition 1 can be easily generalized to three dimensions to obtain
3.2 Convergence Behavior of the Anisotropic Truncation Error
In this section we analyze the convergence properties of the truncation error map using Proposition 1. Let us first consider the directional components of the truncation error.
Proposition 2
The directional components of the locally-generated truncation error exhibit spectral convergence with respect to the polynomial order in the corresponding direction:
Proof
According to assumption (b) (Eq. 44), each directional component of the locally-generated truncation error, \(\tau _{{\varOmega },i}\), depends solely on the polynomial order in the corresponding direction, \(N_i\). If we insert Eq. 44 into Eq. 39 and analyze the dependencies term by term, we recover 55 for the isolated truncation error. In the same way, if we insert Eq. 44 into 34, we recover 55 for the non-isolated truncation error. \(\square \)
Now, we are able to analyze the convergence behavior along lines of the truncation error map, where a line in d dimensions is defined as:
with \(a_i,b \in \mathbb {R}\).
Proposition 3
The total truncation error does not necessarily decrease exponentially along lines of the truncation error map.
Proof
The corresponding positive statement can be easily proven wrong with a counterexample. Let us consider a 2D anisotropic representation. From Proposition 2, we know that the truncation error of each directional component in an element, \(\tau _i^N\), decreases exponentially when increasing \(N_i\); and that the decreasing rate is \(\eta _i\), a constant that depends on the smoothness of the solution in the direction i. Let us suppose that for a certain element in a mesh, the directional components of the error have the same value for a specific combination of polynomial orders \(({\bar{N}}_1, {\bar{N}}_2)\) in the infinity norm:
Let us analyze the convergence rate along an iso-\(N_i\) line of the truncation error map with constant \(N_1 = {\bar{N}}_1\), i.e. the convergence rate of \(\tau ^{{\bar{N}}_1N_2}\) as a function of \(N_2\). Note that, according to assumption (b), along the line we have
Furthermore, assumption (a) states that the total truncation error along the line of the map is:
Substituting Eq. 58 into 59 and using the triangle inequality yields:
Remember that the truncation error map is defined as the dependence of \(\log \left|\left|\tau ^{N_1N_2}\right|\right|_{\infty }\) on \((N_1,N_2)\) (Definition 6). Therefore, taking logarithms in both sides and rearranging, Eq. 60 can be rewritten in two equivalent forms:
For \(N_2 \ll {\bar{N}}_2\), the second term on the right-hand side of Eq. 61 vanishes, which indicates that the convergence rate of the truncation error along an iso-\(N_i\) line of constant \(N_1 = {\bar{N}}_1\) tends to \(\eta _2\). On the other hand, for \(N_2 \gg {\bar{N}}_2\), the second term on the right-hand side of Eq. 62 vanishes, which implies that the convergence rate along an iso-\(N_i\) line of constant \(N_1 = {\bar{N}}_1\) tends to zero, since the truncation error is bounded by \(\log (C)\), a constant that does not depend on \(N_2\). In other words, the iso-\(N_i\) line on the hyperplane for \(N_1={\bar{N}}_1\) is not a straight line. \(\square \)
3.3 High-Order Extrapolation of the Truncation Error Estimations
In this section, we present a procedure for extrapolating the truncation error estimations (inner map) that can be obtained by applying Proposition 1. Since Proposition 3 rules out the possibility of extrapolating along iso-\(N_i\) lines of the truncation error map, we take advantage of the anisotropic behavior of the truncation error (Eq. 43) and the spectral convergence of its directional components (Proposition 2). The proposed methodology, which is valid for both the isolated and non-isolated truncation error, can be summarized in three steps:
-
1.
Perform anisotropic coarsening to obtain \(\tau _i\) (Proposition 1) and construct the inner truncation error map directly. In d dimensions, this requires only \(n^{new}_{eval}\) evaluations of the discrete partial differential operator \({\mathcal {R}}^N\), where
$$\begin{aligned} n^{new}_{eval} = \sum _{i=1}^d (P_i-1). \end{aligned}$$(63) -
2.
Compute \(\log \left|\left|\tau _i\right|\right|_{\infty }\) and perform a linear regression analysis in the direction i in order to describe the behavior of \(\log \left|\left|\tau _i\right|\right|_{\infty }\) as a function of \(N_i\). This is supported on the proved spectral behavior of the directional components of the truncation error (Proposition 2).
-
3.
Construct the outer truncation error map using Eq. 45 and the extrapolated values of \(\log \left|\left|\tau _i\right|\right|_{\infty }\):
$$\begin{aligned} \log \left|\left|\tau \right|\right|_{\infty } = \log \left|\left|\sum _{i=1}^d \tau _i\right|\right|_{\infty }. \end{aligned}$$(64)
We refer to this methodology as high-order extrapolation since it does not suppose that \(\log \left|\left|\tau \right|\right|_{\infty }\) has a linear behavior. On the contrary, it only supposes (based on the Proposition 2) that \(\log \left|\left|\tau _i\right|\right|_{\infty }\) is linear. An example is provided in Sect. 4.
3.4 Theoretical Comparison of the New Anisotropic \(\tau \)-Estimation with Previous Approaches
Figure 3a illustrates the theoretically predicted behavior of the truncation error map that is obtained with the new anisotropic \(\tau \)-estimation method for a toy problem (only illustrative). As noted in the proof of Proposition 3, along an iso-\(N_i\) line, the truncation error firstly decays exponentially for low \(N_{j \ne i}\) and then tends asymptotically to a constant value for high \(N_{j \ne i}\). As can be seen, contrary to the low-order extrapolation, the new anisotropic \(\tau \)-estimation does not assume that the truncation error map has a linear behavior. That is the reason why it is called high-order extrapolation. Figure 3b shows a comparison of the hyperplane behavior with the one obtained using the new anisotropic \(\tau \)-estimation method. As can be seen, the hyperplane tends to underpredict the truncation error for some combinations of polynomial orders as compared to the new truncation error estimator. A comparison of the output of both estimation methods with the exact truncation error in a test case is provided in Sect. 4.2.
It is noteworthy that even though the method of Kompenhans et al. [19] supposes hyperplane behavior, their strategy of selecting the polynomial order in every direction independently (step 4 of Sect. 2.4) minimizes the error involved in the low-order extrapolation (compare the values of \(\tau \) in Figs. 3a and 2). Furthermore, the authors remark that for \(N_1 \gg N_2\) and \(N_2 \gg N_1\) the new anisotropic estimation tends to have a hyperplane behavior. In fact, Kompenhans et al. [19, Sect. 5.1] state that only the values of the truncation error where \(N_1 \gg N_2\) or \(N_2 \gg N_1\) should be used for the least square fitting. The high-order extrapolation can be seen as a form of bypassing this requirement.
In summary, the main differences between the method of Kompenhans et al. with low-order extrapolation and the new p-anisotropic error estimator with high-order extrapolation are the following:
-
The number of lower-order representations that are needed for generating the inner truncation error map (also, the number of evaluations of the discrete partial differential operator—\({\mathcal {R}}^N\)) in the method of Kompenhans et al. is
$$\begin{aligned} n_{eval} = \prod _{i=1}^d (P_i-1), \end{aligned}$$(65)because the solution on the reference mesh must be injected in every single representation of the inner map; whereas in the new p-anisotropic error estimator it is only
$$\begin{aligned} n_{eval}^{new} = \sum _{i=1}^d (P_i-1), \end{aligned}$$(66)since only some lower-order representations are needed (Eq. 45).
-
The high-order extrapolation method based on the directional components of the truncation error can provide more accurate estimations of the outer truncation error map for smooth solutions than the low-order extrapolation, which supposes hyperplane behavior. The reason is that, while the high-order extrapolation relies on the spectral convergence of the directional components of the truncation error (see Proposition 2), we already proved that the truncation error map does not have a hyperplane behavior (Proposition 3). As will be seen in Sect. 4, sometimes the low-order extrapolation can be as accurate as its high-order counterpart in some regions of the truncation error map. However, this is highly dependent on the PDE behavior and the retained tessellation (mesh).
-
The price that must be paid for fewer evaluations of the discrete partial differential operator (Eqs. 65 and 66) is a slightly decreased accuracy in the inner truncation error map when using the p-anisotropic error estimator proposed in this paper. The reason is that the \(\tau \)-estimation procedure involves a small error that depends on the discretization and/or interpolation errors on the reference mesh (see Eq. 49 for the isolated truncation error and Eq. 82 for the non-isolated truncation error). When the truncation error is \(\tau \)-estimated for every single combination of polynomial orders (as in Kompenhans et al. [19]), this small error is only added once to the estimated value, whereas it is added d times when using the new p-anisotropic estimator (where d is the number of dimensions of the problem).
3.5 Truncation Error Estimation Under High-Order Mappings
Since in the DGSEM the order of the numerical quadrature is equal to the order of approximation, in order for the method to be free-stream (or constant state) preserving [22], the order of the mapping in every direction (\(M_i\) in Eq. 11) must be at most the order of the DG representation in that same direction, \(N_i\) [22] (isoparametric mappings). For this reason, the lower-order meshes used for estimating the truncation error must be constructed with a lower-order mapping, if we want them to be free-stream preserving. This causes an additional geometry representation error that is quantified in our truncation error estimate. The presented method is still consistent for p-adaptation purposes since the additional geometry representation error would also be present in the p-adapted meshes.
3.6 Truncation Error Estimation When Not in the Asymptotic Regime
As has been pointed out before, the spectral convergence can only be expected when in the asymptotic regime. If the solution is not smooth enough for the analyzed polynomial orders or the selected mesh size, the errors are not expected to decrease exponentially fast when the polynomial order is increased. This is the case when shocks or any other kind of singularities are present in the solution. Under these circumstances, the characteristic negative slope of Fig. 1a may not be observed for the directional components of the truncation error. A positive slope or a very low coefficient of determination in the linear regression, \(R^2\), are signs that the analyzed element is not in the asymptotic regime, and can be used as an indication that h- or r-adaptation should be performed. In such cases and for these particular elements a warning is issued by the solver.
4 Validation of the Anisotropic \(\tau \)-Estimation Method
The compressible Navier–Stokes equations can be written in conservative form (see “Appendix C”) and discretized using the DGSEM, as explained in Sect. 2.1. In order to test the accuracy of the proposed \(\tau \)-estimation method, a 2D manufactured solutions test case is analyzed. The exact solution selected for the problem is
which is simulated in the unit square, as depicted in Fig. 4. Inserting Eq. 67 into 86, the source term for the 2D compressible Navier–Stokes equations yields
The main interest is to validate the proposed error estimator and compare its outcome with previous works. Since the method of Kompenhans et al. [19] explained in Sect. 2.4 was formulated and used with the non-isolated truncation error, the results that are shown in Sects. 4.1 and 4.2 were obtained for the non-isolated truncation error estimator (\(\tau _P^N\)). However, similar results can be obtained for the isolated truncation error, since its maps exhibit the same behavior as the ones presented here. In addition, in Sect. 4.3 we compare the truncation error estimator with the isolated truncation error estimator when used for driving a p-adaptation procedure.
4.1 Truncation Error Maps and Number of Degrees of Freedom
A fully time-converged solution (\(||{\mathcal {R}}^P||_\infty <10^{-10}\)) of order 5 (\(P=P_1=P_2=5\)) is used to estimate the truncation error using the method of Sect. 3.1. The results for element A are depicted in Fig. 5a. Figure 5b shows the exact truncation error. It can be seen that the proposed method predicts a truncation error map that is very similar to the exact one, even for extrapolated values. Hence, in agreement with the obtained results, the assumptions of Sect. 3.1 are reasonable. These maps can be used for selecting an appropriate combination of polynomial orders such that a maximum truncation error \(\tau _{max}\) is achieved employing a minimum number of degrees of freedom.
Figure 6 shows the map of the number degrees of freedom (DOFs) for every (\(N_1\),\(N_2\))-combination. The polynomial orders that achieve a truncation error \(\tau <\tau _{max}\) are marked with black squares. Let us remark that, although these results are not exactly the same for the estimated and exact truncation error maps, they are very similar. Therefore, we conclude that the proposed estimation method may be used for adaptation purposes. Notice that there are many alternatives that produce a truncation error in the desired range, but there is only one that minimizes the number of degrees of freedom and, therefore, the computational cost.
4.2 Comparison with Previous Methodologies
Figure 7 shows the 3D representation of the exact truncation error map (a), the one obtained with the high-order extrapolation (b), and the one obtained with the low-order extrapolation (c)—here, we illustrate the complete hyperplane. The maps were generated with the same fully time-converged solution of order \(P_1=P_2=5\). As can be seen, the truncation error map generated with the high-order extrapolation bears close resemblance to the exact one, whereas the hyperplane underpredicts the truncation error in some regions, as anticipated in Sect. 3.4.
If we generate the truncation error map using the method of Kompenhans et al. [19] (Sect. 2.4), we obtain Fig. 8. We remark that although the method of Kompenhans et al. produces accurate results for \(N_i<P\), it fails to predict the behavior of the truncation error for \(N_i \ge P\). In fact, using this method the full truncation error map is not being generated, but only the extrapolations for the iso-\(N_i\) lines \(N_1 = P_1-1\) and \(N_2=P_2-1\).
A close inspection of the values of the truncation error for a fixed polynomial order (dashed and dotted lines of Fig. 8) can reveal details about the extrapolated map. Let us first analyze the truncation error for a fixed \(N_2=4\). In Fig. 9a we illustrate how \(\tau _{5,5}^{N_1,4}\) is obtained using the new methodology of Sect. 3.1: the anisotropic contributions of the truncation error, \(\tau _1\) and \(\tau _2\), are used to generate independent trend lines and their values are then used to compute \(\tau _{5,5}^{N_1,4}\). Figure 9b shows a comparison of this result with the exact truncation error and the one obtained using the method of Kompenhans et al.. It is remarkable that spectral convergence can be observed and both error estimators predict it.
Now, let us analyze the case of a fixed \(N_1=4\). Figure 10a illustrates how \(\tau _{5,5}^{4,N_2}\) is obtained. Notice how, in this case, for \(N_2 \ge 3\) a stagnation in the decreasing rate of the truncation error occurs because
Figure 10b shows a comparison of this result with the exact truncation error and the truncation error estimated using the method of Kompenhans et al.. Let us note that the exact truncation error also exhibits the stagnation behavior for \(N_2 \ge 3\), but a linear extrapolation of the values of \(\tau \) would under-predict the truncation error for \(N_2>4\). The reason is that spectral convergence can be expected for the decoupled terms (\(\tau _i\)), but not necessarily for the total truncation error along iso-\(N_i\) lines of the truncation error map (Propositions 2 and 3). In this particular case, it is evidenced that when the assumptions of Remark 1 are violated, the error is underestimated in the outer truncation error map. This simple example shows how the anisotropic error estimator formulated in this paper can generate more accurate representations of the truncation error map for \(N_i \ge P_i\) than previous estimators.
4.3 p-Anisotropic Adaptation Based on the Proposed Non-isolated and Isolated Truncation Error Estimators
As was discussed above, both the non-isolated and the isolated truncation error can be approximated using the anisotropic method introduced in this paper. In this section, we analyze how both estimators perform with the new anisotropic approximation when driving a p-adaptation procedure. The fully converged solution of order \(P_1=P_2=5\) is used as the reference mesh for the anisotropic \(\tau \)-estimation procedure with high-order extrapolation explained in Sect. 3.3. Different truncation error thresholds are set as the target of the p-adaptation procedure in the range \(10^{-7} \le \tau _{max} < 10^{-1}\), and the polynomial order is selected after the estimation so that the number of degrees of freedom is minimized (see Fig. 6). The maximum polynomial order allowed in any direction is selected as \(N_{max}=10\), and the minimum polynomial order as \(N_{min}=1\).
Figure 11a shows the non-isolated truncation error that was achieved after the mesh adaptation as a function of the specified threshold (\(\tau _{max}\)), and Fig. 11(b) illustrates the isolated truncation error that was achieved for different values of \(\tau _{max}\). Two plateaux can be observed in both figures, one for \(\tau _{max} \le 10^{-5}\) and one for \(\tau _{max} \ge 6 \times 10^{-3}\) as a consequence of the limiting polynomial orders. The first plateau corresponds to the minimum \(||\tau ||_{\infty }\) (and \(||{\hat{\tau }}||_{\infty }\)) that can be achieved when \(N_1=N_2=N_{max}=10\), and the second corresponds to the maximum \(||\tau ||_{\infty }\) (and \(||{\hat{\tau }}||_{\infty }\)) that can be achieved when \(N_1=N_2=N_{min}=1\) in every element. For the remaining specified thresholds both estimators perform reasonably well, being the isolated truncation error slightly better. The small gap between the ideal and achieved errors is attributed to small errors in the estimation procedure.
As these results show, controlling the isolated truncation error of a mesh also controls its non-isolated truncation error: a further advantage of the isolated estimator. In fact, we can write the non-isolated truncation error in terms of the isolated truncation error from the definitions in Sect. 2.2, and “Appendixes A and B”:
Equation 70 suggests that the isolated truncation error is expected to control the non-isolated truncation error for sufficiently smooth solutions, for an appropriate choice of the numerical flux. This topic will be addressed in detail in future investigations.
Taking into account that the main difference of the non-isolated truncation error is that it is affected by neighboring elements, we can conclude that the isolated estimator is a better driver for p-adaptation methods than the non-isolated truncation error estimator. Namely, because it would be excessively expensive to evaluate every possible combination of polynomial orders for each element of the mesh and its neighbors in order to feed the p-adaptation procedure.
4.4 Anisotropic Error Estimation Under High-Order Mappings
In this section, the accuracy of the proposed error estimator is tested for elements with curved faces and high-order geometry mappings. In order to do so, the same manufactured test case is analyzed in a mesh where all the element faces are sinusoidal functions (see Fig. 12). Following Eq. 11, the reference-to-physical mapping can be approximated with polynomials of order \(1 \le M_i\), where \(M_1=M_2=1\) means that the problem of Fig. 4 is recovered. For higher values of \(M_i\), the sinusoidal function is more accurately represented.
As in Sect. 4.1, a fully converged solution on a reference mesh of order \(P_1=P_2=5\) is used to approximate the truncation error using the proposed estimator for \(1 \le N_i \le 7\), and the results are compared with the exact truncation error, which is obtained by injecting the exact solution to the problem (Eq. 67) in the different representations of the truncation error map. Figure 13 shows the estimated and exact truncation errors for element A along two iso-\(N_i\) lines, \(N_1=4\) and \(N_2=4\).
Let us now note that, in order to generate the truncation error map with the method of Sect. 3.3 and a reference solution of order \(P_1=P_2=5\), it is necessary to generate eight additional low-order representations to estimate the error. Furthermore, as was discussed in Sect. 3.5, a DGSEM representation must have \(M_i \le N_i\) to be free-stream preserving [22]. Therefore, for certain values of M, it is possible that the low-order representations require reduced order mappings. For the sake of exposition, Table 1 shows the allowable mapping orders when the geometry is represented with a fourth order polynomial, \(M_1=M_2=4\). As can be seen, only two of the lower-order representations [(5, 4) and (4, 5)] can retain the specified high-order mapping. This could be regarded as a limitation, but, as we will show, it does not pose a problem for the truncation error estimation.
Two important conclusions can be drawn from Fig. 13. First, that the truncation error is higher for higher-order mappings (compare with Figs. 9 and 10). This is consistent with the results reported by Botti [4], where the convergence deteriorates when the mapping order is increased. In the analyzed case, it can be seen that the y-component of the truncation error, \(\tau _2\), is specially dependent on the mapping order for element A. Second, it is shown that the proposed error estimator correlates well with the exact truncation error for the different mapping orders in spite of the apparent limitation shown in Table 1. In fact, a new stagnation in the truncation error is successfully predicted for \(N_1 \ge 5\) when \(M \ge 4\). As mentioned in Sect. 3.5, the extra geometry representation error contained in the lower-order representations is also present in the meshes where the exact truncation error is evaluated.
The accuracy of the DGSEM deteriorates when the mapping order is increased. However, our estimation method still predicts the truncation error (which includes geometrically induced errors) accurately.
5 Conclusions
In this paper, we have studied truncation error estimators, their convergence properties and accuracy. The most important conclusions of this work are:
-
1.
A new technique for evaluating the truncation error was developed which requires less computational resources in the estimation procedure than previous implementations. Furthermore, this technique allows computing extrapolations of the truncation error with enhanced accuracy compared with previous methods. This enables using coarser reference meshes, hence further improving the computational efficiency.
-
2.
The presented method provides truncation error estimations that are accurate enough for performing p-adaptation, as shown in Sects. 4.1 and 4.3.
-
3.
According to the analyses conducted in this paper, the isolated truncation error is better suited to drive a p-adaptation procedure than its non-isolated counterpart. In the first place, because the non-isolated error is affected by the discretization in other regions. Second, and as stated in Remark 2, the non-isolated truncation error estimator imposes certain requirements for the extrapolation procedure to work well. This translates into a more expensive \(\tau \)-estimation. Furthermore, additional requirements are needed in order for Proposition 1 to hold with the non-isolated truncation error.
-
4.
The method of Kompenhans et al. [19], in which every combination of \(N = (N_1,N_2,\ldots ,N_d)\) is directly evaluated for generating the truncation error map, performs slightly better at estimating the truncation error for \(N_i<P_i\) than the proposed error estimator, but fails to predict the truncation error for \(N_i \ge P_i\) accurately. A good compromise could be to generate the truncation error map for \(N_i<P\) using the method of Kompenhans et al., but then changing to the fully decoupled method for generating the extrapolated map. In this case, however, additional evaluations of the discrete partial differential operator must be performed.
Notes
Sufficiently high does not necessarily mean that the polynomial order of the other elements must be kept in P, but that it must be high enough so that the externally-generated contributions to the truncation error are less than the internally-generated ones.
References
Aftosmis, M.J.: Upwind method for simulation of viscous flow on adaptively refined meshes. AIAA J. 32(2), 268–277 (1994). https://doi.org/10.2514/3.11981
Bassi, F., Rebay, S.: A high-order accurate discontinuous finite element method for the numerical solution of the compressible Navier–Stokes equations. J. Comput. Phys. 131, 267–279 (1997). https://doi.org/10.1006/jcph.1996.5572.http://isn-csm.mit.edu/literature/1997-jcp-bassi.pdf
Berger, M.J.: Adaptive finite difference methods in fluid dynamics. In: Von Karman Institute for Fluid Dynamics, Computational Fluid Dynamics 50 p. (See N88-15951 08-34) (1987)
Botti, L.: Influence of reference-to-physical frame mappings on approximation properties of discontinuous piecewise polynomial spaces. J. Sci. Comput. 52(3), 675–703 (2012). https://doi.org/10.1007/s10915-011-9566-3
Brandt, A., Livne, O.E.: Multigrid Techniques: 1984 Guide with Applications to Fluid Dynamics, Revised edn. SIAM, Philadelphia (2011). https://doi.org/10.1137/1.9781611970753
Canuto, C., Hussaini, M.Y., Quarteroni, A., Thomas Jr., A.: Spectral Methods in Fluid Dynamics. Springer, Berlin (2012)
Choudhary, A., Roy, C.J.: Structured mesh r-refinement using truncation error equidistribution for 1D and 2D Euler problems. In: 21st AIAA Computational Fluid Dynamics Conference. American Institute of Aeronautics and Astronautics, Reston, VA, AIAA 2013-244, pp. 1–15 (2013). https://doi.org/10.2514/6.2013-2444
Cockburn, B., Karniadakis, G.E., Shu, C.W.: The development of discontinuous Galerkin methods. Discontinuous Galerkin Methods 11, 3–50 (2000). https://doi.org/10.1007/978-3-642-59721-3_1
Deng, S.: Numerical simulation of optical coupling and light propagation in coupled optical resonators with size disorder. Appl. Numer. Math. 57(5–7), 475–485 (2007). https://doi.org/10.1016/j.apnum.2006.07.001
Estep, D.: A posteriori error bounds and global error control for approximation of ordinary differential equations. SIAM J. Numer. Anal. 32(1), 1–48 (1995)
Eva Casoni y Antonio Huerta: Shock capturing for discontinuous Galerkin methods (2011). http://www.tesisenred.net/handle/10803/51571
Ferrer, E., Willden, R.H.: A high order discontinuous Galerkin–Fourier incompressible 3D Navier–Stokes solver with rotating sliding meshes. J. Comput. Phys. 231(21), 7037–7056 (2012). https://doi.org/10.1016/j.jcp.2012.04.039
Fraysse, F., Redondo, C., Rubio, G., Valero, E.: Upwind methods for the Baer–Nunziato equations and higher-order reconstruction using artificial viscosity. J. Comput. Phys. 326, 805–827 (2016). https://doi.org/10.1016/j.jcp.2016.09.017
Fraysse, F., Valero, E., Ponsín, J.: Comparison of mesh adaptation using the adjoint methodology and truncation error estimates. AIAA J. 50(9), 1920–1932 (2012). https://doi.org/10.2514/1.J051450
Georgoulis, E.: Discontinuous Galerkin methods on shape-regular and anisotropic meshes. Philosophy (2003). http://www.math.le.ac.uk/PEOPLE/eg64/papers/thesis_main.pdf
Hartmann, R.: Error estimation and adjoint-based adaptation in aerodynamics. European Conference on Computational Fluid Dynamics, pp. 1–14 (2006)
Hartmann, R., Houston, P.: Adaptive discontinuous Galerkin finite element methods for the compressible Euler equations. J. Comput. Phys.183(2), 508–532 (2002). https://doi.org/10.1006/jcph.2002.7206. http://linkinghub.elsevier.com/retrieve/pii/S0021999102972062
Hesthaven, J.S., Warburton, T.: Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications. Springer, New York (2008)
Kompenhans, M., Rubio, G., Ferrer, E., Valero, E.: Adaptation strategies for high order discontinuous Galerkin methods based on Tau-estimation. J. Comput. Phys. 306, 216–236 (2016). https://doi.org/10.1016/j.jcp.2015.11.032
Kompenhans, M., Rubio, G., Ferrer, E., Valero, E.: Comparisons of p-adaptation strategies based on truncation-and discretisation-errors for high order discontinuous Galerkin methods. Comput. Fluids 139, 36–46 (2016). https://doi.org/10.1016/j.compfluid.2016.03.026
Kopriva, D.: Implementing Spectral Methods for Partial Differential Equations: Algorithms for Scientists and Engineers. Springer Science & Business Media B.V. (2010)
Kopriva, D.A.: Metric identities and the discontinuous spectral element method on curvilinear meshes. J. Sci. Comput. 26(3), 301–327 (2006). https://doi.org/10.1007/s10915-005-9070-8
Kopriva, D.A., Woodruff, S.L., Hussaini, M.Y.: Computation of electromagnetic scattering with a non-conforming discontinuous spectral element method. Int. J. Numer. Methods Eng. 53(1), 105–122 (2002). https://doi.org/10.1002/nme.394
Martin, R., Guillard, H.: A second order defect correction scheme for unsteady problems. Comput. Fluids 25(1), 9–27 (1996). https://doi.org/10.1016/0045-7930(95)00027-5
Mavriplis, C.: Nonconforming discretizations and a posteriori error estimators for adaptive spectral element techniques (1989). http://hdl.handle.net/1721.1/14526
Mavriplis, C.: Adaptive mesh strategies for the spectral element method. Institute for Computer Applications in Science and Engineering pp. 1–19 (1992). http://www.sciencedirect.com/science/article/pii/S0045782594800103
Minoli, C.A.A., Kopriva, D.A.: Discontinuous Galerkin spectral element approximations on moving meshes. J. Comput. Phys. 230(5), 1876–1902 (2011). https://doi.org/10.1016/j.jcp.2010.11.038
Oberkampf, W.L., Roy, C.J.: Verification and Validation in Scientific Computing. Cambridge University Press, Cambridge (2010)
Persson, P.O., Peraire, J.: Sub-cell shock capturing for discontinuous Galerkin methods. In: 44th AIAA Aerospace Sciences Meeting and Exhibit pp. 1–13 (2006). https://doi.org/10.2514/6.2006-112
Phillips, T., Derlaga, J., Roy, C., Borggaard, J.: Finite volume solution reconstruction methods for truncation error estimation. In: 21st AIAA Computational Fluid Dynamics Conference (2013). https://doi.org/10.2514/6.2013-3090
Phillips, T.S.: Residual-based discretization error estimation for computational fluid dynamics residual-based discretization error estimation for computatioanl fluid dynamics. Ph.D. thesis, Virginia Polytechnic Institute and State University (2014). https://vtechworks.lib.vt.edu/handle/10919/50647
Phillips, T.S., Roy, C.J.: Residual methods for discretization error estimation. In: 20th AIAA Computational Fluid Dynamics Conference 3870(27–30), 665 (2011)
Phillips, T.S., Roy, C.J.: A new extrapolation-based uncertainty estimator for computational fluid dynamics. J. Verif. Valid. Uncertain. Quantif. 1(4), 041,006 (2017). https://doi.org/10.1115/1.4035666
Pierce, N.A., Giles, M.B.: Adjoint and defect error bounding and correction for functional estimates. J. Comput. Phys. 200(2), 769–794 (2004). https://doi.org/10.1016/j.jcp.2004.05.001
Rasetarinera, P., Hussaini, M.: An efficient implicit discontinuous spectral Galerkin method. J. Comput. Phys. 172(2), 718–738 (2001). https://doi.org/10.1006/jcph.2001.6853. http://linkinghub.elsevier.com/retrieve/pii/S0021999101968536
Remacle, J.F., Flaherty, J.E., Shephard, M.S.: An adaptive discontinuous Galerkin technique with an orthogonal basis applied to compressible flow problems. SIAM Rev. 45(1), 53–72 (2003)
Rivière, B.: Discontinuous Galerkin methods for solving elliptic and parabolic equations theory and implementation. SIAM (2008). https://doi.org/10.1137/1.9780898717440
Roache, P.J.: Verification and validation in computational science and engineering, vol. 895. Hermosa Albuquerque, NM (1998)
Roe, P.L.: Approximate Riemann solvers, parameter vectors, and difference schemes. J. Comput. Phys. 43(2), 357–372 (1981). https://doi.org/10.1016/0021-9991(81)90128-5
Roy, C.: Review of discretization error estimators in scientific computing. In: 48th AIAA Aerospace Sciences Meeting Including the New Horizons Forum and Aerospace Exposition. American Institute of Aeronautics and Astronautics, Reston, VA (2010). https://doi.org/10.2514/6.2010-126
Rubio, G., Fraysse, F., De Vicente, J., Valero, E.: The estimation of truncation error by \(\tau \)-estimation for Chebyshev spectral collocation method. J. Sci. Comput. 57(1), 146–173 (2013). https://doi.org/10.1007/s10915-013-9698-8
Rubio, G., Fraysse, F., Kopriva, D.A., Valero, E.: Quasi-a priori truncation error estimation in the DGSEM. J. Sci. Comput. 64(2), 425–455 (2015). https://doi.org/10.1007/s10915-014-9938-6
Rubio Calzado, G.: Truncation Error Estimation in the Discontinuous Galerkin Spectral Element Method. Ph.D. thesis, Universidad Politécnica de Madrid. School of Aeronautics (ETSIAE) (2015)
Syrakos, A., Efthimiou, G., Bartzis, J.G., Goulas, A.: Numerical experiments on the efficiency of local grid refinement based on truncation error estimates. J. Comput. Phys. 231(20), 6725–6753 (2012). https://doi.org/10.1016/j.jcp.2012.06.023
Syrakos, A., Goulas, A.: Finite volume adaptive solutions using SIMPLE as smoother. Int. J. Numer. Methods Fluids 52(11), 1215–1245 (2006). https://doi.org/10.1002/fld.1228
Toro, E.F.: Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction. Springer-Verlag, Berlin (2009)
Venditti, D.A., Darmofal, D.L.: Grid adaptation for functional outputs: application to two-dimensional inviscid flows. J. Comput. Phys. 176(1), 40–69 (2002). https://doi.org/10.1006/jcph.2001.6967. http://linkinghub.elsevier.com/retrieve/pii/S0021999101969670
Wang, Z., Fidkowski, K., Abgrall, R., Bassi, F., Caraeni, D., Cary, A., Deconinck, H., Hartmann, R., Hillewaert, K., Huynh, H., Kroll, N., May, G., Persson, P.O., van Leer, B., Visbal, M.: High-order CFD methods: current status and perspective. Int. J. Numer. Methods Fluids 72(8), 811–845 (2013). https://doi.org/10.1002/fld.3767
Zienkiewicz, O.C.: The background of error estimation and adaptivity in finite element computations. Comput. Methods Appl. Mech. Eng. 195(4–6), 207–213 (2006). https://doi.org/10.1016/j.cma.2004.07.053
Acknowledgements
The authors would like to thank David Kopriva for his friendly advise and cooperation. This project has received funding from the European Union’s Horizon 2020 Research and Innovation Program under the Marie Skłodowska-Curie Grant agreement No. 675008. The authors acknowledge the computer resources and technical assistance provided by the Centro de Supercomputación y Visualización de Madrid (CeSViMa).
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix A: Isolated Truncation Error Dependence on Interpolation Error
According to Definition 5 and Eq. 37, the isolated truncation error in the DGSEM can be expressed for any basis function \(\phi \) in an element e as
where the superindex N on the integrals indicates that they are approximated with a Gaussian quadrature of order N and the superindex e has been dropped for readability. Since the DGSEM is a collocation method, the value computed with Eq. 71 corresponds to the isolated truncation error on the node of the basis function \(\phi \). The terms \({\mathbf {s}}^N\) and \({\mathscr {F}}^N\) can be expressed in terms of the interpolation error as
Inserting Eq. 72 into 71, integrating by parts, and expressing everything with \(L_2({\varOmega })\) inner product notation we obtain,
where \((\cdot ,\cdot )^N_{{\varOmega }^e}\) stands for the \(L_2\) product operator evaluated with a quadrature of order N in the domain \({{\varOmega }^e}\). The first term on the right-hand side vanishes since the value of \(\varepsilon _{{\mathbf {s}}}^N\) is zero on the quadrature nodes (the DGSEM is a collocation method). Furthermore, it is reasonable to neglect the quadrature error since it is of a lower order of magnitude than the value of the integral. Therefore, we obtain
Appendix B: Anisotropic Non-isolated Truncation Error Estimation
In this section, we show briefly that the non-isolated truncation error can be estimated anisotropically using Proposition 1. In order to do so, we need some additional assumptions.
1.1 B.1 Additional Assumptions
As in Sect. 3.1, following assumptions are a consequence of the tensor product basis functions of the DGSEM and hold for sufficiently smooth solutions in the asymptotic range:
-
(c)
The discretization error has an anisotropic behavior and, therefore, can be decoupled in directional components. For the 2D case:
$$\begin{aligned} \epsilon ^{N_1N_2} = \epsilon _1^{N_1N_2} + \epsilon _2^{N_1N_2}. \end{aligned}$$(75)As in (a), \(\epsilon _i\) is the projection of the global discretization error, \(\epsilon \), into a local direction, i.
-
(d)
The locally-generated discretization error in each direction depends only on the polynomial order in that direction:
$$\begin{aligned} \epsilon _{{\varOmega },i}^{N_1N_2} = \epsilon _{{\varOmega },i}^{N_1N_2}(N_i) \end{aligned}$$(76)
Following the same reasoning as in Remark 2, and for reasons that will become clear at the end of the proof, an additional assumption is required:
-
(e)
The \(\tau \)-estimation procedure is performed element-wise while keeping the polynomial order in other elements sufficiently high so that:
$$\begin{aligned} \left|\left|\epsilon ^N_{\partial {\varOmega }}\right|\right| \ll \left|\left|\epsilon ^N_{{\varOmega }}\right|\right| \end{aligned}$$(77)
As (a) and (b), assumptions (c) and (d) also follow from the work of Rubio et al. [42, 43]. The authors remark that assumptions (a), (b), (c) and (d) are consistent with the dependence of the non-isolated truncation error on the discretization error (Eq. 33). Furthermore, assumption (e) imposes an additional requirement for Proposition 1 to hold: that the polynomial orders of the elements not being analyzed must be maintained high enough during \(\tau \)-estimation, so that the externally-generated contributions to the discretization error are smaller than the internally-generated ones.
Let us note that the assumption (d) implies that, for smooth solutions in the asymptotic range, the discretization error in one direction does not change considerably when the polynomial order in another direction is changed:
with \(i \ne j\), and \(1 \le i,j \le 2\).
Proof
Following the same procedure as in “Appendix A”, according to Definition 4 and Eq. 31, the non-isolated truncation error in the DGSEM can be expressed for any basis function \(\phi \) in an element e as
where \(\bar{{\mathbf {q}}}^{\underline{\ }}\) is the external (neighbor element’s) solution and the superindex “e” has been dropped for the local solution. Since the DGSEM is a collocation method, the value computed with Eq. 79 corresponds to the non-isolated truncation error on the node of the basis function \(\phi \). After inserting the definition of discretization error (Definition 2), \(\bar{{\mathbf {q}}}=\bar{{\mathbf {q}}}^N+\epsilon ^N\), and expanding the fluxes using Taylor series we obtain
where the interpolant of the discretization error is omitted for readability (\({\mathbf {I}}^N\epsilon ^N \rightarrow \epsilon ^N\)), \(\epsilon ^N\) is the discretization error of the element e, and \(\epsilon ^{\underline{N}}\) is the discretization error of a neighbor element connected through the surface \(\partial {\varOmega }\). Notice that, for the sake of readability, the symbol for the external polynomial orders is the same as of the internal ones, i.e. N, although they can be different.
We now want to approximate the non-isolated truncation error through \(\tau \)-estimation. We part from the definition of the discretization error (Eq. 20). Adding and subtracting the discrete solution on a higher order grid, \({\mathbf {q}}^P\), yields
Reorganizing we have
Therefore, the \(\tau \)-estimation yields
Since it is possible to decouple the discretization error inside our analyzed element in a locally-generated and an externally-generated component (Eq. 21), Eq. 82 can be rewritten as
Equation 83 holds even for anisotropic representations, i.e. \(N=(N_1,N_2,N_3)\) and \(P=(P_1,P_2,P_3)\). Let us note that if the polynomial order of the elements that are not being analyzed is maintained as high as in the reference mesh, \(\epsilon _{\partial {\varOmega }}^P\) cancels out \(\epsilon _{\partial {\varOmega }}^N\) and \(\epsilon ^{\underline{N}} - \epsilon ^{\underline{P}} \approx 0\), i.e., the \(\tau \)-estimation provides the locally-generated truncation error.
Let us now consider the case of 2D anisotropic coarsening in the direction i (\({\mathbf {N}}=(N_i,P_j)\), \({\mathbf {P}}=(P_i,P_j)\)). Taking into account assumptions (c) and (d), we obtain
It is important to note that for sufficiently smooth solutions, the discretization errors in the high order mesh of order \({\mathbf {P}}\) are smaller than the discretization errors in the analyzed mesh \({\mathbf {N}}\) and therefore can be neglected. Finally, if assumptions (c) and (e) hold, the anisotropic version of Eq. 83 (\(N=(N_1,N_2,N_3)\)) can be reconstructed by summing all the directional components (Eq. 84) if the quadrature errors are neglected. I.e., we recover Eq. 45:
\(\square \)
Appendix C: The Navier–Stokes Equations
The compressible Navier–Stokes equations in conservative form can be written in non-dimensional form as
where the conserved variables are \({\mathbf {q}} = \left( \rho , \rho u, \rho v, \rho w, \rho e \right) ^T\) (\(\rho \) is the density; u, v and w are the velocity components; and e is the specific total energy), \({\mathbf {s}}\) is an external source term, and \({\mathscr {F}}^a\) and \({\mathscr {F}}^{\nu }\) are called the advective and diffusive flux dyadic tensors, respectively, which depend on \({\mathbf {q}}\). Expanding the fluxes in Cartesian coordinates leads to the expression,
Here, Re is the Reynolds number. The advective fluxes are then defined as
where the pressure p is computed using the calorically perfect gas approximation. On the other hand, the diffusive fluxes are defined as
where T is the temperature, \(\gamma \) is the heat capacity ratio, and \(\kappa \) is the thermal diffusivity. The nondimensional parameters are Pr, the Prandtl number; and M, the Mach number. The stress tensor components are computed using the Stokes hypothesis,
with \(\mu \) the fluid’s viscosity, and \({\mathbf {V}}\) the flow velocity. For the simulations in this paper we chose the typical parameters for air: \({\mathrm{Pr}} = 0.72\), \(\gamma = 1.4\), while \(\mu \) and \(\kappa \) are calculated using Sutherland’s law.
Rights and permissions
About this article
Cite this article
Rueda-Ramírez, A.M., Rubio, G., Ferrer, E. et al. Truncation Error Estimation in the p-Anisotropic Discontinuous Galerkin Spectral Element Method. J Sci Comput 78, 433–466 (2019). https://doi.org/10.1007/s10915-018-0772-0
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10915-018-0772-0
Keywords
- High-order discontinuous Galerkin
- Spectral methods
- p-Anisotropic representations
- \(\tau \)-Estimation
- Truncation error
- Anisotropic p-adaptation