i am interested to simulate acoustical radiation from a horn.
I can model the horn (based on formulas / in a parametrical manner) and the membrane independently and covert it form point clouds to a mesh (*.stl) using meshlab.
In the following example a speaker was modeled with the parametrical gmsh interface and certain areas were defined with certain “domain indices”. Those indices are used later in the code to define the sources.
At the same time on the whole grid (membrane and horn) the function spaces get defined: spaceP = bempp.api.function_space(grid, “P”, 1) spaceU = bempp.api.function_space(grid, “DP”, 0, segments=[2])
I can not use this gmshgeometry interface because of the special form i want to simulate. Merging the two meshes manually in gmsh is not working reliably. GMSH is changing indices by its self and some parts of the mesh “vanish” for no reason sometimes. Aditionally, I want to create an “automated” simulation chain in python, so no manual “merging” is allowed.
My questions:
Can i import the two meshes individually and merge them in python / bempp enviroment?
Can i afterwards assign the finction spaces to multiple meshes including the boundary conditions?
Do the membrane and horn need to be connected (numerically), meaning the membrane-cirmumference points are exactly the same as the horn entry circumference points?
Less elegant / unified → Is there a way to merge the meshes with a command line command with meshio/gmsh or bempp?
From the gmsh, meshio or bempp documentation i can not find any hint on how to do this efficiently but at the same time i do not think that my requirement is so special, that the framework can not handle this. So any help is highly appreciated
Help on function union in module bempp.api.grid.grid:
union(grids, domain_indices=None, swapped_normals=None)
Return the union of a given list of grids.
Parameters
----------
grids: list
A list of grid objects.
domain_indices : list
Attach a list of domain indices to the new
grid such that grid[j] received the domain
index domain_indices[j]
swapped_normals : list of boolean
A list of the form [False, True, ...],
that specifies for each grid if the normals
should be swapped (True) or not (False). This
is helpful if one grid is defined to be inside
another grid.
This method returns a new grid object, which is
the union of the input grid objects.
yes, i did implement a few different horn shapes and played around a little bit.
What i found so far:
When using a volume “behind” the driver (as it is the case in every speaker and in the example) even when closed there is a problem when resonances occur inside that volume. Usually those cases are managed by CHIEF points as far as i know, but those are not implemented here. I decided to go for a very tiny volume so no resonances can occur.
Results seem reasonable, computing times as well
With point 1) there is always the “back of the horn” exposed, because it is only a thin shell. I expect influences here.
This is one of the results the beam pattern in horizontal and vertical plane of an eliptical JMLC horn with 1.5kHz and 1kHz cutoff frequency.
In the next steps i will manufacture some horns and measure them to learn more about the performance
Kind regards, Tobi
Those are some nice results. Compliments on your work! I like the radiation and normalized radiation “spinorama” plots in both planes.
I’ve got experience in simulating horns in ABEC, however looking into transferring to BEMPP as ABEC does not allow for easy automation nor customisation. I can share some of our experiments and builds in case your interested.
Would you mind sharing (parts of) your code of your experiments?