Estimates the complex eigenvalues in the wavenumber domain for a rectangular room with arbitrary uniform impedances on the boundary by numerically solving for the roots of the transcendental equation.
Estimates the complex eigenvalues in the wavenumber domain for a
rectangular room with arbitrary uniform impedances on the boundary by
numerically solving for the roots of the transcendental equation.
A initial approximation to the zeroth order mode is applied to
improve the conditioning of the problem. The eigenvalues corresponding to
tangential and oblique modes are calculated from the eigenvalues of the
respective axial modes. Resulting eigenvalues with a real part larger than
k_max will be discarded.
Parameters:
L (array, double) – The dimensions in m
ks (array, double) – The wave numbers for which the eigenvalues are to be solved.
k_max (double) – The real part of the largest eigenvalue. This solves as a stopping
criterion independent from the real wave number k.
zeta (array, double) – The normalized specific impedance on the boundaries.
only_normal (boolean, optional (False)) – Only return the eigenvalues corresponding to the axial modes.
The mode indices will still contain the indices for all modes in
the defined frequency range. The complete set of eigenvalues
can be calculated as
\(k_n = \sqrt{ k_{n,x}^2+k_{n,y}^2+k_{n,z}^2 }\).
Returns:
k_ns (array, complex) – The complex eigenvalues for each wavenumber
mode_indices (array, integer) – The wave number indices of respective eigenvalues.
Note
Eigenvalues smaller for a wave number \(k < 0.02\) will be replaced by
the value for the closest larger wave number to ensure finding the root.
Calculate the transfer function of a rectangular room based on the
analytic model.
Implementation as given in [2] . The model is based on the solution
for a room with rigid walls. The damping of the modes is included as
a damping in the medium, not as a damping caused by the boundary.
Consequently, all modes share the same damping factor calculated from
the reverberation time as \(\delta = \frac{3\log(10)}{T_{60}}\).
Parameters:
dimensions (double, ndarray) – The dimensions of the room in the form [L_x, L_y, L_z]
source (double, array) – The source position in Cartesian coordinates [x, y, z]
receiver (double, ndarray) – The receiver position in Cartesian coordinates [x, y, z]
reverberation_time (double) – The reverberation time of the room in seconds.
max_freq (double) – The maximum frequency to consider for the calculation of the
eigenfrequencies of the room
samplingrate (int) – The sampling rate
speed_of_sound (double, optional (343.9)) – The speed of sound
n_samples (int) – number of samples for the calculation
Returns:
rir (pyfar.Signal) – The room impulse response
eigenfrequencies (ndarray, double) – The eigenfrequencies for which the room impulse response was
calculated
References
Example
Calculate the sound field in a rectangular room with 1 s reverberation
time for a given source and receiver combination.