K-wave tool to try to obtain the reverberation time.
6 of the concrete wall.
Parameters in (medium.alpha_coeff) should I use?
m code is
clear all;
% set the PML size
PML_size = 10;
% create the computational grid [ 3m by 3m domain ]
Nx = 128- 2*PML_size; % number of grid points in the x (row) direction
Ny = (128- 2*PML_size)/2; % number of grid points in the y (column) direction
Nz = (128- 2*PML_size)/4;
dx = 10/Nx; % grid point spacing in the x direction [m]
dy = 5/Ny; % grid point spacing in the y direction [m]
dz = 2.5/Nz;
kgrid = makeGrid(Nx, dx, Ny, dy, Nz, dz);
% define the properties of the propagation medium
c_air = 330; % [m/s]
rho_air = 1.225; % [kg/m^3]
% define the properties of the wall
c_wall = 3500; % [m/s]
thickness = 5; % [grid points]
% define the position of the wall
wall = zeros(Nx, Ny, Nz);
wall(1:thickness,:,:) = 1;
wall(end-thickness+1:end,:,:) = 1;
wall(:,1:thickness,:) = 1;
wall(:,end-thickness+1:end,:) =1;
wall(:,:,1:thickness) = 1;
wall(:,:,end-thickness+1:end) = 1;
% assign the medium properties
medium.sound_speed = c_air*ones(Nx, Ny,Nz);
medium.sound_speed(wall == 1) = c_wall;
medium.density = rho_air*ones(Nx, Ny,Nz);
medium.alpha_coeff = 4.6462e-06*ones(Nx,Ny,Nz);
medium.alpha_coeff(wall==1)= 1.3049;
medium.alpha_power = 0 ;
medium.sound_speed_ref = c_air;
% create the time array
cfl = 0.2;
t_end=2; % [s]
[kgrid.t_array, dt] = makeTime(kgrid, medium.sound_speed, cfl, t_end);
source_freq = 1000; % [Hz]
source_mag = 20; % [Pa]
source.p = source_mag*toneBurst(1/kgrid.dt, source_freq, 1);
source.p_mask = zeros(Nx, Ny,Nz);
source.p_mask(22, 27, 14) = 1;
% define sensors everywhere
%sensor.mask = ones(Nx,Ny,Nz );
sensor.mask = zeros(Nx,Ny,Nz);
%sensor.mask(45,54,54)=1;
sensor.mask(52,27, 14)=1;
sensor.mask(62,27, 14)=1;
sensor.mask(72,27, 14)=1;
%sensor.mask(89,54,54)=1;
% define the acoustic parameters to record
sensor.record = {'p'};
input_args = {'PMLInside', false, 'PlotPML', false, 'PMLSize', PML_size, 'DataCast', 'single'};
% run simulation
sensor_data = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});
-If you set the density of the concrete wall is not simulated.
- medium.alpha_coeff = 4.6462e-06*ones(Nx,Ny,Nz); -> air attenuation
- medium.alpha_coeff(wall==1)= 1.3049; -> concrete attenuation