Hi,
I am trying to simulate a acoustic wave propagation in heterogeneous media(air-solid) with time varying source (consisting of multiple frequencies). The air is considered to be inviscid and medium don't have any absorption coefficient. While using the code-snippet below- I am getting a values inside the solid at the center, though the wave has not reached there yet. I don't know whether the solution is coming out to be unstable or there are some problem with my parameters. Could you please help me with that?
% create the computational grid
Nx = 128; % number of grid points in the x (row) direction
Ny = 128; % number of grid points in the y (column) direction
dx = 0.1e-3; % grid point spacing in the x direction [m]
dy = 0.1e-3; % grid point spacing in the y direction [m]
kgrid = kWaveGrid(Nx, dx, Ny, dy);
% define the properties of the upper layer of the propagation medium
medium.sound_speed_compression = 343* ones(Nx, Ny); % [m/s]
medium.sound_speed_shear = zeros(Nx, Ny); % [m/s]
medium.density = 1.225 * ones(Nx, Ny); % [kg/m^3]
% define the properties of the lower layer of the propagation medium
medium.sound_speed_compression(Nx/2:end, :) = 3000; % [m/s]
medium.sound_speed_shear(Nx/2:end, :) = 800; % [m/s]
medium.density(Nx/2:end, :) = 1200; % [kg/m^3]
% create the time array
cfl = 0.1; % Courant-Friedrichs-Lewy number
t_end = 1e-3; % [s]
kgrid.makeTime(max(medium.sound_speed_compression(:)), cfl, t_end);
%Time varying source
source.s_mask = zeros(Nx, Ny);
source.s_mask(Nx/4, Ny/2) = 1;
% define a time varying sinusoidal source
source_freq1 = 1e5; % [Hz]
source_freq2 = 5e5; % [Hz]
source.sxx = 0.2*sin(2 * pi * source_freq1 * kgrid.t_array)+0.8*sin(2 * pi * source_freq2 * kgrid.t_array);
source.syy = 0.2*sin(2 * pi * source_freq1 * kgrid.t_array)+0.8*sin(2 * pi * source_freq2 * kgrid.t_array);
% define a sensor
sensor.mask = zeros(Nx, Ny);
sensor.mask(end-Nx/4, Ny/2) = 1;
%
% % define the acoustic parameters to record
sensor.record = {'p', 'p_final'};
% define a custom display mask showing the position of the interface from
% the fluid side
display_mask = false(Nx, Ny);
display_mask(Nx/2 - 1, :) = 1;
% define input arguments
input_args = { 'PlotPML', true,...
'DataCast', 'gpuArray-single'};
% run the simulation
sensor_data = pstdElastic2D(kgrid, medium, source, sensor, input_args{:});
% reorder the simulation data
sensor_data_reordered = reorderSensorData(kgrid, sensor, sensor_data);