Documentation

Here is the documentation for the Graphical User Interface (GUI) of the BEM acoustics toolbox. The GUI is mostly self-explanatory and should keep you from doing anything wrong. A more detailed description of the BEM core functions you find in the MATLAB help (if the BEM acoustics toolbox is installed).
Please also have a look at our blog for some details.

  1. Download and unpack the BEM acoustics toolbox to a folder you like.
  2. Open MATLAB and run the installBEMacoustics.m file you find in the BEMacoustics folder. This will add all the paths to MATLAB that the toolbox will need.
  3. Now type in MATLAB Command Window [project,setup] = BEMacoustics; this will enable you to see the variables in your workspace. But it would be enough to type BEMacoustics to run the GUI.
  4. You will be asked for the type of calculation you would like to simulate. Please select either radiation or scattering.
  5. On the Parameter tab of the GUI you can now set the parameters like:
    • speed of sound c [m/s]
    • Average time steps per element: This parameter is important for the memory allocation when calculating the BEM matrices. The default is set to 4. This is about the highest you should get when you choose a time step appropriate to the surface mesh. The only reason to change this parameter is when you encounter an Out of memory error. You can than reduce the parameter. If you choose the parameter too small the memory allocation will not be enough for all the matrix entries and MATLAB will become very, very slow! In fact, it will be so slow that you should kill the process and restart.
    • Time step Δt [s]: This is the most important parameter and has to be chosen with care! The time step and the surface mesh depend on each other in the following way: The ratio β of the time step Δt times sound speed c divided by the average element size l of the surface mesh (β=c*Δt/l) should be 0.7<β<1.5. Within these limits the best results will be achieved. For β<0.7  the spatial discretisation of the surface mesh is to coarse and will cause an increase of numerical errors. It is most likely that the simulation will be influenced by the inner resonances of the object (for exterior problems) and might get unstable! For β>1.5 you will waste a lot of computational time but the results should be accurate.
    • Number of Gaussian points: This will set the the accuracy of the numerical integration, which is of course a crucial point for accurate results. The default is set to 16 and it is not recommended to choose a smaller value. You can increase the value to get better results especially if you have a β<1. This will of course increase the computation time of the simulation.
    • Load mesh of structure: Please select a file with the definition of the surface of your structure. At the moment only MATLAB files containing the variables nodes and elements are accepted. Please have a look at the example file you find in the example-folder. Flat quad and triangle elements are supported (also mixed meshes). The elements should be defined so that the surface normal vector points into the domain! In future releases we hope to include import functions for standard mesh file types. If you have such functions, we would be glad if you would contribute them.
  6. If all parameters are set, push the Save Parameter button. The Add new setup button will then be enabled. Pushing that button a new Setup tab will be created. Creating the first Setup the normal vectors, center points and surface of all elements will be calculated. Depending on the number of elements that can take some minutes or only seconds.demo_GUI_1
  7. On the Setup tab the surface mesh will be displayed and you can add the following to your project:
    • Load microphone position: Select a MATLAB file that defines the microphone positions where the sound pressure will be calculated.
    • Load boundary conditions (only radiation): Select a MATLAB file that defines the flux q for every surface element (matrix size [Ne x Nt]) and the time vector. The flux can be calculated out of the time derivative of v the normal surface velocity: q=-ρ*dv/dt with ρ being the density of the medium.
    • Load source data (only scattering): Select a MATLAB file that defines the source location scr (matrix size [Ne x 3]), the sound pressure p_scr (matrix size [Nscr x Nt]) emitted by the source and t the time vector.  Multiple sources are allowed, but at the moment only monopole sources. Plane waves will come in a future release.
    • Number of time steps: The number of time-steps is displayed. It will be determined by the length of the boundary condition or the source vector.
  8. Now you can start the simulation by pushing the Run calculation button. The GUI will be disabled as long as the calculation is running. A new window will open, displaying the progress of each step.
  9. When the calculation was successfull you can display the result by selecting one microphone point with the data cursor (looks like a cross) and pushing the Plot result button.

demo_GUI_3

 

And here is a list of all variables:

Name Description Size Notes
Scalars Nc number of CHIEF points [1 x 1]
Ne number of elements in the mesh [1 x 1]
Nmic number of microphone points [1 x 1]
Nnodes number of nodes in the mesh [1 x 1]
Nscr number of sources [1 x 1]
Nt number of time steps [1 x 1]
Mesh elements definition of the mesh’s elements
(reference to node indices)
[Ne x 4] Elements must be rectangular or triangular.
In case of triangular elements, the last column equals the first.
nodes cartesian coordinates of the nodes of the surface mesh [Nnodes x 3] Unit = m
Mic
data
MicNodes microphone positions in cartesian coordinates [Nmic x 3] Unit = m
BC data
(radiation)
q flux at surface element [Ne x Nt Unit = kg/(m^2*s^2)
t time vector [1 x Nt] Must be equidistantly sampled. Unit = s
CHIEF
data
cnodes CHIEF points in cartesian coordinates [Nc x 3] Should lie completely within the mesh. Unit = m
Source data
(Scattering)
p_scr pressure at sources [Nscr x Nt] Unit = Pa
scr source positions in cartesian coordinates [Nscr x 3] Unit = m
t time vector [1 x Nt] Must be equidistantly sampled. Unit = s