31.08.2018 Views

Eduardo Kausel-Fundamental solutions in elastodynamics_ a compendium-Cambridge University Press (2006)

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

214 MATLAB programs<br />

f1 = f0*rˆ3;<br />

fpr<strong>in</strong>tf (fout, ‘%15.5f %15.5f\n’, [T;U*f0]);<br />

fclose (fout);<br />

% c) Response at receiver by numerical Fourier transform<br />

hold off;<br />

t0 = r-1; % dimensionless arrival time<br />

H = H.*exp(i*w0*t0); % delay TF by arrival time<br />

V = zeros(size(T));<br />

u0 = 0.5*fac/rˆ2;<br />

for j=1:length(T) % Fourier transform by direct <strong>in</strong>tegration (no FFT here)<br />

t = T(j);<br />

% Advantage: can use arbitrary size & No. of time steps<br />

V(j) = u0+sum(real(H.*exp(i*w*t)));<br />

end<br />

V = V*dw/pi;<br />

V = V+tail/r;<br />

T1 = [0 t0 T+t0]; % shift delayed time by wave arrival time<br />

V = [0 0 V];<br />

plot(T1,V);<br />

% plot response by FT<br />

grid on;<br />

% d) Response at receiver by exact formula<br />

fac = sqrt((1-pois)/2)/rho/Cs;<br />

V = fac*exp(-b*T).*(cos(wd*T-phi)-(1-1/r)*s<strong>in</strong>(wd*T))/r; % Exact response<br />

V = [0 0 V];<br />

hold on;<br />

plot(T1,V,‘r:’);<br />

tit = spr<strong>in</strong>tf(...<br />

‘Cyl<strong>in</strong>drical cavity under pressure, response at r/r0=%5.2f, \\nu=%5.2f’,...<br />

r, pois);<br />

title(tit);<br />

titx = ‘Time (s)’;<br />

xlabel(titx);<br />

pause;<br />

close;<br />

% Create EasyPlot file<br />

fout = fopen(‘Cav3D-TD1.ezp’, ‘w’);<br />

fpr<strong>in</strong>tf (fout, ‘/et g “%s”\n’, tit);<br />

fpr<strong>in</strong>tf (fout, ‘/et x “%s”\n’, titx);<br />

fpr<strong>in</strong>tf (fout, ‘/og on\n’);<br />

fpr<strong>in</strong>tf (fout, ‘%15.5f %15.5f\n’, [T1;V*f1]);<br />

fclose (fout);<br />

return

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!