Hello,
First off thank you so much for offering this package free of charge. I am trying to simulate more than two layers of elastic/viscoelastic materials and am running into a problem when coding more than two layers. Here is the general process I am using:
% Define properties of the first layer (FOAM)
medium.sound_speed_compression = 2278*ones(Nx, Ny); % [m/s]
medium.sound_speed_shear = 30*zeros(Nx, Ny); % [m/s]
medium.density = 1265*ones(Nx, Ny); % [kg/m^3]% Define properties of the second layer (Steel)
medium.sound_speed_compression(Nx/2:end, :) = 5164; % [m/s]
medium.sound_speed_shear(Nx/2:end, :) = 2164; % [m/s]
medium.density(Nx/2:end, :) = 7500; % [kg/m^3]% Define properties of the third layer (PMMA)
medium.sound_speed_compression(3/Nx:end, :) = 11663; % [m/s]
medium.sound_speed_shear(Nx/3:end, :) = 1663; % [m/s]
medium.density(Nx/3:end, :) = 11185; % [kg/m^3]etc...
But it seems as though I always end up with just two materials. Any insight into what I'm doing wrong is greatly appreciated. Also, it there a way to make the layers circular? Like if I wanted to take a cross section of a sphere in the center. My problem involves coated spheres. Thanks!