# Sound-hard Burton miller acoustic scattering

Hello

First of all, thanks for making this software.

I’m a masters student currently working with BEMPP to solve acoustic scattering problems off of a human head model to numerically calculate HRTF’s.

As I have understood it, i can formulate my BIE as \frac{1}{2}p - M[p] = p_{inc}, with a sound-hard boundary condition \frac{\partial}{\partial n} p = 0.
I get results out using:

k = 5   # wave number o
space = bempp.api.function_space(grid, "DP", 0)
I = bempp.api.operators.boundary.sparse.identity(space, space, space)
M = bempp.api.operators.boundary.helmholtz.double_layer(space, space, space,k,assembler = "fmm") # double layer potential
lhs = 0.5 * I - M
@bempp.api.complex_callable
def f(x, n, domain_index, result):
result[0] = np.exp(1j * k * x[0])
rhs = bempp.api.GridFunction(space, fun=f)
sol, info = bempp.api.linalg.gmres(lhs, rhs,tol=1E-4)


in a couple of minutes.

However when i try to add the Burton-Miller term:

    I = bempp.api.operators.boundary.sparse.identity(space, space, space)
M = bempp.api.operators.boundary.helmholtz.double_layer(space, space, space,k,assembler = "fmm")    # double layer potential
E = bempp.api.operators.boundary.helmholtz.hypersingular(space, space, space, k, assembler= "fmm")  # derivative of dlp
lhs =  0.5 * I - M - 1j/k * E                                                                      # burton miller



The gmres solver hangs forever (or at least becomes really slow), and i am forced to use space = bempp.api.function_space(grid, "DP", 1) which will give me three values per element, even though I’m only interested in a single value for each element.

I’m pretty new to BEM so I’m certainly just doing something wrong, but i’m hoping that the smart people here may have a solution.

Best regards
Rasmus

Rasmus,

Please try: space = bempp.api.function_space(grid, “P”, 1).
The hypersingular operator requires piecewise linear functions. These are the continuous versions instead of the discontinuous versions you used.

Best,
Elwin

3 Likes

Thanks a ton, Elwin!

Now at least it seems to give me results in a decent amount of time.

In this way I seem to get a result for every vertex. If i want to approximate the surface solution on the midpoint of each element, can i simply take the arithmetic mean of the pressure at the 3 vertices of the element?

Best regards,
Rasmus

EDIT: Also to the moderators, if i run into other problems using BEMPP in this project, would you prefer if i ask for help in this thread or make a new one for separate issues?

Rasmus,

The continuous P1 elements are node based: value 1 at a given vertex in the mesh, value 0 at all other vertices and piecewise linear at each triangle element. Hence, the solution you get are values of the surface pressure at each vertex. You can evaluate the surface pressure inside the triangles with linear interpolation of the values at the three vertices.

Best,
Elwin

Hi, Rasmus, have you compared this solution with the analytical one? It seems that large error is caused by utilizing the BIE 0.5p - M[p] = p_{inc} for this wavenumber. The following figure is the calculation for ka = 5 (a - radius of the sphere).

(DoF - 8192, dp0_space = bempp.api.function_space(grid, “DP”, 0) )

Sorry, I am pretty new to BEMPP. How did you generated this graph?