Acoustic Tube resonance. (Not for general consumption).

Open

$f = {nv \over 2L}$

where n is a positive integer (1, 2, 3...) representing the resonance mode, L is  the length of the tube and v is the speed of sound in air (which is approximately 344 meters per second at 20 °C and at sea level).

where d is the diameter of the resonance tube. This equation compensates for the fact that the exact point at which a sound wave is reflecting at an open end is not perfectly at the end section of the tube, but a small distance outside the tube.

Closed

$f = {nv \over 4L}$

where "n" here is an odd number (1, 3, 5...). This type of tube produces only odd harmonics and has its fundamental frequency an octave lower than that of an open cylinder (that is, half the frequency).

A more accurate equation is given below:

http://mysite.verizon.net/cllsj/windchimes/length.htm

Hz.           mm          "

500          344       19.6

600          286       11.25

700          245       9.6

800          215        8.4

900          190        7.5

1000        172        6.77

1500        114         4.9

2000        86         3.3

3000        57         2.2

3500       49          1.9

4000       43          1.7

4500       38          1.5