Hello,
I'm trying to model a simulation to measure surface waves in two different media. At this time, a wave with strange straight line shape is generated in the unset position. what is this problem?
Thank you.
code:
clear all;
close all;
clc;
%% create the computational grid
Nx = 300; % [grid points]
Ny = 400; % [grid points]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dx = 0.001; % [m] %% See changes.
dy = 0.001; % [m] %% See changes.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
kgrid = makeGrid(Nx, dx, Ny, dy);
%% define the compressional sound speed [m/s]
medium.sound_speed_compression = 343*ones(Nx, Ny); % P-wave velocity of air
medium.sound_speed_compression(200:300, :) = 4000; % P-wave velocity of concrete
%% define the shear sound speed [m/s]
medium.sound_speed_shear = 0*ones(Nx, Ny); % S-wave velocity of air
medium.sound_speed_shear(200:300, :) = 2500; % S-wave velocity of concrete
%% define the mass density [kg/m^3]
medium.density = 1.2754*ones(Nx, Ny); % air density
medium.density(200:300,:) = 2350; % concrete density
%% define the absorption coefficients [dB/(MHz?2 cm)]
% medium.alpha_coeff_compression = 0.9;
% medium.alpha_coeff_shear = 0;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Create the time array (Refer to Manual Page 31)
kgrid.t_array = makeTime(kgrid, medium.sound_speed_compression, 0.1,10e-4);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% define u_mask
source.u_mask = zeros(Nx,Ny);
source.u_mask(160,70:100) = 1;
source.u_mode = 'additive';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dt = kgrid.t_array(2)-kgrid.t_array(1) ; %[s] %%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
sampling_freq = 1/dt; % [Hz]
tone_burst_freq = 5e4; % [Hz]
tone_burst_cycles = 10;
source.ux = 1*toneBurst(sampling_freq, tone_burst_freq, tone_burst_cycles);
source.uy = 1*toneBurst(sampling_freq, tone_burst_freq, tone_burst_cycles);
% define sensor
sensor.mask = zeros(Nx, Ny);
sensor.mask(160, 300:400) = 1;
input_args = {'PlotPML', true, 'PMLInside', false, 'PMLSize', [40, 40], 'PMLAlpha',100, 'DataCast', 'single'};
% run the simulation
sensor_data = pstdElastic2D(kgrid, medium, source, sensor, input_args{:});