- Thread Starter
- #21
The Python version of the 2D finite difference (FD) code seem to be working! But I haven't thoroughly tested it yet.
Below show the duplicates of what were in post #8 which was simulated using finite element with Mathematica. The 2D room is 8 m X 4 m. I calculated the room modes using both the analytical solution (reference) and by solving for the eigenvalues and eigenvectors of the FD matrix (the discrete Laplace operator matrix).
Room modes from the analytical room mode solution of rectangular rooms.
Solution from solving for the eigenvalues and eigenvectors of the FD matrix — didn't match perfectly, but this method works for non-rectangular geometries too, if you manage to setup the FD matrix.
Below are simulations of the sound wave propagations with monopole and dipole sources to visualize how different the source types and orientations affect how the sound sources couple to the room modes. The sound sources are centered at the pressure null of the 60.6 Hz (2, 1) mode. The excitation is a 6.5 cycle of 60.6 Hz tone burst.
Monopole: Since it is located in the pressure null, the sound radiated dies off quickly.
Dipole, oriented in the direction along the length of the room: Excited the axial (3, 0) room mode at 64.3 Hz but not the (2, 1) mode.
Dipole, oriented perpendicular to the length of the room: Excited the tangential (2, 1) room mode.
The Python Jupyter notebooks used to generate the plots are in the attached ZIP. I haven't started on the explanations of the theories behind the simulation. Will update when I can get it done. Hopefully by next weekend.
[Edit] Finished the Jupyter notebook explaining the theory/method behind the simulation code. Modified the notebooks to also show a plot of the pressure vs time response at a "listener location". Added 3 more demo cases -- double bass array and comparing it against single bass array with full back wall absorption, plus cardioid. The new and updated notebooks are in the attached v20250208 zip archive.
Below show the duplicates of what were in post #8 which was simulated using finite element with Mathematica. The 2D room is 8 m X 4 m. I calculated the room modes using both the analytical solution (reference) and by solving for the eigenvalues and eigenvectors of the FD matrix (the discrete Laplace operator matrix).
Room modes from the analytical room mode solution of rectangular rooms.
Solution from solving for the eigenvalues and eigenvectors of the FD matrix — didn't match perfectly, but this method works for non-rectangular geometries too, if you manage to setup the FD matrix.
Below are simulations of the sound wave propagations with monopole and dipole sources to visualize how different the source types and orientations affect how the sound sources couple to the room modes. The sound sources are centered at the pressure null of the 60.6 Hz (2, 1) mode. The excitation is a 6.5 cycle of 60.6 Hz tone burst.
Monopole: Since it is located in the pressure null, the sound radiated dies off quickly.
Dipole, oriented in the direction along the length of the room: Excited the axial (3, 0) room mode at 64.3 Hz but not the (2, 1) mode.
Dipole, oriented perpendicular to the length of the room: Excited the tangential (2, 1) room mode.
The Python Jupyter notebooks used to generate the plots are in the attached ZIP. I haven't started on the explanations of the theories behind the simulation. Will update when I can get it done. Hopefully by next weekend.
[Edit] Finished the Jupyter notebook explaining the theory/method behind the simulation code. Modified the notebooks to also show a plot of the pressure vs time response at a "listener location". Added 3 more demo cases -- double bass array and comparing it against single bass array with full back wall absorption, plus cardioid. The new and updated notebooks are in the attached v20250208 zip archive.
Attachments
Last edited: