1 Introduction

Historically, the residual distribution concept developed in two different research paths. The first was the study by Hall, Morton and collaborators in 1980’s which focused on the cell-vertex finite volume methods [1,2,3]. The second path was concerned with the physics of the PDE by Roe [4]. In 1982, Roe [4] proposed a framework of an multidimensional upwind residual distribution (RD) but merely for the scalar convection problem. The generalization for a system of equation in two dimensions was done by Abgrall [5, 6], implementing the idea on the Euler equations. The current status and future trends of the RD methods are described in details by Abgrall [7, 8] and the references therein.

One of the purposes of using RD methods was to obtain more accurate solutions on unstructured triangular grids. Among the motivations of developing the RD methods are to faithfully mimic multidimensional physics and keep a compact stencil compared to the finite volume (FV) methods. These include the work of [9] and it was briefly shown that RD methods are insensitive to randomized grids [10, 11]. The works of [12] provide a rigorous analytical discussion of the performance of RD and FV on structured triangular grids but limited to only the scalar problems. [13] provided the comparison on the system of Euler equations but merely demonstrated through the numerical results. Both works noted that RD methods are affected by grid deterioration but at a much lesser rate compared to FV methods. An attempt to accurately develop an RD method on skewed triangular grids is almost non-existent in the literature. Most of the developments for RD methods are based on ideal or regular grids [6, 14, 15] although most recently there have been some developments of Streamline-Upwind-Petrov–Galerkin (SUPG) RD methods on stretched triangular grids [16] solving the advection–diffusion and potential flow equations.

In this paper, we intend to analyze in-depth the performance of RD methods on skewed triangular grids. Then we aim to develop an RD method based on the LDA approach which would include a more accurate signal distribution to the nodes when the grids are skewed. This newly proposed LDA approach is intended to preserve accuracy for a large range of grid skewness on isotropic and anisotropic grids. For a start, the focus of this paper would be on two dimensional steady state equations. The analysis begins with the scalar equations followed by the system of Euler equations. The fully unstructured (anisotropic) grids will be used for the Euler test case, particularly for the Ringleb flow and the subsonic flow over a two-dimensional circular cylinder.

2 Classic RD Methods for Scalar Equations

Consider the general two dimensional hyperbolic scalar equation.

$$\begin{aligned} u_t+\vec {\nabla }\cdot \vec {F}=0, \end{aligned}$$
(1)

where t is time, F is the flux as a function of u which is the dependent variable. The total (\(\phi _T^\tau \)) residual in cell \(\tau \) is defined as,

$$\begin{aligned} \phi ^\tau _T=\oint _{\partial \tau }\vec {F}\cdot \hat{n}dS \end{aligned}$$
(2)

where the \(\hat{n}\) is the inward unit normal vector and dS is the differential length of the element along the border of the cell (Fig. 1). Applying the trapezoidal integration rule in a cell,

Fig. 1
figure 1

The total cell residual (\(\tau \) in the cell domain for integration)

$$\begin{aligned} \phi ^\tau _T=\frac{1}{2}\sum _p\vec {F}_p\cdot \vec {N}_p,\quad p=i,j,k \end{aligned}$$
(3)

where \(\vec {N}_i\) is the inward normal of each edge scaled with the length and, \(\vec {F}_i\) is the flux vector of the node in front of the ith edge. In the RD methods, the total residual is spread to points (nodes) and the approaches will be discussed in the following subsections. We start with the classic RD methods followed by the new distribution approach. The scope will be on first and second order upwind-type methods since this is a proof-of-concept paper. Herein, the governing models for Eq. (1) are \(\vec {F}=(a,b)u\) for the linear and \(\vec {F}=(u^2/2,u)\) for the nonlinear scalar equations. Define,

$$\begin{aligned} k_i=\frac{1}{2}\vec {\lambda }_\text {ave}\cdot \vec {N}_i \end{aligned}$$
(4)

And,

$$\begin{aligned} k_i^+=\left\{ \begin{array}{ll} k_i&{}k_i\ge 0\\ 0&{}k_i<0 \end{array} \right. ,\quad k_i^-=\left\{ \begin{array}{ll} 0&{}k_i\ge 0\\ k_i&{}k_i<0 \end{array} \right. \end{aligned}$$
(5)

where \(\vec {\lambda }_\text {ave}\) is the average characteristic vector within the cell. For a linear case, \(\vec {\lambda }_\text {ave}\) is constant but our formulation will also cater for the nonlinear case.

2.1 N-scheme

The classic N-scheme formulation [7] is shown in Eq. (6). It should be mentioned that the \(k_i\) is referring to edge i within an element (\(\tau \)) and, \(u_i\) refers to the values of point i in front of the edge i. According to Eq. (4),

$$\begin{aligned} \phi _i^\tau =k_i^+\left( u_i-\hat{u}\right) ,\quad \hat{u}=\left( \sum _pk_p^-\right) ^{-1}\sum _p k_p^-u_p,\quad p=i,j,k \end{aligned}$$
(6)

Note that the averaging type in Eq. (4) has to be specific in order to achieve conservation. For instance, in the Burgers’ equation it should be the arithmetic average of u [17].

2.2 LDA

The LDA formulation for scalar equation is,

$$\begin{aligned} \phi _i^\tau =\beta _i\phi ^\tau _T,\quad \beta _i=k_i^+\left( \sum _pk_p^+\right) ^{-1},\quad p=i,j,k \end{aligned}$$
(7)

where \(\phi _T^\tau \) is the total residual of the cell. Therefore, the averaging type in Eq. (4) would not affect the conservation because of the following fact.

$$\begin{aligned} \sum _p\beta _p=1 \end{aligned}$$
(8)

There are two scenarios in LDA; the 1-target and 2-target cell which are distinguished by the \(k_{i,j,k}^+\). If a cell has one (two) non-zero \(k_{i,j,k}^+\) then it will be 1-target (2-target).

2.3 Lax–Wendroff

For the Lax–Wendroff scheme like the LDA is also Linearity Preserving (LP) in which the signals are in the following form.

$$\begin{aligned} \phi _i^\tau =\beta _i\phi ^\tau _T,\quad \beta _i=\frac{1}{3}+\frac{\Delta t}{2A^\tau }k_i \end{aligned}$$
(9)

\(A^\tau \) is the element area and, \(\Delta t\) is element delta time. Based on [17],

$$\begin{aligned} \Delta t=\nu _c\left( \frac{2A^\tau }{\sum _p|k_p|}\right) ,\quad p=i,j,k \end{aligned}$$
(10)

which leads to,

$$\begin{aligned} \beta _i=\frac{1}{3}+\nu _c\frac{k_i}{\sum _p|k_p|} \end{aligned}$$
(11)

The \(\nu _c\) is the cell CFL number.

3 Weighted RD Approach

3.1 Geometrical Aspects on Skewed Grids for Scalar

In the classic signal distribution, the projections of the characteristic vector normal to each edge is required to find the signal portion. Define,

$$\begin{aligned} \vec {\lambda }_p=\left( \vec {\lambda }\cdot \hat{n}_p\right) \hat{n}_p,\quad p=i,j,k \end{aligned}$$
(12)

where \(\vec {\lambda }_p\) shows the vector projection of the characteristic vector (\(\vec {\lambda }\)) along the inward normal of edge p. If the length of this projection (\(\vec {\lambda }\cdot \hat{n}_p\)) becomes positive it means that the characteristic is coming into the cell and vice versa. Hence, number of the positive lengths in a cell will illustrate the 1-target or 2-target cell type. Thus, similar to the definition of \(k^+\), one can define,

$$\begin{aligned} \vec {\lambda }_p^+=\left\{ \begin{array}{lc} \vec {\lambda }_p&{}\vec {\lambda }\cdot \hat{n}_p\ge 0 \\ 0&{}\vec {\lambda }\cdot \hat{n}_p<0 \end{array} \right. \end{aligned}$$
(13)

3.1.1 Case: 1-Target

Assume the 1-target case for a triangle (Fig. 2a). According to the definition of \(\vec {\lambda }_p^+\), only one of them will be non-zero for a 1-target cell. As it can be seen from the Fig. 2a, even though the \(\vec {\lambda }_k^+\) is pointing into a midpoint along the edge somewhere in between points i and k for a skewed grid nonetheless, all the residual is going to point k. This may not be the best way to distribute the signals. We propose that the signals be distributed to points i and k as shown in Fig. 2b. As a result, the 1-target now becomes a 2-target cell with this new approach. It is obvious that for an equilateral element the point m will be identical to the k, hence we can deduce that the new approach would recover the classic 1-target for equilateral triangles (and for lowly skewed triangles). Note that \(\vec {\lambda }\) is based on some form of averaging within the cell and located at the geometrical center of the triangle ensure that this idea can also be extended to nonlinear Burgers’ equation.

Fig. 2
figure 2

Classic 1-target element (\(\vec {\lambda }_{i,j}^+=0\)) with two signal distribution. Note that the signals are distributed to point i (\(\beta ^W_i\phi _T\)) and point k (\(\beta ^W_k\phi _T\)) accordingly for which the weights \(\beta ^W_{i,k}\) are to be determined. a Classic signal distribution, b Weighted signal distribution

3.1.2 Case: 2-Target

For the 2-target scenario the same approach is applied. The pivot point of the cell will be the geometrical center and from there the residual is distributed based on the upwind idea. Again, we use some kind of an averaging for the cell. Note that for an equilateral grid the weighted approach will recover the classic upwind approach thus, we merely discuss a skewed grid condition here. In Fig. 3, the classic distribution is shown for a skewed grid. Similar to the 1-target case, the projections of the characteristic vector are not pointing at the main points ijk, yet the signals are solely going to the respective 2-target points. However, in the weighted approach (Fig. 4) each of the two-target signals will be distributed to the nodes that share the element edge for which the projected characteristic vector are pointing at. This will cause the 2-target case to be a 3-target case (loss of upwind) for highly skewed grids. However, for an equilateral grids a or a minimally skewed grids, the 2-target case would remain 2-target.

Fig. 3
figure 3

Classic 2-target element (\(\vec {\lambda }_{k}^+=0\)) with classic signal distribution

Fig. 4
figure 4

Classic 2-target element (\(\vec {\lambda }_{k}^+=0\)) with weighted signal distribution

3.2 Weighted Distribution

In this section, we are address precise aspects of the weighted approach. In order to construct a less sensitive signal distribution, according to Figs. 2b and 4, the ratios of

$$\begin{aligned} w_{(\text {distance ratio})\rightarrow (\text {point of interest})}^{e=(\text {edge number})},\quad \text {point of intreset}=i,j,k \end{aligned}$$
(14)

are required. Note that the edge number e is defined as ijk which are the edges in front of ijk points, respectively. For a skewed grid, the first point of interest of the inward normal direction (point m) will be on some edge which is not a nodal point, necessarily. This will require a weighted distribution between the nodes that connect the particular edge. Distributing with weighted idea will produce more accurate distribution of the signals.

It is clear that for all three edges the w should be calculated. Thus, we have nine values for w in one element but some of them maybe zeros depending on the grid orientation. The zero weights are discussed after Lemma 3.1 and 3.2. In order to find the weights (w) we have to first construct the geometrical foundation.

Lemma 3.1

Consider an arbitrary vector \(\vec {d}\) starts from a geometrical center of a triangle (Fig. 5). Assume the total area is \(A^\tau \), the area ratios could be shown as,

$$\begin{aligned} \frac{A_p}{A^\tau }=\frac{1}{3}+\frac{\vec {d}\cdot \vec {N}_p}{2A^\tau },\quad p=i,j,k \end{aligned}$$
(15)

where \(A_i=A_{o'jk}, A_j=A_{io'k}\) and \(A_k=A_{ijo'}\). Note that \(\vec {N}_{ijk}\) are the scaled inward normals [18].

Fig. 5
figure 5

Determining the area ratios for an arbitrary \(\vec {d}\)

Proof

Consider Fig. 5, assume \(\vec {d}\) is a vector. And, point o is the geometrical center of the triangle ijk; hence, the summation of dark and light shaded domains will be \(\frac{1}{3}A^\tau \). Based on the weighted idea,

$$\begin{aligned} \frac{A_i}{A^\tau }=\frac{A_{jko}-A_{joko'}}{A^\tau }= \frac{1}{3}-\frac{A_{joko'}}{A^\tau } \end{aligned}$$
(16)
Fig. 6
figure 6

Moving the \(OO'\) in order to find \(A_{OBO'C}\). a Before moving \(OO'\), b after moving \(OO'\)

By moving the \(oo'\) assuming its alignment remains the same, the \(A_{joko'}\) will be constant because the perpendicular distance of the points j and k from \(oo'\) is the same. Therefore, the \(oo'\) is moved along its direction until point \(o'\) intersects with jk. Note that \(l_i=\bar{jk}\). The dot product of \(\hat{n}_A\) and \(\vec {d}\) will provide the height of the ojk in Fig. 6b. Therefore,

$$\begin{aligned} A_{joko'}=-\frac{1}{2}\left( \hat{n}_i\cdot \vec {d}\right) l_i =-\frac{1}{2}\vec {d}\cdot \vec {N}_i \end{aligned}$$
(17)

Adding to the Eq. 16,

$$\begin{aligned} \frac{A_i}{A^\tau }=\frac{1}{3}-\frac{A_{joko'}}{A^\tau } =\frac{1}{3}-\frac{1}{A^\tau }\left( -\frac{1}{2}\vec {d}\cdot \vec {N}_i\right) = \frac{1}{3}+\frac{\vec {d}\cdot \vec {N}_i}{2A^\tau } \end{aligned}$$
(18)

\(\square \)

Lemma 3.2

Consider an inward vector \(\vec {D}\) starting from a geometrical center of a triangle and ends exactly on the edge i as shown in Fig. 7. The area ratios could be written as,

$$\begin{aligned} \left\{ \begin{array}{l} \frac{A_i}{A^\tau }=\frac{1}{3}-\frac{\vec {N}_i \cdot \vec {N}_i}{3\min \left( \vec {N}_i\cdot \vec {N}_p\right) }\\ \frac{A_j}{A^\tau }=\frac{1}{3}-\frac{\vec {N}_i \cdot \vec {N}_j}{3\min \left( \vec {N}_i\cdot \vec {N}_p\right) }\\ \frac{A_k}{A^\tau }=\frac{1}{3}-\frac{\vec {N}_i\cdot \vec {N}_k}{3\min \left( \vec {N}_i\cdot \vec {N}_p\right) } \end{array} \right. ,\quad p=i,j,k \end{aligned}$$
(19)

where the \(\vec {N}_{ijk}\) are the scaled inward normals.

Proof

Since \(\vec {D}\) is in the same direction of inward normal, assume

$$\begin{aligned} \vec {D}=S\vec {N}_i,\quad S>0 \end{aligned}$$
(20)

where S is a positive scalar value which make the \(\vec {D}\) ends on point m. Based on Eq. 18,

$$\begin{aligned} \left\{ \begin{array}{l} \frac{A_i}{A^\tau }=\frac{1}{3}+\frac{\vec {D}\cdot \vec {N}_i}{2A^\tau } =\frac{1}{3}+\frac{S\vec {N}_i\cdot \vec {N}_i}{2A^\tau }\\ \frac{A_j}{A^\tau }=\frac{1}{3}+\frac{\vec {D}\cdot \vec {N}_j}{2A^\tau } =\frac{1}{3}+\frac{S\vec {N}_i\cdot \vec {N}_j}{2A^\tau }\\ \frac{A_k}{A^\tau }=\frac{1}{3}+\frac{\vec {D}\cdot \vec {N}_k}{2A^\tau } =\frac{1}{3}+\frac{S\vec {N}_i\cdot \vec {N}_k}{2A^\tau } \end{array} \right. \end{aligned}$$
(21)

Because the endpoint of \(\vec {D}\) is on one of the edges, at least one of the area ratios should be zero. Therefore,

$$\begin{aligned} \left\{ \begin{array}{l} \frac{A_i}{A^\tau }=0\\ \text {or}\quad \frac{A_j}{A^\tau }=0\\ \text {or}\quad \frac{A_k}{A^\tau }=0 \end{array} \right. \quad \Rightarrow \quad S=\frac{-2A^\tau }{3\min \left( \vec {N}_i\cdot \vec {N}_p\right) } ,\quad p=i,j,k \end{aligned}$$
(22)

Since \(\min \left( \vec {N}_i\cdot \vec {N}_p\right) \) is always negative therefore, S will be positive. Substituting S into the area ratio equations we get the following equations.

Fig. 7
figure 7

Determining the area ratios for an inward normal \(\vec {D}\) which ends on the edge in front (\(A_k=0\)). m is the intersection point

$$\begin{aligned} \left\{ \begin{array}{l} \frac{A_i}{A^\tau }=\frac{1}{3}-\frac{\vec {N}_i \cdot \vec {N}_i}{3\min \left( \vec {N}_i\cdot \vec {N}_p\right) }\\ \frac{A_j}{A^\tau }=\frac{1}{3}-\frac{\vec {N}_i \cdot \vec {N}_j}{3\min \left( \vec {N}_i\cdot \vec {N}_p\right) }\\ \frac{A_k}{A^\tau }=\frac{1}{3}-\frac{\vec {N}_i \cdot \vec {N}_k}{3\min \left( \vec {N}_i\cdot \vec {N}_p\right) } \end{array} \right. ,\quad p=i,j,k \end{aligned}$$
(23)

\(\square \)

All the geometrical analysis is required to determine weights w. Despite the tedious mathematical procedures, the general formulation of the weighted approach could be written in a simple and similar form like the Lax–Wendroff method.

$$\begin{aligned} w_{i(\text {point of intreset})}^{e(\text {edge number})}=\frac{1}{3}- \frac{\vec {N}_e\cdot \vec {N}_i}{3\min \left( \vec {N}_e\cdot \vec {N}_p\right) } ,\quad p=i,j,k \end{aligned}$$
(24)

Note that we have simplified the notation. It should be mentioned that the summation of w for a specific edge number e will be always one and at least one of the w values should be zero (“Showing Zero Weight For One Characteristic Projection” section of “Appendix 5”.). It should be mentioned that e is the repeated index and details will be presented in the next section.

3.3 Weighted LDA

We shall now implement the weighted approach shown in Eq. 24 to the LDA method. We could also apply it to other methods such the SUPG approach but will not do so herein. We shall define the new LDA method as the weighted-LDA approach.

$$\begin{aligned} \phi _i^\tau =\beta _i^W\phi ^\tau _T \end{aligned}$$
(25)

where,

$$\begin{aligned} \beta _i^W=\sum _ew_i^e\beta _e,\quad e=i,j,k \end{aligned}$$
(26)

and,

$$\begin{aligned} w_i^e=\left( \frac{A_i}{A^\tau }\right) _{\text {edge:}e}=\frac{1}{3}- \frac{\vec {N}_e\cdot \vec {N}_i}{3\min \left( \vec {N}_e\cdot \vec {N}_p\right) } ,\quad p=i,j,k \end{aligned}$$
(27)

Note that \(\beta _e\) is calculated from the classic LDA.

Lemma 3.3

The classic 1-target element in classic LDA might become 2-target in the weighted LDA in skewed grid.

Proof

Based on Fig. 2a, if the element is not isosceles (\(ik\ne kj\)) element then the intersection of \(\vec {\lambda }_k^+\) extension with ik or jk will not be at the point k. Therefore, the residual is going to two points (Fig. 2b). \(\square \)

Lemma 3.4

The classic 2-target element in classic LDA might become 3-target in the weighted LDA in skewed grid.

Proof

Based on Fig. 3, if the element is not equilateral (\(ik\ne kj\ne kj\)) element then the intersection of \(\vec {\lambda }_i^+\) extension with ik or ji will not be at the point i and, the same is applied for the \(\vec {\lambda }_j^+\). Therefore, the residual might be going to three points (Fig. 4). \(\square \)

Lemma 3.5

The weighted LDA approach for scalar equation is conservative.

Proof

According to Eq. 25,

$$\begin{aligned} \begin{array}{rl} \phi _i^\tau +\phi _j^\tau +\phi _k^\tau =&{} \left( \sum _{e}\left( \frac{A_i}{A^\tau }\right) _{\text {edge:}e}\beta _e +\sum _{e}\left( \frac{A_j}{A^\tau }\right) _{\text {edge:}e}\beta _e\right. \\ &{}+\left. \sum _{e}\left( \frac{A_k}{A^\tau }\right) _{\text {edge:}e}\beta _e\right) \phi ^\tau _T\\ =&{} \left( \sum _{e}\underbrace{\left( \frac{A_i+A_j+A_k}{A^\tau }\right) _{\text {edge:}e}}_{1}\beta _e\right) \phi ^\tau _T\\ =&{} \underbrace{\left( \sum _{e}\beta _e\right) }_{1}\phi ^\tau _T =\phi ^\tau _T \end{array} \end{aligned}$$
(28)

Hence, conservation is achieved. \(\square \)

Lemma 3.6

The weighted LDA approach is LP (Linearity Preserving) for the scalar equations.

Proof

The signals of weighted LDA are,

$$\begin{aligned} \left\{ \begin{array}{l} \phi _i^\tau =\beta ^W_i\phi ^\tau _T\\ \phi _j^\tau =\beta ^W_j\phi ^\tau _T\\ \phi _k^\tau =\beta ^W_k\phi ^\tau _T \end{array} \right. \quad \wedge \quad \phi ^\tau _T\rightarrow 0 \quad \Rightarrow \quad \left\{ \begin{array}{l} \phi _i^\tau \rightarrow 0\\ \phi _j^\tau \rightarrow 0\\ \phi _k^\tau \rightarrow 0 \end{array} \right. \end{aligned}$$
(29)

Note that \(\beta ^W_{i,j,k}>0\). Thus, the LP is satisfied. It will be shown in the next section that the weighted LDA retains second order accuracy (Eq. 40) based on truncation error (TE) analysis. \(\square \)

3.4 Weighted Blended Approach

Based on [19,20,21], a blended approach is used to circumvent Godunov’s theorem. Because of the fact that the weighted N-scheme is not positive (“Appendix 3”), we shall use the classic N-scheme as the first order of the blending approach. For the second order, the classic and weighted LDA will be used. The original formulation is given by,

$$\begin{aligned} \phi _i^\text {B}=\theta \phi _i^\text {N}+\left( 1-\theta \right) \phi _i^\text {LDA},\quad \theta =\frac{\left| \phi _T\right| }{\sum _p\left| \phi _p^\text {N}\right| } \end{aligned}$$
(30)

In order to make the blending approach consistent, the averaging in N should be implemented in a way that the total residual for one specific cell should be same as the total residual for the LDA.

4 Truncation Error Analysis for the Linear Case

Although the Taylor series expansion may not be best suited to analyze errors on unstructured anisotropic grids, but we shall use it to perform an analytical error to study the numerical methods on uniform (isotropic) grids. The grid skewness on isotropic grids is controlled by varying the height (h) and width (k) of the element in-which \(k=hs\). The s is the stretching parameter to control the skewness (details are in “Appendix 5”). By doing so, we could now perform an analytical truncation error analysis on skewed isotropic grids to provide initial insights of the performance of various numerical methods.

In the truncation error analysis, only the isotropic grids are considered for the reasons mentioned before. The procedure of calculating the general equation are performed based on the main point \(u_0\) which more details could be found in [12]. Thus,

$$\begin{aligned} \text {TE}=w_0u_0+\sum _jw_ju_j \end{aligned}$$
(31)

where j stands for neighboring points. For an isotropic grid, there are two grid types as shown in Fig. 8. In order to make the calculation easier these two are combined and all the Taylor series analysis will be based on the main point (0) including the calculation for point 1. For instance, in the N-scheme all of the signals which are going to the main point from the neighboring cells is shown in the following.

Fig. 8
figure 8

The isotropic grid points and cell numbers. The s is the ratio of k / h. The \(\vec {\lambda }\) is the characteristic vector

Table 1 Normal distance of the neighbor points from the characteristic going through main point for isotropic grid
$$\begin{aligned} \phi _0^\tau =\phi _{i}^\tau +\phi _{ii}^\tau +\phi _{iii}^\tau +\phi _{iv}^ \tau +\phi _{v}^\tau +\phi _{vi}^\tau +\phi _{vii}^\tau +\phi _{viii}^\tau \end{aligned}$$
(32)

Consider \(\frac{b}{a}<\frac{k}{h}\); therefore,

$$\begin{aligned} \phi _{i}^\tau =\phi _{ii}^\tau =\phi _{iii}^\tau =\phi _{viii}^\tau =0, \end{aligned}$$
(33)

and,

$$\begin{aligned} \begin{array}{l} \phi _{iv}^\tau =\frac{ak}{2} (u_0-u_5),\quad \phi _{v}^\tau =\frac{1}{2} (a k (u_0-u_5)+b h (u_5-u_6)),\\ \phi _{vi}^\tau =\frac{bh}{2}(u_0 - u_6),\quad \phi _{vii}^\tau =\frac{bh}{2}(u_0 - u_7), \end{array} \end{aligned}$$
(34)

thus,

$$\begin{aligned} \phi _0^\tau =a k (u_0-u_5)+\frac{bh}{2}(2u_0+u_5-2u_6-u_7). \end{aligned}$$
(35)

And for the point 1,

$$\begin{aligned} \phi _1^\tau =\phi _{i}^\tau +\phi _{viii}^\tau +\phi _{ix}^\tau +\phi _{x}^\tau \end{aligned}$$
(36)

where,

$$\begin{aligned} \begin{array}{l} \phi _{ix}^\tau =\phi _{x}^\tau =0,\quad \phi _{i}^\tau =\frac{1}{2}(b h - a k) (u_0 - u_1),\\ \phi _{viii}^\tau =\frac{1}{2}(a k (-u_0 + u_1) + b h (u_1 - u_8)), \end{array} \end{aligned}$$
(37)

therefore,

$$\begin{aligned} \phi _1^\tau =\frac{1}{2}(2 a k (-u_0 + u_1) + b h (u_0 - u_8)). \end{aligned}$$
(38)

By combining \(\phi _0^\tau \) and \(\phi _1^\tau \) the general equation (total truncation error) for classic N-scheme will be,

$$\begin{aligned} \text {TE}=\frac{\phi _0^\tau +\phi _1^\tau }{2hk} =\frac{2ak(u_1-u_5)+bh(3u_0+u_5-2u_6-u_7-u_8)}{4hk} \end{aligned}$$
(39)
Table 2 The coefficients of first order methods in general equation for isotropic grid
Table 3 The coefficients of second order methods in general equation for isotropic grid

The normal distance of the streamline with each point will be used to construct the Taylor series (Table 1). All the coefficients for the isotropic grid are demonstrated in Tables 2 and 3. Moreover, the stencil (dependency of points) of each method is shown in Fig. 9. As it can be seen, the domain of dependency for RD methods are more compact relative to the finite volume leading to an early hypothesis that the RD methods are perhaps less sensitive to grid skewness. To find the truncation error, the first step is to expand the neighboring values based on the main point using Taylor series. Note that the solution is constant along the streamline direction. Thus, the Taylor series should expand only in the normal direction to the streamline. The normal distance of the streamline with each point will be used to construct the Taylor series (Table 1). Consequently, for different methods the global truncation error equation will be provided in Eq. 40. The Lax–Friedrich RD approach of [22] will also be included.

The weighted LDA method has a slightly larger computational stencil compared to the original LDA due to the nature of its signals distribution as shown in Fig. 9 but still has much smaller stencil relative to the second order finite volume approach. This is a small sacrifice to be made to model a more physical wave propagation on skewed grids.

Although the spatial order-of-accuracy of the LDA, Lax–Wendroff and weighted LDA are formally second order accurate but each has different coefficients multiplied to the error terms. We shall demonstrate that this terms would affect the performance of the methods on skewed triangular grids.

$$\begin{aligned} \begin{array}{l} \text {TE}_\text {N}= \left( \frac{b (b-2 a s) (a s+b)}{4 r^2 s}\right) hu_{nn} +\left( \frac{a b (a s+b) (4 a s-b)}{24 r^3}\right) h^2u_{nnn}+O\left( h^3\right) \\ \text {TE}_\text {LxF}= \left( -\frac{2 a^3 s^3+a^2 b s^2+3 a b^2 s+b^3}{3 r^2 s}\right) hu_{nn} +\left( \frac{b (2 a s+b) \left( a^2 s^2+b^2\right) }{12 r^3 s}\right) h^2u_{nnn}+O\left( h^3\right) \\ \text {TE}_\text {LDA}= \left( \frac{b \left( 4 a^3 s^3-6 a^2 b s^2+11 a b^2 s-3 b^3\right) }{24 r^3 s}\right) h^2u_{nnn}\\ \qquad \quad \qquad +\left( \frac{b^2 (b-2 a s) (b-a s) (a s+b)}{48 r^4 s}\right) h^3u_{nnnn}+O\left( h^4\right) \\ \text {TE}_\text {FV}(1^{st})= \left( -\frac{a \left( 2 a^2 s^2+b^2\right) }{6 r^2}\right) hu_{nn} +\left( \frac{a^3 b s^2+2 a b^3}{12 r^3}\right) h^2u_{nnn}+O(h^3)\\ \text {TE}_\text {FV}(2nd)= \left( -\frac{a^3 b s^2+8 a b^3}{72 r^3}\right) h^2u_{nnn} +\left( \frac{36 a^5 s^4+77 a^3 b^2 s^2+22 a b^4}{432 r^4}\right) h^3u_{nnnn}+O\left( h^4\right) \\ \text {TE}_\text {LDA(W)}= \left( \frac{a b \left( 2 a^2+5 b^2\right) }{24 r^3}-\frac{b^4}{24 r^3 s^3}+\frac{a b^3}{6 r^3 s^2} +\frac{-a^2 b^2-b^4}{24 r^3 s}-\frac{a^2 b^2 s}{12 r^3} \right) h^2u_{nnn}\\ \qquad \qquad \qquad \quad +\left( \frac{a b^2 \left( 3 a^2-2 b^2\right) }{144 r^4}-\frac{a b^4}{48 r^4 s^2}+\frac{b^5}{144 r^4 s^3}+\frac{a^3 b^2 s^2}{72 r^4} -\frac{a^2 b^3 s}{144 r^4}+\frac{b^5-a^2 b^3}{144 r^4 s} \right) h^3u_{nnnn}\\ \qquad \qquad \qquad \quad +O\left( h^4\right) \\ \text {TE}_\text {LxW}= \left( -\frac{b^3 (b-3 a s)}{8 r^3 s}\right) h^2u_{nnn} +\left( \frac{b^2 (9 b-10 a s) (b-a s) (a s+b)}{144 r^4 s}\right) h^3u_{nnnn}+O\left( h^4\right) \end{array} \end{aligned}$$
(40)
Fig. 9
figure 9

The stencil for isotropic grid for different methods

where,

$$\begin{aligned} r=\sqrt{a^2+b^2} \end{aligned}$$

Note that s is the stretching parameter which is connected to the skewness Q as it was mentioned in Eq. 71. The TE of each method depends on the grid skewness, the characteristic vector and the high order derivatives of the variables. The last two factors are problem dependent but the focus would be on the grid skewness dependency.

4.1 Analytical Case Study

We have selected a specific case study to analyze the truncation error of each method. The exact solution of this case study is given by,

$$\begin{aligned} u_\text {E}(x,y)=-\cos \left( 2\pi (bx-ay)\right) ,\quad a,b>0 \end{aligned}$$
(41)

In the current test case \(a=b=1\) is chosen. Note that there is more than one possibility for a and b (for instance, for finite volume cell vertex in the isotropic grid it is 24 conditions). For simplicity we just explore one condition. Based on Eq. 40 the truncation error (TE) for the RD and FV methods are shown in Eq. 42.

$$\begin{aligned} \begin{array}{l} \text {TE}_{\text {FV}(1^{st})}= h\left( -\frac{2s^2+1}{12} \right) u_{nn}+h^2\left( \frac{s^2+2}{24\sqrt{2}}\right) u_{nnn}+O\left( h^3\right) \\ \text {TE}_{\text {LxF}}= h\left( -\frac{\left( s \left( 2 s^2+s+3\right) +1\right) }{6 s}\right) u_{nn}+h^2\left( \frac{(2s+1)\left( s^2+1\right) }{24\sqrt{2} s}\right) u_{nnn}+O\left( h^3\right) \\ \text {TE}_{\text {N}}= h\left( -\frac{\left( 2s^2+s-1\right) }{8s}\right) u_{nn}+h^2 \left( \frac{(s+1)(4s-1)}{48\sqrt{2}}\right) u_{nnn}+O\left( h^3\right) \\ \text {TE}_{\text {FV}(2nd)}= h^2\left( \frac{s^2+8}{144 \sqrt{2}}\right) u_{nnn} +h^3\left( \frac{36 s^4+71 s^2-26}{1728}\right) u_{nnnn}+O\left( h^4\right) \\ \text {TE}_{\text {LDA}}= h^2\left( \frac{s\left( 4s^2-6s+11\right) -3}{48\sqrt{2}s}\right) u_{nnn} +h^3\left( \frac{(s-1)(s+1)(2s-1)}{192s}\right) u_{nnnn}+O\left( h^4\right) \\ \text {TE}_{\text {LDA(W)}}= h^2\left( \frac{-2 s^4+7 s^3-2s^2+4 s-1}{48 \sqrt{2} s^3}\right) u_{nnn}\\ \qquad \qquad \,\,\qquad +h^3\left( \frac{(s+1) \left( 2 s^4-3 s^3+4 s^2-4s+1\right) }{576 s^3}\right) u_{nnnn}+O\left( h^4\right) \\ \text {TE}_{\text {LxW}}= h^2\left( \frac{3 s-1}{16 \sqrt{2} s}\right) u_{nnn} +h^3\left( \frac{(s-1) (s+1) (10 s-9)}{576 s}\right) u_{nnnn}+O\left( h^4\right) \end{array} \end{aligned}$$
(42)

The truncation error (TE) plots over skewness are demonstrated in Fig. 10. Note that we consider the linear advection case in order to calculate the derivatives inside the truncation error based on test case 4.1. The analytical errors shows that there is a difference between first order methods as we vary the skewness. In addition, the amount of the error is different. The N-scheme is the best (both in terms of magnitude and minimal error increment) followed by the first order finite volume and lastly the Lax Friedrich method. This is expected because of the high amount of diffusion for the Lax Friedrich method. The N-scheme errors grow somewhat of linear to the grid skewness whereas the other first order methods have a quadratic rate. This provides another justification to utilize the classic N-scheme for the first order scheme when using the blended approach with weighted LDA.

Fig. 10
figure 10

Truncation error (TE) for linear case with \(Q=0.3-0.9\)

The analytical results for the second order methods are hugely different as shown in Fig. 10. For the best grid setting, the second order finite volume method produces the least error but the errors rapidly grow as we increase the skewness. The classic and weighted LDA is quite close to each other for the best grid. As the skewness is increased, the difference between TE grows larger but is much less than the second order finite volume. The weighted LDA has an almost a constant error value (or linearly increasing) when the grids are skewed, preserving accuracy even for very large skewness, unlike the original LDA which has a quadratic error increase. This analytically demonstrates that having a more physical signals distribution for a skewed element reduces the dependency on grid changes. The Lax–Wendroff performs similar to the LDA(W).

4.2 Numerical Results for Linear Case

The scalar equation will be solved in a \(1\times 1\) area with residual distribution and finite volume methods “Appendix 2” using the same problem presented in the truncation error analysis. The wave is coming from the bottom and left sides of the domain and going out from the top and right sides (\(\varvec{\lambda }=a\hat{i}+b\hat{j}\)).

Fig. 11
figure 11

Numerical \(L_2\) error versus the grid distance in logarithmic scale for the best grid (\(Q=0.3\))

Fig. 12
figure 12

Numerical \(L_2\) error for linear case with \(Q=0.3-0.9\)

The order of accuracy for some of the methods on the best grid (\(Q = 0.3\)) are depicted in Fig. 11. The numerical \(L_2\) error results are remarkably similar to the analytical TE as shown in Fig. 12 with the highlight of weighted LDA preserving accuracy even for \(Q=0.8\). Note that the weighted LDA preserves second order accuracy for skewed isotropic grids within the range of \(Q=0.3\) until \(Q=0.9\) for this scalar problem, both analytically and numerically but results are omitted for brevity. As in the analytical part, the Lax–Wendroff approach also performs admirably and comparable to the weighted LDA method.

It has to be mentioned that the \(L_2\) error is decreasing in the numerical results. However, in the TE in Fig. 10 shows an error increment or remaining constant. The main reason is coming from the numerical limitations. In the numerical experiments, there would be a grid refinement in one direction (and coarsening in the orthogonal direction) as the grid skewness is increased since the total number of elements is fixed within the domain. This is unavoidable for the grid choice that we use and also not present in the analytical TE analysis. Overall, there would be a downward shift of the error curves for the different methods, relative to the analytical one. Since the weighted LDA and Lax Wendroff methods are pretty much a constant error curve in the analytical part, the downward shifting causes them both to appear to have errors decrease when skewness is increased in the numerical part.

Furthermore, in the Figs. 13, 14 and 15, the error contours are included. As it can be seen, the errors increase as skewness is increased for the first order methods. For the second order methods, the results are almost similar on good grids. As the skewness is increased, the second order FV is the worst followed by the LDA. The weighted LDA demonstrates very little differences in the results when the grids are skewed.

Fig. 13
figure 13

The error contours on the isotropic grid for \(Q=0.3\)

Fig. 14
figure 14

The error contours on the isotropic grid for \(Q=0.6\)

Fig. 15
figure 15

The error contours on the isotropic grid for \(Q=0.9\)

5 Extension of Weighted Approach to the Nonlinear Burgers Equations

Consider the Burgers equation

$$\begin{aligned} \frac{\partial u}{\partial t}+\vec {\nabla }\cdot \vec {F}=0,\quad \vec {F}=\frac{u^2}{2}\hat{i}+u\hat{j} \end{aligned}$$
(43)

Based on Eq. 1, the characteristic speed is \((a,b)=(u,1)\). The solution will be solved in a square area (\([-1,0]\times [0,1]\)).

5.1 Nonlinear Burgers Equation

For a nonlinear scalar case, the main idea remains the same. The calculation of signals for weighted LDA has two steps,

  • Calculating \(\beta _{i,j,k}\) and the total residual from the classic LDA (Eq. 7).

  • Determining all the weights from the Eq. 27.

  • Use Eq. 25 in order to find weighted LDA signals.

5.2 Numerical Results for Nonlinear Cases

5.2.1 Expansion Wave

For the expansion case, the bottom edge is the inlet wave,

$$\begin{aligned} u_\text {bottom}=\frac{U_r+x(U_r-U_l)}{1+y(U_r-U_l)},\quad U_r>U_l \end{aligned}$$
(44)

where \(U_r\) and \(U_l\) are the right and left side of the values. The condition \(U_r>U_l\) ensures that the solution will expand without any shock waves. In this study, \(U_r=1.5\) and \(U_l=-0.5\) are chosen. In order to compare the numerical results, the cross section of \(y=0.5\) are shown for different methods in Figs. 16, 17 and 18.

Fig. 16
figure 16

The cross section profiles for expansion case (\(Q=0.3\))

Fig. 17
figure 17

The cross section profiles for expansion case (\(Q=0.5\))

Fig. 18
figure 18

The cross section profiles for expansion case (\(Q=0.8\))

As demonstrated in Fig. 19, the most accurate and least sensitive method for non linear smooth case is the weighted LDA. The LDA method performs reasonably well on grids with low skewness. Nonetheless, its \(L_2\) error is increases when skewnesss is increased unlike the weighted LDA. The second order finite volume method is the worst second order method.

The N scheme is the most dependable first order method. The first order finite volume method performs really good on the best grids but rapidly deteriorates as grid skewness is increase. Moreover, the Lax–Friedrichs method is the worst. Like the second order finite volume, the first order version is also showing the most grid-dependent result and even more than the Lax Friedrichs RD method.

Fig. 19
figure 19

Numerical \(L_2\) error for non-linear expansion case with \(Q=0.3-0.9\)

5.2.2 Shock-Tree Problem

Recall the Burgers’ equation (Eq. 43), with the inflow boundary at the bottom,

$$\begin{aligned} u(x,0)=1.5-2x \end{aligned}$$
(45)

The steady state exact solution is,

$$ \begin{aligned} u(x,y)=\left\{ \begin{array}{ll} -0.5 &{} y\le \frac{1}{2} \quad \& \quad \frac{x-\frac{3}{4}}{y-\frac{1}{2}}<\frac{1}{2}\\ 1.5 &{} y\le \frac{1}{2} \quad \& \quad \frac{x-\frac{3}{4}}{y-\frac{1}{2}}>\frac{1}{2}\\ \max \left( -0.5,\min \left( 1.5,\frac{x-\frac{3}{4}}{y-\frac{1}{2}}\right) \right) &{} \text {elsewhere} \end{array} \right. \end{aligned}$$
(46)

The initial condition is set to \(u=0\). We represent the solutions computed for the isotropic grid a discussed in section “Appendix 5”. Furthermore, the cross sectional results of each method are shown in Figs. 20, 21 and 22. The contour plots for the best grid is demonstrated in Fig. 24. Note that the Lax–Wendroff and the LDA(W) results are very similar therefore, we only show LDA(W) for the most part.

There is small difference in the results of the second order methods near the shock as the grids are skewed.The weighted LDA produces oscillations around the shock due to Godunov’s theorem similar to other second order methods. However, monotone results are achieved once a blended (limited) LDA and blended weighted LDA are being used.

Moreover, the blending and the PSI approaches are tested in order to show the behavior of these methods in Fig. 23. As it can be seen, the blending approaches and the PSI are producing a monotone results.

Fig. 20
figure 20

The cross section profiles for shock-tree case (\(Q=0.3\))

Fig. 21
figure 21

The cross section profiles for shock-tree case (\(Q=0.5\))

Fig. 22
figure 22

The cross section profiles for shock-tree case (\(Q=0.8\))

Fig. 23
figure 23

The cross section profiles for shock-tree case (\(Q=0.8\)) for the blended approaches

Fig. 24
figure 24

The contours of the shock tree case on the isotropic grid for \(Q=0.3\)

6 Extension of Weighted Approach to the System of Euler Equations

The system of ideal Euler equations with the conserved variables \(\varvec{u}=(\rho , \rho u, \rho v, \rho E)^T\) satisfy the following.

$$\begin{aligned} \varvec{u}_t + \nabla \cdot \vec {\varvec{F}} = 0 \end{aligned}$$
(47)

or in integral form

$$\begin{aligned} \oint (\varvec{u}dA-\vec {\varvec{F}}dt)=0 \end{aligned}$$
(48)

with the fluxes defined as \(\vec {\varvec{F}}=(\varvec{f}(\varvec{u}),\varvec{g}(\varvec{u}))\).

$$\begin{aligned} \varvec{f}(\varvec{u})&=\left[ \begin{array}{c} \rho {u}\\ \rho {u^{2}} + P\\ \rho {uv}\\ \rho {uH} \end{array} \right] ,&\varvec{g}(\varvec{u})&=\left[ \begin{array}{c} \rho {v}\\ \rho {uv}\\ \rho {v^{2}} + P\\ \rho {vH} \end{array} \right] \end{aligned}$$
(49)

where the total energy and total enthalpy are defined as \(E=e+\frac{u^2 + v^2}{2}\) and \(H=E+\frac{P}{\rho }\). The compatibility relation between pressure and internal energy e is used for closure, \(P=\rho {e}(\gamma -1)\) and \(\gamma \) is the fluids ratio of specific heats. The Jacobian matrix is defined as the following.

$$\begin{aligned} J=\varvec{R}\Lambda \varvec{R}^{-1} \end{aligned}$$
(50)

where the right eigenvectors are written as follows.

$$\begin{aligned} \varvec{R}=\left[ \begin{array}{cccc} 1 &{} 1 &{} 0 &{} 1\\ u-an^x &{} u &{} -n^y &{} u+an^x\\ v-an^y &{} v &{} n^x &{} v+an^y\\ h-aq &{} \frac{u^2+v^2}{2} &{} r &{} h+aq \end{array} \right] \end{aligned}$$
(51)

where \(n^x\) and \(n^y\) is a unique vector that is illustrating the direction of the decomposition. We define, \(r=-un^y + vn^x\) and \(q=un^x+vn^y\) are the velocity along and normal to the decomposition direction. And,

$$\begin{aligned} \Lambda =\left[ \begin{array}{cccc} q-a &{}\quad 0 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad q &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad q &{}\quad 0\\ 0 &{}\quad 0 &{} \quad 0 &{}\quad q+a \end{array} \right] \end{aligned}$$
(52)

where,

$$\begin{aligned} a=\sqrt{\frac{\gamma P}{\rho }} \end{aligned}$$
(53)

6.1 Classic LDA

In the classic LDA the signal distribution is,

$$\begin{aligned} \varvec{\phi }_i=\varvec{\beta }_i\varvec{\phi }_T \end{aligned}$$
(54)

where,

$$\begin{aligned} \varvec{\beta }_i=K_i^+\left( \sum _pK_p^+\right) ^{-1},\quad p=i,j,k \end{aligned}$$
(55)

The definition of \(K_i^+\) is,

$$\begin{aligned} K_i^+=\frac{1}{2}R_i\left( \vec {\Lambda }\cdot \vec {N}\right) ^+_iL_i \end{aligned}$$
(56)

where,

$$\begin{aligned} (c)^+=\left\{ \begin{array}{ll} c &{} \quad c>0\\ 0 &{} \quad c\le 0 \end{array} \right. \end{aligned}$$
(57)

Note that the \(\bar{(.)}\) variables are calculated based on the arithmetic average of a cell. \(\bar{(.)}_i\) represents the cell average value using a specific edge (ijk) inward normal.

6.2 Lax–Wendroff

The Lax–Wendroff for the system of equations discussed in [17] which is given by,

$$\begin{aligned} \varvec{\phi }_i=\varvec{\beta }_i^\text {LxW}\varvec{\phi }_T \end{aligned}$$
(58)

where,

$$\begin{aligned} \varvec{\beta }_i^\text {LxW}=\frac{1}{3}I+\nu _cK_i \left( \sum _p\left| K_p\right| \right) ^{-1},\quad p=i,j,k \end{aligned}$$
(59)

The \(\nu _c\) is the cell CFL number.

6.3 Weighted LDA

6.3.1 Geometrical Aspects on Skewed Grids for System of Equations

In the system of equations the eigenvalues could not be implemented as the scalar since the acoustic waves have omni direction. Instead, another parameter is defined to show the residual portion coming from a specific edge. Consider Eq. (56), the \(\left( \vec {\Lambda }\cdot \vec {n}\right) ^+_i\) is a scalar quantity. However, it shows the projection of the characteristic vector along the inward normal of an edge. Therefore, one could reconstruct a vector based on

$$\begin{aligned} \vec {\Lambda }_i^{\vec {n}_i}=\left( \vec {\Lambda } \cdot \vec {n}\right) _i^+\vec {n}_i \end{aligned}$$
(60)

If \(\left( \vec {\Lambda }\cdot \vec {n}\right) _i\) is positive (negative), the direction of this vector will be inward (outward) normal of the edge.

In the classic approaches, all the residual portion that is coming form positive \(\vec {\Lambda }_i^{\vec {n}_i}\) will be going to point i that is suitable for equilateral grids (Fig. 25a). On the other hand, for a skewed grid as it is illustrated in Fig. 25, we are using the weighted idea to distribute the residual. Consequently, even though the RD methods are compact and less sensitive to the grid, the distribution in classic RD approaches could be improved in order to generate a method that is distributing the signals considering. The geometrical aspects here is same as scalar base on the formulation. Nevertheless, the difference is lying in the fact that for system of equations there are three inward normal directions that we have to take into account instead of one single characteristic vector. Recall Eq. 24,

$$\begin{aligned} w_{i(\text {point of interest})}^{e(\text {edge number})}= \left( \frac{A_i}{A^\tau }\right) _{\text {edge:}e}=\frac{1}{3}- \frac{\vec {N}_e\cdot \vec {N}_i}{3\min \left( \vec {N}_e\cdot \vec {N}_p\right) } ,\quad p=i,j,k \end{aligned}$$
(61)

where \(A^\tau \) is the total area of the element.

Fig. 25
figure 25

General signal distribution on two elements. a Equilateral element, b Skewed element

6.3.2 Formulation

In the Euler system of equations, the formulation of weighted LDA is the same as the scalar Eq. 25 but the signals \(\varvec{\phi }_i\) are now vectors. Thus,

$$\begin{aligned} \varvec{\phi }_i^\tau =\left( \sum _ew^e_i\varvec{\beta }_e\right) \varvec{\phi }^\tau _T,\quad e=i,j,k \end{aligned}$$
(62)

The \(\varvec{\beta }_{i,j,k}\) is determined exactly like the classic LDA in Eq. 55. Note that,

$$\begin{aligned} w^e_i=\left( \frac{A_i}{A^\tau }\right) _{\text {edge:}e}=\frac{1}{3}- \frac{\vec {N}_e\cdot \vec {N}_i}{3\min \left( \vec {N}_e\cdot \vec {N}_p\right) } ,\quad p=i,j,k \end{aligned}$$
(63)

Lemma 6.1

The weighted LDA approach for system of equations is conservative.

Proof

The summation of signals is,

$$\begin{aligned} \begin{array}{rl} \varvec{\phi }_i^\tau +\varvec{\phi }_j^\tau +\varvec{\phi }_k^\tau =&{} \left( \sum _{e}\left( \frac{A_i}{A^\tau }\right) _{\text {edge:}e}\varvec{\beta }_e +\sum _{e}\left( \frac{A_j}{A^\tau }\right) _{\text {edge:}e}\varvec{\beta }_e\right. \\ &{}+\left. \sum _{e}\left( \frac{A_k}{A^\tau }\right) _{\text {edge:}e} \varvec{\beta }_e\right) \varvec{\phi }^\tau _T\\ =&{} \left( \sum _{e}\underbrace{\left( \frac{A_i+A_j+A_k}{A^\tau } \right) _{\text {edge:}e}}_{1}\varvec{\beta }_e\right) \varvec{\phi }^\tau _T\\ =&{} \underbrace{\left( \sum _{e}\varvec{\beta }_e\right) }_ {\varvec{I}}\varvec{\phi }^\tau _T =\varvec{\phi }^\tau _T \end{array} \end{aligned}$$
(64)

Hence, the conservation is satisfied. \(\square \)

Lemma 6.2

The weighted LDA approach for system of equations is LP (Linearity Preserving).

Fig. 26
figure 26

The RG1, RG2 and RG4 grids

Proof

According to Eq. 62,

$$\begin{aligned} \left\{ \begin{array}{l} \varvec{\phi }_i^\tau =\left( \sum _{e}\left( \frac{A_i}{A^\tau }\right) _{\text {edge:}e}\varvec{\beta }_e\right) \varvec{\phi }^\tau _T\\ \varvec{\phi }_j^\tau =\left( \sum _{e}\left( \frac{A_j}{A^\tau }\right) _{\text {edge:}e}\varvec{\beta }_e\right) \varvec{\phi }^\tau _T\\ \varvec{\phi }_k^\tau =\left( \sum _{e}\left( \frac{A_k}{A^\tau }\right) _{\text {edge:}e}\varvec{\beta }_e\right) \varvec{\phi }^\tau _T \end{array} \right. \quad \wedge \quad \varvec{\phi }^\tau _T\rightarrow 0 \quad \Rightarrow \quad \left\{ \begin{array}{l} \varvec{\phi }_i^\tau \rightarrow 0\\ \varvec{\phi }_j^\tau \rightarrow 0\\ \varvec{\phi }_k^\tau \rightarrow 0 \end{array} \right. \end{aligned}$$
(65)

Thus, the LP condition is satisfied. \(\square \)

The Lax–Wendroff version for the systems of Euler equations can be readily found in [17]. Note that, the weighted LDA is still an upwind-type method unlike the Lax–Wendroff approach since only the positive (upwind) \(K_i^+\) is considered for the signals distribution.

Fig. 27
figure 27

Histogram for different grid disturbances using in the Ringleb case

Fig. 28
figure 28

Numerical \(L_2\) error versus the grid distance in logarithmic scale for different grid types (RG1, RG2, RG3 and RG4), respectively

6.4 Numerical Results for System of Euler Equations

6.4.1 Ringleb Flow

The Ringleb flow [23] is used to study the order of accuracy analysis for the Euler equation. In this paper, the order of accuracy of the second order finite volume (“Appendix 2”), classic LDA and weighted LDA are examined with Ringleb flow using different disturbance percentage of the grid (Fig. 26). The distribution of grid skewness for each grid type is demonstrated in Fig. 27. The RG1, RG2 and RG3 are showing the 20, 50 and 90% of disturbances. Moreover, the RG4 stands for the 90% disturbances which is disturbed twice.

Fig. 29
figure 29

Histogram for different grid disturbances using in the cylinder case; G1, G2 and G3 which are defined in “Anisotropic Grid” section of “Appendix 5”

Fig. 30
figure 30

The G1, G2 and G3 grids

Fig. 31
figure 31

2nd order finite volume, Lax–Wendroff, classic and weighted LDA for G1, G2 and G3

The order of accuracy for different methods are demonstrated in Fig. 28. The second order FV shows a dramatic order of accuracy drop. Although it is second order for RG1, it drops significantly to first order in RG2. More importantly, on RG3 grid, the results become erratic in which the order of accuracy can not be measured. Finally, the second order finite volume does not even have a converged solution for RG4. Overall, the LDA and weighted LDA preserve the order of accuracy as the grid becomes highly skewed but the former has a larger increment in error magnitude. This demonstrates that the weighted LDA is less sensitive to grid changes.

6.4.2 Subsonic Cylinder

The weighted LDA approach is evaluated on a subsonic flow over cylinder with incoming free stream Mach number 0.3. In order to shed light on the reliability and solidness of the methods, the grid will be disturbed and randomized by three steps which are 20, 50 and 90% (G1, G2 and G3) demonstrated in Figs. 29 and 30.

There are three different grid sets in which the second order methods including 2nd order finite volume (“Appendix 2”), classic and weighted LDA are tested. After disturbing the grid point, the quality of the grid is measured by the percentage of the grid number’s skewness. In Fig. 29, the distribution of the skewness versus the percentage of number of the cells is shown.

All the results are shown in Fig. 31. Clearly, the weighted LDA is much superior to the original LDA and second order finite volume methods particularly in recovering the stagnation point at the back of the cylinder. In fact, the second order finite volume solution diverges for the worst grid set up. It should be mentioned that the two LDA methods are not identical for the best grid since around the cylinder the skewness is not absolutely zero (\(Q\sim 0.0197\)). The more disturbed the grid, the more the difference between classic and weighted LDA will be. The LDA(W) is very similar to the Lax–Wendroff as the whole concept is similar, except for the fact that the LDA(W) is upwind method and Lax–Wendroff is a central scheme.

7 Conclusion

It is demonstrated in this paper that overall the finite volume methods are more susceptible to results deterioration compared to the residual distribution methods. This is mainly due to perhaps the use of non-compact stencils of the former relative to the latter. Changes in grids skewness will have a much more detrimental effects to the orientation of the numerical methods with non-compact stencils relative to a method with compact stencil.

However, the classic LDA method in this paper is only slightly better relative to second order finite volume method in terms of preserving accuracy. Unlike the original LDA, the new weighted LDA method preserves accuracy for almost all skewness and this is demonstrated for the selected test problems herein using scalar equations and the system of Euler equations. This is due to the weighted LDA not only depends on the local wave-characteristics to distribute the residuals from classic LDA but also actively adjusting based on the grid topology. For an equilateral triangular element, the weighted LDA reduces to the original LDA. However, the process of weight distribution being locally applied on each node will be triggered once the elements deviate from equilateral triangles. This locally-adaptive process will cater for changes in grids even though there is no change in the wave-characteristics. Although the weighted LDA has a larger computational stencil compared to the original LDA but it still remains compact, within one neighboring node to the main node of interest. Nevertheless, the signals formulation of the weighted LDA is relatively simple and has a similar form to the Lax–Wendroff method in a sense that it may lose upwinding properties for highly skewed grid. This is the price to be paid for achieving less sensitivity on grid skewness.

Since the weighted LDA has a larger computational stencil yet remain compact, the prospect of extending to higher order accuracy is more natural compared to classic LDA. Various combination of the weights to each node can be explored to cancel out the low order truncation error terms and the work is currently underway.