- Research
- Open access
- Published:
Multigrid method based on transformation-free high-order scheme for solving 2D Helmholtz equation on nonuniform grids
Advances in Difference Equations volume 2016, Article number: 19 (2016)
Abstract
High-order compact difference schemes can achieve higher-order accuracy on uniform grids. However, in some cases these may not achieve the desired accuracy. Therefore, we propose a multigrid method based on high-order compact difference scheme on nonuniform grids. We will use interpolation and restriction operators developed by Ge and Cao (J. Comput. Phys. 230:4051-4070, 2011). The suggested scheme has up to fourth-order accuracy. Lastly, some numerical experiments are given to show the accuracy and performance of the proposed scheme.
1 Introduction
Two- and three-dimensional elliptic partial differential equations (PDEs) play a pivotal role in different fields of science and technology. High-order compact schemes (HOC) are used for the solution of the Helmholtz equation and other elliptic PDEs [2, 3]. Consider the two-dimensional (2D) Helmholtz equation
where Ω is a rectangular domain and k is a wave number. The forcing function \(f(x,y)\) and the solution \(u(x,y)\) have the required continuous differentiability up to a specific order. The equation has many real-world applications like elasticity, electromagnetic waves, acoustic wave scattering, weather and climate prediction, water wave propagation, noise reduction in silencers, and radar scattering. In this paper, we use a finite-difference approximation on nonuniform grids in discrete domain to obtain a scheme up to fourth-order accuracy. We also considered the Helmholtz equation with constant value of k.
Equation (1) has been solved by different techniques such as finite-difference method (FDM) [4], fast-Fourier-transform-based (FFT) methods [5], finite-element method (FEM) [6], the spectral-element method [7], compact finite-difference method [8], and multigrid methods [9]. The multigrid method based on HOC schemes is among the most efficient iterative techniques for solving PDEs [10, 11].
In FDM the number of mesh points will be enlarged to increase the accuracy; however, it will also increase the computational time. The Helmholtz equation is solved by FEM and spectral-element method, but the limitations of these methods are of high computational cost [7]. Many iterative techniques for the Helmholtz equation suffer due to their slow convergence. The investigation on fast iterative methods to efficiently solve the large algebraic systems arising from high-order difference schemes for PDEs is more attractive. Multigrid methods together with the HOC schemes on uniform mesh sizes are developed in [11–14]. In most cases where sudden changes occur in a flow, the step sizes have to be rectified over the entire domain. Under these situations, where points are concentrated in the regions of sharp variation, local mesh refinement procedures [1, 2, 9, 15–17] are necessary, thus dramatically reducing the computational time and computer storage. Ge and Cao [1, 18] developed a multigrid method with HOC scheme on nonuniform grids for solving 2D convection diffusion equation and 3D Poisson equation. This paper is based on approach that an interpolation operator and a projection operator that are suited for a HOC scheme using nonuniform mesh are represented by a transformation-free HOC scheme on nonuniform grids. The main focus in this paper is to develop a multigrid method based on a HOC scheme on nonuniform grids for solving of the 2D Helmholtz equation. To the best of our knowledge, the 2D Helmholtz equation is not solved by a multigrid method based on a HOC scheme on nonuniform grids.
2 HOC scheme on nonuniform grids
Consider a square domain \((x,y)\in[a_{1},a_{2}]\times[b_{1},b_{2}]\). Discretization is performed on two-dimensional nonuniform gird points. The interval \([a_{1},a_{2}]\) is divided into subintervals
In the x-direction, consider \(h_{x}= \frac{a_{2}-a_{1}}{N_{x}}\), and the forward and backward step sizes are given by
Similarly in the y-direction, \(h_{y}= \frac{b_{2}-b_{1}}{N_{y}}\),
Furthermore, \(\alpha_{x}=\theta_{fx}\theta_{bx}\), \(\beta_{x}=\theta_{fx}+\theta_{bx}\), and \(\gamma_{x}=\theta_{fx}-\theta_{bx}\). If \(\theta_{fx}=\theta_{bx}=1\) (\(h_{fx}=h_{bx}\), \(h_{fy}=h_{by}\)), then the grids turn to be uniform. The approximate values of a function \(u(x,y)\) at interior grid points \((x_{i},y_{j})\) are represented by \(u_{0}\), and the estimated values of other eight neighboring points are determined by \(u_{i}\), \(i=1,2,3,\ldots,8\), as in Figure 1.
The Taylor series expansion is performed for appropriate description of a sufficiently smooth function \(u({x,y})\) in the given domain at points 1 and 3, which are
Multiplying equation (2) by \(\theta_{bx}\) and (3) by \(\theta_{fx}\), then adding and solving for the second-order derivative, which gives
where \(\eta_{x}=\beta^{4}_{x}-5\alpha_{x}(\beta^{2}_{x}-\alpha_{x})\), and the second-order central difference operator along the x-direction is defined as
if \(\theta_{fx}=\theta_{bx}=1\), then equation (5) reduces to uniform grids of the central difference operator. Hence, the second-order derivative for the x-direction is
and the approximation of the second-order derivative for the variable y can be find accordingly. Therefore, the central difference (CD) scheme for the Helmholtz equation can be discretized as
where \(\tau_{0}\) is the truncation error and is defined as
The equations \(H_{1}\), \(H_{2}\), \(H_{3}\) and \(L_{1}\), \(L_{2}\), \(L_{3}\) are defined as
If \(\tau_{0}\) is dropped off from equation (7), then the CD scheme for nonuniform grids becomes
According to the definition of \(\delta^{2}_{x}\), \(\delta^{2}_{y}\), the CD scheme can be written as
In equation (10), only five grid points are involved. From the definition of \(\tau_{0}\) we can see that when \(h_{fx}=h_{bx}\) and \(h_{fy}=h_{by}\), then equation (10) is of second-order accuracy. In order to improve the accuracy, we consider
and
Applying the central difference scheme to equation (11), we have
Similarly, equation (12) will be
Through central difference schemes, the first- and second-order derivatives in equations (12), (13) can be approximated. Now combining equations (7) and (8) with equations (12) and (13), the nine-point HOC scheme on nonuniform mesh points for two-dimensional Helmholtz equation (1) can be written as
The coefficients of the LHS in equation (15) are given as
It is easier to know that this scheme has third to fourth order of accuracy from expansion of \(\tau_{0}\).
3 Multigrid method
The multigrid method is one of the most efficient and fastest methods for solving PDEs. In the multigrid method, the rate of convergence is independent of the mesh size. This method is more effective for solving large-scale sparse linear systems obtained from the discretization of elliptic PDEs [9, 10, 19–22]. The main principle of the multigrid method is to smoothen the error on coarse grid level using basic iterative methods such as Jacobi or Gauss-Seidel method, etc. The multigrid method consists of three important components that are relaxation, restriction, and interpolation operators. These are applied as ‘a single iteration of a multigrid cycle comprised of manipulating the error by the application of relaxation method, fixing the residuals on the coarse grid level, solving the error equation on the coarse grid and adjusting the correction of coarse grid up to the fine grid level’.
Some specific methods have been applied for the solution of the 2D and 3D Helmholtz equations with HOC schemes on uniform grids [2–4, 6, 8, 12, 13]. A full weighting restriction operator and the standard bilinear interpolation operator are used as the inter-grid transfer operators. But in the case of nonuniform grids, these restriction and interpolation operators cannot be used; so new restriction and interpolation operators for nonuniform grids are proposed by Ge and Cao [1] by using the area law developed by Liu [23]. In the following section, we give out the derivation of the two operators for the completeness.
3.1 Restriction operator
The principle of developing restriction operator is based on the evaluation of the residuals on the coarse grid level with the use of residuals on the fine grid level. In the multigrid method, Liu developed a law for the restriction of the residual [23], known as the area law.
For every point on the coarse grid level, there are corresponding eight fine grid points surrounding it. On the coarse grid, there is a contribution of different degree between the reference grid points and the corresponding surrounding grid points on the fine grids, and a full weighting restriction operator for nonuniform grids is constructed on the base of area law. These points are shown for convenience in Figure 1. The basic idea for getting the full weighting restriction operator of each grid point is to analyze the weighting coefficients of the residuals. On the coarse grids, the reference point \((i,j)\) of the fine grids have the major contribution to it, so the corresponding weighting coefficient is evaluated by \(a_{0}/a \). At that instant, we noticed that the grid points near the reference point \((i,j)\) have much more contributions than those far away from it. For instance, the weighting coefficient of the point \((i+1,j)\) is given by \(a_{3}/a \), that of the point \((i-1,j)\) by \(a_{1}/a \), and so on. Now suppose that \(r_{ij}\) is the residual at the fine grid point \((i,j)\) and that \(\bar{r}_{\bar{i} , \bar{j}}\) is the corresponding residual at the coarse grid point \((\bar{i},\bar{j})\). It is very simple to see that \(i=2 \bar{i}\) and \(j=2\bar{j}\); thus, the full weighting restriction operator on nonuniform grids can be written as in [1]:
in which
If the step size reduces to equal size, then the total area is divided into sixteen equal small parts by the grid lines and half-grid lines. Denoting the area of each part by a, we obtain that \(a_{0}=4 \bar{a}\), \(a_{1}=a_{2}=a_{3}=a_{4}=2\bar{a}\), and \(a_{5}=a_{6}=a_{7}=a_{8}=\bar{a}\). Due to this situation, the restriction operator will reduced to the full weighting operator on equal mesh sizes [24]:
3.2 Interpolation operator
For the construction of an interpolation operator, we use a similar strategy. We observed that when grid points are shifted from coarse level to the fine level, at that instant, the grids points on the coarse level are the grid points on fine level. These grid points are shifted directly from the coarse grid level to the fine grid level. The interpolation operator is expressed as \(r_{i,j}=\bar{r}_{\bar{i},\bar{j}}\). Thus, the points on the fine grid are interpolated with their own neighboring points on the coarse level. The formula for error correction along the x- and y-directions are interpolated as [1]
In case of central grid points, we use four grid points around them on the coarse grid level to interpolate as follows [1]:
where
When the grid sizes become equal, then the interpolation operator reduces to the bilinear interpolation on equal step sizes [24]:
3.3 Relaxation operator (smoother)
In the multigrid method, the relaxation operator is an important operator. Its work is not to remove the errors, but to damp the high-frequency components of the errors on the present grid level. A simple smoother (Gauss-Seidel relaxation) method can efficiently remove the errors in all directions for simple isotropic problems [7, 20], but in case of anisotropic and boundary layer problems, the line Gauss-Seidel [19, 21] and alternating line Gauss-Seidel methods [1, 25–27] are shown to be more robust smoothers. In this paper, we use three relaxations to smooth the residuals on each coarse grid such as the line Gauss-Seidel relaxation, natural Gauss-Seidel relaxation, and Red-black Gauss-Seidel relaxation.
4 Numerical experiments
In order to check the effectiveness of the present method, some problems are chosen. The V-cycle multigrid method is used with zero initial guess, and the process is stopped when the Euclidean norm of the residual vector is reduced by 10−10 on the finest grid level. The effectiveness of the multigrid method with HOC scheme and CD scheme (10) is presented. The reported errors are the \(l_{2}\)-norms of the errors between the computed solution and the exact solution on finest grid. The order of accuracy for a difference scheme is defined as
where \(\operatorname{Error}(N_{1})\) and \(\operatorname{Error}(N_{2})\) are the maximum absolute errors approximated for two different grids with \(N_{1} +1\) and \(N_{2} +1\) points in both direction, whereas \(N_{1}\) is half of \(N_{2}\). We use the \(l_{2}\)-norm for comparison of the numerical solution and the exact solution, which is defined as
where \(e_{i,j}\) is the error vector defined as, \(e_{i,j}=u_{i,j}-v_{i,j}\), and \(v_{i,j}\) is the discrete approximation of \(u_{i,j}\) which implies that \(u_{i,j} =v_{i,j} + {O}(h)^{4}\). First, we use different grid sizes from 82 to 1282 to compute the accuracy order.
The \(l_{2}\)-norms of the error and accuracy order for the same value of λ and different values of \(N, k\) are presented in Tables 1 and 2. We consider the case where \(N=16\) and \(N=32\) for the accuracy order of the scheme. We also examined the behavior of the scheme for different values of k. The scheme is sensitive for \(4\leq k\leq5\). If we increase the value of \(k=1\text{,}000\), then the error does not decrease further. The scheme behaves robustly with respect to the wave number k. However, for any value of N and k, overall, the error does not increase. One of the important advantages of this scheme is the execution time. The computed results show that the line Gauss-Seidel method takes less CPU time than the other smoothers.
Example 1
Consider the following elliptic PDE with the source term:
the boundary conditions are given by the analytic solution, that is,
This problem has a steep boundary layer along \(x=0\); therefore, we are using nonuniform grids along the x-axis, which are accumulating near \(x=0\), and uniform grids along the y-axis with the following stretching function [28]:
where λ is a stretching parameter and controls the tightness of the grid points in the x-direction. When \(\lambda< 0\), more grid points are accumulated to the boundary \(x=0\) and to the boundary \(x=1\) for \(\lambda> 0\). If \(\lambda=0\), then the grids reduced to be uniform. When \(\lambda=-0.8\) and the grid numbers are 322, the grid distribution in the xy-plane is shown in Figure 1. The estimated accuracy and maximum absolute error with different stretching parameter λ are presented in Table 3. We see that when \(\lambda= 0\), the results are very poor. A more accurate solution and order of convergence are obtained from HOC and CD schemes with decreasing stretching parameter λ on nonuniform grids. We observe that when \(\lambda =-0.8\), the solution obtained with HOC scheme is more accurate, but when λ further decreases to −0.9, the accuracy decreases. This situation is not wondering because putting more grids in the boundary layer area will necessarily cause lack of mesh points in the other regions of the domain. Figure 2 indicates the configuration of solution in the xy-plane. Table 4 shows the \(l_{2}\)-norm of the error, CPU timing, and the order of accuracy for different stretching parameters λ in problem 1. It is also obvious from the results that the line Gauss-Seidel relaxation is the most efficient smoother with the least multigrid V-cycle numbers for such type of problems. (a) shows the exact solution, (b) the solution obtained from HOC scheme on uniform grids, (c) the computed solution obtained from a HOC scheme on nonuniform grids, and (d) the computed solution of CD scheme on nonuniform grids.
Example 2
Consider the PDE with a source term \(f(x,y)\),
Its analytic solution is
The source function is determined by the analytic solution with the boundary layers along \(x=1\) and \(y=1\). Hence, nonuniform grids along the coordinate directions with accumulation near \(x=1\), \(y=1\) is used by the following stretching formula:
When λ gets closer to 1, more grids are accumulated near \(x=1\), \(y=1\). When \(\lambda=0.8\) and the grids size is 322, the grids distribution is given in Figure 3. Table 5 indicates the error norms and order of accuracy for different stretching parameters λ for problem 2. The value of λ changes from 0.0 to 0.9. We observe that in nonuniform grids with increasing the stretching parameter λ, more and more grids accumulate into the boundary layers; consequently, more accurate results are obtained from HOC and CD schemes. The rate of convergence continuously increases with the increase of λ. We observe that when \(\lambda=0.8\), a considerably most accurate solution is obtained with the HOC scheme, but when λ increases to 0.9, it leads to decrease in accuracy. Figure 4 shows the contours of the exact solution in the xy-plane. Table 6 and Table 7 list the number of multigrid V-cycles and the corresponding CPU time in seconds for solving problem 2 on the 162, 322, 642, and 1282 grids. (a) represents the exact solution, (b) the solution obtained by the HOC scheme on uniform grids, (c) the computed solution by the CD scheme on uniform grids, and (d) the solution obtained by the HOC scheme on nonuniform grids with \(\lambda=0.8\).
Example 3
Consider the Helmholtz equation with a source function \(f(x,y)\),
with the Dirichlet boundary condition. Its analytic solution is
We observe that the exact solution does not show high variations; therefore, nonuniform grids are not necessary. Uniform grids are used for this problem to check the effectiveness of the multigrid method. The results obtained from the HOC and CD schemes are presented. The reported error is the error norm over the discretized grid points on the finest grid level. Table 8 lists the number of multigrid V-cycles and the corresponding CPU time in seconds for solving problem 3 on the 162, 322, 642, and 1282 grids. We can see that, for this problem, the multigrid method is very efficient and all the smoothers work well.
5 Conclusion
In this paper, we have proposed a transformation-free high-order compact finite-difference scheme on nonuniform grids for solution of the 2D Helmholtz equation to get up to fourth-order accuracy. Furthermore, we have applied the multigrid method based on the HOC scheme on nonuniform grids, which solved the resulting system efficiently. In the case of boundary layer problems with suitable grid stretching ratios, the accuracy is up to fourth order for the HOC scheme and second order for the CD scheme. Numerical results show that the multigrid method with HOC scheme has the required accuracy and is faster than the CD scheme.
References
Ge, Y, Cao, F: Multigrid method based on the transformation-free HOC scheme on nonuniform grids for 2D convection diffusion problems. J. Comput. Phys. 230, 4051-4070 (2011)
Boisvert, RF: A fourth-order accurate Fourier method for the Helmholtz equation in three dimensions. ACM Trans. Math. Softw. 13, 221-234 (1987)
Sutmann, G: Compact finite difference scheme of sixth order for the Helmholtz equation. J. Comput. Appl. Math. 293, 15-31 (1987)
Singer, I, Turkel, E: High-order finite difference method for the Helmholtz equation. Comput. Methods Appl. Mech. Eng. 163, 343-358 (1998)
Harari, I, Turkel, E: Accurate finite difference methods for time-harmonic wave propagation. J. Comput. Phys. 119, 252-270 (1995)
Harari, I, Hughes, TJ: Finite element methods for the Helmholtz equation in an exterior domain model problem. Comput. Methods Appl. Mech. Eng. 87, 59-96 (1991)
Mehdizadeh, O, Paraschiviou, M: Investigation of a two-dimensional spectral method for Helmholtz’s equation. J. Comput. Phys. 189, 111-129 (2003)
Nabavi, M, Siddique, MH, Dargahi, J: Sixth-order accurate compact finite-difference method for the Helmholtz equation. J. Sound Vib. 307, 972-982 (2007)
Brandt, A: Multi-level adaptive solution to boundary value problems technique. Math. Comput. 31, 333-390 (1977)
Gupta, MM, Kouatchou, J, Zhang, J: A compact multigrid solver for convection-diffusion equation. J. Comput. Phys. 132, 123-129 (1997)
Zhang, J, Ge, L, Kouatchou, J: A two colorable fourth-order compact difference scheme and parallel iterative solution of 3D convection-diffusion equation. Math. Comput. Simul. 54, 65-80 (2000)
Ghaffar, F, Badshah, N, Islam, S: Multigrid method for solution of 3D Helmholtz equation based on HOC schemes. Abstr. Appl. Anal. 2014, Article ID 954658 (2014)
Ghaffar, F, Badshah, N, Khan, MA, Islam, S: Multigrid method for 2D Helmholtz equation using higher order finite difference scheme accelerated by Krylov subspace. J. Appl. Environ. Biol. Sci. 4, 169-179 (2014)
Gupta, MM, Kouatchou, J, Zhang, J: Comparison of second and fourth order discretizations for multigrid Poisson solver. J. Comput. Phys. 132, 226-232 (1997)
Kalnay de Rivas, E: On the use of nonuniform grids in finite-difference equations. J. Comput. Phys. 10, 202-210 (1972)
Teilgland, R, Eliassen, JK: A multilevel mesh refinement procedure for CFD computations. Int. J. Numer. Methods Fluids 36, 519-538 (2001)
Zhang, J, Sun, H, Zhao, JJ: High order compact scheme with multigrid local mesh refinement procedure for convection-diffusion problems. Comput. Methods Appl. Mech. Eng. 191, 4661-4674 (2002)
Ge, Y, Cao, F: A transformation-free HOC scheme and multigrid method for solving the 3D Poisson equation on nonuniform grids. J. Comput. Phys. 234, 199-216 (2013)
Ge, Y: Multigrid method and fourth-order compact difference discretization scheme with unequal meshsizes for 3D Poisson equation. J. Comput. Phys. 229, 6381-6391 (2010)
Zhang, J: Fast and high accuracy multigrid solution for three dimensional Poisson equation. J. Comput. Phys. 143, 449-461 (1998)
Zhang, J: Multigrid method and fourth-order compact scheme for 2D Poisson equation with unequal mesh-size discretization. J. Comput. Phys. 179, 170-179 (2002)
Hackbusch, W, Trottenberg, H: Multigrid Methods. Springer, Berlin (1982)
Liu, C: Multilevel adaptive methods in computational fluid dynamics. PhD thesis, University of Colorado at Denver (1989)
Wesseling, P: An Introduction to Multigrid Methods. Wiley, Chichester (1992)
Saad, Y: A flexible inner-outer preconditioned GMRES algorithm. SIAM J. Sci. Stat. Comput. 14, 461-469 (1993)
Zhang, J: Preconditioned iterative methods and finite difference schemes for convection-diffusion. Appl. Math. Comput. 109, 11-30 (2000)
Ge, L, Zhang, Z: High accuracy iterative solution of convection diffusion equation with boundary layers on nonuniform grids. J. Comput. Phys. 171, 560-578 (2001)
Spotz, WF, Carey, GF: Formulation and experiments with high-order compact schemes for nonuniform grids. Int. J. Numer. Methods Heat Fluid Flow 8, 288-297 (1998)
Acknowledgements
The authors would like to express their gratitude to the editors and anonymous reviewers for their valuable suggestions, which substantially improved the standard of the paper.
Author information
Authors and Affiliations
Corresponding author
Additional information
Competing interests
The authors declare that they have no competing interests.
Authors’ contributions
The authors equally contributed in the paper. All authors read and approved the final manuscript.
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Ghaffar, F., Badshah, N., Islam, S. et al. Multigrid method based on transformation-free high-order scheme for solving 2D Helmholtz equation on nonuniform grids. Adv Differ Equ 2016, 19 (2016). https://doi.org/10.1186/s13662-016-0745-2
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s13662-016-0745-2