Whistle-noise: a home experiment

The 2024 Summer Olympic Games have just started, and I had an idea to simulate something that is present in the life of most athletes: whistles! Unless they are practicing under the directions of coach Roy Kent, a whistle is something they may hear frequently. Whistles are common objects but contain interest aerodynamical and acoustical features. Cavity and jet hydrodynamic instabilities are combined and result in a periodic flow oscillation that generates sound at a frequency around 3 kHz, in the range of peak human hearing sensibility.

The sports whistle is composed by a channel, a circular cavity and a wedge (labium). The flow impacts the labium in a periodic manner producing the tone.

Motivated by the Olympic spirit, I jumped into the subject to try to simulate the phenomenon myself.

Before moving further, a small disclaimer on these results. I called “home experiment” for 2 reasons: 1) because the recordings were made at home in the noisiest and most reverberant room ever seen in the history of humanity and the microphone is not calibrated; and 2) I have limited computational power and no intention to fully reproduce the recordings with the simulations. My objective is not to have a scientific or engineering grade results, but rather have fun, learn and practice the use of the modelling and post-processing techniques and software.

Model

To simulate the whistle noise mechanism, I did as in previous studies [Liu2012,Shi2014]: I bought two whistles, one for recording and one for cutting in half to get the measures for reproducing numerically. They came with a pea, an artifact used for changing the timbre of the whistle, but I remove it with a plier. Modelling the pea dynamics is an interesting challenge in a numerical point of view and a nice follow up of this study that I may someday tackle.

After measuring everything I could using a caliper, the whistle cross-section is reproduced with the help of CAD software. Even if the geometry is relatively simple, it is easier than calculating the intersections between the several lines and circles. Some key dimensions are presented further. Note that most dimensions used to produce the final model are rounded versions of the measurements because I’m not looking to retro-engineer the whistle and precision of most of the measurements were frankly quite limited. Domain is composed by a single inlet and a single outlet, combined with a sponge zone.

Simulations are performed in 2D for two turbulent modelling techniques: URANS (Unsteady Reynolds Averaged Simulation) and LES (Large Eddy Simulation). Flow inlet velocity is of 5.5 m/s, value selected to obtain a peak frequency similar to the recording. More details at the end of this article.

“What your tone”: sound spectra

To have some reference on what to look for, I recorded the whistling with a microphone (uncalibrated) placed a few centimeters from the whistle. For the simulations, pressure is recorded for a probe 125 mm away from the center of the cavity and the spectra density is calculated.

A look at the sound spectra is a nice starting point to analysis the physics. Sound is tonal (‘whistle gonna whistle’) for all 3 configurations with a louder peak around 2.5 kHz, to be more precise 2.34kHz for the recording, 2.02 kHz for the URANS and 2.67 kHz for the LES, and at least the first harmonic is visible. The frequency itself is not of an indication of the quality of the numerical setup since I selected the inlet velocity. Furthermore, the levels mean absolutely nothing for the recording because the microphone is not calibrated, so only relative levels are presented. Note also that the LES spectrum is relatively noisier (pun intended) than the recording with numerous peaks between the harmonics. Such behavior may be justified by the absence of the third dimension, noted to be crucial in the dissipation of oscillations [Miyamoto2013].


Relative sound pressure levels for recording, URANS and LES (click to open interactive plot).

The evolution of the raw signals at the probes illustrates nicely the difference between them. A sawtooth signal composed by a few number of modes is present for both the recording and the LES (in reverse) while the URANS signal is almost a pure sinusoidal signal. Amplitude normalization is done by removing the average and dividing the remaining part by 3/2 of its standard deviation and \(T\) represents the period (\(1/f_{peak}\)).


Evolution of normalized pressure levels (click to open interactive plot).

Comparison of the normalized signals to simple waves:

  • Sinusoidal: \(\mathrm{sin}(2\pi t)\)
  • Sawtooth (phase \(\phi = \pi/2\)): \( \sum_{i=1}^n \frac{2}{\pi} \frac{(-1^i)}{i} \mathrm{sin}( i[(2\pi t + \phi)] )\)
  • Reverse sawtooth (phase \(\phi = 0\)): \( \sum_{i=1}^n \frac{-2}{\pi} \frac{(-1^i)}{i} \mathrm{sin}( i[(2\pi t + \phi)] )\)

Comparison of normalized signals to simple waves (click to open interactive plot).

The absolute values can be analyzed when sticking only to the simulations. The peak sound pressure levels are of 77 dB for the LES and of 60 dB for the URANS. Such values are relatively low when you consider what levels whistles can reach but remain reasonable when you consider low-effort blows [Murphy2019], what I was trying to achieve at my home recording because I don’t hate my neighbors!


Sound spectra of simulations (click to open interactive plot).

“Blowin’ in the Wedge”: flow fields

The mechanisms of sound production are clearly highlighted by the flow fields, with the jet moving up and down during a cycle. Animations of the spanwise vorticity field (\(\omega_z = \partial v / \partial x – \partial u / \partial y\)) show that the instability is modeled for both URANS and LES simulations, while the density fields illustrate the propagation of the acoustic waves. The multiplier of the inlet velocity used in the normalization of the vorticity is for an estimation of the velocity of the jet considering the height reduction factor of 5 from the inlet section to the end of the channel and \(\rho_0\) is the density of the unperturbed air.


Animation of density and vorticity fields, URANS simulation.


Animation of density and vorticity fields, LES simulation.

The richness of spectra in the case of the LES can partially be justified by the Kelvin-Helmholtz instabilities (rows of contra-rotating vortices) that are formed at the jet boundaries. On the other hand, the higher sound levels at the principal mode and its harmonics can be associated with the higher circulation of the impinging vortex. Another distinction between the results is that the flow reattaches to the outer surface of the whistle only for the URANS simulation. It can always be due to the distinctions of the closure models, but most probably it may be caused by a fundamental difference in the setups: the URANS simulation does not have a sponge zone. I tried using it as well, but the simulation was so diffusive that the jet oscillations were killed after activating it.

In synthesis, with the performed simulations I arrived to reproduce the main mechanisms of the sound generated by whistles. Since I was satisfied, I stopped here but there are many interesting aspects that are open to analysis, such as further examining the Kelvin-Helmholtz instability, accessing the quality of the numerical setups, preparing a setup with smaller domain and acoustic analogies, running 3D versions of the simulations, and so on. Feel free to jump into the details in the following section and to reach me up if you have any question/suggestion/comment! Move forward if you want to get deeper in the subject.

To learn more

Some nice links I found at the time I was performing the simulations and writing this post:

For the nerds: methodology and numerical setup

The full analysis is done with open-source software, starting from the model. FreeCAD 0.20.2 is used for reproducing the geometry, Gmsh for meshing and OpenFOAM v2206 for solving the flow equations. For post-processing, automatic snapshot generation is done with pyvista. The other visuals are produced with matplotlib and plotly. Inkscape 1.1 is used for genereting the diagrams.

Due to limitations in computational power simulations are 2D only. Even if the resulting fields and spectra are not fully representative of the flow and that LES is not defined in 2D, the key features of the phenomena are captured in a 2D simulation [Miyamoto2013,Giordano2013]. Since the focus was to reproduce the overall dynamics of the flow, only a few tests are done for defining the domain and the mesh and no convergence study is performed. Outer domain is circular with a radius of 150 millimeters from the center of the cavity, what is equivalent to 1 wavelength for a frequency of 2.5 kHz. Mesh is generated with 2D tri elements with some boundary layers from the walls. The final mesh is composed by 200 thousand cells, considering also 5 prismatic layers and an average y+ of about 0.5. The 180 degrees opening at the right side of the domain is employed to avoid reflections and allow a direct simulation of the noise propagation.

Since there is no 2D simulation in OpenFOAM the mesh is extruded in the z direction using one layer, front and back boundaries are defined as empty. For the LES simulation a sponge zone was necessary, done using the acousticDampingSource option (there is a nice article here). For simplicity, the direct noise is simulated using a compressible solver, rhoPimpleFoam, and the CFL is limited to 1.0. This choice leads to more expensive setup, should probably be changed if one wants to perform a 3D declination of the setup. The turbulence models are k-omega-SST for URANS and WALE for LES, both with their default parameters.

Several velocities are tested, results for an inlet velocity of 5.5 m/s are selected for presentation. The simulation time is of 0.1 seconds, what corresponds to 250 cycles for the expected tone. After careful observation it is clear that both simulations are not fully stablished at that time, however the obtained data is considering sufficient for illustrating the whistling and comparing to the recording.

The sampling frequency for both the recording and the simulations is of 96 kHz and the spectra are calculated using the Welch method with 2048 datapoints and 95% of overlap, so the frequential resolution is of 46.9 Hz. For the simulations, the signal is considered after 0.06 seconds. After the initial 0.1 seconds of simulations, instantaneous fields are exported with a frequency of 40 kHz until 0.102 seconds. Two cycles, about 30 snapshots, are extracted to produce the herein animations.

All the details and the full setup are available in a github repo if you want to reproduce or (even better) improve my results: github.com/wjgsp-com/whistle-noise

References

[Murphy2019]: Murphy, W. J., et al. (2019). Referee whistles Part II—Outdoor sound power assessment. The Journal Of The Acoustical Society Of America, 145 (3_Supplement), 1816. 10.1121/1.5101636

[Liu2012]: Liu, J. (2012). Simulation of whistle noise using Computational Fluid Dynamics and acoustic Finite Element Simulation. University of Kentucky. uknowledge.uky.edu/me_etds/9

[Shi2014]: Shia, Y. et al (2014). Numerical simulation of whistles using Lattice Boltzmann methods. ISMA 2014, Le Mans, France. conforg.fr/isma2014/cdrom/data/articles/000051.pdf

[Miyamoto2013]: Miyamoto, M. et al. (2013). Numerical Study on Acoustic Oscillations of 2D and 3D Flue Organ Pipe Like Instruments with Compressible LES. Acta Acustica United With Acustica, 99(1), 154‑171. 10.3813/aaa.918599

[Giordano2013]: Giordano, N. (2013). Direct numerical simulation of a recorder. The Journal Of The Acoustical Society Of America, 133(2), 1111‑1118. 10.1121/1.4773268