I am trying to use addLineElement to add a transducer with a diameter of 3mm, but after generating it, the mask obtained using getArrayBinaryMask is much larger than 3mm. Can you tell me what to do? Thank you.
Below is part of the code:
(
clc;
clear all;
%%%%%%%%%%%%%%
pml_size = 40; % [grid points]
Nx = 256; % [grid points]
Ny = 256; % [grid points]
dx = 0.25e-3; % [m]
dy = 0.25e-3; % [m]
kgrid = kWaveGrid(Nx, dx, Ny, dy);
medium.sound_speed = 1510; % [m/s]
medium.density = 1020; % [kg/m^3]
medium.alpha_coeff = 0.75; % [dB/(MHz^y cm)]
medium.alpha_power = 1.5;
%频率疑问 频率高了(差不多超过4.5mhz图上就显示很差)
freq1 = 2.22e6; % 4.5 MHz
freq2 = 2.22e6;
% freq1 = 5.22e6; % 4.5 MHz
% freq2 = 5.58e6;
%振幅疑问%%%%%%%%%%%%%%%%%%%
amp = 0.53e6; % 0.53[MPa]
% vrad_bk=1*0.7; %with backing side vibration velocity amplitude 0.68*0.6
%
% vrad_nobk=0*0.27; %without backing side vibration velocity amplitude
% 换能器设置
karray = kWaveArray('BLITolerance', 0.05, 'UpsamplingRate', 10);
line_diameter = 0.003; % [m]
x_start = int32 (Nx/2 - (line_diameter / dx)/2);
x_end =int32 (Nx/2 + (line_diameter / dx)/2);
y_start =int32 (Ny/2 - (line_diameter / dy)/2);
y_end = int32 (Ny/2 + (line_diameter / dy)/2);
% 添加线性元素到换能器阵列
karray.addLineElement([ 0,-0.0015],[ 0,0.0015]);
zhu = karray.getArrayBinaryMask(kgrid);
)