2. Basic Usage

2.1 Application layout

The next figure depicts the Wave Acoustics Simulator GUI (Graphical User Interface). It consists of four main regions:

Win_Layout

  1. File menu - Here the user can quit the application, load a new simulation or check information about WaveAcoustics itself.

  2. Simulation option tabs – The user can set the source and boundary characteristics, view data in real time using a virtual oscilloscope and change graphical and other simulation settings. Each option type is grouped into an expandable tab, listed below. These options are described in greater detail in the subsequent chapters of this documentation.

    • Source

    • Boundaries

    • Oscilloscope

    • View

    • Settings

  3. Main view - Shows the graphical output of wave simulations. By default, the elapsed time is shown in the bottom left corner. A ‘W.A.S.’ watermark is displayed on the top right corner. This watermark is not displayed in the industrial version.

  4. Simulation controls - Play/pause, reset, record animation and set snap grid on/off.

2.2 How to setup a basic simulation

2.2.1 Input Sources

Right-click on the main view to create a sinusoidal source (default source):

Source

Note that the source positions will be marked with light blue squares. You can then start the simulation or pause it at any time by pressing the ‘play/pause’ button down in the simulation controls:

Fplay

Note that the source position markers disappear while the simulation is running:

Source

If you wish to edit the characteristics of your source or even input a different type of source, use the expandable ‘Source’ menu, in the simulation option tabs.

2.2.2 Input boundaries

Left-click on the main view. This will enter boundary insertion mode:

Boundary

Please note that whilst the boundary position has not been fixed by the user, the boundary will appear pink. Otherwise, it will appear white.

The user must press the ‘ESC’ key in order to exit boundary insertion mode.

2.2.3 Snap grid on/off

You can toggle the snap grid on/off by clicking the snap button in the simulation controls:

Snap1

The snap button will turn red and the snap grid will be displayed:

Snap2

It is worth noting that whilst inserting boundaries (and while the snap grid is enabled) a tooltip appears next to the mouse cursor indicating the corresponding physical distance of the boundary.

Snap2

2.2.4 Select/Delete boundaries

The user is able to select boundaries by using SHIFT + RIGHT CLICK and dragging the mouse cursor over it. This will show the selection rectangle which will appear in an orange colour. Selected boundaries will appear in yellow. The following figure shows two boundaries that have been selected:

Snap3

In order to unselect these boundaries, the user should press the 'ESC' key. It is possible to delete selected boundaries by pressing the key 'DELETE' on the keyboard. The following figure shows the arrangement obtained by deleting the two previously selected boundaries:

Snap4

2.2.5 Simulation output

The following picture depicts the graphical output of the Wave Acoustics Simulator, where the user defined a sound source, two receiver positions and a set of boundaries:

Sim

Note the two point responses (blue and red) visible in the ‘Oscilloscope’ tab. These responses are updated while the simulation is running. The corresponding receiver positions are set by clicking the middle mouse button in the main view area – the first click sets the first receiver (green square), while the second click sets the second receiver (green circle). To reset these receiver positions press the 'R' key.

2.2.6 Saving audio/data

The acoustic pressure data corresponding to the two receivers can be saved to disk by enabling ‘Save data/audio’. While this option is checked, data is streamed into the file 'data.csv ' inside the 'data_output' folder.


The user should not attempt to open the file ‘data.csv’ while data is being streamed into it. When the user unchecks the option ‘Save data/audio’, the data streaming process ends and a data (.csv) and two audio (.wav) files are created inside the ‘data_output’ folder. On Windows 10, an empty command line window shows up for a few seconds while the audio files are being created:

Fexe


The resulting file ‘data.csv’ can then be opened by 3rd party software such as a spreadsheet, MATLAB or Python. As an example, the following figure shows the data being opened using a spreadsheet:

SimSheet

Likewise, the resulting audio files 'audio_receiver1.wav' and 'audio_receiver2.wav' can be played or embedded in MS Powerpoint or an html5 webpage.


For example, the following scene depics a sound source (pulse) and a receiver placed midway between two walls:

Auralization

Since the distance between walls is 22m, ‘flutter echoes’ can be clearly heard in the audio:

2.2.7 Reset simulation

To reset to an entirely new simulation, click ‘File -> New’ in the file menu:

Fnew

To reset everything (sound field, receivers and source positions) except the boundaries, click the reset button in the simulation controls:

Frese2t

To reset only the receiver data and positions, press the ‘R’ key.

2.2.8 Record animation

Wave Acoustics Simulator offers a way to record an animation of the simulations.

To create an animation, set up your sources and boundaries and then press the 'rec' button down in the simulation controls:

Frec

This will trigger the simulation to start playing. The ‘rec’ button will turn red while the recording is ongoing:

Frec

To stop the recording simply click the 'rec' button again. This will make the button restore its original white colour and will automatically create the animation file inside the 'data_output' folder.
The animation output consists of an a file with the .gif extension. The creation of this file typically takes a few seconds to complete. On Windows 10, an empty command line will show up while the animation file is being created:

Fexe

Once the file creation process is finished, the command line window will disappear and the .gif file is ready to be opened. In addition to the command line window, a file 'status_animation.txt' is also created (also inside the 'data_output' folder), indicating that the animation file was successfully created and is ready to be opened by a suitable player (like Firefox):

Fexe

The animation file obtained in our test simulation is shown here:

Fani

2.3 Keyboard shortcuts

Several actions on WAS can be performed using the keyboard, as indicated in the following list:


  • ‘ESC’ - is used to finish entering boundaries, which become active and will appear white.


  • ‘ENTER’ - is used to automatically close the boundaries to their starting point (while in boundary insertion mode).


  • ‘SPACE’ - Pause/Unpause the simulation


  • ‘DELETE’ - is used to remove selected boundaries from the simulation.


  • ‘R’ - Pressing the ‘R’ key resets the receivers position and corresponding data.