hi!
I have used the k-wave for few weeks and have some problems.I want to do a simulation about the aperture of a single element transducer,so I define a transducer and a source use the 'makeBall' in the 3D.The code is shown blow:
% create the computational grid
Nx = 64; % number of grid points in the x direction
Ny = 64; % number of grid points in the y direction
Nz = 64; % number of grid points in the z direction
dx = 100e-3/Nx; % 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]
% create the time array
kgrid.makeTime(medium.sound_speed);
% create a concave sensor
sphere_offset =10; % [grid points]
diameter = Nx/2 + 1; % [grid points]
bowl_pos = [1 + sphere_offset, Ny/2, Nz/2]; % [grid points]
focus_pos = [Nx/2, Ny/2, Nz/2]; % [grid points]
sensor.mask = makeBowl([Nx, Ny, Nz], bowl_pos, inf, diameter, focus_pos);
% create initial pressure distribution using makeBall
ball_magnitude = 5; % [Pa]
ball_radius = 5; % [grid points]
p0 = ball_magnitude * makeBall(Nx, Ny, Nz, 30, Ny/2, Nz/2, ball_radius);
and I want to show the transducer and the source togather in the codes as follows:
voxelPlot(sensor.mask+p0);
view([130, 40]);
my question is why the result is wrong.I execute the codes about the transducer and show it ,it's right,and I execute the codes about the source and show it,it's right as well.But when I try show them togather the transducer is can't be seen.I'm very confused,I need your help,thank you in advance!