Hear the Sound of an Organ Pipe Design with a Simulation App

April 20, 2016

We’ve talked a lot on the blog about the different types of simulation apps that you can build. But did you know that you can create an app that plays sounds? The Organ Pipe Designer allows users to investigate the parameters behind an organ pipe configuration and then play the resulting sounds to really see — and hear — a design in action. Let’s learn more about the physics behind our underlying model and its transformation into an easy-to-use app.

Organ Pipes Set the Tone for a Classical Instrument

Pipe organs have been commonly found in churches, synagogues, concert halls, and theaters for over 500 years and are recognized for their deep, full sound. Organ pipes, which produce a specific pitch when wind, or pressurized air, is passed through them, are at the heart of this classical instrument’s sound. These pipes can be cylindrical, conical, or rectangular, and they are built out of a variety of different materials — most commonly wood or metal, but sometimes glass, stone, or even bamboo.

A photo showing organ pipes in a pipe organ.
Organ pipes (shown in silver) produce the sound of this pipe organ at the Mondaye Abbey in Normandy, France. Image by Goéland — Own work. Licensed under CC BY-SA 3.0, via Wikimedia Commons.

There are a variety of parameters that can affect the pitch of an organ pipe. With COMSOL Multiphysics and the Acoustics Module, it is possible to study such influences and optimize the design in order to achieve the desired pitch.

Modeling Organ Pipes in COMSOL Multiphysics

Organ pipes produce sound when air is pushed in at the bottom of the pipe and travels out through the mouth. The turbulence at the outlet causes vibrations in the languid and upper lip system. These vibrations resonate inside the organ pipe’s body, thus creating the note.

Looking at the schematic below, we can see the geometry for an open pipe. Here, the tone corresponds to half-wave resonance in the pipe and the harmonics are resonances with shorter wavelengths.

Model geometry for an organ pipe.
Model geometry for an organ pipe.

The pitch of an organ pipe, and any other musical instrument, is determined by two factors: fundamental frequency and harmonics. Fundamental frequency is the lowest possible frequency produced by an instrument, also known as the first harmonic. Harmonics are specific vibration frequencies that cause characteristic standing wave patterns in an instrument. The harmonic frequencies for an instrument are related to each other by whole number ratios.

The fundamental frequency and harmonics for an organ pipe depend on the shape of the pipe, elastic properties of its walls, and the thickness of the pipe walls. Changing any combination of these properties, even slightly, will change the frequency response resonance peaks of the pipe and produce a different pitch.

To further investigate such parameters, we can model an organ pipe with the Pipe Acoustics interface of the Acoustics Module and COMSOL Multiphysics. To do so, we set up the organ pipe geometry with parameters including pipe length, wall thickness, and the cross-sectional shape of the pipe, which is circular in this case. We add the elastic properties of the pipe’s walls by describing them with Young’s modulus and Poisson’s ratio. We also add an end impedance property to the open end of the pipe that accounts for end effects.

The simulation results plot the sound pressure level, which determines the pipe’s frequency response for both different pipe radii and different wall thicknesses.

Plot depicting the frequency response for different pipe radii.
Simulation results for different pipe wall thicknesses.

The frequency response in the organ pipe when changing the pipe radii, from 2 to 4 cm (left), and wall thickness, from 0.5 to 3 mm (right).

Changing the pipe radii clearly impacts the resonance frequency and affects the pipe’s overall frequency response resonance peaks, making it an important design factor. As for the wall width, any modification also affects the pipe resonance slightly. This is due to the elastic properties of the pipe wall influencing the effective compressibility, which changes the effective speed of sound and the resonance of the pipe system.

Additionally, we are able to see a plot of the parameters that provides a fundamental frequency of 44 Hz, or an A4 note, which is a standard pitch in music theory. These results also plot five other harmonics of the pipe that range from 100 to 3000 Hz. The curve in the graph illustrates the change in pitch.

Fundamental frequency and harmonics plot.
The fundamental frequency and the next five harmonics of a 44 Hz, or an A4, note.

Note that you may also want to model the small residual airflow in the organ pipe, as it could slightly alter the resonance frequency and affect the pitch. Although we will not discuss this here, the effect can be easily implemented using the Pipe Flow Module.

Advance and Auralize Your Organ Pipe Design with a Simulation App

The Organ Pipe Designer takes the complex physics of the organ pipe model and hides it within a simplified interface. With this app, users can quickly and easily test changes to parameters such as pipe radius, wall thickness, ambient pressure, and temperature, and see how they will affect the tone and pitch of the organ pipe design. Further, they can run a fundamental frequency and harmonics study on each parameter change instead of running the full simulation over and over again.

A screenshot showing the UI for the Organ Pipe Designer.
The user interface for the Organ Pipe Designer.

With the layout of the Organ Pipe Designer, multiple functions can be performed with just the click of a button. It is possible to:

  • Reset the user input
  • Run the study
  • View the study settings
  • Create reports and documentation
  • See the pipe properties
  • Play and listen to the pipe’s response

One exciting aspect of building apps in the Application Builder is the ability to use custom Java® code in order to extend functionality beyond the built-in model features. For this app, certain code was written that allows users to actually hear the output frequencies of the organ pipe based on the different design parameters. The app thus enables auralization of the device, or lets a virtual sound system be heard on a computer.

The Organ Pipe Designer contains three results tabs that provide views of different simulation findings. Each of the tabs has a button that allows users to play the sound or group of sounds. Response: Different Pipe Radii shows how the output changes if the pipe radius is varied and Response: Different Pipe Wall Thicknesses shows how the output changes if the wall thickness of the pipe is altered. A third tab, Response: Different Fundamental and Harmonics, shows the results of the fundamental frequency and harmonics study for the organ pipe design. Within this tab, users have the option to play the sounds individually or all together.

Note: Make sure your sound is on before pressing play!

The Application Builder in COMSOL Multiphysics makes it simple to transform your model into an app. For models like our organ pipe example that involve multiple intricate parameters, an app that enables users to efficiently test how parameter changes affect a design — and actually hear the results — will be music to your ears.

Further Reading

Oracle and Java are registered trademarks of Oracle and/or its affiliates.


Kommentare (0)

Einen Kommentar hinterlassen
Log In | Registrierung
Laden...
COMSOL BLOG DURCHSTÖBERN