University of Florida/Eml4507/s13.team4ever.Wulterkens.R6.4
Appearance
Problem 6.4 Deformation in 3D Space
On my honor, I have neither given nor received unauthorized aid in doing this assignment.
Problem Statement
[edit | edit source]There is a 3D truss system with applied forces. We need to optimize each beam to meet a factor of safety of 1.5.
Matlab Solution
[edit | edit source]Set up degrees of freedom and coordinates
[edit | edit source]%Constants
E = 30000000; %Youngs Modulus
L1 = 3; %Short lengths
L2 = 8; %Long lengths
v = 0.3; %poissons ratio
YS = 37000; %Yield Strength
p = 0.00073; %density
FS = 1.5; %Factor of Safety
%coordinates
pos = zeros(3,10);
pos(:,1) = [-L1/2;0;8];
pos(:,2) = [L1/2;0;8];
pos(:,3) = [-L1/2;L1/2;4];
pos(:,4) = [L1/2;L1/2;4];
pos(:,5) = [L1/2;-L1/2;4];
pos(:,6) = [-L1/2;-L1/2;4];
pos(:,7) = [-L2/2;L2/2;0];
pos(:,8) = [L2/2;L2/2;0];
pos(:,9) = [L2/2;-L2/2;0];
pos(:,10) = [-L2/2;-L2/2;0];
%Connections
conn = zeros(2,25);
conn(:,1) = [1;2];
conn(:,2) = [1;4];
conn(:,3) = [2;3];
conn(:,4) = [1;5];
conn(:,5) = [2;6];
conn(:,6) = [2;4];
conn(:,7) = [2;5];
conn(:,8) = [1;3];
conn(:,9) = [1;6];
conn(:,10) = [3;6];
conn(:,11) = [4;5];
conn(:,12) = [3;4];
conn(:,13) = [5;6];
conn(:,14) = [3;10];
conn(:,15) = [6;7];
conn(:,16) = [4;9];
conn(:,17) = [5;8];
conn(:,18) = [4;7];
conn(:,19) = [3;8];
conn(:,20) = [5;10];
conn(:,21) = [6;9];
conn(:,22) = [6;10];
conn(:,23) = [3;7];
conn(:,24) = [4;8];
conn(:,25) = [5;9];
%Degree of Freedom
dof = zeros(25,7);
D = zeros(10,3);
%assign nodes degree of freedoms
for i = 1:10
j = (i-1)*2+i;
D(i,:) = [j,j+1,j+2];
end
%Assign members their DOF's
for i = 1:25
dof(i,:) = [i,D(conn(1,i)',:),D(conn(2,i)',:)];
end
%seperates into x and y coordinates
x = zeros(25,2);
y = zeros(25,2);
z = zeros(25,2);
for i = 1:25
x(i,:) = [pos(1,conn(1,i)),pos(1,conn(2,i))];
y(i,:) = [pos(2,conn(1,i)),pos(2,conn(2,i))];
z(i,:) = [pos(3,conn(1,i)),pos(3,conn(2,i))];
end
Set up K matrix to be used for calculations
[edit | edit source]%Set up K and M matrix
K = zeros(30);
M = zeros(30);
A = zeros(25,1);
for i = 1:25
A(i) = pi()*(2/2)^2; %Area of all members
end
for i = 1:25
xm = x(i,2)-x(i,1);
ym = y(i,2)-y(i,1);
zm = z(i,2)-z(i,1);
L = sqrt(xm^2+ym^2+zm^2);
l = xm/L;
m = ym/L;
n = zm/L;
k = E*A(i)/L*[l^2 l*m l*n -l^2 -l*m -l*n;l*m m^2 m*n -l*m -m^2 -m*n;l*n m*n n^2 -l*n -m*n -n^2;-l^2 -l*m -l*n l^2 l*m l*n;-l*m -m^2 -m*n l*m m^2 m*n;-l*n -m*n -n^2 l*n m*n n^2];
m = L*A(i)*p;
m = [m/2 0 0 0 0 0;0 m/2 0 0 0 0;0 0 m/2 0 0 0;0 0 0 m/2 0 0;0 0 0 0 m/2 0;0 0 0 0 0 m/2];
Dof = dof(i,2:7);
K(Dof,Dof) = K(Dof,Dof)+k;
M(Dof,Dof) = M(Dof,Dof)+m;
end
Reduce matrices and make initial conditions
[edit | edit source]%Makes an alternate K and M matrix to calncel rows and columns for boundary
%conditions.
Kr = K;
Mr = M;
Kr((19:30),:) = [];
Kr(:,(19:30)) = [];
Mr((19:30),:) = [];
Mr(:,(19:30)) = [];
%Applied Forces
F = zeros(18,1);
F(2) = 60000;
F(5) = 60000;
Determine the deformation of each DOF
[edit | edit source]d = Kr\F;
d = [d;zeros(12,1)];
Set up new coordinates and determine stress and strain
[edit | edit source]posn = zeros(3,10);
%new position vectors
for i = 1:10
j = i*3;
posn(1,i) = pos(1,i) + d(j-2);
posn(2,i) = pos(2,i) + d(j-1);
posn(3,i) = pos(3,i) + d(j);
end
xn = zeros(25,2);
yn = zeros(25,2);
zn = zeros(25,2);
%Put in new coordinates
for i = 1:25
xn(i,:) = [posn(1,conn(1,i)),posn(1,conn(2,i))];
yn(i,:) = [posn(2,conn(1,i)),posn(2,conn(2,i))];
zn(i,:) = [posn(3,conn(1,i)),posn(3,conn(2,i))];
end
%Finding stress and FOS
e = zeros(25,1);
o = zeros(25,1);
for i = 1:25
xm = x(i,2)-x(i,1);
ym = y(i,2)-y(i,1);
zm = z(i,2)-z(i,1);
L = sqrt(xm^2+ym^2+zm^2);
xl = xn(i,2)-xn(i,1);
yl = yn(i,2)-yn(i,1);
zl = zn(i,2)-zn(i,1);
Ll = sqrt(xl^2+yl^2+zl^2);
e(i) = (Ll-L)/L; %Strain
o(i) = e(i)*E; %Stress
end
Determine factor of safety and reduce area
[edit | edit source]FOS = zeros(25,1);
on = 1.5*YS;
for i = 1:25
A(i) = A(i)*abs(o(i))/on;
FOS(i) = YS/abs(o(i));
if A(i) <= pi()*(0.1/2)^2
A(i) = pi()*(0.1/2)^2;
elseif A(i) >= pi()*(2.5/2)^2
A(i) = pi()*(2.5/2)^2;
end
end
Conclusion
[edit | edit source]The final area of each member was able to be reduced to its minimum of 0.1 inches and stay above a factor of safety of 1.5. Final stresses are in psi:
- 13.94
- -8487.15
- -8487.15
- 8611.63
- 8611.63
- -12871.54
- 13045.99
- -12871.54
- 13045.99
- 63.42
- 63.42
- 788.95
- -778.48
- -5171.02
- 5174.49
- -5171.02
- 5174.49
- -7787.74
- -7787.74
- 7792.39
- 7792.39
- 14680.46
- -14679.76
- -14679.76
- 14680.46