I recently programmed a method for easily doing basic 2D finite element analysis of acoustics. I did this for a different kind of project, but thought it would be cool to try it out as a method of analyzing how sound behaves in L-shaped rooms. I used the following dimensions in the software (the room consists of the L-shape in the picture):

Obviously we're simplifying things a lot, as we're leaving the height of the room out of the calculations. Still, the calculations will give us a lot of information of how sound behaves from the perspective of the most interesting dimensions of the room.

Let's try feeding in a plane wave from the top of the room, just to see what happens. Try moving the slider around a bit to see how the sound field forms in the room. *Please note that it can take a while for the content to load.*

Some central things to note:

- When the plane wave reaches the convex corner, the corner will radiate sounds in all directions (also to the right).
- A sound field quickly forms in both the top-down and the left-right direction

The red dot represents a microphone in the room, in case you're wondering. Let's see what the microphone gives us:

We can clearly see when the first diffracted sound arrives at the microphone. Two reflections arrive shortly afterwards, in close succession. After that, the sound field quickly becomes complicated.

Let's check out the frequency response as measured by the microphone:

We can clearly see at least a few room modes. Let's try examining the modes more thoroughly.

**Additional: The plane wave**The plane wave consists of a gaussian pulse. We can't feed too sharp of a pulse into the room, as that would lead to errors in the calculations. By increasing the width of the pulse, we can get a pulse which the calculations will be able to handle.

**Additional: How is the response of the room calculated**

I cheated a bit. The calculation model I used doesn't account for damping, which in practice means that the room would continue reverberating indefinitely. I calculated the response for 0.5 seconds and approximated damping simply by multiplying the non-fading response with a decaying curve. Which isn't something that really should be done.

The gaussian pulse has the following frequency content (magnitude):

Using this, I calculated the response up to 200 Hz by deconvolving the pulse from the response. Deconvolution, in this case, means that I took into account the varying frequency content of the excitaiton. This can be done by dividing the frequency content of the response by the frequency content of the excitation.

## Room modes

I've written quite a bit about room modes recently, but not from the perspective of irregular rooms. Let's see what they look like in this case! Below are the 6 lowest room modes. Many of them are far from obvious, as can be seen. They bear very little resemblance to the lowest room modes in a rectangular room.

## Conclusions

If the geometry of the room differs even slightly from a rectangular layout, and one wishes to calculate an approximation of the room modes of the space, there really doesn't seem to be that many options available. Numerical modeling using the finite element method, as used in this post, is a method which works nicely.