This is a simulation of sound wave interference in air columns. A sound wave enters an air column at an open end. This wave, represented as a blue dotted line (when shown), represents the amount of displacement the air molecules in the tube would have from their equilibrium position if this were the only sound wave in the air column. The original wave reflects when it reaches the opposite end of the tube, whether the opposite end is open or closed. If it is closed, the wave inverts upon reflection off of the more-rigid closed end and is therefore "shifted" by half a wavelength. If the end is open, no inversion or shift occurs. The original wave and its reflection will always form a standing wave (thicker solid blue line).
This first reflection will reflect again when it gets back to the original end of the tube. This second reflection will reflect off the far end of the tube as a third reflection. The second and third reflections are represented as orange dotted lines (when shown). The sum of these two reflections is shown as a thicker solid orange line. When the solid blue and solid orange lines overlap, resonance occurs. The reason for this is that if the standing wave from the first two reflections matches up with the standing wave for the second set of reflections, then all subsequent standing waves from further reflections will also constructively interfere. Note that this resonance will always occur when the original end of the tube aligns perfectly with the anti-node of the original standing wave..
The wave in the lower tube is the sum of the original wave and all the reflected waves. This sum can be shown as a transverse wave, a longitudinal wave, or both.
This version of the simulation allows you to look at the longitudinal version of the first two standing waves. As with their transverse counterparts, when these two longitudinal waves alight perfectly, resonance occurs. Adjust the slider to find the various resonances and look for the relationship between the length of the tube and the wavelength of the wave. Note that this relationship depends on whether the far end of the tube is open or closed.