Hi all,
I am working on a project where we are trying to create a realistic simulation of the propagation of shear waves on a plate and to graph the displacement of the plate at multiple points. Currently I am using the source.s_mask to simulate a time varying pressure being applied to the plate at an small area and reading data using sensor.mask at different points on the grid. The simulation used is pstdElastic2D(kgrid, medium,source,sensor).Is the data recorded by the sensor Stress or Strain? and if is stress how can I manipulate that recorded data to a displacement data. Im sharing my code so maybe you guys can see it and run it. Have a good day.
-Julio
clear all ; close all;
%% Create the Computational Grid %%
dx = 0.2e-1; % [m]
dy = 0.2e-1; % [m]
Nx = round(2/dx)+1; % [grid points]
Ny = round(2/dy)+1; % [grid points]
kgrid = makeGrid(Nx, dx, Ny, dy);
%% Medium Properties %%
% define the compressional sound speed [m/s]
medium.sound_speed_compression = 6420*ones(Nx, Ny);
% define the shear sound speed [m/s]
medium.sound_speed_shear = 3040*ones(Nx, Ny);
% define the mass density [kg/m^3]
medium.density = 2700*ones(Nx, Ny);
%% Delta Sorce %%
t = [linspace(-1,1+.39325,101)]; % Time Vector
w = 2; % Triangle Width
x = tripuls(t,w); % Sampled aperiodic triangle
%% Square Source %%
y = square(pi*t);
%% Source (Presure) %%
source.s_mask = zeros(Nx, Ny); %Creates my matrix for the Source
source.s_mask(round(Nx/8),round(Ny/2)) =1;
%source.s_mask(7*round(Nx/8),round(Ny/2)) =1;
%source.s_mask(round(Nx/2),round(Ny/8)) =1;
%source.s_mask(round(Nx/2),7*round(Ny/8)) =1;
source.sxy =1*y; %Square and Delta Source
%% Define my Sensors in the Grid %%
sensor.mask = zeros(Nx, Ny);
sensor.mask(round(Nx/8),round(Ny/2))=1 ; % Sensor at the 1/8 in the X-direction
sensor.mask(round(Nx/4),round(Ny/2))=1 ; % Sensor at the 1/4 in the X-direction
sensor.mask(round(Nx/2),round(Ny/2)) = 1 ;% Sensor at the center
%sensor.mask(3*round(Nx/4),round(Ny/2))=1 ; % Sensor at the 3/4 in the X-direction
%% run the simulation
sensor_data = pstdElastic2D(kgrid, medium, source,sensor);
[r, c] = size(sensor_data);
%% Plot the Sensor Simulated Data %%
for x = 1:4
figure(1+r)
hold on
plot(1:c,sensor_data(x,1:c));
xlabel('Time (usec)');ylabel('Displacement (um)');
pause(.25)
grid on;
end
-Julio