Trying to simulate air flow in a melodica

Hi,

I am a hobbyist who likes to play the melodica. A melodica is a wind instrument with a piano keyboard. When a key is pressed, air flows past a reed and out an exhaust port. The vibration of the reed makes the sound.

If I press, two keys, especially a low note and high note, the high note loses a lot of volume. High notes have smaller reeds (and reed gaps along which the air flows out), but they are also much further from the entry point of the air. Connect two melodicas using tubes in a Y-configuration and a low note played on one won’t affect a high note played on the other. I was hoping to find out something about what happens when I do this.,

Most of my modeling experience is with Sketchup. I used Autodesk Fusion 360 and I figured out I needed to model the “air space” inside the melodica as a solid. I think that’s what I did.

I then set up the model inside SimScale and put in what I thought were reasonable parameters. I ran the simulation. After 18 minutes or so, I got some results. I thought I’d get some of those nice. colorful particle traces or something. I got nothing interesting. Clearly I goofed on the setup.

If anyone is willing to spend some time looking through the model, that would be great. If not, well, I’ll keep plugging away at it. I don’t expect anyone to spend any large chunk of time on it; I’m hoping one of you knows enough about beginner errors that you probably already know where I went wrong.

Here’s a link to the project: SimScale

Thanks!

Hey there and nice project idea! :slight_smile:

Well, what is that something? :slight_smile: Do you have any idea on what you want to investigate? Anything that you would like to use to make sense on how the melodica would sound? We unfortunately do not offer aeroacoustics so far but if you have some rough idea if the pressure/velocity values help you, you could work with the slice filter for example to see where interesting velocities arise, or maybe recirculation zones (if these are of any relevance, I am not so far in understanding how the instrument works?) :wink:

Best,

Jousef

Let me give you (and others) more background on this.

To see and hear what a melodica sounds like, just do a web search.

What I’ve created is a model of the internal airway in a melodica, from where a player blows air into the instrument to where it exits just past two reeds. It should be a single solid and I have selected faces for input and output. The single input is the circular face on one end. I’ve tried to list this as a constant input flow of .5 liters of air per second.

The outputs assume the instrument is at sea level. I’ve listed them as pressure outputs. with the [pressure being the pressure of air at sea level. For the remaining parameters, I tried to figure out how to do as coarse a simulation as possible to make sure things were working before trying for more detail.

If a melodica player presses a single key, the entire mass flow exits through one reed. The lower notes have bigger exits. Applying Bernoulli’s formula, we know the pressure will be higher and the exit speed slower for lower notes as compared to higher notes, but the total energy of the air passing by the reed will be the same in either case.

When two keys are pressed, though, the reeds compete for air. Not only do the higher notes have less area, they are further from the air inlet. Knowing the total mass flow through each opening for any given unit of time would be useful. In an ideal design, the mass flow would be evenly divided.

It would also be interesting to know the pressure/velocity for each note when played singly and together.

In some designs, air is routed to the far end of the melodica so that the higher notes are closer to the air flow. It would be useful to compare the results for that design versus the usual design I modeled. In other designs, baffles have been added to block some of the sideways flow of air (on the assumption that this allows the lower notes to get more than their “fair” share. Finally, yet other designs have a main air chamber with branches to each reed, with higher notes getting bigger branches. The theory is that this gives the higher notes “more air”—I don’t know of any physics principle that would support this.

If I could get a model working, then I could modify it to check the effectiveness of any of these designs.

Right now, I have a model that appears to have two frames and nothing interesting to show in either of them. Actually, I just went back to it, starting poking around and managed to add some particle traces, so maybe it did do something useful. I’ll try to find some tutorials on how to visualize the results.

@freixas:

I suggest you start to use (when setting a simulation) Result control > Force and moments | Surface data | Probe points, in order to get some insights on air displacements.

Melodica is not common in CFD, but that gives you an opportunity to become a pioneer! :sweat_drops:

Take care,

Retsam

Thanks! I appreciate all tips.

I thought I would post the results of my first test run for anyone who bumped into this thread.

I found that by using cutting planes, I could easily determine the volumetric flow rate (VFR) at the inlet and outlets.

One possible design goal would be to maintain the VFR ration of the two reeds at 1:1. In other words, if each note gets the full incoming VFR when played by itself, each gets 1/2 the VFR when played together. Whether this is optimal requires some acoustic analysis—the actual goal is not 1/2 the VFR, it’s 1/2 the volume. When playing notes alone, a player can maintain a constant volume by adjusting the VFR, if needed. I did not expect to get a 1:1 ratio and did not.

Another possible result would have been for the VFR ratio to be equal to the ratio of the areas of the two reed openings, which is 2.2:1. This would mean an equal VFR per unit of area and might actually do a better job of maintaining equal volume. I did not get this result either.

What I actually expected is that the reed that is both closer to the air source and bigger would get a ratio higher than 2.2:1.

What I got was a ratio of 1.28:1. Despite being smaller and further from the air source, the high note reed gets more of the VFR than one would expect from the area of its cross-section.

What I know is that if I play a high note, then add a low note, the high note becomes much quieter (sometimes almost silent). Either there’s something I don’t understand or the model is set up incorrectly or I’m running into some limitations of the simulation (e.g. I notice the that input VFR is not equal to the sum of the two outputs, which suggests a problem).