Good day;

I'm Ingeneering student and nowadays I'm working on my Bachelor's thesis.

I need to do a simulation of the ultrasound propagation across a square section (2D) that represents a column of concrete with its reinforcements in order to generate an image reconstruction of the column based on the ultrasound propagation.

I began to use the K-WAVE toolbox, the first step, like the examples, is to "construct" the k-grid and to define the medium properties (speed of sound and density).

The medium in my case is composed by: air (that represents the enviroment and where the source of the ultrasound is going to be set), concrete (square section of the column) and steel (square or circular sections that are allowed into the square section of the column representing the reinforcements) giving a model for a Heterogeneous Propagation Medium.

As i said, i started defining the medium, i set a simple model avoiding the reinforcements, only the air and in its middle a concrete section were defined with the following data: concrete density: 2730(kg/m3)

concrete (speed of sound): 4000(m/s)

air density: 1.18(kg/m3)

air (speed of sound): 343(m/s)

The medium in my case is composed by: 1.air (that represents the enviroment), 2.concrete (square section of the column) and 3.steel (square or circular sections that represents the reinforcements are allowed into the square section of the column).

As i said, i started setting the properties of the medium, in this first attemp, i set only air as enviroment and concrete with stone as the column, avoiding the reinforcement.

Then i set the ultrasound source and the sensors, then i started the simulation.

So, here´s my problem, when the simulation starts, the source of ultrasound doesn´t appear, and in other cases, the waves of sound enter into the square section but they don´t go out, instead, they began to crash into the section.

I apreciate that you help me with this problem or telling me what is wrong. I send you the code, thank you!!

'%% crear k grid

Nx=200;

Nz=200;

dx=1;

dz=1;

kgrid = makeGrid(Nx, dx, Nz, dz);

%% grid of air (enviroment) (speed of sound)

for i=1:Nz

for j=1:Nx-150

medium.sound_speed(i,j) = 343;

end

end

for i=1:Nz-150

for j=Nx-150:Nx

medium.sound_speed(i,j) = 343;

end

end

for i=Nz-49:Nz

for j=Nx-150:Nx

medium.sound_speed(i,j) = 343;

end

end

for i=Nz-150:Nz

for j=Nx-49:Nx

medium.sound_speed(i,j) = 343;

end

end

%% grid of the square section (concrete (4000) and stone (3700)) (speed of sound)

for i=Nz-149:Nz-50

for j=Nx-149:Nx-50

if rem((i+j),2)~=0

medium.sound_speed(i,j) = 4000;

end

end

end

for i=Nz-149:Nz-50

for j=Nx-149:Nx-50

if rem((i+j),2)==0

medium.sound_speed(i,j) = 3700;

end

end

end

%% grid of air (enviroment) (density)

for i=1:Nz

for j=1:Nx-150

medium.density(i,j) = 1.18;

end

end

for i=1:Nz-150

for j=Nx-150:Nx

medium.density(i,j) = 1.18;

end

end

for i=Nz-49:Nz

for j=Nx-150:Nx

medium.density(i,j) = 1.18;

end

end

for i=Nz-150:Nz

for j=Nx-49:Nx

medium.density(i,j) = 1.18;

end

end

%% grid of the square section (concrete (2800) and stone (2500)) (density)

for i=Nz-149:Nz-50

for j=Nx-149:Nx-50

if rem((i+j),2)~=0

medium.density(i,j) = 2800;

end

end

end

for i=Nz-149:Nz-50

for j=Nx-149:Nx-50

if rem((i+j),2)==0

medium.density(i,j) = 2500;

end

end

end

%% sensors

sensor_radius = 90;

num_sensor_points = 500;

sensor.mask = makeCartCircle(sensor_radius, num_sensor_points);

%% ultrasonido

[kgrid.t_array dt] = makeTime(kgrid, medium.sound_speed);

% source of ultrasound

source.p_mask = zeros(Nz, Nx);

source.p_mask(152, 100) = 1;

% signal

source_freq = 2e6;

source_mag = 250;

source.p = source_mag*sin(2*pi*source_freq*kgrid.t_array);

% smooth the source

%source.p = filterTimeSeries(kgrid, medium, source.p);

% run the simulation

[sensor_data p_final] = kspaceFirstOrder2D(kgrid, medium, source, sensor,'PlotLayout', true);

figure;

imagesc(sensor_data, [-1, 1]);

colormap(getColorMap);

ylabel('Sensor Position');

xlabel('Time Step');

colorbar;'