Hi Brad.
Actually I ve developed some room acoustics tools like SPL map (pattern radiation) simulation, impulse response etc.
But I have a problems with medium and source sources properties. Could you answer for my question if its possible? Here:
1) Absorption coefficient
In "statistical acoustics" there is absroption coefficient [-]. Is there any relation with power law absorption coefficients [db/MHz^y cm-1]? Maybe my google skills are really bad, but I didn find any literature relating these two phenomenas.
I had an idea to set up some value of power law coeff. and count RT using Schroder backward integration. Using Sabine eq. I would find out alpha. Than I would do it for some range of power law coeff. values and I would get range of alpha[-] values. I would aproximate it with some polynomal function and I would get this relation.
But there is problem in increasing power law absorptions values. There is no more decreasing in impulse responce decay when I reach some specific value(weird). F.e power law coeff. value 8 had the same decay result as value 8000. I need to say, that the wall thickness is 10cm in room 5x5m.
Maybe my thoughts about this are wrong. What would be your recommendation for my future work?
2) Sound sources
I ve developed some tools like polarity reverse, delay of the array of sound sources.
But my question is about the frequency range. I would like to simulate frequency response from let say 20Hz do 100 Hz in f.e. 10 points in the room. Is there any chance to use bandpass pink noise or sine sweep as a sound source and do the simulation for all the frequencies? I know that for now, there are no tools for it in your toolbox (just toneBurst.m). But should I try to manage it or its not possible?
I should say that Adam J.Hill FDTD software lowFAT is doing what I want to simulate using bandpass noise. But I dont know the algorithm. :/ Here are some examples: http://adamjhill.com/AJHILL/wp-content/uploads/2018/04/LowFAT-Users-Guide-v1.6.pdf
Thank you for your response.
Here is my code for explanation of the wall absorption experiment:
clearvars;
% grid
Nx = 50;
Ny = 50;
dx = 5/Nx;
dy = 5/Ny;
kgrid = kWaveGrid(Nx, dx, Ny, dy);
% medium properties
c_air = 343; % [m/s]
rho_air = 1.225; % [kg/m^3]
%wall properties
c_wall = 343; % [m/s]
rho_wall = 100; % [kg/m^3]
thickness = 1; % [grid points]
wall = zeros(Nx, Ny);
wall(1:thickness, :) = 1;
wall(end - thickness + 1:end, :) = 1;
wall(:, 1:thickness) = 1;
wall(:, end - thickness + 1:end) = 1;
%medium definition
medium.sound_speed = c_air*ones(Nx, Ny);
medium.density = rho_air*ones(Nx, Ny);
medium.alpha_coeff = zeros(Nx, Ny);
medium.alpha_coeff(wall == 1) = 8; % [dB/(MHz^y cm)]
medium.alpha_power = 1.5;
medium.sound_speed_ref = c_air;
medium.sound_speed(wall == 1) = c_wall;
medium.density(wall == 1) = rho_wall;
% time array
kgrid.makeTime(medium.sound_speed, 0.3, 0.5);
%sound source
spacing=1; %[m]
spacing_points=round(spacing/dx);
center_array_x=Nx/2;
center_array_y=round(1/3*Ny);
source.p_mask = zeros(Nx, Ny);
source.p_mask(center_array_x,center_array_y ) = 1;
% define a time varying sinusoidal source
source_freq = 63; % [Hz]
source_mag = 120; % [Pa]
source.p = source_mag * sin(2 * pi * source_freq * 0.035);
% filter
%source.p = filterTimeSeries(kgrid, medium, source.p);
% display mask
display_mask = source.p_mask;
% sensor mask
sensor.mask = zeros(Nx, Ny);
sensor.mask(Nx/2, Ny/2) = 1;
sensor.record = {'p'};
% simulation
input_args = {'DisplayMask', display_mask, 'PMLInside', false, 'PlotPML', false};
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});
%% impulse
figure;
plot(t_sc * kgrid.t_array, sensor_data.p(1, :), 'r-');
set(gca, 'XLim', [0, 500 ]);
%% decay
magnitude_decay=10*log10(sensor_data.p(1, :).^2/max(sensor_data.p(1, :).^2));
figure;
plot(t_sc * kgrid.t_array, magnitude_decay, 'k-');
set(gca,'YLim', [-120, 0 ], 'XLim', [0, 500 ]);
xlabel(['Time [' t_prefix 's]']);
ylabel('p');