Abstract
In this paper, the numerical solution to the Helmholtz equation with impedance boundary condition, based on the Finite volume method, is discussed. We used the Robin boundary condition using exterior points. Properties of the weak solution to the Helmholtz equation and numerical solution are presented. Further the numerical experiments, comparing the numerical solution with the exact one, and the computation of the experimental order of convergence are presented.
1 Introduction
Numerical methods in acoustics solve the wave equation
where P is the pressure and c is the speed of sound. This equation describes the behavior of sound, light, or water waves. In the case of time harmonic acoustic propagation and scattering [1], the pressure function is given by
Here ω = 2πf is the angular frequency measured in rad/s, ƒ the frequency measured in Hz and Re denotes the real part. Function A is in general complex valued and is the complex acoustic pressure.
To solve (1), the method of separating the variables can be applied. Thus the time-independent form of the original equation is obtained, which is called the Helmholtz equation
Here |A(x)| is the amplitude of the time harmonic pressure fluctuation at x and k is the acoustic wavenumber (number of radians per unit distance). Wavenumber is also given by the formula
The Helmholtz equation is related to the problems of steady-state oscillations. The unknown function A(x) is defined on a two or three dimensional domain D, where its boundary is denoted by ∂D. In our paper we focus on the most commonly relevant boundary condition [1], called impedance boundary condition of the type
In this boundary condition n denotes the outward normal to the boundary ∂D, and
Our main goal is to present a numerical scheme for solving the problem (3), (5) in 2D.
2 Finite Volume Method
There are several numerical techniques for solving the Helmholtz equation. Among them we can mention the Finite element method e.g. in [3], or the Boundary element method e.g. in [4] and [5]. In this article we study numerical solution based on the Finite volume method which is an extension of the previous work [4].
We present the numerical scheme based on the Finite volume method [6]. The discretization of the domain D is the union of so called finite volumes (in 2D usually rectangles or triangles). This discretization is denoted as Th, where the index h is connected with the size of finite volumes. In our case the domain will be a two dimensional rectangle and our finite volumes will be squares of size h. In each finite volume p ∊ Th we have a representative point Xp in which the approximated function can be evaluated. That is why our numerical solution is a piecewise constant function, which is constant on each finite volume, and is calculated at the representative point. This point is usually chosen in the barycentre of the finite volume. Moreover we denote by E the set of all edges of each finite volume p ∊ Th. If we have our discretization as described above, our mesh fulfils an important property
for both neighbouring representative points Xp and Xq. Here npq is the outward normal of the finite volume p to the common side with finite volume q; this side is denoted by σpq and dpq is the distance between representative points Xp and Xq. An important feature of the method is the local conservativity of numerical fluxes, which means that the flux is conserved from one discretization finite volume to its neighbour.
After the discretization of the domain we have n finite volumes along one side of the rectangle domain and m finite volumes along the other, a mesh of m × n finite volumes is obtained. The particular finite volume is labelled as p and its boundary as ∂p. In the finite volume we denote the constant value of the approximated solution as up, and the solution in the neighbouring volume as uq. The size of the finite volume p is denoted by m(p) and the edge σpq has the size denoted by m(ςpq). We denote by N(p) the set of all neighbours of the finite volume p, which means the finite volumes that have common side with volume p.
The finite volume numerical scheme can be obtained by integrating the differential equation (3) on each finite volume. Using Green’s theorem we obtain
We apply the approximation function as discussed above which can be denoted by
We use this property in (7) together with the approximation of the normal derivative by a standard finite difference. This way we obtain
The solution to the Helmholtz equation is based on complex values as
For the approximate solution it is the same
and analogously
where i is imaginary unit. Thus the proposed equation is valid for both real part and imaginary part. We will denote it in a similar way but with the upper indices “r” or “i”. We have
These equations are valid for the interior finite volumes.
We now denote by E = Eint ∪ Eext, where Eint is the set of all interior edges and Eext is the set of all edges of all finite volumes that belong to ∂D. Further Th = Th,int ∪ Th,ext, where Th,int is the set of all finite volumes which have all edges in Eint and Th,ext is the set of all finite volumes that have at least one edge in Eext. Finally by N(p)int we denote the set of those neighbours with common side σpq ∊ Eint, and N(p)ext is the set of neighbours with common side σpq ∊ Eext.
From prescribed boundary condition (5), we obtained the conditions for the real and imaginary parts of the solution
For the finite volume p ∊ Th,ext we use the boundary conditions to approximate the numerical fluxes along the edges from Th,ext. For this purpose we use exterior finite volumes denoted by qext, and the value of the numerical solution at these finite volumes is denoted by
From (14) we obtain
where
Now, from equations (16), we eliminate the unknown values
This way we create a system of linear algebraic equations, in which the matrix was of order 2nm . After solving the system, both the real and imaginary part are obtained for each finite volume.
3 Properties of the Weak and Numerical Solution
Let the data in (5) fulfil the following assumptions
g = gr + igi and gr ∈ L2(∂D), gi ∈ L2(∂D)
β is real number
A complex valued function A = Ar + iAi is a weak solution of (3)-(5) if
Ar ∊ H1(D)) and Ai ∊ H1(D)
the following holds
If we now pose in(18) v = Ā = Ar –iAi, we immediately have
We remind that the computational domain we assume in this section is rectangle, and our discretization mesh consists of squares with the edge of size h. We have m finite volumes along one direction of the domain D, and n along the another direction, so we have n×m finite volumes. Thus we have
We can express our numerical scheme in a similar way as it was done for the continuous equation. We obtain for p ∊ Th,int
and for p ∊ Th,ext
We can approximate the boundary condition by
where
Substituting uqext – up in (21) from (22) we have
Now we multiply each of the equation (20) and (21) by ūp =
which can be rearranged in the form
where
First we notice
and using boundary approximation (22) for real and imaginary part we have
Thus for the term I we obtain
Now we use the discrete H1 seminorm defined in [6]
where Dςu = |up-uq|,ς = σpq. If we now use the definition of a constant numerical solution (8), we can write
4 Numerical Scheme for Regular Mesh
We use the same computational domain as in the previous section. Now we derive numerical schemes for the real and imaginary part of the complex valued approximation function.
We have two types of the linear algebraic equations. The first belongs to the finite volumes from the set Th,int, and second for the finite volumes from the set Th,ext. In the first case we have for both, real and imaginary part of the numerical solution, the following equations
For the second case we have some sides (one or two) of the finite volume that belongs to the boundary of the domain D. Here we use the boundary condition and the approximation described above
From these equations we can easily eliminate the unknown values
Substituting these values into (15) for p ∈ Th,ext we have
where
In this way we obtain linear system of algebraic equation with unknowns
5 Numerical experiments
This section describes the results of the code, which solves the Helmholtz equation by the Finite volume method on the square domain of size 1 metre.
5.1 Experiment 1 - boundary conditions with β = 1
First to be presented is the solution of (3)-(5) with β = 1 in (5), so Robin boundary conditions are prescribed for all sides of domain. For the beginning we must use the exact solution used in [3]
where the values k1, k2 are given by
The source function g was set so as to comply with the exact solution (30). Firstly we present results for
Next figures are dedicated to the bigger wavenumber. It is known that higher frequencies (i.e. bigger wavenumbers) require finer discretization, if we want to get results close to the exact solution [7]. Figure 4 shows the exact solution for the wavenumber 25rad/m. Figures 5 and 6 depict the numerical solution for 10 and 40 discretizing points.
It is clear that it is more difficult to approximate this function. Figure 7 shows plots for n = 60, where the results get very close to the exact solution.
The L2 error was calculated by the formula
Here
k= 10rad/m | k=25rad/m | |||||
---|---|---|---|---|---|---|
n | 10 | 40 | 60 | 10 | 40 | 60 |
L2 | 0.2653 | 0.0143 | 0.0063 | 1.3518 | 0.2324 | 0.1000 |
error |
where h is the length of the finite volume. α will be then calculated by
and from the theory it is known that its value is expected to be converging to 2. Table 2 shows the results for the wavenumber 10rad/m.
n | L2 error | α |
---|---|---|
10 | 0.265255 | 2.17192 |
20 | 0.058864 | 2.03935 |
40 | 0.014320 | 2.01011 |
80 | 0.003555 |
Next figures 8 – 14 are for the value of
Presented figures and tables (3 and 4) show, that the behaviour is very similar to the previous value of θ.
k= 10rad/m | k=25rad/m | |||||
---|---|---|---|---|---|---|
n | 10 | 40 | 60 | 10 | 40 | 60 |
L2 | 0.1425 | 0.0082 | 0.0036 | 1.5407 | 0.1238 | 0.0541 |
error |
n | L2 error | α |
---|---|---|
10 | 0.142520 | 2.09584 |
20 | 0.033340 | 2.02356 |
40 | 0.008200 | 2.00635 |
80 | 0.002041 |
5.2 Experiment 2 - mixed boundary conditions
The final part of the paper shows the results of program with changed boundary conditions. The domain is divided in two parts
The boundary conditions on three sides of the boundary ∂DRobin are prescribed as in the previous case, where β = 1 in (5). For part of the right side of the domain
the value of β = 0 in (5), so zero Neumann boundary conditions were obtained
This combination of Robin and Neumann boundary conditions can represent for example a column (i.e. a hard wall barrier) standing in the free space. Exact solution is the same as in the previous case (30). The following tables 5 and 6 show the values of L2 error and EOC.
k= 10rad/m | k=25rad/m | |||||
---|---|---|---|---|---|---|
n | 10 | 40 | 60 | 10 | 40 | 60 |
L2 | 0.2757 | 0.0150 | 0.0066 | 1.2876 | 0.2376 | 0.1024 |
error |
n | L2 error | α |
---|---|---|
10 | 0.275654 | 2.15734 |
20 | 0.061793 | 2.04152 |
40 | 0.015010 | 2.01061 |
80 | 0.003725 |
6 Conclusion
We have studied the numerical solution to the Helmholtz complex-valued equation. Our numerical solution is obtained using classical Finite volme method. For discretization of the boundary condition, which is of Robin type, we have used aditional exterior finite volumes by eliminating values on them. Properties of the weak solution and numerical solution are derived. Numerical experiments of various cases with changing boundary conditions show experimental order of convergence for the numerical solution to the exact one.
Acknowledgement
This work was supported by VEGA 1/0728/15.
References
[1] Chandler-Wild S., Langdon S., Boundary element methods for acoustics, Lecture notes, University of Reading, Department of Mathematics, 2007Search in Google Scholar
[2] Handlovičová A., Riečanová I., Roozen N. B., Rigid piston simulations of acoustic space based on Finite volume method, Proceedings of Aplimat, 15-th Conference on Applied Mathematics, Institute of Mathematics and Physics, Faculty of Mechanical Engineering STU in Bratislava, 2016, ISBN 978-80-227-4531-4Search in Google Scholar
[3] Babuška I. M., Ihlenburg F., Paik E. T., Sauter S. A., A Generalized Finite Element Method for Solving the Helmholtz Equation in two Dimensions with Minimal Pollution, Comput. Methods Appl. Mech. Engrg. 128,1995, 325-35910.1016/0045-7825(95)00890-XSearch in Google Scholar
[4] Riečanová I., Finite volume method scheme for the solution of Helmholtz equation, Proceedings of Aplimat, 14-th Conference on Applied Mathematics, Institute of Mathematics and Physics, Faculty of Mechanical Engineering STU in Bratislava, 2015, ISBN 978-80-227-4314-3Search in Google Scholar
[5] Sauter S. A., Schwab C., Boundary Element Methods, Springer-Verlag, Berlin, 2011, 56110.1007/978-3-540-68093-2Search in Google Scholar
[6] Eymard R., Gallouet T., Herbin R., Finite Volume Methods, Handbook of Numerical Analysis, Elsevier, 2007Search in Google Scholar
[7] Riečanová I., Solution of the Helmholtz equation by the Boundary element method and the Finite volume method, Proceedings of Advances in Architectural, Civil and Environmental Engineering, faculty of civil Engineering, Slovak University of Technology in Bratislava, 2014, 29-36, ISBN 978-80-227-4301-3Search in Google Scholar
© 2016 A. Handlovičová and I. Riečanová
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 3.0 License.