1. In "example_ewp_layered_medium.m", how to define an explosive source. the example define initial pressure using "source.p0", but did not define how this pressure will change with time.
2. I want to define a time varying stress source (6 cycles of the rectangular wave). Below is the code, can you point out whether my code is right?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
disc_magnitude = 0; % [Pa]
disc_x_pos = 128; % [grid points]
disc_y_pos = 128; % [grid points]
disc_radius = 5; % [grid points]
source.s_mask = makeDisc(Nx, Ny, disc_x_pos, disc_y_pos, disc_radius);
% define a time varying pressure source
source_mag = 5;
t=0:1e-6:1000e-6;
number_t=length(t);
signal=zeros(1,number_t);
fs_rec=1e6;
t_rec = -90e-6:1/fs_rec:90e-6;
w = 30e-6;
y = rectpuls(t_rec,w);
number_y=length(y);
for i=1:6
signal_temp((i-1)*number_y+1:i*number_y)=y;
end
signalonecycle=signal_temp(59:end);
number_signalonecycle=length(signalonecycle);
signal(1:number_signalonecycle)=signalonecycle;
source.sxx = source_mag*signal;
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Thanks,
Yu