Вы находитесь на странице: 1из 23

ME-5311

STRUCTURAL DYNAMICS
FINAL EXAMINATION
DATE OF SUBMISSION: 05/11/2016

HIMASNHU JAISWAL
UTA ID 1001276798
CLASS ID 29
MECHANICAL ENGINEERING
SPRING 2016

PROBLEM 1:
%% DATA INPUT
CID=29;
M1=2;M1=1;
%% FINDING K1 and K2 to maximize the Eigen value
for i=1:(300*CID-1)
K1=i;
K2=300*CID-i;
M=diag([M1 M1]);
K=[K1+K2 -K2;-K2 K2];
[phi,Lamb]=eig(K,M);
Lambda(i)=Lamb(1,1);
end
%% Plot of K1 & K2
j=1:1:(300*CID-1);
K1=j;K2=300*CID-j;
figure,
plot(Lambda,K1,'g','linewidth',2);
hold on
plot(Lambda,K2,'r','linewidth',2);
hold on
grid on
xlabel('\bfEigenvalue');
ylabel('\bfK1 & K2 in (N/m)');
title('\bfEigenvalue vs K1 K2 plot');
%% Max Eigenvalue and corresponding Eigenvectors
[Max_Eigenvalue,Loc]=findpeaks(Lambda)
plot(Max_Eigenvalue,K1,'b','linewidth',2);
legend('\bfK1','\bfK2');
K1=K1(Loc)
K2=K2(Loc)
M=diag([M1 M1])
K=[K1+K2 -K2;
-K2 K2]
[Eigenvector,Eigenvalue]=eig(K,M)
Wn1_Max=sqrt(Eigenvalue(1,1))
%5 Normalization of Eigenvectors
Phi1_Max=Eigenvector(:,1)/max(Eigenvector(:,1))

OUTPUT 1

Max_Eigenvalue =
1450
Loc =
5800
K1 =
5800
K2 =
2900
M=
2
0
1 1
2
K=
8700
-2900

-2900
2900

Eigenvector =
-0.4082 -0.5774
-0.8165 0.5774
Eigenvalue =
1.0e+03 *
1.4500
0
0 5.8000
Wn1_Max =
38.0789
Phi1_Max =
1.0000
2.0000

PROBLEM 2:
% Given Data
CID=29;
m1=2;m2=1;
k1=1000+10*CID;
k2=500+5*CID;A=400;
% Stiffness, Mass &

Force Matrix calculation

K=[k1+k2 -k2;-k2 k2];F=[A;0];


M=diag([m1 m2]);
%% Calculation of Mode Shapes and Natural Frequency
[Phi,Lam]=eig(K,M);
Wn1=sqrt(Lam(1,1));Wn2=sqrt(Lam(2,2));
Gmr=Phi'*M*Phi;
Gkr=Phi'*K*Phi;
Gfr=Phi'*F;
%% Plotting Response for Time Domain Solutins for (t<=T0);
W1=Wn1;
T0=pi/W1;
syms t
Q10=(Gfr(1)/2/Gkr(1,1))*(sin(Wn1*t)-Wn1*t.*cos(Wn1*t));
Q20=(Gfr(2)/(Gkr(2,2)-Gmr(2,2)*W1.^2))*(sin(W1*t)-(W1/Wn2)*sin(Wn2*t));
U1t=Phi(1,1)*Q10+Phi(1,2)*Q20;
U2t=Phi(2,1)*Q10+Phi(2,2)*Q20;
t1=linspace(0,T0,200);
figure,
plot(t1,subs(U1t,t,t1),'r','linewidth',2);
hold on
plot(t1,subs(U2t,t,t1),'k','linewidth',2);
hold on
%% Plotting Response for Time Domain Solutions T0 to 4*T0
q0=[subs(Q10,t,T0);subs(Q20,t,T0)];
V1=diff(Q10,t);
V2=diff(Q20,t);
qv0=[subs(V1,t,T0);subs(V2,t,T0)];
Q1f=q0(1)*cos(Wn1*(t-T0))+(qv0(1)/Wn1)*sin(Wn1*(t-T0));
Q2f=q0(2)*cos(Wn2*(t-T0))+(qv0(2)/Wn2)*sin(Wn2*(t-T0));
U1f=Phi(1,1)*Q1f+Phi(1,2)*Q2f;
U2f=Phi(2,1)*Q1f+Phi(2,2)*Q2f;
t2=linspace(T0,4*T0,200);
plot(t2,subs(U1f,t,t2),'g','linewidth',3);
hold on
plot(t2,subs(U2f,t,t2),'b--','linewidth',2);
grid on
title('\bfTime Domain Response Plot');
xlabel('\bfTime');

ylabel('\bfResponse');
legend('\bfU1 at t<=T0','\bfU2 at t<=T0','\bfU1 at t>T0','\bfU2 at t>T0');

PROBLEM 3:
%%Problem 3)
clear all
close all
clc
%Data
CID=29;
m1=1000;m2=500;L1=2.5;L2=2.5;J1=2*m1*L1^2/12;J2=2*m2*L2^2/12;
k1=50000-100*1*CID;k2=50000-100*2*CID;k3=50000-100*3*CID;k4=50000100*4*CID;
%Mass and Stiffness Matrix
M=diag([m1 J1 m2 J2]);
Tk1=[1 -L1 0 0];
Tk2=[1 L1 0 0];
Tk3=[-1 L1 1 -L2];
Tk4=[-1 -L1 1 L2];
K=k1*Tk1'*Tk1+k2*Tk2'*Tk2+k3*Tk3'*Tk3+k4*Tk4'*Tk4;
%Eigenvalue,Eigenvectors and Natural Frequencies
[Phi,Lamb]=eig(K,M)
Wn1=sqrt(Lamb(1,1))
Wn2=sqrt(Lamb(2,2))
Wn3=sqrt(Lamb(3,3))
Wn4=sqrt(Lamb(4,4))
Phi1_Max=Phi(:,1)/max(Phi(:,1))
Phi2_Max=Phi(:,2)/max(Phi(:,2))
Phi3_Max=Phi(:,3)/max(Phi(:,3))
Phi4_Max=Phi(:,4)/max(Phi(:,4))
%Plot 4th Mode
plot(Phi4_Max);

OUTPUT

Phi =
-0.0218
0.0229
-0.0003
0.0001
-0.0324
-0.0308
-0.0005
-0.0010
Lamb =
1.0e+03 *
0.0523
0
0
0.2776
0
0
0
0
Wn1 =
7.2299
Wn2 =
16.6623
Wn3 =
17.7229
Wn4 =
40.8509
Phi1_Max =
65.3759
1.0000
97.3493
1.5501
Phi2_Max =
1.0000
0.0039
-1.3425
-0.0425
Phi3_Max =
-0.0007
0.6720
-0.0300
1.0000
Phi4_Max =
0.0130
-0.7444
-0.0181
1.0000

-0.0000
0.0213
-0.0010
0.0318

0.0004
-0.0225
-0.0005
0.0302

0
0
0.3141
0

0
0
0
1.6688

PROBLEM 4:
% Structual Dynamics Take Home Problem 4
%Class ID input
cid=29;
% K Matrix
k1=1000+(10*cid);k2=500+(5*cid);k3=200+(10*cid);k4=100+(5*cid);
K=[k1+k2 -k2 0 0;-k2 k2+k3 -k3 0;0 -k3 k3+k4 -k4;0 0 -k4 k4];
%Forced Response Matrix
F=[100;50;40;10];
% Mass Matrix
M=diag([10 5 4 1]);
%Eigen Value And Eigen Vector
[v,d]=eig(K,M);
% Natural Frequency
wn=sqrt(d)
% Generalized Mass Matrix
GM=v'*M*v;
% Generalized K matrix
GK=v'*K*v;
% Generalized Force Matrix
GF=v'*F;
T=2*(pi/wn(1,1))
t=linspace(0,2*T,200);
%% Modal solution
Q1=(-38.8636/30.8644)*(1-cos(5.5556*t));Q2=(20.4984/147.5907)*(1cos(12.1487*t));
Q3=(7.8789/281.9872)*(1-cos(16.7925*t));Q4=(-2.7137/388.8077)*(1cos(19.7182*t));
%q1=(GF(1,1)/GK(1,1))*(1-cos(wn(1,1)); %q2=(GF(2,1)/GK(2,2))*(1cos(wn(2,2));
%q3=(GF(3,1)/GK(3,3))*(1-cos(wn(3,3)); %q4=(GF(4,1)/GK(4,4))*(1cos(wn(4,4));
u1=-0.0930 *Q1+0.2345*Q2+0.1722*Q3-0.0818*Q4;
u2=-0.2345*Q1+0.1669*Q2-0.2363*Q3+0.2477*Q4;
u3=-0.3468*Q1-0.1734*Q2-0.0941*Q3-0.3013*Q4;
u4=-0.3968 *Q1-0.4363*Q2+0.6235*Q3+0.5132*Q4;
T1=2*T;
q1=(-38.8636/30.8644)*(1-cos(5.5556*T1));
q2=(20.4984/147.5907)*(1-cos(12.1487*T1));
q3=(7.8789/281.9872)*(1-cos(16.7925*T1));
q4=(-2.7137/388.8077)*(1-cos(19.7182*T1));
U4 = -0.3968 *q1-0.4363*q2+0.6235*q3+0.5132*q4

%% truncated modal solution


u4_1=-0.3968*Q1; u4_1_2=-0.3968*Q1-0.4363*Q2;
u4_1_2_3=-0.3968*Q1-0.4363*Q2+0.6235*Q3; u4_4=u4;
plot(t,u4_1,'linewidth',2),grid,hold
plot(t,u4_1_2,'linewidth',2)
plot(t,u4_1_2_3,'linewidth',2)
plot(t,u4_4,'linewidth',2)

OUTPUT

wn =
5.5556
0
0
0
T =
1.1310
U4 =
-0.1030

0
12.1487
0
0

0
0
16.7925
0

0
0
0
19.7182

PROBLEM 5:
%% Data
CID=29;
m1=10;m2=5;m3=4;m4=1;
F=[100;50;40;10];
k1=1000+10*CID;
k2=500+5*CID;
k3=200+10*CID;
k4=100+5*CID;
%% Mass and Stiffness Matrix
M=diag([m1 m2 m3 m4]);
K=[k1+k2 -k2 0 0;-k2 k2+k3 -k3 0;0 -k3 k3+k4 -k4;0 0 -k4 k4];
%% Eigenvalue, Eigenvectors and Natural Frequencies
[Phi,Lamb]=eig(K,M);
Wn1=sqrt(Lamb(1,1));
Wn2=sqrt(Lamb(2,2));
Wn3=sqrt(Lamb(3,3));
Wn4=sqrt(Lamb(4,4));
%% Mode Superpostion
Gmr=Phi'*M*Phi;
Gkr=Phi'*K*Phi;
Gfr=Phi'*F;
syms t W
q1=(Gfr(1)/(Gkr(1,1)-Gmr(1,1)*W.^2))*(sin(W*t)-(W/Wn1)*sin(Wn1*t));
q2=(Gfr(2)/(Gkr(2,2)-Gmr(2,2)*W.^2))*(sin(W*t)-(W/Wn2)*sin(Wn2*t));
q3=(Gfr(3)/(Gkr(3,3)-Gmr(3,3)*W.^2))*(sin(W*t)-(W/Wn3)*sin(Wn3*t));
q4=(Gfr(4)/(Gkr(4,4)-Gmr(4,4)*W.^2))*(sin(W*t)-(W/Wn4)*sin(Wn4*t));
q1f=(Gfr(1)/(Gkr(1,1)-Gmr(1,1)*W.^2));
q2f=(Gfr(2)/(Gkr(2,2)-Gmr(2,2)*W.^2));
q3f=(Gfr(3)/(Gkr(3,3)-Gmr(3,3)*W.^2));
q4f=(Gfr(4)/(Gkr(4,4)-Gmr(4,4)*W.^2));
%% Frequnecy Respone of Mass 4
U4=Phi(4,1)*q1f+Phi(4,2)*q2f+Phi(4,3)*q3f+Phi(4,4)*q4f;
w=linspace(0,2*Wn4,500);
U4f=subs(U4,W,w);
U4p=subs(U4,W,(Wn1+Wn2)/2);
P= 8.8521;
U4_F =177124194971752849115680251055/(19807040628566084398385987584*(P^2 5192886318848395/35184372088832)) - 19550324911063113425134547627355/
(1267650600228229401496703205376*(P^2 - 8687567524788319/281474976710656))
- 24910546107428788219909185580077/(5070602400912917605986812821504*(P^2 1240192623755463/4398046511104)) + 7062027829783276736861513777279/
(5070602400912917605986812821504*(P^2 - 6839977373474969/17592186044416));
%% Plot Frequency Response for Mass 4
figure,
semilogy(w,abs(U4f),'b','linewidth',2);
hold on
semilogy((Wn1+Wn2)/2,abs(U4p),'ro','linewidth',2);
xlabel('\bfOmega');
ylabel('\bfResponse');
title('\bfFrequnecy Response of u4(w)');

legend('\bfu4(w)','\bf(Wn1+Wn2)/2');
grid on
OUTPUT
U4_F =
-0.4342

PROBLEM 6:
% Class ID input

CID=29;
% Value of K1 & K2
K1=2000+(10*CID);
K2=1500-(5*CID);
% Variable defining distance from CG
c=-2:0.05:4;
%Given Data
j=1000;
m=300;
Wn=sqrt((K2*((4-c).^2)+K1*(2+c).^2)./(j+(300*(c).^2)));
Wn_=real(Wn);
A= max(Wn)
plot(c,Wn_,'r:','linewidth',2),grid,hold
title('\bf C vs Wn')
xlabel('\bf wn')
ylabel('\bf distance from Cg')
grid on
OUTPUT

A =
5.5646

PROBLEM 7:
%% Problem 7)

clear all
close all
clc
%% Data
A=2;E=1e7;Rho=0.1/386.4;
CID=29;
Wn=[]; n=5;
L=100+(5*CID);
F=(A*E)/(L);
%% Mode Function
syms x
i=1:1:n;
Zhi=sin(i*pi*x/L);
%% Mass and Stifness Matrix
Gmr=(int(Rho*A*Zhi'*Zhi,'x',0,L));
Gkr=(int(E*A*(diff(Zhi,x,1))'*diff(Zhi,x,1),'x',0,L));
Zhi_L2=subs(Zhi,x,L/2);
%% Force Matrix
GF=Zhi_L2*F;
%% Natural Frequnecies
for i=1:n
Lambda=i*(pi/L);
Wn(i)=Lambda*sqrt(E/Rho);
end
%% Response @point Q
syms t
t1=2*(pi/Wn(1,1));
tt=linspace(0,3*t1,200);
for i=1:1:n
q(i)=(GF(1,i)/Gkr(i,i))*(1-cos(Wn(1,i)*t));
end
for i=1:1:n
u(i)=Zhi(1,i)*q(1,i) ;
end
U_r=sum(u);
U_r=subs(U_r,t,tt);
U_r=subs(U_r,x,L/4);
%% Plot Response @point Q
figure;
plot(tt,U_r,'b','linewidth',2);
hold on
xlabel('\bfTime');
ylabel('\bfResponse');
title('\bfSolution Mode 5 at Point Q');
grid on

B). SOLUTION PLOT FOR 10 MODES

B). SOLUTION PLOT FOR 20 MODES

PROBLEM 8:
%% Data
A=2;E=1e7;Rho=0.1/386.4;
CID=29;

Wn=[];
n=5;
L=100+(5*11);
F=(A*E)/(L);
%% Mode Function
syms x
i=1:1:n;
Zhi=sin(i*pi*x/L);
%% Mass and Stifness Matrix
Gmr=(int(Rho*A*Zhi'*Zhi,'x',0,L));
Gkr=(int(E*A*(diff(Zhi,x,1))'*diff(Zhi,x,1),'x',0,L));
Zhi_L2=subs(Zhi,x,L/2);
%% Force Matrix
GF=Zhi_L2*F;
%% Natural Frequencies
for i=1:n
Lambda=i*(pi/L);
Wn(i)=sqrt(E/Rho)*Lambda;
end
%% Response @point Q
syms t w
t1=2*(pi/Wn(1,1));
tt=linspace(0,3*t1,200);
for i=1:1:n
q(i)=(GF(1,i)/(Gkr(i,i)-Gmr(i,i)*w^2))*(sin(w*t)(w/Wn(1,i))*sin((Wn(1,i)*t)));
end
for i=1:1:n
u(i)=Zhi(1,i)*q(1,i) ;
end
U_r=sum(u);
U_r=subs(U_r,t,tt);
U_r=subs(U_r,x,L/4);
%% Frequency Respone @point Q
for i=1:1:n
Freq(i)=(GF(1,i)/(Gkr(i,i))).*(1./(1-(w./Wn(1,i)).^2));
end
Freq=sum(Freq);
w1=linspace(0,(Wn(1,5)+2.3905e+04)/2,200); %Wn6=6*pi/L*sqrt(E/Rho)
Freq=subs(Freq,w,w1);
%% Plot Frequency Respone @point Q
figure,
semilogy(w1,abs(Freq),'b','linewidth',2);
xlabel('\bfOmega');
ylabel('\bfResponse');
title('\bfSolution Mode 5 at Point Q');
grid on

Вам также может понравиться