Hi Dr. Treeby,
I am doing plane wave simulation and have a homogenous medium with two point scatterers with different acoustic impedance. The received waveform has the original excitation signal and a small reflection followed by the signal from the scatterers. I am not sure where the reflection is from. I have the PML layer set outside with PML_alpha with the default value of 2. I have tried setting PML alpha value [0 2] and it didn't work. I posted the code below and here is the received signal at the sensor:
http://tinypic.com/r/ix409h/9
% create the computational grid
clear all;
pml_x_size = 20;
pml_y_size = 20;
Nx = 256 - 2*pml_x_size;
Ny = 96 - 2*pml_y_size;
dx = 0.2e-3;
dy = 0.2e-3;
kgrid = makeGrid(Nx, dx, Ny, dy);
gridx_pts =11;
c0 = 1540; % [m/s]
rho0 = 1000; % [kg/m^3]
medium.sound_speed_ref = c0;
medium.alpha_power = 1.2;
medium.alpha_coeff = 0.75;
%medium.alpha_mode = 'no_absorption';
t_end = (Nx*dx)*2.4/c0; % [s]
kgrid.t_array = 0:15e-9:t_end;
source_strength = 1e6; % [Pa]
tone_burst_freq = 1.875e6; % [Hz]
tone_burst_cycles = 5;
input_signal = source_strength*toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles);
source.p_mask = zeros(Nx,Ny);
num_elements = 48; % [grid points]
x_offset = 1 ; % [grid points]
start_index = Ny/2 - round(num_elements/2) + 1;
source.p_mask(x_offset, start_index:start_index + num_elements - 1) = 1;
source.p = input_signal;
sensor.mask = zeros(Nx,Ny);
sensor.mask(x_offset, start_index:start_index + num_elements - 1) = 1;
sound_speed_map = c0*ones(Nx, Ny);
density_map = rho0*ones(Nx, Ny);
cwire = 3000;
scattering_rho0 = cwire/1.5;
xc = Nx - 5;
yc = (floor(Ny/2));
scattering_region5 = makeDisc(Nx, Ny, xc-14, yc,1); %
scattering_region6 = makeDisc(Nx, Ny, xc-8, yc+4,1);
sound_speed_map(scattering_region5 == 1) = cwire;
density_map(scattering_region5 == 1) = scattering_rho0;
sound_speed_map(scattering_region6 == 1) = cwire;
density_map(scattering_region6 == 1) = scattering_rho0;
Ls = round(kgrid.Nt/2); % sample size
input_args = {'PMLInside', false, 'PMLSize', [pml_x_size, pml_y_size],'PlotSim',false,'PlotScale',[-10 10]};
medium.sound_speed = sound_speed_map;
medium.density = density_map;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor,input_args{:}); % collect data for image
sd = sensor_data(2,:);
plot(sd)