Yes. There is a cavity as a resonator. But the shape of cavity is not circular form. I am looking for the condition in these resonators such as cavity in a shape of square.
Do you mean that the below equation (in attached files) is the resonance condition of each kind of resonators?: and L is the perimeter of each resonators
Hopefully, you have your answer from Dr. Kamran's response above.
To push a bit further, here is an interesting question: Can you determine the shape of a drum from its resonances? In other words, can you hear the shape of a drum? This question was addressed by Mark Kac in The American Mathematical Monthly back in 1966 as an answer to a question asked earlier by mathematician Hermann Weyl. The sad answer is no, you cannot. In other words, two differently shaped drums can have the same set of resonances or eigen-frequencies.
How does this relate to your question about a square drum? To find the resonances of any drum requires solving the Helmholtz equation with appropriate boundary conditions. This is what you are doing as you go from the round drum to the square. More complex shapes might not have closed-form solutions but they are all solvable. Their sounds are what make percussion instruments so compelling to listen to -- almost all cultures have their own drums with their own sounds.
In a practical direction, another question asks if you can tell the shape of a room from its resonances, pushing the original drum question from 2 to 3 dimensions. When a blind person taps her cane on the floor of a new room, she can sense its shape from the acoustic response of the air in the room to the impulses of the cane. But is the room shape (in 3D) unique from this impulse or equivalent frequency-domain analysis? I don't know. Kac (1966) would suggest the answer is no. But maybe 3D is different from 2D. So, you question is interesting from a basic physics/math point of view but also interesting enough to keep mathematicians and physicists awake all night thinking about it.
Regarding Sara's original question, for square/rectangular geometries, I would suggest the self imaging principle of multimode interference structures. It states that single or multiple images of a given input profile are periodically replicated in space and these locations are directly related to the beat length (L_pi) of the two lowest order modes propagation constants (beta_0 and beta_1):