Upload
zerbin-gis
View
214
Download
4
Embed Size (px)
DESCRIPTION
UCSD MAE 150 Homework Assignment Number 6
Citation preview
Problem 1)a) Moment of inertia about neutral axis for each beam cross-section
I1 =
0.0013m4
I2 =
0.0064m4
I3 =
1.3333e-04m4
b)Individual Stiffness matrices:K1 for elements 1-6, K2 for 7-12, and K3 for 13-18
K1 = 1.0e+08 * 3.9391 3.9391 -3.9391 3.9391 3.9391 5.2522 -3.9391 2.6261 -3.9391 -3.9391 3.9391 -3.9391 3.9391 2.6261 -3.9391 5.2522
K2 = 1.0e+09 * 2.0039 2.0039 -2.0039 2.0039 2.0039 2.6719 -2.0039 1.3360 -2.0039 -2.0039 2.0039 -2.0039 2.0039 1.3360 -2.0039 2.6719
K3 = 1.0e+07 * 4.2000 4.2000 -4.2000 4.2000 4.2000 5.6000 -4.2000 2.8000 -4.2000 -4.2000 4.2000 -4.2000 4.2000 2.8000 -4.2000 5.6000
Diagonal terms of global stiffness matrix:
*The global stiffness matrix I created is a 36x36 matrix, since the first two rows and columns were deleted to satisfy the B.C. u1=0 & u2=0 since clamped to the wall. I used sub2ind to extract the diagonals of the global stiffness matrix into a vector as seen below
1.0e+09 *
0.7878 1.0504 0.7878 1.0504 0.7878 1.0504 0.7878 1.0504 0.7878 1.0504 2.3979 3.1971 4.0079 5.3438 4.0079 5.3438 4.0079 5.3438 4.0079 5.3438 4.0079 5.3438 2.0459 2.7279 0.0840 0.1120 0.0840 0.1120 0.0840 0.1120 0.0840 0.1120 0.0840 0.1120 0.0420 0.0560
c)
*Displacement vector is a 38x1 vector, since I include that displacement at node 1 is 0m,0°
Displacement =
0.0000m 0.0000° 0.0000m 0.0000°
0.0001m 0.0001° 0.0003m 0.0001° 0.0005m 0.0001° 0.0008m 0.0002° 0.0012m 0.0002° 0.0016m 0.0002° 0.0019m 0.0002° 0.0023m 0.0002° 0.0027m 0.0002° 0.0031m 0.0002° 0.0035m 0.0002° 0.0040m 0.0003° 0.0046m 0.0003° 0.0053m 0.0003° 0.0060m 0.0004° 0.0067m 0.0004° 0.0074m 0.0004°
d)
Load =
0 0 0 0 0 0 0 0
0 0 -45N 0 0 0 0 0 0 0 0 0 0 0 15N 0 30N 0 30N 0 30N 0 30N 0 30N 0 15N 0
e)
Length of rod in meters0 5 10 15 20 25 30 35 40
Verti
cal D
ispl
acem
ent i
n m
eter
s10-3
-8
-7
-6
-5
-4
-3
-2
-1
0Problem 1E
f)
Length of rod in meters0 5 10 15 20 25 30 35 40
Rot
atio
n A
ngle
10-4
0
0.5
1
1.5
2
2.5
3
3.5
4Problem 1F
Problem 2)
Will use {[M]-1[K]- ω2[I]}x=0
Where eignenvalues can be found usingDet|[M]-1[K]- ω2[I]|=0
a)Diagonal terms of global stiffness matrix:
1.0e+07 *
1.2558 1.2558 2.8395 1.9118 2.5115 2.5115 2.1835 1.2558 1.2558 1.2558 1.2558 1.2558 2.5115 1.5838 2.1835 1.2558 2.5115 1.5838 0.9278 0.9278 0.6560 1.5838
b)
Diagonal terms of Global mass matrix
Mv =
0.5935 0 1.2591 0 1.1871 0 0.7674 0
0.5935 0 0.5935 0 1.0132 0 0.7674 0 1.0132 0 0.3477 0 0.6655 0
c)
eig(M*K)
1.0e+07 *
4.8257 3.3427 2.8705 2.6679 1.5355 1.0919 -0.0000 0.2064 0.6424 0.3244 0.4851 0 0 0 0 0 0 0 0 0 0 0
Problem 3)
MATLAB Code:
%Problem 1 %PART A Moments I1,I2,I3I1=(.35^4)/12I2=(pi*.3^4)/4I3=(.2^4)/12 %PART BLLL=36;LL=LLL/3;L=LL/6;E=210*10^9;Q=15;F=-45; %K1 is the individual stiffness matrix for elements 1-6, K2 is for elements%7-12, and K3 is for elements 13-18
K1=[12*E*I1/(L^3),6*E*I1/(L^2),-12*E*I1/(L^3),6*E*I1/(L^2);6*E*I1/(L^2),4*E*I1/(L),-6*E*I1/(L^2),2*E*I1/(L);-12*E*I1/(L^3),-6*E*I1/(L^2),12*E*I1/(L^3),-6*E*I1/(L^2);6*E*I1/(L^2),2*E*I1/(L),-6*E*I1/(L^2),4*E*I1/(L)]
K2=[12*E*I2/(L^3),6*E*I2/(L^2),-12*E*I2/(L^3),6*E*I2/(L^2);6*E*I2/(L^2),4*E*I2/(L),-6*E*I2/(L^2),2*E*I2/(L);-12*E*I2/(L^3),-6*E*I2/(L^2),12*E*I2/(L^3),-6*E*I2/(L^2);6*E*I2/(L^2),2*E*I2/(L),-6*E*I2/(L^2),4*E*I2/(L)]
K3=[12*E*I3/(L^3),6*E*I3/(L^2),-12*E*I3/(L^3),6*E*I3/(L^2);6*E*I3/(L^2),4*E*I3/(L),-6*E*I3/(L^2),2*E*I3/(L);-12*E*I3/(L^3),-6*E*I3/(L^2),12*E*I3/(L^3),-6*E*I3/(L^2);6*E*I3/(L^2),2*E*I3/(L),-6*E*I3/(L^2),4*E*I3/(L)] N=38 **To save paper, I will only show how I created stiffness matrices 3, 9, and 15. The same for loop was used for all 18 stiffness matrixes
B3=zeros(N,N);for i=1:4 for j=1:4 B3(i+4,j+4)=K1(i,j); endend B9=zeros(N,N);for i=1:4 for j=1:4 B9(i+16,j+16)=K2(i,j); endend B15=zeros(N,N);for i=1:4 for j=1:4 B15(i+28,j+28)=K3(i,j); endend K=B1+B2+B3+B4+B5+B6+B7+B8+B9+B10+B11+B12+B13+B14+B15+B16+B17+B18; %B.C. u1=0, u2=0 since clamped to wall K(1,:)=[];K(:,1)=[];K(1,:)=[];K(:,1)=[]; %Used sub2ind to find diagonals of the matrix K Koko=K(sub2ind(size(K),1:size(K,1),1:size(K,2)))'
%Part C Load=[0,0,0,0,0,0,0,0,0,0,F,0,0,0,0,0,0,0,0,0,0,0,Q*LL/12,0,Q*LL/6,0,Q*LL/6,0,Q*LL/6,0,Q*LL/6,0,Q*LL/6,0,Q*LL/12,0]'Ki=inv(K);Displacement=Ki*Load %Part D Beam=[0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36];for i = 1:18 vert(i)=-Displacement((2*i)-1);endvert1=[0,vert]; for i = 1:18 rot(i)=Displacement(2*i);endrot1=[0,rot];
%Part E
plot(Beam,vert1)ylabel('Vertical Displacement in meters')xlabel('Length of rod in meters')title('Problem 1E')
%Part F
plot(Beam,rot1)ylabel('Rotation Angle')xlabel('Length of rod in meters')title('Problem 1E')
%Problem 2 E=210*10^9;d=0.0075;A=pi*((d/2)^2);p=7870;L1=1;L2=sqrt(2); %Mass of horizontal & vertical beams m1m1=p*L1*A %Mass of diagonal beams m2m2=p*L2*A %PART A%theta=0K1=(A*E/L1)*[1,0,-1,0;0,0,0,0;-1,0,1,0;0,0,0,0];%theta=90K2=(A*E/L1)*[0,0,0,0;0,1,0,-1;0,0,0,0;0,-1,0,1];
s=((sqrt(2))/2)^2;%theta=45K3=(A*E/L2)*[s,s,-s,-s;s,s,-s,-s;-s,-s,s,s;-s,-s,s,s];%theta=135K4=(A*E/L2)*[s,-s,-s,s;-s,s,s,-s;-s,s,s,-s;s,-s,-s,s];**To save paper, I will only show how I created stiffness matrices 3, 9, and 22. The same for types of loops were used for all 22 stiffness matrices N=22 B3=zeros(N,N);for i=1:4 for j=1:4 B3(i+4,j+4)=K1(i,j); endend B9=zeros(N,N)for i=1:2 for j=1:2 B9(i,j)=K2(i,j); endend for i=1:2 for j=3:4 B9(i,j+8)=K2(i,j); endend for i=3:4 for j=1:2 B9(i+8,j)=K2(i,j); endend for i=3:4 for j=3:4 B9(i+8,j+8)=K2(i,j); endend B22=zeros(N,N)for i=1:2 for j=1:2 B22(i+6,j+6)=K4(i,j); endend for i=1:2 for j=3:4 B22(i+6,j+18)=K4(i,j); endend
for i=3:4 for j=1:2 B22(i+18,j+6)=K4(i,j); endend for i=3:4 for j=3:4 B22(i+18,j+18)=K4(i,j); endend KK=B1+B2+B3+B4+B5+B6+B7+B8+B9+B10+B11+B12+B13+B14+B15+B16+B17+B18+B19+B20+B21+B22 Koko=KK(sub2ind(size(KK),1:size(KK,1),1:size(KK,2)))' %PART Bmm1=m1/2;mm2=m2/2;massvec=[(2*mm1)+mm2,0,(3*mm1)+(3*mm2),0,(4*mm1)+(2*mm2),0,(3*mm1)+mm2,0,(2*mm1)+mm2,0,(2*mm1)+mm2,0,(3*mm1)+(2*mm2),0,(3*mm1)+mm2,0,(3*mm1)+(2*mm2),0,2*mm1,0,mm1+2*mm2,0]; M=diag(massvec);Mv=massvec' %PART C
MinvK=M*KKeig(MinvK)