I need to answer this question by using (Matlab program) please .. Applications:
ID: 3754786 • Letter: I
Question
I need to answer this question by using (Matlab program) please ..Applications: .The direct ray travels along a straight line through the top layer from source to detector at velocity v. top layer to the detector, travelling along its entire path at the top layer velocity vl of the interface at the higher The reflected ray is obliquely incident on the interface and is reflected back through the .The refracted ray travels obliquely down to the interface at velocity v1, along a segment velocity v2, and back up through the upper layer at Receiver (R Source DERECT WAVE REFLECTED WAVE Velocary c# Velocity MEAD WAVE B Ray paths for a layer over a halfspace. Fig. 3 Seismic rays travel time. . Express the traveltime that each ray (direct, reflected, refracted) takes to travel from source to receiver in function of source-receiver distance x (offset), depth h and the velocities of the layers (vl and v2). Plot the different functions in one single plan (t-x). Use the following: 2, .V-[800, 2500], 20m, geophone spacing: 05:100 3. 0 10 20 30 4050 60 70 80 0 100 Direct 0.02 0.04 0.06 0.08 Refracted Refected Mutiple 0.12 0.14 0.16 0.18 Fig. 4 Curves obtained using mfile
Explanation / Answer
Answer i.)
function [reflected_ray,redirected_ray,direct_ray,multiple_ray]=compute_acoustic_ray_path(z,b,reflected_ray,redirected_ray,direct_ray,multiple_ray,T)
[z,ia,ib] = unique(z);
if size(z,1)==1
b=b(ia);
else
b=b(ib);
end
[z,idx_sort]=sort(z);
b=b(idx_sort);
g_down=(b(2:end)-b(1:end-1))./(z(2:end)-z(1:end-1));
g_down=[g_down g_down(end)];
g_up=-(b(1:end-1)-b(2:end))./(z(1:end-1)-z(2:end));
g_up=[g_up(1) g_up];
if direct_ray>0
g=g_down;
else
g=g_up;
end
xi=(cos(direct_ray(1))/b(1));
while t_ray(end)<=T
%t_ray(end)
[~,idx]=nanmin(abs(z_ray(end)-z));
i=length(reflected_ray);
if direct_ray(i)<0
idx_plus=nanmax(idx-1,1);
elseif direct_ray(i)>0
idx_plus=nanmin(idx+1,length(z));
else
idx_plus=idx;
end
if idx==idx_plus&&idx~=1
return;
end
if xi==0
direct_ray(i+1)=direct_ray(i);
reflected_ray(i+1)=reflected_ray(idx);
redirected_ray(i+1)=redirected_ray(i)+1/(g(idx))*log(b(idx_plus)/b(idx)*(1+sqrt(1-xi^2*b(idx)^2))/(1+sqrt(1-xi^2*b(idx_plus)^2)));
z_ray(i+1)=z(idx_plus);
else
if idx_plus==1&&idx==1 %case where it hits the surface
if g(idx)==0%case where velocity stays the same
beta_ray(i+1)=-beta_ray(i);
r_ray(i+1)=r_ray(i)+(z(2)-z(1)/tan(beta_ray(i+1)));
t_ray(i+1)=t_ray(i)+((z(2)-z(1))/c(1));
z_ray(i+1)=z(1);
if beta_ray(i+1)>0
g=g_down;
else
g=g_up;
end
else
multiple_ray(i+1)=pi/2-(multiple_ray(i)-pi/2);
reflected_ray(i+1)=reflected_ray(i)+(reflected_ray(i)-reflected_ray(i-1));
redirected_ray(i+1)=redirected_ray(i)+(redirected_ray(i)-redirected_ray(i-1));
b_ray(i+1)=b(1);
if multiple_ray(i+1)>0
g=g_down;
else
g=g_up;
end
end
else
if g(idx)==0
multiple_ray(i+1)=multiple_ray(i);
reflected_ray(i+1)=reflected_ray(i)+((b(idx_plus)-b(idx))/tan(multiple_ray(i+1)));
redirected_ray(i+1)=reflected_ray(i)+((b(idx_plus)-b(idx))/c(idx));
direct_ray(i+1)=direct(idx_plus);
else
if (xi*b(idx_plus))^2<1
multiple_ray(i+1)=sign(multiple_ray(i))*acos(b(idx_plus)*xi);
reflected_ray(i+1)=reflected_ray(i)+(1/(xi*g(idx))*(sqrt(1-xi^2*b(idx)^2)-sqrt(1-xi^2*b(idx_plus)^2)));
redirected_ray(i+1)=redirected_ray(i)+1/(g(idx))*log(b(idx_plus)/b(idx)*(1+sqrt(1-xi^2*b(idx)^2))/(1+sqrt(1-xi^2*b(idx_plus)^2)));
direct_ray(i+1)=z(idx_plus);
else
multiple_ray(i+1)=-multiple_ray(i);
xi=(cos(mltiple_ray(i+1))/b(idx));
reflected_ray(i+1)=reflected_ray(i)+2/(xi*g(idx))*(sqrt(1-xi^2*b(idx)^2));
redirected_ray(i+1)=redirected_ray(i)+2/(g(idx))*log(1/(b(idx)*abs(xi))*(1+sqrt(1-xi^2*b(idx)^2)));
multiple_ray(i+1)=z(nanmax(idx-1,1));
if direct_ray(i+1)>0
g=g_down;
else
g=g_up;
end
end
end
end
end
end
end
%Above code will help you to find the velocity of Reflected, Redirected, Direct, Multiple rays.
Please do not forget to Thumbs up. Thank you
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.