A.A Fondjo. Dynamic Loading On Structures Project
A.A Fondjo. Dynamic Loading On Structures Project
CIVN7005
STRUCTURAL DYNAMICS
(STUDENT NO 526196)
LECTURER: DR. K LI
Preface
m1 500x10 Ns /m
⎡ ⎤
⎢ m2 500x10 Ns /m ⎥
⎢ m3 500x10 Ns /m ⎥
⎢ k1 1.26x10 N/m ⎥
⎢ ⎥
⎢ k2 8.41x10 N/m ⎥
⎢ k3 4.20x10 N/m ⎥
⎢c1 4.2657x10 Ns/m⎥
⎢ ⎥
⎢c2 2.8438x10 Ns/m⎥
⎣c3 1.4219x10 Ns/m⎦
[1]
Results presented for all questions, refers:
[2]
Question 1
If damping is neglected:
'ф фΩ
5.91 0 0
Ω + 0 13.88 0 -
0 0 22.99
Question 2
x 10
-3 Displacement Response of First Floor vs Time
6
Displacement Response in metres
-2
-4 X: 0.44
Y: -0.004827
-6
0 1 2 3 4 5 6 7 8 9 10
Time in seconds
[3]
Displacement Response of Second Floor vs Time
0.01
Displacement Response in metres
0.005
-0.005
X: 0.48
Y: -0.007746
-0.01
0 1 2 3 4 5 6 7 8 9 10
Time in seconds
0.01
Displacement in metres
0.005
-0.005
-0.01
0 5 10 15
Time in seconds
Question 3
First Floor
1.5
1
Magnitude
0.5
0
0 1 2 3 4 5 6
Frequency in Hertz
[4]
Second Floor
3
2.5
2
Magnitude
1.5
0.5
0
0 1 2 3 4 5 6
Frequency in Hertz
Third Floor
4.5
3.5
3
Magnitude
2.5
1.5
0.5
0
0 1 2 3 4 5 6
Frequency in Hertz
Frequency –
Frequency - PSD
Floor eigenvalue %error
radians radians
1 5.91 5.694266 -4.40
2 13.88 13.6245432 -1.87
3 22.99 22.8223432 -0.74
The percentage error is small, thus it is acceptable to use Power Spectral Density as measure of
natural frequency.
Question 4
.
[5]
-5
x 10
First Floor
10
8 X: 1.31
Y: 8.692e-005
6
Displacement [m]
-2
-4
-6
-8
0 1 2 3 4 5 6 7 8 9 10
time [s]
-4
x 10
Second Floor
2
1.5
Displacement [m]
0.5
-0.5
X: 1.87
Y: -9.803e-005
-1
0 1 2 3 4 5 6 7 8 9 10
time [s]
-4
x 10
Third Floor
3
X: 0.22
Y: 0.0002235
2
Displacement [m]
-1
-2
-3
0 1 2 3 4 5 6 7 8 9 10
time [s]
[6]
4
x 10
First Floor
1.5
X: 0.56
Y: 1.062e+004
1
Inertia Force [N]
0.5
-0.5
-1
0 1 2 3 4 5 6 7 8 9 10
time [s]
Second Floor
6000
4000
2000
Inertia Force [N]
-2000
-4000
-6000
-8000 X: 0.33
Y: -9064
-10000
0 1 2 3 4 5 6 7 8 9 10
time [s]
Third Floor
10000
X: 0.31
Y: 9783
8000
Inertia Force [N]
6000
4000
2000
-2000
0 1 2 3 4 5 6 7 8 9 10
time [s]
[7]
4
x 10
First Floor
1.5
1 X: 1.31
Y: 1.095e+004
Shear Force [N]
0.5
-0.5
-1
0 1 2 3 4 5 6 7 8 9 10
time [s]
Second Floor
8000
6000 X: 0.72
Y: 6752
4000
Shear Force [N]
2000
-2000
-4000
-6000
-8000
0 1 2 3 4 5 6 7 8 9 10
time [s]
4
x 10
Third Floor
1.5
1
Shear Force [N]
0.5
-0.5
-1
0 1 2 3 4 5 6 7 8 9 10
time [s]
[8]
Q4 PSD
Frequency -
f3(t) Frequency - PSD
Story Eigenvalue
kN radians radians
1,2,3 12sin20t 5.91 5.65
1,2,3 12sin20t 13.88 13.62
1,2,3 12sin20t 22.99 19.69
Second Floor
0.1
0.08
Abs. Magnitude
0.06
0.04
0.02
0
0 1 2 3 4 5 6 7 8 9 10
Frequency in Hertz
Question 5
Max Max Inertia
f3(t) Max Shear Force
Floor Displacement Force
kN mm N N
1 12sin5.62t 1.85 30630 2334700
2 12sin5.62t 4.266 69880 202800
3 12sin5.62t 0.742 186600 132900
[9]
-3
x 10
First Floor
2
X: 9.29
Y: 0.00185
1.5
1
Displacement [m]
0.5
-0.5
-1
-1.5
-2
0 2 4 6 8 10 12 14 16 18 20
time [s]
-3
x 10
Second Floor
5
Displacement [m]
X: 9.84
Y: -0.004266
-5
0 2 4 6 8 10 12 14 16 18 20
time [s]
-3
x 10
Third Floor
8
X: 9.29
Y: 0.00742
6
4
Displacement [m]
-2
-4
-6
-8
0 2 4 6 8 10 12 14 16 18 20
time [s]
[10]
4
x 10
First Floor
4
2
Inertia Force [N]
-1
-2
X: 9.29
Y: -3.036e+004
-3
-4
0 2 4 6 8 10 12 14 16 18 20
time [s]
4
x 10
Second Floor
8
X: 9.83
6 Y: 6.988e+004
4
Inertia Force [N]
-2
-4
-6
-8
0 2 4 6 8 10 12 14 16 18 20
time [s]
5
x 10
Third Floor
2
1.5
1
Inertia Force [N]
0.5
-0.5
-1
-1.5 X: 9.85
Y: -1.866e+005
-2
0 2 4 6 8 10 12 14 16 18 20
time [s]
[11]
5
x 10
First Floor
3
-1
X: 9.84
-2 Y: -2.334e+005
-3
0 2 4 6 8 10 12 14 16 18 20
time [s]
5
x 10
Second Floor
3
2
Shear Force [N]
-1
X: 9.29
Y: -2.028e+005
-2
-3
0 2 4 6 8 10 12 14 16 18 20
time [s]
5 Third Floor
x 10
1.5
X: 9.84
Y: 1.329e+005
1
Shear Force [N]
0.5
-0.5
-1
-1.5
0 2 4 6 8 10 12 14 16 18 20
time [s]
[12]
PSD
Second Floor
8
6
Abs. Magnitude
5 X: 0.8667
Y: 4.185
0
0 1 2 3 4 5 6 7 8 9 10
Frequency in Hertz
Question 6
kN mm N N
-3
x 10
First Floor
3
2
Displacement [m]
-1
-2
-3 X: 1.58
Y: -0.003698
-4
0 2 4 6 8 10 12 14 16 18 20
time [s]
[13]
-3
x 10
Second Floor
6
4
Displacement [m]
2
-2
-4
-6
X: 0.56
Y: -0.007777
-8
0 2 4 6 8 10 12 14 16 18 20
time [s]
Third Floor
0.015
0.01
Displacement [m]
0.005
-0.005
-0.01 X: 0.52
Y: -0.01268
-0.015
0 2 4 6 8 10 12 14 16 18 20
time [s]
x 10
5 First Floor
1
0.5
Inertia Force [N]
-0.5
-1
X: 8.68
Y: -1.52e+005
-1.5
-2
0 2 4 6 8 10 12 14 16 18 20
time [s]
[14]
5
x 10
Second Floor
1
-0.5
-1
-1.5
X: 9.61
Y: -2.017e+005
-2
-2.5
0 2 4 6 8 10 12 14 16 18 20
time [s]
5
x 10
Third Floor
2
1
Inertia Force [N]
-1
-2
-3
X: 0.56
Y: -4.124e+005
-4
-5
0 2 4 6 8 10 12 14 16 18 20
time [s]
5
x 10
First Floor
4
2
Shear Force [N]
-1
-2
-3
-4 X: 1.58
Y: -4.66e+005
-5
0 2 4 6 8 10 12 14 16 18 20
time [s]
[15]
5
x 10
Second Floor
4
3
Shear Force [N]
2
-1
-2
X: 8.54
Y: -2.823e+005
-3
0 2 4 6 8 10 12 14 16 18 20
time [s]
5
x 10
Third Floor
2.5
1.5
Shear Force [N]
0.5
-0.5
-1
-1.5 X: 8.48
Y: -1.903e+005
-2
0 2 4 6 8 10 12 14 16 18 20
time [s]
[16]
ELC, PSD
Second Floor
5
X: 0.9
Y: 4.555
4
Abs. Magnitude
0
0 0.5 1 1.5 2 2.5 3 3.5 4
Frequency in Hertz
One peak experienced at first natural frequency, only first natural frequency is gotten on the
structure during earthquake.
[17]
Question 7
x 10
-5 First Floor
2.5
2 X: 0.41
Y: 2.107e-005
1.5
Displacement [m]
0.5
-0.5
-1
-1.5
-2
0 2 4 6 8 10 12 14 16 18 20
time [s]
x 10
-5 Second Floor
5
4 X: 0.42
Y: 4.335e-005
3
Displacement [m]
-1
-2
-3
-4
0 2 4 6 8 10 12 14 16 18 20
time [s]
[18]
x 10
-5 Third Floor
8
6 X: 0.37
Y: 6.411e-005
4
Displacement [m]
2
-2
-4
-6
-8
0 2 4 6 8 10 12 14 16 18 20
time [s]
First Floor
600
400
Inertia Force [N]
200
-200
-400
-600
X: 0.41
Y: -780.4
-800
0 2 4 6 8 10 12 14 16 18 20
time [s]
Second Floor
1000
500
Inertia Force [N]
-500
X: 0.43
Y: -1072
-1000
-1500
0 2 4 6 8 10 12 14 16 18 20
time [s]
[19]
Third Floor
2000
X: 0.41
Y: 1814
1500
Inertia Force [N]
1000
500
-500
-1000
-1500
0 2 4 6 8 10 12 14 16 18 20
time [s]
First Floor
3000
2000
Shear Force [N]
1000
-1000
X: 2
Y: -1955
-2000
0 2 4 6 8 10 12 14 16 18 20
time [s]
Second Floor
2000
1500
1000
Shear Force [N]
500
-500
-1000
-1500 X: 0.43
Y: -1877
-2000
0 2 4 6 8 10 12 14 16 18 20
time [s]
[20]
Third Floor
1500
1000
Shear Force [N]
500
-500
-1000 X: 0.24
Y: -1323
-1500
0 2 4 6 8 10 12 14 16 18 20
time [s]
PSD
Second Floor
0.03
0.025
Abs. Magnitude
0.02
0.015
0.01
0.005
X: 2.133
Y: 0.0006421
0
0 1 2 3 4 5 6
Frequency in Hertz
Two peaks produced. Corresponding to the first and second natural frequency.
[21]
KEYS PROGRAMME
[22]
Question No 1 - Natural Frequencies
m1 = 500e3
m2 = 500e3
m3 = 500e3 %m1, m2,m3 in Ns^2/m
k1 = 1.26e8
k2 = 8.41e7
k3 = 4.20e7 %k1,k2,k3 in N/m
omega1 = sqrt(D(1,1))
omega2 = sqrt(D(2,2))
omega3 = sqrt(D(3,3)) % Natural frequencies
Mode1 = V(:,1)
Mode2 = V(:,2)
Mode3 = V(:,3) %mode shapes
[23]
Question 2 –
m1 = 500e3
m2 = 500e3
m3 = 500e3 %m1, m2,m3 in Ns^2/m
k1 = 1.26e8
k2 = 8.41e7
k3 = 4.20e7 %k1,k2,k3 in N/m
c1 = 4.2657e5
c2 = 2.8438e5
c3 = 4.219e5 %Question 2 - c1,c2,c3 in Ns/m
T2 = t(i) + h;
X2 = Xrk(:,i) + Y1*h;
Y2 = Yrk(:,i) + F1*h;
rk2=[0,0,0]';
F2 = D*(rk2-K*X2- C*Y2);
T3 = t(i) + h;
[24]
X3 = Xrk(:,i) + Y2*h;
Y3 = Yrk(:,i) + F2*h;
rk3=[0,0,0]';
F3 = D*(rk3-K*X3- C*Y3);
T4 = t(i) + Tao ;
X4 = Xrk(:,i) + Y3*h;
Y4 = Yrk(:,i) + F3*h;
rk4=[0,0,0]';
F4 = D*(rk4-K*X4- C*Y4);
end
figure
plot(t,x1)
ylabel('Displacement in metres'), grid on
xlabel('Time in seconds')
title('Displacement vs Time Response Response of First Floor')
figure
plot(t,x2)
ylabel('Displacement in metres'), grid on
xlabel('Time in seconds')
title('Displacement vs Time Response Response of Second Floor')
figure
plot(t,x3)
ylabel('Displacement in metres'), grid on
xlabel('Time in seconds')
title('Displacement vs Time Response Response of Third Floor')
[25]
Question 3 - Spectral Analysis using the FFT Method
m1 = 500e3
m2 = 500e3
m3 = 500e3 %m1, m2,m3 in Ns^2/m
k1 = 1.26e8
k2 = 8.41e7
k3 = 4.20e7 %k1,k2,k3 in N/m
c1 = 4.2657e5
c2 = 2.8438e5
c3 = 4.219e5 %Question 2 - c1,c2,c3 in Ns/m
T2 = t(i) + h;
X2 = Xrk(:,i) + Y1*h;
Y2 = Yrk(:,i) + F1*h;
rk2=[0,0,0]';
F2 = D*(rk2-K*X2- C*Y2);
T3 = t(i) + h;
X3 = Xrk(:,i) + Y2*h;
[26]
Y3 = Yrk(:,i) + F2*h;
rk3=[0,0,0]';
F3 = D*(rk3-K*X3- C*Y3);
T4 = t(i) + Tao ;
X4 = Xrk(:,i) + Y3*h;
Y4 = Yrk(:,i) + F3*h;
rk4=[0,0,0]';
F4 = D*(rk4-K*X4- C*Y4);
y1 = abs(fft(x1));
y2 = abs(fft(x2));
y3 = abs(fft(x3));
figure
plot(f,y3),axis([0 6 0 4.5])
ylabel('Magnitude'), grid on
xlabel('Frequency in Hertz')
title('Third Floor')
figure
plot(f,y1),axis([0 6 0 1.5])
ylabel(' Magnitude'), grid on
xlabel('Frequency in Hertz')
title('First Floor')
figure
plot(f,y2),axis([0 6 0 3])
ylabel(' Magnitude'), grid on
xlabel('Frequency in Hertz')
title('Second Floor')
[27]
Question 4.
Design Parameters
M = mass matrix in Ns^2/m
K = stiffness matrix in N/m
C = damping matrix in Ns/m
M1 = 500E3
M2 = 500E3
M3 = 500E3
K1 = 1.26E8
K2 = 8.41E7
K3 = 4.20E7
C1 = 4.2657E5
C2 = 2.0430E5
C3 = 1.4219E5
D = inv(M)
X0 = [0;0;0]
DX0 = [0;0;0]
Tao = 0.01;
h = Tao/2;
Xrk(:,1)=X0;
Yrk(:,1)=DX0;
F0=0;
N=5000;
for i=1:N
t(i) = (i-1)*Tao;
T1 = t(i);
X1 = Xrk(:,i);
Y1 = Yrk(:,i);
rk1=[0,0,12*sin(20*T1)]';
F1 = D*(rk1-K*X1- C*Y1);
[28]
T2 = t(i) + h;
X2 = Xrk(:,i) + Y1*h;
Y2 = Yrk(:,i) + F1*h;
rk2=[0,0,12*sin(20*T2)]';
F2 = D*(rk2-K*X2- C*Y2);
T3 = t(i) + h;
X3 = Xrk(:,i) + Y2*h;
Y3 = Yrk(:,i) + F2*h;
rk3=[0,0,12*sin(20*T3)]';
F3 = D*(rk3-K*X3- C*Y3);
T4 = t(i) + Tao ;
X4 = Xrk(:,i) + Y3*h;
Y4 = Yrk(:,i) + F3*h;
rk4=[0,0,12*sin(20*T4)]';
F4 = D*(rk4-K*X4- C*Y4);
% Q4.1(a) Displacement
figure
plot(t,Xrk(1,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('1st Storey')
figure
plot(t,Xrk(2,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('2nd Storey')
figure
plot(t,Xrk(3,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
[29]
title('3rd Storey')
Inert1 = 0-((K1+K2)*x1)+(K2*x2)-((C1+C2)*y1)+(C2*y2);
Inert2 = 0+(K2*x1)-((K2+K3)*x2)+(K3*x3)+(C2*y1)-((C2+C3)*y2)+(C3*y3);
Inert3 = 12*sin(20*t(i))+(K3*x2)-(K3*x3)+(C3*y2)-(C3*y3);
figure
plot(t,Inert1)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('1st Storey')
figure
plot(t,Inert2)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('2ND Storey')
figure
plot(t,Inert3)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('3RD Storey')
Shear1 = (x1)*K1;
Shear2 = (x1-x2)*K2;
Shear3 = (x1-x3)*K3;
figure
plot(t,Shear1)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('1st Storey')
figure
plot(t,Shear2)
ylabel('Shear Force [N]'), grid on
[30]
xlabel('time [s]')
title('2ND Storey')
figure
plot(t,Shear3)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('3RD Storey')
z1 = abs(fft(x1));
z2 = abs(fft(x2));
z3 = abs(fft(x3));
figure
plot(f,z3),axis([0 10 0 3.5e-4])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency [Hertz]')
title('3rd Storey freq')
figure
plot(f,z1),axis([0 10 0 1.5e-4])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency [Hertz]')
title('1st Storey freq')
figure
plot(f,z2),axis([0 10 0 1.5e-4])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency [Hertz]')
title('2nd Storey freq')
[31]
Question 5 -
m1 = 500e3
m2 = 500e3
m3 = 500e3 %m1, m2,m3 in Ns^2/m
k1 = 1.26e8
k2 = 8.41e7
k3 = 4.20e7 %k1,k2,k3 in N/m
c1 = 4.2657e5
c2 = 2.8438e5
c3 = 4.219e5
T2 = t(i) + h;
X2 = Xrk(:,i) + Y1*h;
Y2 = Yrk(:,i) + F1*h;
rk2=[0,0,12000*sin(5.62*T2)]';
F2 = D*(rk2-K*X2- C*Y2);
T3 = t(i) + h;
X3 = Xrk(:,i) + Y2*h;
[32]
Y3 = Yrk(:,i) + F2*h;
rk3=[0,0,12000*sin(5.62*T3)]';
F3 = D*(rk3-K*X3- C*Y3);
T4 = t(i) + Tao ;
X4 = Xrk(:,i) + Y3*h;
Y4 = Yrk(:,i) + F3*h;
rk4=[0,0,12000*sin(5.62*T4)]';
F4 = D*(rk4-K*X4- C*Y4);
% Displacement
figure
plot(t,Xrk(1,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Xrk(2,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
plot(t,Xrk(3,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('Third Floor')
Inert1 = 0-((k1+k2)*x1)+(k2*x2)-((c1+c2)*y1)+(c2*y2);
[33]
Inert2 = 0+(k2*x1)-((k2+k3)*x2)+(k3*x3)+(c2*y1)-((c2+c3)*y2)+(c3*y3);
Inert3 = 12000*sin(5.62*t(i))+(k3*x2)-(c3*x3)+(c3*y2)-(c3*y3);
figure
plot(t,Inert1)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Inert2)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
plot(t,Inert3)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('Third Floor')
Shear1 = (x1)*k1;
Shear2 = (x1-x2)*k2;
Shear3 = (x2-x3)*k3;
figure
plot(t,Shear1)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Shear2)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
plot(t,Shear3)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('Third Floor')
[34]
% Fourier Transform
z1 = abs(fft(x1));
z2 = abs(fft(x2));
z3 = abs(fft(x3));
figure
plot(f,z3),axis([0 10 0 8])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency in Hertz')
title('Third Floor')
figure
plot(f,z1),axis([0 10 0 8])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency in Hertz')
title('First Floor')
figure
plot(f,z2),axis([0 10 0 8])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency in Hertz')
title('Second Floor')
[35]
Question 6 - ELC
clear
fid=fopen('c:\ELC.dat');
[a,n2]=fscanf(fid,'%e',[2,inf]);
n1=length(a);
for j=1:n1
t(j)=a(1,j);
aa(j)=a(2,j);
end
fclose(fid);
g=9.81; %m/s2
m1 = 500e3
m2 = 500e3
m3 = 500e3 %m1, m2,m3 in Ns^2/m
k1 = 1.26e8
k2 = 8.41e7
k3 = 4.20e7 %k1,k2,k3 in N/m
c1 = 4.2657e5
c2 = 2.8438e5
c3 = 4.219e5
[36]
Y1 = Yrk(:,i);
if t<=8
rk1=-g*aa(j)*[m1;m2;m3];
else
rk1=[0;0;0];
end
F1 = D*(rk1-K*X1- C*Y1);
T2 = t(i) + h;
X2 = Xrk(:,i) + Y1*h;
Y2 = Yrk(:,i) + F1*h;
if t<=8
rk2=-g*aa(j)*[m1;m2;m3];
else
rk2=[0;0;0];
end
F2 = D*(rk2-K*X2- C*Y2);
T3 = t(i) + h;
X3 = Xrk(:,i) + Y2*h;
Y3 = Yrk(:,i) + F2*h;
if t<=8
rk3=-g*aa(j)*[m1;m2;m3];
else
rk3=[0;0;0];
end
F3 = D*(rk3-K*X3- C*Y3);
T4 = t(i) + Tao ;
X4 = Xrk(:,i) + Y3*h;
Y4 = Yrk(:,i) + F3*h;
if t<=8
rk4=-g*aa(j)*[m1;m2;m3];
else
rk4=[0;0;0];
end
F4 = D*(rk4-K*X4- C*Y4);
[37]
f(i+1)=(i-1)*(1/Tao)/N;
end
% Displacement
figure
plot(t,Xrk(1,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Xrk(2,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
plot(t,Xrk(3,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('Third Floor')
Inert1 = (-g*aa(j)*m1)-((k1+k2)*x1)+(k2*x2)-((c1+c2)*y1)+(c2*y2);
Inert2 = (-g*aa(j)*m2)+(k2*x1)-((k2+k3)*x2)+(k3*x3)+(c2*y1)-((c2+c3)*y2)+(c3*y3);
Inert3 = (-g*aa(j)*m3)+(k3*x2)-(c3*x3)+(c3*y2)-(c3*y3);
figure
plot(t,Inert1)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Inert2)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
[38]
plot(t,Inert3)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('Third Floor')
Shear1 = (x1)*k1;
Shear2 = (x1-x2)*k2;
Shear3 = (x2-x3)*k3;
figure
plot(t,Shear1)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Shear2)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
plot(t,Shear3)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('Third Floor')
% Fourier Transform
z1 = abs(fft(x1));
z2 = abs(fft(x2));
z3 = abs(fft(x3));
figure
plot(f,z3),axis([0 4 0 8])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency in Hertz')
title('Third Floor')
figure
plot(f,z1),axis([0 4 0 5])
ylabel('Abs. Magnitude'), grid on
[39]
xlabel('Frequency in Hertz')
title('First Floor')
figure
plot(f,z2),axis([0 4 0 5])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency in Hertz')
title('Second Floor')
[40]
Question 7
m1 = 500e3
m2 = 500e3
m3 = 500e3 %m1, m2,m3 in Ns^2/m
k1 = 1.26e8
k2 = 8.41e7
k3 = 4.20e7 %k1,k2,k3 in N/m
c1 = 4.2657e5
c2 = 2.8438e5
c3 = 4.219e5
T2 = t(i) + h;
X2 = Xrk(:,i) + Y1*h;
Y2 = Yrk(:,i) + F1*h;
rk2=[0,0,2000*exp(-5*T2)]';
F2 = D*(rk2-K*X2- C*Y2);
T3 = t(i) + h;
X3 = Xrk(:,i) + Y2*h;
[41]
Y3 = Yrk(:,i) + F2*h;
rk3=[0,0,2000*exp(-5*T3)]';
F3 = D*(rk3-K*X3- C*Y3);
T4 = t(i) + Tao ;
X4 = Xrk(:,i) + Y3*h;
Y4 = Yrk(:,i) + F3*h;
rk4=[0,0,2000*exp(-5*T4)]';
F4 = D*(rk4-K*X4- C*Y4);
% Displacement
figure
plot(t,Xrk(1,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Xrk(2,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
plot(t,Xrk(3,:))
ylabel('Displacement [m]'), grid on
xlabel('time [s]')
title('Third Floor')
Inert1 = 0-((k1+k2)*x1)+(k2*x2)-((c1+c2)*y1)+(c2*y2);
[42]
Inert2 = 0+(k2*x1)-((k2+k3)*x2)+(k3*x3)+(c2*y1)-((c2+c3)*y2)+(c3*y3);
Inert3 = 2000*exp(-5*t(i))+(k3*x2)-(c3*x3)+(c3*y2)-(c3*y3);
figure
plot(t,Inert1)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Inert2)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
plot(t,Inert3)
ylabel('Inertia Force [N]'), grid on
xlabel('time [s]')
title('Third Floor')
Shear1 = (x1)*k1;
Shear2 = (x1-x2)*k2;
Shear3 = (x2-x3)*k3;
figure
plot(t,Shear1)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('First Floor')
figure
plot(t,Shear2)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('Second Floor')
figure
plot(t,Shear3)
ylabel('Shear Force [N]'), grid on
xlabel('time [s]')
title('Third Floor')
[43]
% Fourier Transform
z1 = abs(fft(x1));
z2 = abs(fft(x2));
z3 = abs(fft(x3));
figure
plot(f,z3),axis([0 10 0 0.05])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency in Hertz')
title('Third Floor')
figure
plot(f,z1),axis([0 10 0 0.05])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency in Hertz')
title('First Floor')
figure
plot(f,z2),axis([0 10 0 0.05])
ylabel('Abs. Magnitude'), grid on
xlabel('Frequency in Hertz')
title('Second Floor')
[44]