# University of Florida/Eml4507/s13.team4ever.R4
### Problem R4.1

On my honor, I have neither given nor recieved unauthorized aid in doing this assignment.

#### Given:

We are given from Fead.s13.sec53b.djvu that
$K={\begin{bmatrix}3&-2\\-2&5\\\end{bmatrix}}$
$\gamma _{1}=4-{\sqrt {5}}$
$\gamma _{2}=4+{\sqrt {5}}$
and
$X_{1}={\begin{bmatrix}1.618\\1\\\end{bmatrix}}$

#### Solution:

So we need to find an eigenvector such that
${\begin{bmatrix}K-\gamma _{2}*I\\\end{bmatrix}}{\begin{bmatrix}x_{1}\\x_{2}\\\end{bmatrix}}={\begin{bmatrix}0\\0\\\end{bmatrix}}$
${\begin{bmatrix}-1-{\sqrt {5}}&-2\\-2&1-{\sqrt {5}}\\\end{bmatrix}}{\begin{bmatrix}x_{1}\\x_{2}\\\end{bmatrix}}={\begin{bmatrix}0\\0\\\end{bmatrix}}$
Augmenting the right hand matrix onto the left hand matrix and putting this in row reduced echelon form we obtain,
${\begin{bmatrix}1&-0.618&0\\0&0&0\\\end{bmatrix}}$
we may set $x_{2}=1$ and obtain:
$X_{2}={\begin{bmatrix}-0.618\\1\\\end{bmatrix}}$
We will now show that these two eigenvectors are orthogonal by showing that the dot product between the two is zero.
$X_{1}$ ${\dot}$ $X_{2}=(1.618)(-0.618)+(1)(1)=0$
Therefore, they are orthogonal.
The corresponding eigenvalue for this eigenvector isn't the smallest possible eigenvalue which means this isn't a fundamental mode.
The modal shape is plotted below.

### Problem R.4.2
#### Honor Pledge:

On my honor I have neither given nor received unauthorized aid in doing this problem.

#### Problem Description:

We are tasked with finding the eigenvector $x_{1}$ corresponding to the eigenvalue $\lambda _{1}$ for the same system as described in R4.2. We must also plot the mode shapes and compare with those from R4.2. Lastly we are tasked with creating an animation for each mode shape.

#### Given:

from Fead.s13.sec53b(4).djvu:
$K={\begin{bmatrix}3&-2\\-2&5\\\end{bmatrix}}$
$\gamma _{1}=4-{\sqrt {5}}$
$\gamma _{2}=4+{\sqrt {5}}$
and, from R4.1
$X_{2}={\begin{bmatrix}-0.618\\1\\\end{bmatrix}}$

#### Solution:

${\begin{bmatrix}K-\gamma _{1}*I\\\end{bmatrix}}{\begin{bmatrix}x_{1}\\x_{2}\\\end{bmatrix}}={\begin{bmatrix}0\\0\\\end{bmatrix}}$
So,
${\begin{bmatrix}-1+{\sqrt {5}}&-2\\-2&1+{\sqrt {5}}\\\end{bmatrix}}{\begin{bmatrix}x_{1}\\x_{2}\\\end{bmatrix}}={\begin{bmatrix}0\\0\\\end{bmatrix}}$
Combining and reducing to row echelon form. ${\begin{bmatrix}1&-0.618&0\\0&0&0\\\end{bmatrix}}$
we may set $x_{1}=1$ and obtain:
$X_{1}={\begin{bmatrix}1\\1.618\\\end{bmatrix}}$
Proving that they are orthogonal by ensuring the dot product between the two is zero: $X_{1}$ ${\dot}$ $X_{2}=(1)(-0.618)+(1)(1.618)=0$
The eigenvalue corresponding to this eigenvector is the smallest possible and there this must be a fundamental mode.
Mode shape plotted in picture below. Picture is adapted from Fead.s13.sec53b(4).djvu p.53-16.

## Problem R4.3: Post processing of member forces and reactions p.11-3 (fead.f08.mtgs.[10-18])

On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

### Given: Two member system with initial force P

Consider a 2 member system with an applied force. The displacements are assumed to be known. This allows for the post processing for the reactions both globally and for the members.

### Solution: Post process for member forces and reactions

Both methods first require the displacements which are assumed as given since we are post processing for the member forces.
This is the general stiffness matrix for a two bar system as given.
${\vec {K}}={\begin{bmatrix}&1&2&3&4&5&6\\1&(l^{(1)})^{2}*K^{(1)}&l^{(1)}m^{(1)}*K^{(1)}&-(l^{(1)})^{2}*K^{(1)}&-l^{(1)}m^{(1)}*K^{(1)}&0&0\\2&l^{(1)}m^{(1)}*K^{(1)}&(m^{(1)})^{2}*K^{(1)}&-l^{(1)}m^{(1)}*K^{(1)}&-(m^{(1)})^{2}*K^{(1)}&0&0\\3&-(l^{(1)})^{2}*K^{(1)}&-l^{(1)}m^{(1)}*K^{(1)}&(l^{(1)})^{2}*K^{(1)}+(l^{(2)})^{2}*K^{(2)}&l^{(1)}m^{(1)}*K^{(1)}+l^{(2)}m^{(2)}*K^{(2)}&-(l^{(2)})^{2}*K^{(2)}&-l^{(2)}m^{(2)}*K^{(2)}\\4&-l^{(1)}m^{(1)}*K^{(1)}&-(m^{(1)})^{2}*K^{(1)}&l^{(1)}m^{(1)}*K^{(1)}+l^{(2)}m^{(2)}*K^{(2)}&(m^{(1)})^{2}*K^{(1)}+(m^{(2)})^{2}*K^{(2)}&-(l^{(2)})^{2}*K^{(2)}&-l^{(2)}m^{(2)}*K^{(2)}\\5&0&0&-(l^{(2)})^{2}*K^{(2)}&-l^{(2)}m^{(2)}*K^{(2)}&(l^{(2)})^{2}*K^{(2)}&l^{(2)}m^{(2)}*K^{(2)}\\6&0&0&-l^{(2)}m^{(2)}*K^{(2)}&-(m^{(2)})^{2}*K^{(2)}&l^{(2)}m^{(2)}*K^{(2)}&(m^{(2)})^{2}*K^{(2)}\\\end{bmatrix}}$
The first two columns and the last two columns are struck out due to fixed positions of nodes 1 and 3. Since we are post processing for the reactions forces and member forces, we know the displacements at node 2. These displacements are used along with the global stiffness matrix to solve for the reaction forces. The reaction forces will be parallel to the members since the truss elements are two force members.
${\begin{Bmatrix}F_{1x}\\F_{1y}\\F_{3x}\\F_{3y}\end{Bmatrix}}={\begin{Bmatrix}-(l^{(1)})^{2}*K^{(1)}&-l^{(1)}m^{(1)}*K^{(1)}\\-(l^{(1)})m^{(1)}*K^{(1)}&-(m^{(1)})^{2}*K^{(1)}\\-(l^{(2)})^{2}*K^{(2)}&-l^{(2)}m^{(2)}*K^{(2)}\\-(l^{(2)})m^{(2)}*K^{(2)}&-(m^{(2)})^{2}*K^{(2)}\end{Bmatrix}}{\begin{Bmatrix}u2\\v2\end{Bmatrix}}$

#### Method 1 (square root of sum of squares)

Once the x and y components of the global forces on node 1 have been found, the square root of the sum of squares of the component can be used to find the member force magnitude. This is the member force since we are observing a two force member.
$\mathbf {Element1force} ={\sqrt {F_{1x}^{2}+F_{1y}^{2}}}$
$\mathbf {Element2force} ={\sqrt {F_{3x}^{2}+F_{3y}^{2}}}$

#### Method 2 (transformation matrix)

The local items are denoted by the overhead bar for each term. The global items do not have this accent.
This first step describes how you obtain the local displacements from the global system.
${\begin{bmatrix}\mathbf {T} \end{bmatrix}}{\begin{Bmatrix}\mathbf {q} \end{Bmatrix}}={\begin{Bmatrix}\mathbf {\overline {q}} \end{Bmatrix}}$
${\begin{bmatrix}{\overline {u_{1}}}\\{\overline {v_{1}}}\\{\overline {u_{2}}}\\{\overline {v_{2}}}\end{bmatrix}}={\begin{bmatrix}l&m&0&0\\-l&m&0&0\\0&0&l&m\\0&0&-l&m\end{bmatrix}}{\begin{bmatrix}u_{1}\\v_{1}\\u_{2}\\v_{2}\end{bmatrix}}$
${\begin{bmatrix}\mathbf {T} \end{bmatrix}}{\begin{Bmatrix}\mathbf {f} \end{Bmatrix}}={\begin{Bmatrix}\mathbf {\overline {f}} \end{Bmatrix}}$
${\begin{bmatrix}f_{1{\overline {x}}}\\f_{1{\overline {y}}}\\f_{2{\overline {x}}}\\f_{2{\overline {y}}}\end{bmatrix}}={\frac {EA}{L}}{\begin{bmatrix}1&0&-1&0\\0&0&0&0\\-1&0&1&0\\0&0&0&0\end{bmatrix}}{\begin{bmatrix}u_{1}\\v_{1}\\u_{2}\\v_{2}\end{bmatrix}}$

### Discussion of Methods

As you could see the method 1 is most simple for easy systems. However, getting into larger systems, the second method will be more useful for automating with an application such as Matlab. The systematic approach of method two allows for large sets of data to be systematically crunched based on the global system matrix. It can be seen that the computational efficiency could vary based on the application. I would choose method two for most approaches since it is more generally applied to large systems.

## Problem 4.4 Eigenvalues and Eigenvectors for Mode Shape

On my honor, I have neither given nor recieved unauthorized aid in doing this assignment.

### Problem Statement

Assume the mass density to be 5,000 $kg/m^{3}$. Contruct the diagonal mass matrix and find the eigenpairs. With this, design a matlab and calfem program to determine the deformation shape.

### Matlab Solution
#### Set up K matrix

k = 100000000000*0.0001/0.3;
K = zeros(28,28);
K(1,1)=k*1;K(3,3)=k*1;
K(3,3)=K(3,3)+k*1;K(5,5)=K(5,5)+k*1;
K(5,5)=K(5,5)+k*1;K(7,7)=K(7,7)+k*1;
K(7,7)=K(7,7)+k*1;K(9,9)=K(9,9)+k*1;
K(11,11)=K(11,11)+k*1;K(9,9)=K(9,9)+k*1;
K(11,11)=K(11,11)+k*1;K(13,13)=K(13,13)+k*1;
K(15,15)=K(15,15)+k*1;K(17,17)=K(17,17)+k*1;
K(19,19)=K(19,19)+k*1;K(17,17)=K(17,17)+k*1;
K(19,19)=K(19,19)+k*1;K(21,21)=K(21,21)+k*1;
K(23,23)=K(23,23)+k*1;K(21,21)=K(21,21)+k*1;
K(23,23)=K(23,23)+k*1;K(25,25)=K(25,25)+k*1;
K(27,27)=K(27,27)+k*1;K(25,25)=K(25,25)+k*1;
K(2,2)=K(2,2)+k*1;K(16,16)=K(16,16)+k*1;
K(4,4)=K(4,4)+k*1;K(18,18)=K(18,18)+k*1;
K(6,6)=K(6,6)+k*1;K(20,20)=K(20,20)+k*1;
K(8,8)=K(8,8)+k*1;K(22,22)=K(22,22)+k*1;
K(10,10)=K(10,10)+k*1;K(24,24)=K(24,24)+k*1;
K(12,12)=K(12,12)+k*1;K(26,26)=K(26,26)+k*1;
K(14,14)=K(14,14)+k*1;K(28,28)=K(28,28)+k*1;
l = cos(45)^2;
kl = 100000000000*0.0001/(0.3*sqrt(2));
for i = 0:5
end

#### Set up the M matrix

M = zeros(28,28);
M(i,i)=0.3*0.0001*5000;
for i = 1:28
end
for i = 1:12
end
for i = 3:12
end
b = zeros(28,1);

#### Determine the Eigenvalues and Eigenvectors

[L,X] = eigen(K,M)
L =
X =

#### Set up the Origional Shape

L=0.3;
for i=1:7
end
for i = 1:14,
end
for i = 1:6
end
for i = 7:12
end
for i = 13:19
end
for i = 20:25;
end
figure(1)
for i = 1:25
end

#### Add in the Eigenvectors

for i=1:14
end
for i=1:14
end
for i = 1:25
end

#### Final
### CALFEM Solution

Three lowest eigenvalues and eigenvectors
Plotting the three lowest mode shapes
For animation using smartgifcreator,

## Table of Assignments

Problem Assignments :
| Problem # | Solved&Typed by | Reviewed by |
| 1 | David Bonner, Bryan Tobin | All |
| 2 | Bryan Tobin, David Bonner | All |
| 3 | Vernon Babich, Tyler Wulterkens | All |
| 4 | Tyler Wulterkens, Chad Colocar, Vernon Babich, David Bonner | All |