You are on page 1of 5

MIDDLE EAST TECHNICAL UNIVERSITY

DEPARTMENT OF ENGINEERING SCIENCE

SOIL STRUCTURE INTERACTION


ES538
HOMEWORK 2

Trkz GARGUN - 2052504


clear all
clc
load loma.txt %loma is the vector defining acceleration history (cm/s2)
dt=0.02;
t=0:dt:(length(loma)-1)*dt;
figure
plot(t,loma)
title('Acceleration Data')
N=2500; % N>length(Loma)=2000, recommended N=2^m, say 4096
dw=2*pi/(N*dt); %!!! frequency pointer defined in this row !!!
Nyq=N/2+1; %Nyquist number defined in terms of data number

%GAZETAS
%According to Gazetas article
%Static ky=2GL/(2-poisson)*(2+2.5*lamda^0.85) where lamda = Ab/4L^2
%ky=0.82 according to fig 2(b)
ky=0.82 ;
%Static kry=(3G/(1-v))*I^0.75*(l/B)^0.15
%kry=1-0.26*a0 Tb1.3
kry=1-0.26*1.884;
%according to gazetas Cy=p*V*Ab fig 2.d
Cy=1.5*100*30*30/1000 ;
%according to gazetas fig2(f) Cry=0.65 becouse of a0=b*wn/v=1.884 and rocking
=L/B=1
Cry=0.48 ;
% Structural properties & matrix definitions
damp=0.05;
Tn=0.5;
wn=2*pi/Tn;
k=((2*pi*(sqrt(9000))/Tn))^2 ;
c=2*0.05*sqrt(k*9000);
%Tss has to be computed for including flexible base contribution
%Tssi=T*(1+ k/ky)^0.5 from Wolf
Tssi=0.5025 ;
Wssi=2*pi/Tssi ;
k=100*((2*pi*sqrt(9000)/Tn))^2;
M=[9000 0 0;0 0 0;0 0 00];
K=[k+ky 20*k -k;20*k kry+(20^2*k) -20*k;-k -20*k k];
C=[c+Cy 20*c -c;20*c Cry+(20^2*c) -20*c ;-c -20*c c];
%Condensation
tempB=[M(1,2) M(1,3)];
tempC=[M(2,2) M(2,3);M(3,2) M(3,3)];
Mcon=M(1,1)-(tempB*(inv(tempC))*transpose(tempB));
Mcon=9000;
tempB=[K(1,2) K(1,3)];
tempC=[K(2,2) K(2,3);K(3,2) K(3,3)];
Kcon=K(1,1)-(tempB*(inv(tempC))*transpose(tempB));
tempB=[C(2,1); C(3,1)];
tempC=[C(2,2) C(2,3);K(3,2) C(3,3)];
Ccon=C(1,1)-(transpose(tempB)*(inv(tempC))*tempB);
%computing FFT of a(t)
fourierLoma=fft(loma,N);
w=0:dw:(N-1)*dw;
figure
plot(w,real(fourierLoma)) % Real component of fourierLoma, symmmetric
title('real series')
figure
plot(w,imag(fourierLoma)) % Imaginary component of fourierLoma, antisymmetric
title('imaginary series')
figure
plot(w(1:Nyq),abs(fourierLoma(1:Nyq))) % Fourier amplitude spectrum
title('Fourier amplitude spectrum')
% calculation of fu(w)
for j=1:Nyq
wk=(j-1)*dw;
H=1/(Kcon+(Ccon*wk*1i)-(wk^2*Mcon)) ;
%H=1/(-wk^2+2*1i*damp*wk*Wssi+Wssi^2);
fu(j)=-fourierLoma(j)*Mcon*H;
end

for j=1:Nyq-2
fu(Nyq+j)=conj(fu(Nyq-j)); %CFT should be antisymmetric
end
figure
plot(w,real(fu)) % Real component of floma, symmmetric
title('Real component of f(u)')
figure
plot(w,imag(fu)) % Imaginary component of floma, antisymmetric
title('Imaginary component of f(u)')
figure
plot(w(1:Nyq),abs(fu(1:Nyq))) % Fourier amplitude spectrum of fu, symmmetric
title('Fourier amplitude spectrum of f(u)')
%inverse transform of fu(w) for computing u(t)
u=ifft(fu);
t=0:dt:(N-1)*dt;
figure
plot(t,imag(u)) %imag(u) should be ~0.0: check!
title('correction for 0')
% or
max(imag(u)) % ans: 4.62e-10
figure
plot(t(1:2000),real(u(1:2000))) % response history,u(t), (cm)
title('Response History,u(t),(cm)')
for j=1:Nyq
wk=(j-1)*dw;
H(j)=-wk^2*Mcon/((-wk^2*Mcon)+(1i*wk*Ccon)+Kcon);
%H(j)=(-wk^2)*Mcon/(Kcon+(wk*Ccon*1i)+(wk^2*Mcon)) ;
%H(j)=(-wk^2)*Mcon/(Kcon+(Mcon*Ccon*wk*1i)-(wk^2*Mcon)) ;
%H(j)=-wk^2/(-wk^2+1i*damp*wk*wn+wn^2); % liu article explains
end
figure
plot(w(1:400),abs(H(1:400))) % Amplification spectrum
title('amplification spectrum')
L=[K(1,1) K(1,2);K(2,1) K(2,2)];
R=-9.86*[K(1,3);K(2,3)];
ufoundation=inv(L)*R;

Max Displacement is obtained : 9.9cm


Max Displacement is obtained for TSSI : 4.4cm

You might also like