Abstract
A new approach in the finite difference framework is developed, which consists of three steps: choosing the dimension of the local approximation subspace, constructing a vector basis for this subspace, and determining the coefficients of the linear combination. New schemes were developed to form the basis of the local approximation subspace, which were derived by approximating only the term of the Helmholtz equation. The construction of a basis of the local approximation subspace allows the new approach to be able to represent any finite difference scheme that belongs to this subspace. The new method is both consistent and capable of minimizing the dispersion relation for all stencils in all dimensions. In the one-dimensional case and 3-point stencil, pollution error is eliminated. In the two-dimensional (2D) case and 5-point stencil, the Complete Centered Finite Difference Method presents a dispersion relation equivalent to Galerkin/Least-Squares Finite Element Method. In the 2D case and 9-point stencil, two versions were developed using two different bases for the local approximation space. Both versions are equivalent and exhibit a dispersion relation similar to Quasi Stabilized Finite Element Method. Additionally, the dispersion analysis revealed a connection between the coefficients of the linear system and the stencil symmetry.
Key words
dispersion analysis; finite difference method; Helmholtz equation; local truncation error; stabilization
INTRODUCTION
The Helmholtz equation has great applicability in physics and engineering because it describes the time-harmonic acoustic, elastic and electromagnetic waves. Stable and accurate numerical solutions using the finite difference method (FDM) and finite element method (FEM) have been a major challenge to date as reported in a vast literature (Harari & Hughes 1991, Ihlenburg & Babuška 1995a, Singer & Turkel 1998, Alvarez et al. 2006). It is well known that, when the wavenumber of the exact solution increases, the numerical solutions lose stability and accuracy, even if the ‘rule of thumb’ (Harari & Hughes 1991, Ihlenburg & Babuška 1995a) is satisfied. This heuristic rule prescribes a relationship between and the mesh parameter necessary for the numerical solution to adequately approximate a wavelength , where a reasonable intuitive choice for the number of nodes per wavelength is . However, this rule does not guarantee stability and accuracy for medium and high values (Ihlenburg & Babuška 1995b, Singer & Turkel 1998, Ihlenburg 1998, Alvarez et al. 2006). In these cases the wavenumber of the numerical solution can be very different from . This misbehavior, known as pollution of the finite element solution or pollution effect (Ihlenburg & Babuška 1995a, Babuška et al. 1995, Babuška & Sauter 1997), is also present in numerical solutions using FDM.
In the 1990s, FEM emerged that eliminated the pollution effect in the one-dimensional (1D) case with pioneering work conducted by Professor Thomas J.R. Hughes (Harari & Hughes 1991, Harari & Hughes 1992). The Galerkin Least-Squares Finite Element Method (GLS) introduces a free parameter that can be chosen so that (dispersion analysis) in the 1D case (Harari & Hughes 1992). However, when applied to the two-dimensional (2D) case, the GLS method presents a pollution effect similar to the classical Galerkin FEM (Thompson & Pinsky 1995). Currently, the idea is accepted that in 2D and three-dimensional (3D) cases, it is impossible to completely eliminate this pollution effect (Babuška & Sauter 1997). Therefore, the new challenge was to develop methods that minimize this pollution effect with the work led by Professor Ivo M. Babuška (Babuška et al. 1995). The Quasi Stabilized Finite Element Method (QSFEM), as presented in (Babuška et al. 1995), introduces modifications at the algebraic level, and no variational formulation is associated with this method. For that reason, there was no FEM derived from a variational formulation with a dispersion relation equivalent to QSFEM. Later, methods with a dispersion relationship equivalent to QSFEM will emerge (Alvarez et al. 2006, Loula et al. 2007, Rochinha et al. 2007, Carmo et al. 2008).
Within the framework of the FDM, some schemes that improve the quality of the numerical solution have been developed. For example, in Singer & Turkel 1998, fourth-order schemes are developed based on generalizations of Padé’s approximations. In Sutmann 2007, new compact finite difference schemes of sixth order are developed for the 3D case. In Nabavi et al. 2007, a new 9-point sixth-order accurate compact method is developed for the 1D and 2D cases. In Fernandes & Loula 2010, a quasi-optimal finite difference method on non-uniform and unstructured meshes is developed. In Wu (2017) a dispersion minimizing compact finite difference scheme of fourth order is developed for the 2D case. In Wu & Xu (2018), an optimal compact finite difference scheme of sixth order is developed for the 2D case. However, all of these schemes can be seen as isolated or incomplete attempts to improve the numerical solution. This is because none of these schemes consider a completely local approximation subspace.
In the present work, the local approximation subspace is considered in its entirety, since a basis of vector is constructed for this subspace. Thus, it is possible to develop a new formalism within the finite difference framework, which always generates the numerical solution with the dispersion relation with the lowest possible error. The new approach, called the Complete Centered Finite Difference Method, is consistent and presents the highest possible stability (Lax & Richtmyer 1956). That is, for the Helmholtz equation, the new method is convergent and exhibits the lowest possible pollution effect. In this first article, our analysis is performed for the Helmholtz scalar equation in an interior domain with Dirichlet boundary conditions, considering only the 1D and 2D cases on uniform meshes. This choice was made with the aim of presenting the new approach in a simple way. In future work, non-uniform meshes and the 3D case will be considered, in addition to Neumann boundary conditions.
The work is organized as follows. The Helmholtz equation and the classical centered scheme for the 1D and 2D cases are presented first. In next section, the new method for the 1D and 2D cases using different uniform stencils is developed, along with new centered schemes necessary to form the basis of the local approximation subspace. Some of the new schemes were developed by simply making new approximations of the term in the Helmholtz equation. Later, the dispersion analysis of all presented schemes is carried out, along with the selection of free parameters for the new method. In next section, the local truncation error of all analyzed schemes is presented, demonstrating that all schemes are consistent. That is, as the mesh is refined, the numerical solution tends toward the exact solution. Later section presents some numerical experiments, which confirm the good performance of the new method and the theoretical analysis carried out. In the final section, some concluding remarks and suggestions for future work are presented.
Helmholtz equation and centered finite difference method
Consider the Helmholtz scalar equation in an interior domain and with Dirichlet boundary conditions.
where is the wavenumber, is the interior of the bounded domain with a Lipschitz boundary , is a source term, and is a scalar field describing the time-harmonic acoustic waves.In uniform meshes or grids and 3-point stencils, for the 1D case, the well-known second order centered finite difference scheme approximates the second derivative by
where , , and (LeVeque 2007). The second term of the Helmholtz equation is approximated as . This results in the equation for the node of the stencil where, and . If the generating vector of the stencil equation is defined as and the unknown vector as , then equation (4) for every interior point can be seen as the inner product of these two vectors . In the particular case of the homogeneous Helmholtz equation (), these vectors are orthogonal . This mathematical formalism for representing a finite difference scheme will facilitate the development of the new method in the next section. It should be noted that the dimension of the vectors and coincides with the number of points of the stencil considered.Similarly, for the 2D case the second derivatives are approximated by
and , which results in the equation for the central node (partial ordering or enumeration) where and . In this case, the generating vector of the stencil equation is defined as and the unknown vector as . This way, the stencil equation (6) for the interior node continues to be the inner product .Complete centered finite difference method
Consider any generic finite difference scheme with solution , where denotes the solution space. This space will be called the global approximation space to differentiate it from the local approximation subspace . The local approximation subspace contains only the components of the vector that are part of the stencil equation, while the global approximation space contains all the components of the vector . The dimension of this space is determined by the number of mesh nodes with degrees of freedom, and denoted by . This space contains all vectors with dimension . The interpolant , defined as the exact solution of the Helmholtz equation evaluated at the mesh nodes, is an element of this space. Thus, the global error can be defined. It is well known that the approximation quality of a finite difference scheme is characterized by three properties: convergence, stability and consistency (Lax & Richtmyer 1956, LeVeque 2007). A finite difference scheme is said to be convergent if when , where denotes some norm in . Also, it is well known that the convergence of a scheme is guaranteed if it is stable and consistent.
Let the linear system of algebraic equations of any scheme be denoted by . This finite difference scheme is said to be stable if there is the inverse matrix such that , where is a constant that does not depend on , is a specific value of the mesh parameter, and denotes some matrix norm. As mentioned previously, for medium and high most of the known FDM are not stable for meshes that satisfy the rule of thumb () (Ihlenburg & Babuška 1995a). Only in meshes that verify will there be asymptotic behavior in the convergence of the global error. In the region between and , there is pre-asymptotic behavior in the convergence of the global error.
Consider the equation corresponding to an arbitrary interior node (in global ordering) of the system . This equation is determined by the type of stencil chosen and the finite difference approximations used. Locally at the stencil level, the unknowns of this equation belong to the subspace with dimension . That is, by fixing the number of points on the stencil, the dimension of the local approximation subspace is determined. This space contains all vectors with dimension . Thus, for each central node of the stencil corresponds to the the component of the local truncation error vector , where denotes the exact solution. This finite difference scheme is said to be consistent if the local truncation error when . On the other hand, a set of linearly independent vectors forms a basis for this local approximation subspace , and any vector in this subspace can be represented as a linear combination of the vectors in this basis. This is the first key idea of the new approach, creating a finite difference method capable of representing any element of the local approximation subspace .
In finite difference terms, if the basis vectors of subspace are chosen as the generating vectors of the stencil equation, then this new approach allows representing the equation of any scheme at every interior point (global ordering or enumeration) as being a linear combination of generating vectors linearly independent, then
where are the standard coefficients of the linear combination. These coefficients can be seen as free parameters to be determined considering some criteria for the problem under study, and this is the second key idea of the new approach. In the case of the Helmholtz equation, the criterion used to determine the free parameters will be the minimization of the dispersion relation (Harari & Hughes 1992, Ihlenburg & Babuška 1995b, Babuška et al. 1995).This new finite difference approach is called the Complete Centered Finite Difference Method (CCFDM) (Nunes 2024). The term ‘complete’ indicates that once a number of stencil points is fixed, the maximum number of stencil equations necessary to have a complete representation of the local approximation subspace are used, that is, the new approach is capable to generate any element of this subspace . The word centered indicates that only centered difference formulas were used in this work, although this approach can also be applied with uncentered difference formulas.
In short, the new formalism is simple and consists of three basic steps. In the first step, a type of stencil with a number of points is chosen, and with this the dimension of the local approximation subspace is fixed. This subspace determines the number of non-zero diagonals in the matrix of the linear system, and consequently the bandwidth of this matrix. In addition, once is fixed, the maximum possible order of approximation for the derivatives is also fixed. In the second step, a vector basis is constructed for the local approximation subspace . The vectors of this basis are chosen among the generating vectors corresponding to the equation of each scheme for this stencil. The generating vectors are obtained by making different approximations to the terms of the partial differential equation (PDE). Since the dimension of the subspace is , then linearly independent generating vectors are needed. Just as a reminder, the generating vectors are linearly independent if the system has the unique solution , where the columns of the matrix are formed by the generating vectors , and the vector is formed by the coefficients of the linear combination. In the third step, the coefficients of the linear combination are determined by requiring or imposing that some specific criterion be checked by the stencil equation. For example, this criterion can be chosen in such a way as to guarantee greater stability and/or accuracy of the method. Once these three steps have been completed, if it is necessary to improve the approximation quality of the method, then it is necessary to increase the dimension of the local approximation subspace . In other words, it is necessary to increase the number of points in the stencil. In the following subsections, the first and second steps of the new formalism will be detailed, and in next section, the third step will be detailed.
CCFDM for 1D case and 3-point stencil
In this case, the local approximation subspace has dimension . Consider centered finite difference formulas such that result in three stencil equations with vectors , and linearly independent. Thus, the CCFDM equation for the central node of this stencil is
where , and . With this, the first step of formalism is completed. It remains to find three schemes with stencil equations whose generating vectors are linearly independent. These vectors can be found using different approximations for the second derivative and/or for the term of the Helmholtz equation. Here the second derivative is approximated only by the second-order centered finite difference formula (3), and three different approximations are presented for the term of the Helmholtz equation.The classical centered finite difference scheme (CC) described by the equation (4) generates the first vector . A new scheme (NS-1) is generated with the approximation , resulting in the equation for the central node of the stencil
Thus, the generating vector of the equation of this stencil is . This approximation for can be understood as an average of the solution around the central node (Alvarez & Nunes 2024, Nunes 2024). Another new scheme (NS-2) is generated with the approximation , resulting in the equation whose generating vector is . More details and other approximations for can be found in Alvarez & Nunes (2024) and Nunes (2024).It can be demonstrated that the vectors , and are linearly independent (Nunes 2024). With this, the second step of formalism is completed. Therefore, with these vectors , and , the equation (8) is capable of generating any scheme for this 3-point stencil. Although a complete basis of three vectors was constructed for the subspace , in the case of uniform meshes, the Corollary 1 guarantees that only two vectors will be needed for this basis. This corollary will be seen in the dispersion analysis in the next section. Further on, the dispersion analysis will show that in this local approximation subspace with dimension , the CCFDM is capable of eliminating the pollution effect, making it unnecessary to increase the dimension of this subspace .
As mentioned in the Introduction, schemes CC (4), NS-1 (9), NS-2 (10) or any other individual scheme are ‘isolated or incomplete’ attempts to improve the numerical solution. This is because it is very difficult for a single scheme with generating vector to be as close as possible to the ‘best approximation’ in this subspace . However, a basis with three generating vectors , and always allows generating the scheme closest to the ‘best approximation’ in this subspace .
CCFDM for 2D case and 5-point stencil
For this case, the local approximation subspace has dimension . Consider centered finite difference formulas such that result in five stencil equations with vectors , , , and linearly independent, where
Thus, the equation for the central node (partial ordering or enumeration) of any 5-point stencil can be generated as where , , , and . With this the first step of formalism is completed. The generating vectors are obtained with five different approximations for the term of the Helmholtz equation and the same approximation (5) for the Laplacian (Nunes 2024).The first vector is obtained with the typical centered difference scheme (CC) described by the equation (6). Analogously to the 1D case, a new scheme (NS-1) is generated with the approximation , resulting in the equation for the central node
where , and the generating vector of the equation of this stencil is . Another new scheme (NS-2) is generated with the approximation , resulting in the equation for the central node where , and . The generating vector of the equation of this stencil is . The third new scheme (NS-3) is generated with the approximation , resulting in the equation for the central node where , and . The generating vector of the equation of this stencil is . The last new scheme (NS-4) needed to complete a basis for the subspace is generated with the approximation , resulting in the equation for the central node where , and . The generating vector of the equation of this stencil is . It can be demonstrated that the vectors , , , and are linearly independent (Nunes 2024). With this the second step of formalism is completed.Although a complete basis of five vectors was constructed for the subspace , in the case of uniform meshes, the Corollary 1 guarantees that only three vectors will be needed for this basis. Further on, the dispersion analysis will show that in this local approximation subspace with dimension , the CCFDM is capable of minimizing pollution effect. However, this minimization presents a dispersion relation equivalent to the GLS method (Thompson & Pinsky 1995), making it necessary to increase the dimension of this subspace to obtain a dispersion relation equivalent to the QSFEM (Babuška et al. 1995).
Again, schemes CC (6), NS-1 (52), NS-2 (53), NS-3 (54), NS-4 (55) or any other individual scheme are ‘isolated or incomplete’ attempts to improve the numerical solution. This is because it is very difficult for a single scheme to be as close as possible to the ‘best approximation’ in this subspace . However, a basis with five generating vectors , , , and always allows generating the scheme closest to the ‘best approximation’ in this subspace , and this is done with the optimal choice of linear combination coefficients via dispersion analysis. These statements remain valid if the dimension of the subspace is increased, but as the dimension of this subspace increases it will be more difficult for any individual scheme to be as close as possible to the ‘best approximation’. Furthermore, this is considered impossible for the Helmholtz equation in two and three dimensions, as it is impossible to eliminate the pollution effect in these cases.
CCFDM for 2D case and 9-point stencil
In this case, the local approximation subspace has dimension . Consider centered finite difference formulas such that result in nine stencil equations with vectors , , , , , , , and linearly independent. Thus, the equation for the central node (partial ordering or enumeration) of any 9-point stencil can be generated as
And so the first step of the new formalism is completed.The compact 9-point stencil in Figure 1 (red color) can also be decomposed into two 5-point stencils (black and blue) (Vichnevetsky & Bowles 1982). In this stencil, the Laplacian will be approximated in two different ways. The first approximation will use centered formulas of second order (approximate Laplacian with 5-point), and the second approximation will use centered fourth-order formulas (approximate Laplacian with 9 points). In this way, two versions of the CCFDM will be developed. That is, two different bases for the local approximation subspace will be constructed, allowing the development of two versions of the CCFDM. However, it will later be proven that these two versions are equivalent, as they exhibit the same dispersion relation and the same global error behavior. In other words, both versions present a minimum dispersion relation equivalent to QSFEM. In addition, although nine vectors are needed to construct a complete basis for the subspace , in the case of uniform meshes, the Corollary 1 guarantees that only five vectors will be needed for this basis. Therefore, in the following development only five vectors will be presented for this basis.
CCFDM with 9-point stencil and Laplacian with 5-point
The first version will be denoted by CCFDM-9p-L5p, and consists of decomposing the compact 9-point stencil into two 5-point stencils (Vichnevetsky & Bowles 1982). In Figure 1, these two 5-point stencils are represented as a classic centered 5-point stencil (black color) and another rotated 5-point stencil (blue color). Thus, the Laplacian is approximated by (5) in the 5-point stencil in black, and by
in the 5-point stencil in blue (Vichnevetsky & Bowles 1982).The first three generating vectors are analogous to the classical centered 5-point stencil (black), but now the dimension of these vectors is 9.
To obtain the fourth and fifth generating vector, the rotated 5-point stencil (blue) is used. The fourth generating vector is obtained by the approximation , where
The fifth generating vector is obtained by the approximation , whereIt can be demonstrated that the vectors , , , and are linearly independent (Nunes 2024). Four more generating vectors (, , and ) are missing to complete a basis for the subspace . However, as previously stated, the Corrolary 1 guarantees that they will not be necessary in the case of uniform meshes. With this, the second step of the new formalism is completed for this choice of the vector basis for the local approximation subspace.
CCFDM with 9-point stencil and Laplacian with 9-point
The second version will be denoted by CCFDM-9p-L9p, and consists of using a single approximation for the Laplacian operator as in (LeVeque 2007) (compact 9-point stencil red color in Figure 1).
The approximations of the term are the same as those used in the previous subsection “CCFDM with 9-point stencil and Laplacian with 5-point“. Thus, the generating vectors , , , and are obtained.It can be demonstrated that the vectors , , , and are linearly independent (Nunes 2024). Analogous to the CCFDM-9p-L5p version, the generating vectors , , and that complete a basis for the subspace are unnecessary for the case of uniform meshes. With this the second step of the new formalism is completed for the other choice of vector basis.
Dispersion analysis and optimal choise of the free parameters
The dispersion analysis allows estimating the difference between the wavenumber of the exact solution and the wavenumber of the numerical solution . This analysis consists of considering the homogeneous Helmholtz equation () with exact solutions in the form of a plane wave propagating in the -direction, where . It is assumed that the numerical solution should also be a plane wave with discrete wavenumber . Thus, substituting this numerical solution into the stencil equation of each scheme, can be obtained as a function of (Harari & Hughes 1992, Ihlenburg & Babuška 1995b, Babuška et al. 1995, Ihlenburg 1998, Alvarez et al. 2006, Loula et al. 2007, Rochinha et al. 2007, Carmo et al. 2008, Fernandes & Loula 2010).
1D case with 3-point stencil
In this case and the numerical solution at point is . Considering 3-point stencil on uniform meshes, and substituting this numerical solution in the equation (8) the following dispersion relation is obtained,
Therefore, the following two equations are obtained:As far as the authors know, this is the first time that two equations appear to be satisfied in the dispersion analysis. In all the works known to us so far, only the equation (20) of the real part has always appeared (Harari & Hughes 1992, Ihlenburg & Babuška 1995b, Babuška et al. 1995, Ihlenburg 1998, Alvarez et al. 2006, Loula et al. 2007, Rochinha et al. 2007, Carmo et al. 2008, Fernandes & Loula 2010). In these works the imaginary part (21) was satisfied automatically, but no mention of this restriction was found. Thus, the equation (21) of the imaginary part is understood as an additional restriction that must satisfy the method to verify the dispersion analysis. In the 1D case, uniform meshes and 3-point stencil, it is necessary that . The CC and NS-1 schemes satisfy the restriction (21), but the NS-2 scheme does not satisfy this restriction (21).
In a similar way to all works known to us, the real part equation (20) is used to explain as a function of ,
where the values of , and of each scheme must be replaced. Performing the Taylor series expansion of the function around (Ihlenburg 1998, Fernandes 2009, Nunes 2024) it is possible to obtain a polynomial representation of for each schemeFor the CCFDM, , and . The coefficients can be determined to minimize . Thus, it is possible to construct stencils with minimal error in the dispersion relation. In particular, for the 1D case it is possible to reach the absolute minimum () by making in the equation (22), and in this way find the parameters that satisfy this dispersion relation.
where since the coefficients are linearly dependent through the dispersion relation, and therefore it is possible to fix one of them (Ihlenburg 1998).The generating vector does not satisfy the imaginary part of the dispersion relation (21), and must be disregarded by choosing . Thus, of the three generating vectors necessary to complete a basis in subspace , the generating vector is unnecessary in the case of uniform meshes. In this way, the coefficients in the equation (8) are determined as and . With this the third step of formalism is completed. This CCFDM eliminates pollution effect () and there is no need to increase the dimension of the local approximation subspace , since its numerical solution coincides with the interpolant. Figure 2 presents for the four methods analyzed.
2D case with 5-point stencil
In this case the numerical solution at point is . Considering 5-point stencil on uniform meshes, and substituting this numerical solution in the equation (12) the following two equations are obtained:
Again as in the 1D case, the imaginary part equation (28) introduces a new constraint that can be satisfied by requiring and . The CC, NS-1 and NS-4 schemes satisfy the restriction (39), but the NS-2 and NS-3 schemes do not satisfy this restriction (39).The real part (38) is used to explain as a function of . Replacing the values of , , , and of each scheme in (38) and performing the Taylor series expansion around , after some algebraic manipulations using the software Mathematica1 (Wolfram 2015), the expressions of for each scheme are obtained:
For the CCFDM-5p, the dispersion relations (38) and (39) are determined by
The coefficients are linearly dependent through the dispersion relation, therefore it is possible to fix (Ihlenburg 1998). The generating vectors and do not satisfy the imaginary part of the dispersion relation (28), and are disregarded making and . Thus, of the five generating vectors needed to complete a basis in subspace , only three are necessary for the case of uniform meshes. These coefficients and can be determined to minimize . In the 2D case, the absolute minimum of the equation (38) cannot be reached for any -direction of the plane wave. This absolute minimum will be reached the same number of times as free parameters available. Thus, choosing the directions and for the plane wave it is possible to obtain
where , , and . Therefore, the CCFDM-5p solution matches the interpolant only when or , andThe dispersion relation of the CCFDM-5p is simplified by replacing the parameters equation (50) and equation (51) in the equation (53),
which is equivalent to the dispersion of the GLS method for and (Thompson & Pinsky 1995).It is possible to obtain a dispersion equivalent to the equation (53) or equation (56) in another simpler way. For this, it is necessary to require more symmetry in the stencil, which is justified because the Hemlholtz equation in a homogeneous medium has a high degree of symmetry. Restricting the imaginary part of the dispersion relation (28) guarantees stencil symmetry with respect to the and axes. The symmetry of the stencil with respect to the straight lines and is guaranteed if . The generating vector does not have this symmetry, and can be disregarded by making . Thus, choosing just as
thus, it is possible to obtain This dispersion relation is simplified by replacing the parameters (57) in the equation (58), which is equivalent to the dispersion of the GLS method for (Thompson & Pinsky 1995).With this the third step of formalism is completed for the 5-point stencil on uniform meshes. It should be highlighted that the equations (53) or (56) and equations (58) or (61) correspond to the same dispersion relation, although they correspond to two versions of the CCFDM-5p. These two versions differ in the degree of symmetry of the stencil. Figures 3 and 4 show the dispersion relation for the analyzed schemes, where and . These are the values of and that generate the smallest error in the dispersion relation for the CCFDM-5p. With this choice, CCFDM-5p is a scheme with a dispersion relation equivalent to that of the GLS method (Thompson & Pinsky 1995), but with the following difference. The matrix of the linear system of the GLS method has nine non-zero diagonals, while the matrix of the CCFDM has only five non-zero diagonals. However, to have the CCFDM with a dispersion relation equivalent to that of the QSFEM (Babuška et al. 1995) it is necessary to increase the dimension of the local approximation subspace ().
2D case with 9-point stencil
Considering 9-point stencil on uniform meshes, and substituting this numerical solution in the equation (17) the two restrictions on the dispersion relation are obtained:
The equation of the imaginary part (63) introduces a restriction that can be satisfied by requiring , , and . This restriction is not sufficient to guarantee stencil symmetry with respect to the and axes. For this, an additional restriction is necessary. The symmetry of the stencil with respect to the straight lines and is guaranteed if . Analogous to the 2D case with 5-point stencil, there are two stencils with different symmetry that generate the same dispersion relation. Here only the case of the stencil with greater symmetry will be presented. That is, the case of the symmetric stencil with respect to the , axes and the straight lines and . More details can be found in Nunes (2024).CCFDM-9p-L5p
For the CCFDM-9p-L5p, the stencil equation (17) is determined by
The generating vectors and do not have the required symmetry, and can be disregarded by making . Thus, only the free parameters and remain to be determined, since . These coefficients and can be determined to minimize . Choosing the directions and for the plane wave it is possible to obtain
The dispersion relation of the CCFDM-9p-L5p is equivalent to the dispersion of the QSFEM for and (Babuška et al. 1995),
where the parameters (73) and (74) were replaced. Figure 5 shows the dispersion relation for the analyzed schemes.CCFDM-9p-L9p
For the CCFDM-9p-L9p, the stencil equation (17) is determined by
The generating vectors and do not have the required symmetry, and can be disregarded by making . Thus, only the free parameters and remain to be determined, since . These coefficients and can be determined to minimize . Choosing the directions and for the plane wave it is possible to obtain
The dispersion relation of the CCFDM-9p-L9p is equivalent to the dispersion of the QSFEM for and (Babuška et al. 1995),
where the parameters (88) and (89) were replaced. Figure 6 shows the dispersion relation for the analyzed schemes.Table I presents the distance of the CCFDM and QSFEM for different values of with fixed. The values presented were calculated using equations (56), (78) and (92). The CCFDM-5p presents zero dispersion for the two angles already mentioned and , which is equivalent to the GLS (Thompson Pinsky 1995). Increasing the dimension of the local approximation subspace to two versions CCFDM-9p-L5p and CCFDM-9p-L9p are obtained, which present a dispersion relation equivalent to QSFEM (Babuška et al. 1995).
Consequence of the uniform mesh in the dispersion analysis and stencil symmetry
The equations (21), (28) and (63) of the imaginary part of the dispersion analysis for uniform meshes imply the following corollary.
Corollary 1. Let it be a uniform mesh with parameter . For each central node (global ordering or enumeration) consider stencil with 3-points in the 1D case, stencil with 5-points and 9-points in the 2D case. Let be the generating vectors of the CCFDM for these 1D and 2D cases. If the equations (21), (28) and (63) of the imaginary part of the dispersion analysis are satisfied, then there are only:
-
two linearly independent generating vectors in the 1D case,
-
three linearly independent generating vectors in the 2D case and 5-point stencil,
-
five linearly independent generating vectors in the 2D case and 9-point stencil.
Proof 1. Item i) In the 1D case and 3-point stencil, the CCFDM is determined by three linearly independent generating vectors , and . For a uniform mesh, the equation (21) of the imaginary part of the dispersion analysis implies , therefore , and . These vectors are linearly independent, when only if . In matrix form this restriction is:
From which it can be noted that this matrix only has two linearly independent rows. That is, the rank of the matrix is 2 (deficient rank). Items ii) and iii) can be demonstrated in a similar way. More details can be found in Nunes 2024.On the other hand, this equation corresponding to the imaginary part is related to the symmetry of the stencil used, thus establishing a connection between the coefficients of the linear system and the symmetry of the stencil. For example, in the 2D case the two stencils analyzed (5-point stencil and 9-point stencil) are shown in the Figure 7.
The imaginary part of the dispersion equation (28) establishes the constraints and for the stencil in the Figure 7a. The imaginary part of the dispersion equation (63) establishes the constraints , , and for the stencil in the Figure 7b. From an algebraic point of view, these are restrictions for the coefficients of the linear system of equations . From a geometric point of view, these are restrictions for the symmetry of the stencil. Applying these restrictions, the stencils in the Figure 7 are transformed into the stencils in the Figure 8.
In Figure 8a it can be seen that the restriction of the imaginary part of the dispersion relation guarantees symmetry of the stencil with respect to the and axes. However, the symmetry of this stencil with respect to the straight lines and is only guaranteed if as shown in Figure 9a. In Figure 8b it can be seen that, even after the restrictions imposed by the imaginary part of the dispersion equation, this stencil still does not have symmetry with respect to the and axes. To guarantee this symmetry it is necessary to impose another restriction, . And the symmetry of this stencil with respect to the straight lines and is only guaranteed if as shown in Figure 9b. It should be noted that the symmetry of the stencil with respect to the lines and will exist if and only if , that is, a uniform mesh. By imposing all these symmetry restrictions, the stencils in Figure 9 are obtained. Thus, this symmetry analysis shows that there is a connection between the symmetry of the problem defined in the continuous domain (equations (1) and (2)) and the discretized problem, and this connection is established through the equation of imaginary part of the dispersion analysis.
Local Truncation Error
The well-known local truncation error is determined at each point (global ordering or enumeration) by replacing the approximate solution with the exact solution in the stencil equation for each scheme. Since is unknown, it is assumed to be a function smooth enough that it is possible to replace by its Taylor series expansions around the point (LeVeque 2007). The errors for each scheme analyzed are presented below. In the case of CCFDM the local truncation error is represented as a function of the free parameters .
1D case with 3-point stencil
Consider partial ordering or enumeration for the central node . Using the notation and can be obtained:
It should be noted that the CC, NS-1 and CCFDM schemes have accuracy order . However, the NS-2 scheme has accuracy order . The NS-2 scheme had no impact on the construction of CCFDM because .
2D case with 5-point stencil
Consider partial ordering or enumeration for the central node . Using the notation and can be obtained:
It should be noted that the CC, NS-1, NS-4 and CCFDM schemes have accuracy order . However, schemes NS-2 and NS-3 have accuracy order . The NS-2 and NS-3 schemes had no impact on the construction of CCFDM because .
2D case with 9-point stencil
CCFDM-9p-L5p
The first three schemes CC, NS-1 and NS-2 generated by the vectors , and (black stencil) have the same that the first three schemes of the 2D case with 5-point stencil (equations (97), (98) and (99)). The new schemes NS-3 and NS-4 generated by the vectors and of the rotated 5-point stencil (blue stencil) and the CCFDM-9p-L5p have the following :
It should be noted that the CC, NS-1, NS-3, NS-4 and CCFDM schemes have accuracy order . However, the NS-2 scheme has accuracy order . The NS-2 and NS-4 schemes had no impact on the CCFDM error because .
CCFDM-9p-L9p
The five schemes generated by the vectors , , , , and the CCFDM-9p-L9p present the following :
It should be noted that all schemes have accuracy order . The NS-2 and NS-4 schemes had no impact on the CCFDM error because .
RESULTS AND DISCUSSION
Two examples in the 1D case and three examples in the 2D case are presented to illustrate the performance of the new approach. As mentioned previously, for the 2D case there are two versions depending on the degree of symmetry of the stencil. The CCDFM-5p has a less symmetrical version (, , equation (50) and equation (51)) and a more symmetrical version (, and equation (57)). The CCDFM-9p-L5p and CCDFM-9p-L9p methods also have a less symmetric and a more symmetric version (Nunes 2024). In each case, the two versions have the same dispersion relationship and numerical results. Here the results are presented only for the versions corresponding to the stencil with greater symmetry. Furthermore, the CCDFM-9p-L5p and CCDFM-9p-L9p methods for the 9-point stencil were developed by constructing different bases for the local approximation subspace. These two versions have the same dispersion relation. The numerical results show that the solutions of these two versions are equal to minus the round-off difference.
All finite difference schemes analyzed were implemented in computational codes developed using MATLAB software (Gilat 2014). The linear system of algebraic equations corresponding to each scheme is solved using the ‘backslash’ operator. As the matrix of the linear system is sparse, the MATLAB function ‘spdiags’ was used. This allows to reduce the computational cost in terms of execution time and storage memory. More details about the computational implementation can be found in Nunes 2024, including the computational codes. The numerical results were calculated on a Acer laptop, Linux 64-bit operating system, AMD Ryzen 7 4800H processor 2.9GHz with 8 core and 16 threads up to 4.2GHz, 2TB SSD, 16GB of RAM memory DDR4 - 3200MHz, and NVIDIA GeForce GTX 1650 Ti 4GB graphics card.
Two examples in the 1D case
The first example consists of solving the homogeneous Helmholtz equation (1) on the interval subjected to Dirichlet boundary conditions such that the exact solution is . Figure 10 shows the solutions of the CC and CCFDM methods together with the interpolant for wavenumber . The results are presented only for the interval, as the wavenumber is high. It can be noted that the CCFDM solution coincides with the interpolant. Figure 11 shows the relative error calculated in the vector norm as a function of the number of degrees of freedom . It can be noted that the relative error of the CCFDM method is approximately 13 orders of magnitude smaller than the error of the CC method. In other words, considering the round-off it is possible to state that the CCFDM error is of the order of computer precision.
The second example has a source term and Dirichlet boundary conditions such that the exact solution is . Figure 12 shows the solutions of the CC and CCFDM methods together with the interpolant for wavenumber . It can be noted that the CCFDM solution coincides with the interpolant.
Three examples in the 2D case
As a first example, the homogeneous Helmholtz equation is considered over a unitary square domain with Dirichlet boundary conditions such that the exact solution is a plane wave propagating in the -direction: . Figure 13 shows the solutions of the two versions of the CCFDM together with the interpolant at section for wavenumber , and . Due to the high wavenumber, three intervals were zoomed. The wave direction was chosen, since in this wave direction the CCDFM-9p does not coincide with the interpolant. As shown by the dispersion analysis, the CCFDM on the 9-point stencil is equivalent to QSFEM. Figures 14 and 15 show the same case only with the difference in values, which confirm the good performance of the new approach even on very coarse meshes. The CCFDM-5p results are equivalent to the GLS method and have been omitted, for more details see (Nunes 2024).
In the second example, the homogeneous problem with superposition of three plane waves is considered, whose exact solution is . Figure 16 shows the solutions of the two versions of the CCFDM together with the interpolant at section for wavenumber , , , and . These three wave directions were chosen because none of them coincide with the wave direction in which the CCDFM-9p shows zero dispersion. Figures 17 and 18 show the same case only with the difference in values.
In the third example, the source term and Dirichlet boundary conditions are considered such that the exact solution is . Figure 19 shows the solutions of the two versions of the CCFDM together with the interpolant at sections for wavenumber , and . Figures 20 and 21 show the same case only with the difference in values.
Figure 22 shows the relative error calculated in the vector norm as a function of the mesh parameter (lower axis) or (upper axis). The CCFDM-5p shows an error similar to the CC scheme, where the main highlight is that the pre-asymptotic behavior appears only from . This corresponds to a mesh refinement much lower than rule of thumb (). This was to be expected because the CCFDM-5p has a dispersion relation equivalent to the GLS method. On the other hand, the CCFDM-9p-L5p and CCFDM-9p-L9p have a dispersion relationship equivalent to the QSFEM method. The main highlight is that they present pre-asymptotic convergence in the region (red straight line with slope ) and asymptotic in the region (black straight line with slope ). For meshes with , round-off errors impact the solution, and it would be necessary to use computers with quadruple precision (Strouboulis et al. 2006).
Figure 23 shows the relative error keeping the value constant for , and . The main highlight is that CCFDM-9p-L5p and CCFDM-9p-L9p are equivalent and have a much smaller error than CCFDM-5p and CC scheme.
Figure 24 shows the relative error as a function of wave direction for the case , and . Again, the main highlight is that CCFDM-9p-L5p and CCFDM-9p-L9p are equivalent and have a much smaller error than CCFDM-5p and CC scheme. As expected, the CCFDM-5p shows zero error for the angles and similarly to the GLS method. The CCFDM-9p-L5p and CCFDM-9p-L9p methods show zero error for angles , , and similarly to the QSFEM method. The numerical value is not exactly zero due to round-off (Strouboulis et al. 2006).
All the theoretical analysis and numerical experiments carried out show that the CCFDM-9pL-5p and CCFDM-9pL-9p have the same dispersion relation and the same global error behavior, although they differ in the order of approximation of the Laplacian. This allows us to state that for the new approach CCFDM the order of approximation of the derivatives is not the most important thing, if the number of stencil points is kept the same (dimension of the subspace ), and if a basis for this subspace is constructed. In other words, the most important issue in terms of stability and accuracy is the ability to completely represent the local approximation subspace. Hence the term ‘Complete’ used in the name of the new approach, since it was possible to build a basis for this subspace in the finite difference framework, that is, any element of this subspace can be generated.
CONCLUSIONS
A new approach in the finite difference framework was developed. This approach fully considers the local approximation subspace determined by the type of stencil chosen, since a vector basis is constructed for this subspace using different schemes generated by linearly independent vectors. Thus, the new method can represent any element of this subspace. That is, any finite difference scheme that belongs to this subspace. Furthermore, some of the vectors used to form this basis are new schemes developed by modifying only the term of the PDE.
In essence, the new approach can be formalized in three simple steps: choosing the dimension of the local approximation subspace, constructing a vector basis for this subspace, and determining the coefficients of the linear combination. When applied to the Helmholtz equation on uniform meshes, CCFDM can always minimize the dispersion relation for all stencils in all dimensions. In the 1D case and 3-point stencil, the absolute minimum is achieved with zero dispersion. In the 2D case and 5-point stencil, the absolute minimum is reached in the directions and with a dispersion relation equivalent to GLS, where the linear system matrix has only five non-zero diagonals. In the 2D case and 9-point stencil, the CCFDM-9p-L5p and CCFDM-9p-L9p versions were developed using two different bases for the local approximation subspace. Both versions reach the absolute minimum in the directions and with a dispersion relation equivalent to QSFEM. That is, both versions are equivalent, and this shows that regardless of the basis chosen for the local approximation subspace, the new approach is capable of generating any element of this subspace.
For the first time in dispersion analysis, two equations emerge that must be satisfied. The equation corresponding to the imaginary part is related to the symmetry of the stencil used, thereby establishing a link between the algebraic question (coefficients of the linear system) and the geometric question of the mesh (stencil symmetry). For each scheme, dispersion analysis, calculation of the local truncation error and experimental analysis of the global error were carried out, showing that the CCFDM is consistent. The numerical results demonstrate that the new approach, in addition to presenting good performance, is very flexible and promising for application to other PDEs.
Based on the analysis presented, it is clear that this new approach introduces a paradigm shift in the framework of finite differences. Future research should investigate this approach on non-uniform 1D, 2D, and 3D meshes, and its application to the diffusion-convection equation with dominant convection. Furthermore, it would be beneficial to extend these ideas to other numerical methods involving sparse matrices, such as the finite element method and the finite volume method.
ACKNOWLEDGMENTS
This work was supported by the Universidade Federal Fluminense and the Coordena~{a}o de Aperfeioamento de Pessoal de N'{i}vel Superior (CAPES, Brasil). The authors are grateful for the constructive comments made by the two reviewers. Dedicated to the Memory of Professor Ivo M. Babuka.
Dedicated to the Memory of Professor Ivo M. Babuška.
References
- ALVAREZ GB, LOULA AFD, CARMO EGD ROCHINHA FA. 2006. A discontinuous finite element formulation for Helmholtz equation. Comput Methods Appl Mech Engrg 195(33-36): 4018-4035.
- ALVAREZ GB NUNES HF. 2024. Novos Esquemas de Diferenças Finitas para a Equação de Helmholtz. REMAT: Revista Eletrônica da Matemática 10: e4001.
- BABUŠKA I, IHLENBURG F, PAIK ET SAUTER SA. 1995. A Generalized Finite Element Method for solving the Helmholtz equation in two dimensions with minimal pollution. Comput Methods Appl Mech Engrg 128: 325-359.
- BABUŠKA IM SAUTER SA. 1997. Is the Pollution Effect of the FEM Avoidable for the Helmholtz Equation Considering High Wave Numbers? SIAM J Numer Anal 34(6): 2392-2423.
- CARMO EGD, ALVAREZ GB, LOULA AFD ROCHINHA FA. 2008. A nearly optimal Galerkin projected residual finite element method for Helmholtz problem. Comput Methods Appl Mech Engrg 197(13-16): 1362-1375.
- FERNANDES DT LOULA AFD. 2010. Quasi optimal finite difference method for Helmholtz problem on unstructured grids. Int J Numer Methods Eng 82(10): 1244-1281.
- GILAT A. 2014. MATLAB: An Introduction with Applications. Wiley, 416 p.
- HARARI I HUGHES TJR. 1991. Finite element methods for the Helmholtz equation in an exterior domain: Model problems. Comput Methods Appl Mech Engrg 87(1): 59-96.
- HARARI I HUGHES TJR. 1992. Galerkin/least-squares finite element methods for the reduced wave equation with non-reflecting boundary conditions in unbounded domains. Comput Methods Appl Mech Engrg 98(3): 411-454.
- IHLENBURG F. 1998. Finite element analysis of acoustic scattering. New York: Springer-Verlag, 226 p.
- IHLENBURG F BABUŠKA I. 1995a. Finite element solution of the Helmholtz equation with high wave number Part I: The h-version of the FEM. Comput Math Appl 30(9): 9-37.
- IHLENBURG F BABUŠKA I. 1995b. Dispersion analysis and error estimation of Galerkin finite element methods for the Helmholtz equation. Int J Numer Methods Eng 38(22): 3745-3774.
- LAX PD RICHTMYER RD. 1956. Survey of the Stability of Linear Finite Difference Equations. Commun Pure Appl Math 9(2): 267-293.
- LEVEQUE RJ. 2007. Finite Difference Methods for Ordinary and Partial Differential Equations: Steady-State and Time-Dependent Problems. Philadelphia: SIAM - Society for Industrial and Applied Mathematics, 341 p.
- LOULA AFD, ALVAREZ GB, CARMO EGD ROCHINHA FA. 2007. A discontinuous finite element method at element level for Helmholtz equation. Comput Methods Appl Mech Engrg 196(4-6): 867-878.
- NABAVI M, SIDDIQUI MHK DARGAHI J. 2007. A new 9-point sixth-order accurate compact finite-difference method for the Helmholtz equation. J Sound Vib 307(3): 972-982.
- NUNES HF. 2024. Método Completo de Diferenças Finitas Centradas para a Equação de Helmholtz. Volta Redonda: Master’s Thesis, Universidade Federal Fluminense, 133 p. (Unpublished).
- FERNANDES DT. 2009. Métodos de Diferenças Finitas e Elementos Finitos para o Problema de Helmholtz. Petrópolis: Ph.D. Thesis, Laboratório Nacional de Computação Científica, 126 p.
- ROCHINHA FA, ALVAREZ GB, CARMO EGD LOULA AFD. 2007. A locally discontinuous enriched finite element formulation for acoustics. Commun Numer Meth Engng 23: 623-637.
- SINGER I TURKEL E. 1998. High-order finite difference methods for the Helmholtz equation. Comput Methods Appl Mech Engrg 163: 343-358.
- STROUBOULIS T, BABUŠKA I HIDAJAT R. 2006. The generalized finite element method for Helmholtz equation: Theory, computation, and open problems. Comput Methods Appl Mech Engrg 195(37-40): 4711-4731.
- SUTMANN G. 2007. Compact finite difference schemes of sixth order for the Helmholtz equation. J Comput Appl Math 311(1): 15-31.
- THOMPSON L PINSKY P. 1995. A galerkin least squares finite element method for the two-dimensional Helmholtz equation, Int J Numer Methods Eng 38(3): 371-397.
- VICHNEVETSKY R BOWLES JB. 1982. Fourier Analysis of Numerical Approximations of Hyperbolic Equations. Philadelphia: SIAM - Society for Industrial and Applied Mathematics, 152 p.
- WOLFRAM S. 2015. An Elementary Introduction to the Wolfram Language. Champaign: Wolfram Media Inc, 324 p.
- WU T. 2017. A dispersion minimizing compact finite difference scheme for the 2D Helmholtz equation. J Comput Appl Math 203: 497-512.
- WU T XU R. 2018. An optimal compact sixth-order finite difference scheme for the Helmholtz equation. Comput Math Appl 75(7): 2520-2537.
Publication Dates
-
Publication in this collection
25 Nov 2024 -
Date of issue
2024
History
-
Received
18 May 2024 -
Accepted
11 Aug 2024
















































