Resonance of a tube of air in case of more complex shapes I've been thinking about posting this question on Music Performance stack, but finally I think it fits more here since I'm interrested in technical details.
The subject of resonance of a tube of air is pretty well documented for simple shapes, like cylinders (open of closed), cones, closed rectangular boxes, spheres et cetera. I even found formulas in my high school books.
But I am interested in much more complex case. Let's imagine we have a solid tube with a certain shape with holes in it filled with vibrating air of frequency $f_i$. How can we predict the frequency $f_o$ of air that come outside of the tube?
For now I can imagine only two ways.


*

*Decompose the problem into sub-problems, in this case complex shape into much simpler shapes (cylinders, cones, rectangular boxes, spheres etc). But still I have no idea how a whole in the tube would affect the frequency, I suppose we would need to take in count the placement of this whole and its size.

*Run a computer simulation of such system. This would require knowledge how does the frequency propagade through air in such solid tube.


To simplify a little bit this complex problem let's forget conditions like air temperature, pressure and humidity.
I'm more interrested in second approach, to create a tool that works a little bit like fuild mechanics simulation software, that help for example design heating installations etc cetera, except that this tool would be usefull for acoustic installations, architecture or instrument design.
If anyone could share some knowledge usefull to understand this phenomena I would be greatfull. What I have found in school and university books or wikipedia is not enough, or I'm not searching for right words.
 A: Calling all finite-element model experts :-) .  
I can only offer one small tidbit: for wind instruments, aside from the octave hole, which exists primarily to facilitate exciting the higher frequency notes, the tone is primarily defined by the distance from the mouthpiece to the first open hole.  As a long-time clarinetist, I'm fully aware that the pitch is adjusted slightly by all other open (or closed) holes along the bore, but the first open one does most of the work.   It is possible to go into the upper octave (or octave+5th) without using the octave key, but requires a lot more breath control.     The octave hole 'destroys' a maximum of the lower-register wavelengths.
I would recommend moving this to the Music Performance page, tho'.  
A: Your two proposed approaches are the ones usually followed by researchers in acoustics. There is a third one that would be an experimental approach. For example you could place a microphone inside the tube and move it to a large number of positions to construct a sound pressure map.
The first approach you mentioned is comparable to a lumped elements model or transmission line model where you typically break down a complex acoustical system into a collection of smaller, simpler systems that you model with equivalent electrical elements. One of the classical example is the Helmholtz resonator.
Example of a basic acoustical model:
 
Check the full document here:
http://en.wikibooks.org/wiki/Engineering_Acoustics/Noise_control_with_self-tuning_Helmholtz_resonators 
In your example, the rigid tube could be modeled as a collection of conical elements in series. Small holes are typically modeled as resistances. You need to come up with a conceptual model and then either solve it analytically or use a software like Simulink or for example this module for Modelica (I never used it, so cannot comment about usefulness/quality)..
Now about your simulation tool, there are commercially available solutions to model complex acoustic system by means of finite elements modeling. One notable example is COMSOL's Acoustics Module. Check this document for a complete description:
http://www.comsol.com/model/download/120903/IntroductionToAcousticsModule.pdf
And I am sure there are open source alternative. Anyone who has suggestions is welcomed to edit this answer.
