A structural analogy for the study of the acoustic behaviour of cavities