Hello developers,
We meet a problem in simulation in a relatively large space.
Parameters are as follows:
PML_size = 10; % size of the PML in grid points
Nx = 420; % number of grid points in the x direction
Ny = Nx; % number of grid points in the y direction
Nz = Nx; % number of grid points in the z direction
dx = 0.2e-3; % grid point spacing in the x direction [m]
dy = dx; % grid point spacing in the y direction [m]
dz = dx; % grid point spacing in the z direction [m]
kgrid = kWaveGrid(Nx, dx, Ny, dy, Nz, dz);
% define the properties of the propagation medium
medium.sound_speed = 1500; % [m/s]
sz=128;
p0_init=zeros(Nx,Ny,Nz);
p0_init((Nx/2-sz/2+1):(Nx/2+sz/2+1),(Nx/2-sz/2+1):(Nx/2+sz/2+1),(Nx/2-sz/2+1):(Nx/2+sz/2+1))=10;
% smooth the initial pressure distribution and restore the magnitude
p0 = smooth(p0_init, true);
% assign to the source structure
source.p0 = p0;
% define a Cartesian spherical sensor
sensor_radius = 40e-3; % [m]
center_pos = [0, 0, 0]; % [m]
num_sensor_points = 1024;
sensor_mask = makeCartSphere(sensor_radius, num_sensor_points, center_pos, true);
% assign to the sensor structure
sensor.mask = sensor_mask;
% create the time array
cfl=0.15;
% kgrid.makeTime(medium.sound_speed);
kgrid.makeTime(medium.sound_speed);
% kgrid.t_array(3470:end)=[];
% set the input arguements
input_args = {'PMLSize', PML_size, 'PMLInside', false, 'PlotPML', true, ...
'Smooth', false, 'DataCast', 'single', 'CartInterp', 'nearest'};
% run the simulation
sensor_data = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});
We meet some problems during the simulation and the signal then the 'sensor_data' becomes continuous oscillation with very high amplitude.(I hope I can share you a figure to show the results) This happened before the wave reach our transducer or PML. We have already tested different 'cfl' values but can not solve this problem.