Hi,

I am trying to simulate the photoacoustic signals of a point source in the 3D space.However,when the number of grid in z directions is less than the grid number in the x and z directions,(such Nz = 42, Nx = 512,Ny = 512) the detected photoacoustic signal has a strange shape and not a N-shape. The code is shown below:

clearvars;

% =========================================================================

% SETTINGS

% =========================================================================

% size of the computational grid

Nx = 512; % number of grid points in the x (row) direction

x = 50e-3; % size of the domain in the x direction [m]

dx = x/Nx; % grid point spacing in the x direction [m]

Nz = 42;

% define the properties of the propagation medium

medium.sound_speed = 1500; % [m/s]

% size of the initial pressure distribution

source_radius = 1; % [grid points]

% distance between the centre of the source and the sensor

source_sensor_distance = 220; % [grid points]

% time array

dt = 50e-9; % [s]

t_end = 1000*50e-9; % [s]

% computation settings

input_args = {'DataCast', 'gpuArray-single'};

% create the computational grid

kgrid = kWaveGrid(Nx, dx, Nx, dx, Nz, dx);

% create the time array

kgrid.setTime(round(t_end / dt) + 1, dt);

% create initial pressure distribution

source.p0 = makeBall(Nx, Nx, Nz, Nx/2, Nx/2, Nz/2, source_radius);

% define a single sensor point

sensor.mask = zeros(Nx, Nx, Nz);

sensor.mask(Nx/2 - source_sensor_distance, Nx/2, Nz/2) = 1;

% run the simulation

sensor_data_3D = kspaceFirstOrder3D(kgrid, medium, source, sensor, input_args{:});

% plot the time signals recorded in each dimension

figure;

[t_sc, t_scale, t_prefix] = scaleSI(t_end);

plot(kgrid.t_array * t_scale, sensor_data_3D ./ max(abs(sensor_data_3D)), 'k-');

axis tight;

I appreciate any help in this regard.