A Fast Fourth-Order Method for 3D Helmholtz Equation with Neumann Boundary

Abstract

We present fast fourth-order finite difference scheme for 3D Helmholtz equation with Neumann boundary condition. We employ the discrete Fourier transform operator and divide the problem into some independent subproblems. By means of the Gaussian elimination in the vertical direction, the problem is reduced into a small system on the top layer of the domain. The procedure for solving the numerical solutions is accelerated by the sparsity of Fourier operator under the space complexity of O(M3). Furthermore, the method makes it possible to solve the 3D Helmholtz equation with large grid number. The accuracy and efficiency of the method are validated by two test examples which have exact solutions.

Share and Cite:

Zhu, N. and Zhao, M. (2018) A Fast Fourth-Order Method for 3D Helmholtz Equation with Neumann Boundary. American Journal of Computational Mathematics, 8, 222-232. doi: 10.4236/ajcm.2018.83018.

1. Introduction

Helmholtz equation appears from general conservation laws of physics and can be interpreted as wave equations. Helmholtz equation is widely applied in the scientific and engineering design problem. Many methods have been proposed for solving the Helmholtz equations, such as finite difference method [1] , finite element method [2] [3] [4] , spectral method [5] [6] and other methods [7] [8] [9] . However, the computational cost of the finite element method increases greatly for large wave number problems. Additionally, boundary element method is limited to constant-coefficients problems. Finite difference schemes provide the simplest and least expensive avenue for achieving high-order accuracy. Some high order algorithms are proposed in [10] [11] [12] [13] . In this paper, we derive a fourth-order finite difference scheme using 19 points for solving the three-dimensional Helmholtz equation.

The discretization of the fully three-dimensional Helmholtz equation contains a large number of unknowns and requires considerable memory space. The time and space complexity increase exponentially as the grid number increases. In the meantime, to maintain a given accuracy, the mesh must be refined as the wave number increases. Some parallel algorithms are presented in [14] [15] . However, this kind of parallel algorithms cannot settle the conflict between the grid number and the performance of the computer hardware.

Fast Fourier transform is a powerful technique for solving the Helmholtz equation both in two and three dimensions [16] [17] . However, fast algorithm in [18] requires much computational cost. In light of this, we propose a fast algorithm for solving the three-dimensional Helmholtz equation. The fast operator applies inexpensive transformation to break the large discretization matrix into small and independent systems. Therefore, the equation in the whole region is divided into some small equations in the vertical direction. Meanwhile, the algorithm saves much memory space and requires less computational time due to the sparsity of the fast operator. The problem is reduced on the aperture by introducing a Gaussian elimination and the Neumann boundary condition in the vertical direction.

The paper is outlined as follows. In Section 2, a fourth-order finite difference method for the Helmholtz equation is derived. In Section 3 and Section 4, a fast algorithm is proposed by the Fourier transformation and Gaussian elimination. Two numerical experiments of the fast fourth-order algorithm are presented in Section 5. The paper is concluded in Section 6.

2. Fourth-Order Finite Difference Method

The model problem is described as follows

Δ ϕ + k 2 ϕ = f , in Ω ϕ = b ( x , y , z ) , on Ω \ Γ (1)

in the cubic domain Ω with Neumann boundary condition

ϕ n = g ( x , y ) , on Γ , (2)

where k is the wave number and Γ is one of the planes of domain. f ( x , y , z ) , b ( x , y , z ) and g ( x , y ) are known function. The Helmholtz equation is approximated by a fourth-order finite difference discretization with h = Δ x = Δ y = Δ z and the partition { ( x i , y j , z l ) } i , j , l = 0 M + 1 , N + 1 , L + 1 .

The 19-points finite difference stencil with h yields the following linear system

( 1 + k 2 h 2 12 ) ( δ x 2 + δ y 2 + δ z 2 ) ϕ i , j , l + h 2 6 ( δ x 2 δ y 2 + δ x 2 δ z 2 + δ y 2 δ z 2 ) ϕ i , j , l + k 2 ϕ i , j , l = f i , j , l + h 2 12 ( δ x 2 δ y 2 + δ x 2 δ z 2 + δ y 2 δ z 2 ) f i , j , l + O ( h 4 ) (3)

where δ x 2 , δ y 2 and δ z 2 are standard second order central difference operator and ϕ i , j , l is the fourth-order finite difference solution of Equation (1).

Moreover, we can write Equation (3) in the matrix form

( 1 + k 2 h 2 12 ) ( A M I N I L + I M A N I L + I M I N A L ) Φ + h 2 6 ( A M A N I L + I M A N A L + A M I N A L ) Φ + k 2 Φ + Φ B = F + h 2 12 ( A M I N I L + I M A N I L + I M I N A L ) F + F B , (4)

where

A M = 1 h 2 tridiag ( 1 , 2 , 1 ) , A N = 1 h 2 tridiag ( 1 , 2 , 1 ) , A L = 1 h 2 tridiag ( 1 , 2 , 1 ) , Φ = ( ϕ 1 , 1 , 1 , , ϕ 1 , 1 , L , ϕ 1 , 2 , 1 , , ϕ 1 , 2 , L , , ϕ 1 , N , L , , ϕ M , N , L ) T , F = ( f 1 , 1 , 1 , , f 1 , 1 , L , f 1 , 2 , 1 , , f 1 , 2 , L , , f 1 , N , L , , f M , N , L ) T ,

the symbol represents the Kronecker product. I M , I N , I L and I M N L are identity matrices, the subscripts denote their dimension. A M , A N and A L are M × M , N × N and L × L tridiagonal matrices respectively. Φ B and F B are the boundary parts of Φ and F.

3. Fast Algorithm for Three-Dimensional Helmholtz Equation

A M and A N are all tridiagonal Toeplitz matrices. Fourier-sine transformation can be applied to these matrices for accelerating the algorithm. Multiplying discrete Fourier-sine transformation matrices S M and S N on the both side of A M and A N , we have

S M A M S M = Λ 1 = diag ( λ 1 , λ 2 , , λ M ) , S N A N S N = Λ 2 = diag ( μ 1 , μ 2 , , μ N ) ,

where

( S M ) i , j = 2 M + 1 ( sin i j π M + 1 ) , λ i = 4 ( M + 1 ) 2 a sin 2 i π 2 ( M + 1 ) , 1 i , j M .

S N and μ t , t = 1 , 2 , , N can be defined in the similar way.

Therefore, multiplying S M S N I L on both side of Equation (4), we have

( 1 + k 2 h 2 12 ) ( Λ 1 I N I L + I M Λ 2 I L + I M I N A L ) Φ ¯ + h 2 6 ( Λ 1 Λ 2 I L + I M Λ 2 A L + Λ 1 I N A L ) Φ ¯ + k 2 Φ ¯ + Φ ¯ B = F ¯ + h 2 12 ( Λ 1 I N I L + I M Λ 2 I L + I M I N A L ) F ¯ + F ¯ B , (5)

where

Φ ¯ = ( S M S N I L ) Φ , F ¯ = ( S M S N I L ) , Φ ¯ B = ( S M S N I L ) Φ B , F ¯ B = ( S M S N I L ) F B .

The sparse structure of S M S N I L is given in Figure 1 when

Figure 1. The sparse structure of S M S N I L with M = N = K = 3 .

M = N = K = 3 , where n z means the number of the unknowns. Hence, the above equation can be transformed into a block tridiagonal matrix based on the structure of the fast operator. Equation (5) can be simplified as

[ ( 1 + k 2 h 2 12 ) ( λ i I L + μ j I L + A L ) + h 2 6 ( λ i μ j I L + μ j A L + λ i A L ) + k 2 ] Φ ¯ i , j , : = F ¯ i , j , : + h 2 12 ( λ i I L + μ j I L + A L ) F ¯ i , j , : + F ¯ B i , j , : Φ ¯ B i , j , : , i = 1 , 2 , , M ; j = 1 , 2 , , N . (6)

In this paper, we take Γ as the top surface of the domain and it can be extended to the general situations. Since the solutions on the other surfaces are already known, we need to extract S ¯ B t o p which contains the parts of ϕ ¯ i , j , L + 1 from Φ ¯ B , there follows

P i j Φ ¯ i , j , : + ( p 1 + p 2 λ i + p 2 μ j ) a L 2 Φ ¯ i , j , L + 1 = F ¯ i , j , : + h 2 12 ( λ i I L + μ j I L + A L ) F ¯ i , j , : + F ¯ B i , j , : Φ ¯ B i , j , : ( 1 ) , (7)

where

P i j = ( 1 + k 2 h 2 12 ) ( λ i I L + μ j I L + A L ) + h 2 6 ( λ i μ j I L + μ j A L + λ i A L ) + k 2 I L , Φ ¯ B i , j , : ( 1 ) = Φ ¯ B i , j , : S ¯ B t o p , p 1 = 1 + k 2 h 2 12 , p 2 = h 2 6 , a L 2 = 1 h 2 ( 0 , 0 , , 1 ) T .

Next, we use the Gaussian elimination with a row partial pivoting to solve Equation (7).

First of all, constructing a LU-decomposition for P i j , i.e. P i j = L i j U i j , we have

L i j U i j Φ ¯ i , j , : + ( p 2 λ i + p 2 μ j + p 1 ) a L 2 ϕ ¯ i , j , L + 1 = F i , j , : + h 2 12 ( λ i I L + μ j I L + A L ) F i , j , : + F ¯ B i , j , : Φ ¯ B i , j , : ( 1 ) . (8)

Since L i j 1 is nonsingular, multiplying L i j 1 on both side of Equation (8), we can obtain

U i j Φ ¯ i , j , : + ( p 2 λ i + p 2 μ j + p 1 ) L i j 1 a L 2 ϕ ¯ i , j , L + 1 = L i j 1 ( F ¯ i , j , : + h 2 12 ( λ i I L + μ j I L + A L ) F ¯ i , j , : + F ¯ B i , j , : Φ ¯ B i , j , : ( 1 ) ) . (9)

Consequently, the last equation of Equation (9) can be derived

α i j ϕ ¯ i , j , L + β i j ϕ ¯ i , j , L + 1 = r i , j , L , i = 1 , 2 , , M ; j = 1 , 2 , , N , (10)

where α i j is the last element of U i j , β i j is the last element of ( p 2 λ i + p 2 μ j + p 1 ) L i j a L 2 , and r i , j , L is the last element of L i j 1 F ¯ i , j , : + h 2 12 ( λ i I L + μ j I L + A L ) F ¯ i , j , : + F ¯ B i , j , : Φ ¯ B i , j , : ( 1 ) . Combining M × N equations analogously to Equation (10), we have

D α Φ ¯ : , : , L + D β Φ ¯ : , : , L + 1 = R 1 , (11)

where

D α = diag ( α 11 , α 12 , , α 1 N , , α M 1 , α M 2 , , α M N ) T , D β = diag ( β 11 , β 12 , , β 1 N , , β M 1 , β M 2 , , β M N ) T , R 1 = ( r 1 , 1 , L , r 1 , 2 , L , , r 1 , N , L , r 2 , 1 , L , r 2 , 2 , L , , r 2 , N , L , , r M , 1 , L , r M , 2 , L , , r M , N , L ) T .

4. Discretization of Neumann Boundary Condition

The fourth-order finite difference discretization of Equation (2) can be expressed as

ϕ n = ϕ i , j , L + 2 ϕ i , j , L 2 h h 2 6 ( ϕ z z z ) i , j , L + O ( h 4 ) .

Using the fourth-order substitution of ϕ z z z we can derive

( 1 + k 2 h 2 6 + h 2 6 δ x 2 + h 2 6 δ y 2 ) ϕ i , j , L + 2 ( 1 + k 2 h 2 6 + h 2 6 δ x 2 + h 2 6 δ y 2 ) ϕ i , j , L = 2 h g i j + h 3 3 ( f z ) i , j , L + 1 , i = 1 , 2 , , M ; j = 1 , 2 , , N ,

or the matrix form

[ ( 1 + k 2 h 2 6 ) I M N + h 2 6 ( A M I N ) + h 2 6 ( I M A N ) ] ( Φ : , : , L + 2 Φ : , : , L ) + Φ B ( 2 ) = 2 h g + h 3 3 ( f z ) : , : , L + 1 . (12)

where

Φ B ( 2 ) = h 2 6 ( b 0 , 1 , L , b 0 , 2 , L , , b 0 , N , L , 0 , 0 , , 0 , , b M + 1 , 1 , L , b M + 1 , 2 , L , , b M + 1 , N , L ) T + h 2 6 ( b 1 , 0 , L , 0 , , b 1 , N + 1 , L , b 2 , 0 , L , 0 , , b 2 , N + 1 , L , , b M , 0 , L , 0 , , b M , N + 1 , L ) T

and b j , j , L = b ( x i , y j , z L ) .

Multiplying S M S N on both side of Equation (12), we can obtain

[ ( 1 + k 2 h 2 6 ) I M N + h 2 6 ( Λ 1 I N ) + h 2 6 ( I M Λ 2 ) ] ( Φ ¯ : , : , L + 2 Φ ¯ : , : , L ) = R 2 Φ ¯ B ( 2 ) , (13)

where

R 2 = ( S M S N ) ( 2 h g + h 3 3 ( f z ) : , : , L + 1 ) , Φ ¯ B ( 2 ) = ( S M S N ) Φ B ( 2 ) .

Moreover, replacing l with L + 1 in Equation (3), we have

[ ( k 2 h 4 12 + 2 h 2 3 ) ( δ x 2 + δ y 2 ) + h 4 6 δ x 2 δ y 2 + k 2 h 2 2 ( 1 + k 2 h 2 12 ) ] ϕ i , j , L + 1 + [ ( 1 + k 2 h 2 12 ) + h 2 6 ( δ x 2 + δ y 2 ) ] ( ϕ i , j , L + 2 + ϕ i , j , L ) = h 2 [ f i , j , L + 1 + h 2 12 ( δ x 2 δ y 2 + δ x 2 δ z 2 + δ y 2 δ z 2 ) f i , j , L + 1 ] , (14)

and the matrix form

[ ( k 2 h 4 12 + 2 h 2 3 ) ( A M I N + I M A N ) + h 4 6 ( A M A N ) ( 2 5 k 2 h 2 6 ) I M N ] Φ : , : , L + 1 + [ ( 1 + k 2 h 2 12 ) I M N + h 2 6 ( A M I N + I M A N ) ] ( Φ : , : , L + 2 + Φ : , : , L ) + Φ B ( 3 ) = h 2 ( F ( 3 ) + F B ( 3 ) ) , (15)

where

F ( 3 ) = h 2 12 ( A M A N + I M A N + A M I N + 12 h 2 I M N ) F : , : , L + 1 h 2 6 ( I M A N + A M I N ) F : , : , L h 2 6 ( I M A N + A M I N ) F : , : , L + 2 .

Multiplying S M S N on both side of Equation (15), there follows

[ ( k 2 h 4 12 + 2 h 2 3 ) ( Λ 1 I N + I M Λ 2 ) + h 4 6 ( Λ 1 Λ 2 ) ( 2 5 k 2 h 2 6 ) I M N ] Φ ¯ : , : , L + 1 + [ ( 1 + k 2 h 2 12 ) I M N + h 2 6 ( Λ 1 I N + I M Λ 2 ) ] ( Φ ¯ : , : , L + 2 + Φ ¯ : , : , L ) = R 3 , (16)

where R 3 = h 2 ( F ¯ ( 3 ) + F ¯ B ( 3 ) ) .

Eliminating Φ ¯ : , : , L + 2 from Equation (13) gives

C Φ ¯ : , : , L + 1 + 2 D Φ ¯ : , : , L = R 3 D B 1 ( R 2 Φ ¯ B ( 2 ) ) , (17)

where

B = ( 1 + k 2 h 2 6 ) I M N + h 2 6 ( Λ 1 I N ) + h 2 6 ( I M Λ 2 ) , C = ( k 2 h 4 12 + 2 h 2 3 ) ( Λ 1 I N + I M Λ 2 ) + h 4 6 ( Λ 1 Λ 2 ) ( 2 5 k 2 h 2 6 ) I M N , D = ( 1 + k 2 h 2 12 ) I M N + h 2 6 ( Λ 1 I N + I M Λ 2 ) .

Combining Equation (11) and Equation (17) and derive a linear system

A Φ ¯ : , : , L + 1 = R , (18)

where

A = C 2 D D α 1 D β , R = R 3 D B 1 ( R 2 Φ ¯ B ( 2 ) ) 2 D D α 1 R 1 .

Finally, after deriving Φ ¯ : , : , L + 1 , we can obtain Φ ¯ i , j , : by substituting Φ ¯ : , : , L + 1 in Equation (7). Multiplying S M S N I L , we can get the numerical solution of the 3D Helmholtz equation.

5. Numerical Experiments

In this section, two numerical experiments are presented to test the validity and efficiency of the proposed method. Both experiments are implemented on MATLAB. All the equations are solved by the BiCG method. Equations in the two examples are solved in a cube Ω = [ 0 , 1 ] × [ 0 , 1 ] × [ 0 , 1 ] .

Example 1. Consider the following problem

u ( x , y , z ) = sin ( π x ) sin ( π y ) sinh ( 2 π ) [ 2 sinh ( 2 π z ) + sinh ( 2 π ( 1 z ) ) ] (19)

with

{ u ( x , y , z ) = sin ( π x ) sin ( π y ) , z = 0 , u ( x , y , z ) = 2 sin ( π x ) sin ( π y ) , z = 1 , u ( x , y , z ) = 0 , y { 0 , 1 } , z = 0 ,

f = 0 and the corresponding Neumann boundary condition can be calculated.

Table 1 fully corroborates the theoretical design rate of the convergence for the proposed method. We can see that a good accuracy (10−7) is achieved with a small number of grid points (16 - 32 in each direction). In the case of space complexity of O ( M 3 ) , the sparsity of Fourier operator accelerates the speed for solving the three-dimensional Helmholtz equation. Moreover, the comparison of the computational time of three times Fourier transformation and twice Fourier transformation are given in Table 1. Here S M S N S L and S M S N I L represent two different transform operators. As we can see from Table 1, the algorithm proposed in this paper saves much computational time and makes it possible to solve the equation with large grid number. Meanwhile, we give the numerical solutions of Equation (19) in the whole domain and numerical solution on the face z = 1 2 in Figure 2 and Figure 3 respectively.

Example 2.

u + k 2 u = ( 2 π 2 ) sin ( π x ) sin ( π y ) sin ( k z ) , in Ω , u = 0 , on Ω \ Γ ,

with the exact solution

u = sin ( π x ) sin ( π y ) sin ( k z ) . (20)

We give the figures of the numerical solutions U with different wave number in Figure 4 and Figure 5. As shown in Figure 4 and Figure 5, the solutions of the Helmholtz equation are highly oscillating for large wave number.

Table 1. Convergence rate and comparisons of computational time (s) for solving Example 1 with different operators.

Figure 2. The numerical solutions of Equation (19) with M = 512 .

Figure 3. The numerical solutions of Equation (19) on the face z = 1 / 2 with M = 512 .

Figure 4. The numerical solutions of Equation (20) with k = 3 π (left) and k = 5 π (right).

Figure 5. The numerical solutions of Equation (20) with k = 7 π (left) and k = 15 π (right).

6. Conclusion

We propose a fast-high order method for solving the 3D Helmholtz equation with Neumann boundary condition. Fourier operator is used to generate block-tridiagonal structure of the discretization of the Helmholtz equation. Moreover, by using the Gaussian elimination in the vertical direction, the Helmholtz equation is reduced into a linear system in the layer of the domain. The validity and efficiency of the method are tested by two numerical experiments.

Acknowledgements

This research was supported by the Nature Science Foundation of Hebei Province (No. A2016502001) and the Fundamental Research Funds for the Central Universities (No. 2018MS129).

Conflicts of Interest

The authors declare no conflicts of interest.

References

[1] Singer, I. and Turkel, E. (1998) High-Order Finite Difference Methods for the Helmholtz Equation. Computer Methods in Applied Mechanics & Engineering, 163, 343-358.
https://doi.org/10.1016/S0045-7825(98)00023-1
[2] Harari, I. and Hughes, T.J.R. (1991) Finite Element Methods for the Helmholtz Equation in an Exterior Domain: Model Problems. Computer Methods in Applied Mechanics & Engineering, 87, 59-96.
https://doi.org/10.1016/0045-7825(91)90146-W
[3] Jin, J.M., Liu, J., Lou, Z. and Liang, C.S.T. (2003) A Fully High-Order Finite-Element Simulation of Scattering by Deep Cavities. Antennas & Propagation IEEE Transactions on, 51, 2420-2429.
https://doi.org/10.1109/TAP.2003.816354
[4] Jin, J.M. and Liu, J. (2000) A Special Higher Order Finite-Element Method for Scattering by Deep Cavities. IEEE Transactions on Antennas & Propagation, 48, 694-703.
https://doi.org/10.1109/8.855487
[5] Braverman, E., Israeli, M. and Averbuch, A. (1999) A Fast Spectral Solver for a 3D Helmholtz Equation. Society for Industrial and Applied Mathematics, 20, 2237-2260.
https://doi.org/10.1137/S1064827598334241
[6] Nabavi, M., Siddiqui, M.H.K. and Dargahi, J. (2007) A New 9-Point Sixth-Order Accurate Compact Finite-Difference Method for the Helmholtz Equation. Journal of Sound & Vibration, 307, 972-982.
https://doi.org/10.1016/j.jsv.2007.06.070
[7] Hong, P.L., Minh, T.L. and Hoang, Q.P. (2018) On a Three Dimensional Cauchy Problem for Inhomogeneous Helmholtz Equation Associated with Perturbed Wave Number. Journal of Computational and Applied Mathematics, 335, 86-98.
https://doi.org/10.1016/j.cam.2017.11.042
[8] Hua, Q.S., Gu, Y., Qu, W.Z., Chen, W. and Zhang, C.Z. (2017) A Meshless Generalized Finite Difference Method for Inverse Cauchy Problems Associated with Three-Dimensional Inhomogeneous Helmholtz-Type Equations. Engineering Analysis with Boundary Elements, 82, 162-171.
https://doi.org/10.1016/j.enganabound.2017.06.005
[9] Kashirin, A.A., Smagin, S.I. and Taltykina, M.Yu. (2016) Mosaic-Skeleton Method as Applied to the Numerical Solution of Three-Dimensional Dirichlet Problems for the Helmholtz Equation in Integral Form. Computational Mathematics and Mathematical Physics, 56, 612-625.
https://doi.org/10.1134/S0965542516040096
[10] Britt, S., Tsynkov, S. and Turkel, E. (2010) A Compact Fourth Order Scheme for the Helmholtz Equation in Polar Coordinates. Journal of Scientific Computing, 45, 26-47.
https://doi.org/10.1007/s10915-010-9348-3
[11] Ortega, G., García, I. and Garzón, G.E.M. (2013) European Conference on Parallel Processing: A Hybrid Approach for Solving the 3D Helmholtz Equation on Heterogeneous Platforms. Springer, Berlin, 8374, 198-207.
[12] Sutmann, G. (2007) Compact Finite Difference Schemes of Sixth Order for the Helmholtz Equation. Journal of Computational & Applied Mathematics, 203, 15-31.
https://doi.org/10.1016/j.cam.2006.03.008
[13] Shaw, R.P. (2000) Integral Equation Methods in Acoustics. Boundary Elements, 4, 221-244.
[14] Poulson, J., Engquist, B., Li, S.W. and Ying, L.X. (2013) A Parallel Sweeping Preconditioner for Heterogeneous 3D Helmholtz Equations. SIAM Journal on Scientific Computing, 35, 194-212.
https://doi.org/10.1137/120871985
[15] Singer, I. and Turkel, E. (2006) Sixth-Order Accurate Finite Difference Schemes for the Helmholtz Equation. Journal of Computational Acoustics, 14, 339-351.
https://doi.org/10.1142/S0218396X06003050
[16] Boisvert, R.F. (1985) A Fourth-Order-Accurate Fourier Method for the Helmholtz Equation in Three Dimensions. ACM Transactions on Mathematical Software, 13, 221-234.
https://doi.org/10.1145/29380.29863
[17] Li, C.L. and Zou, J.W. (2013) A Sixth-Order Fast Algorithm for the Electromagnetic Scattering from Large Open Cavities. Applied Mathematics and Computation, 219, 8656-8666.
https://doi.org/10.1016/j.amc.2013.02.014
[18] Zou, J.W. and Li, C.L. (2013) A High-Order Fast Algorithm for Three-Dimensional Helmholtz Equation. Journal of Guilin University of Electronic Technology, 33, 420-424.

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.