The Tuning Fork Application
In order to make it easy to get started with the Application Builder, we included a few example applications in the Application Libraries of COMSOL Multiphysics version 5.0. This blog post will give you an overview of the Tuning Fork application and the structural vibration model that it is based on.
General Note on Tuning Forks
A tuning fork is used to calibrate instruments to a standard pitch. The most common standard pitch is 440 Hz for the note A. However, there are also other standards in use, frequently based on the note A. For example, the New York Philharmonic and the Boston Symphony Orchestra use 442 Hz and many orchestras in Europe use 443 Hz. You can buy tuning forks corresponding to all of these standards, but also tuning forks for other notes such as C, E, and G.
The picture shows a tuning fork for the standard concert pitch 440 Hz.
In addition to musical applications, there are industrial applications of tuning fork-like structures, such as in MEMS gyroscopes. The mechanism of vibration is similar in all these cases, so let’s discuss that first.
When you strike a tuning fork, it will vibrate in a complex motion pattern that mathematically can be described as the superposition of so-called resonant modes, or eigenmodes. Each mode is associated with a particular eigenfrequency and the combination of all eigenfrequencies creates the specific timbre that makes the characteristic sound of a tuning fork.
The higher eigenfrequencies correspond to resonant modes that will be dampened out more quickly than the lowest eigenfrequency of the so-called fundamental mode. Just a second or so after striking the fork, most of the higher modes are dampened out and all that can be heard is the sound of the fundamental mode as a clean tone. This is the pitch of the tuning fork.
The pictures below show the qualitative mode shapes of a few of the first eigenmodes. The deformations are exaggerated to show the shapes more clearly.
The fundamental vibrational mode of a tuning fork at 440 Hz.
A resonant mode at ~1225 Hz.
A resonant mode at ~2175 Hz.
A resonant mode at ~2800 Hz.
The fundamental mode has the prongs vibrate back and forth in a symmetric and balanced fashion, which transfers very little force to the handle. This mode is weakly dampened and sustained the longest after a strike. Many of the higher resonant modes have a twisting and rotational motion that transfer plenty of force to the handle and will be dampened out quickly by a hand holding it. The first balanced higher mode that, again, transfers very little force to the handle is at 2800 Hz and will sound together with the fundamental mode when striking the tuning fork.
A spectral analysis of a sounding tuning fork in real life indeed reveals this to be the case:
A frequency spectrum of a ringing tuning fork dB vs. frequency. Peaks are clearly visible at 440 Hz and 2800 Hz, corresponding to modes that are balanced with little force transfer to the handle and, so, less damping. Created from a recording of a tuning fork using the software Cubase® 7.5 from Steinberg® Media Technologies GmbH.
The pictures above correspond to a tuning fork that is constrained at the handle by someone holding it firmly. You get a slightly different set of modes in the case of a tuning fork that is unconstrained, such as if you hang it from a string. However, in both cases, the fundamental balanced mode is at 440 Hz.
As a side note (pun intended), the transient timbre of a tuning fork, including tonal contributions from the higher resonant modes, is what creates the characteristic sound of a Rhodes electric piano, which is essentially a collection of tuning forks, or tines, of different lengths.
In COMSOL Multiphysics, you cannot only simulate the vibration of the tuning fork, but also its coupling to the surrounding air domain and the resulting acoustic pressure wave. This capability is available in the Acoustics Module and is illustrated below.
A vibrating tuning fork with its surrounding air pressure wave as computed by the Acoustics Module.
This structural-acoustic model can be downloaded here.
The tuning fork application in the Application Libraries does not include the surrounding pressure wave, but is just a structural modal analysis. The core COMSOL Multiphysics product without any add-ons is sufficient to run this app.
Accessing Apps from the Application Libraries
The Tuning Fork app can be found in the Application Libraries, available from the File menu in the COMSOL Desktop user interface.
Where to find the Application Libraries.
You may also download application files from the Model Gallery by signing into your COMSOL Access account. If a model in the Model Gallery also has an application associated with it, the file will appear with the extension .mphapp.
Where to find apps within a Model Gallery entry.
This particular application computes the fundamental frequency of an unconstrained tuning fork for a user-input prong length. Optionally, you can give the fundamental frequency as input and ask the application to find the corresponding prong length. This requires a simple optimization algorithm implemented in one of the methods contained in the application.
The running tuning fork application.
The app shown here is based on the Tuning Fork: Computing the Eigenfrequency and Eigenmode model, with minor modifications. The handle in the application is cylindrical, while in the other model example, it is slightly conical.
The Form Editor
Your app’s user interface is created in the Form Editor and is streamlined with only a few outputs and user inputs:
- Prong length or Target frequency
- Sound duration
- Frequency or Prong Length
- Mode Shape visualization (normalized)
The Form Editor containing the user interface design of the tuning fork application.
The Method Editor
The tuning fork application contains several methods, both local and global ones. A local method can be associated with a form object as indicated by a small icon in the lower right corner of the object. In this application, the objects having local methods are the three buttons for “Show Geometry”, “Compute”, and “Play Sound” as well as the check box “Find prong length”.
These local methods handle basic user interface logic such as enabling and disabling the input field for “Prong length” based on the status of the “Find prong length” check box.
A local method associated with a form object is, in the form editor, indicated with a small icon in the lower-right corner.
To open a local method in the method editor, use Ctrl+Alt+Click on the form object.
The most important global method is b_compute, which contains a secant method implementation for finding the prong length for a given frequency. The secant method requires a good starting guess and this is provided by an expression for the eigenfrequency vs. prong length relationship given by elementary beam theory. For more information on this beam theory expression, see the model documentation for the Tuning Fork model.
There is also a play_sound method that simply plays the fundamental frequency (with no overtones): playSound(fq, 1000*dur). The first argument to playSound is the frequency and the second argument is the sound duration in milliseconds. One could, of course, also perform a full transient simulation of the tuning fork as it is being struck, but this would require a lengthy computation and extensive processing of the results to find the fundamental frequency. Instead, the implemented modal analysis can be performed in less than a minute on a standard computer.
A method frequency computes the frequency for a given length and is called from the b_compute method.
The method set_results sets the results visualization and frequency output to be that of the seventh eigenmode in the list of found eigenfrequencies. The first six eigenmodes are referred to as rigid body eigenmodes and do not contribute to the sound of the tuning fork. They represent the six degrees of freedom of motion of a rigid body: translation in the three coordinate directions and three rotational angles. The seventh eigenmode corresponds to the fundamental vibrational frequency, which is true for any unconstrained object.
The Method Editor showing the method used to compute the tuning fork prong length for a given frequency.
- COMSOL Now
- Today in Science