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.

Description
We are to find the eigenvector $$ x_2 $$ corresponding to the eigenvalue $$ \lambda_2 $$ for the spring-mass-damper system on p.53-13. We are then to plot and comment on this mode shape. Finally we are to verify that this eigenvector is orthogonal to the one obtained in the example before.

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.



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{Element 1 force}=\sqrt{F_{1x}^2+F_{1y}^2} $$

$$ \mathbf{Element 2 force}=\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.

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 j = 1+i*2; K(j,j)=K(j,j)+l*kl;K(j,j+1)=K(j,j+1)+l*kl;K(j+1,j)=K(j+1,j)+l*kl;K(j+1,j+1)=K(j+1,j+1)+l*kl; K(j+16,j)=K(j+16,j)+l*kl;K(j+16,j+1)=K(j+16,j+1)+l*kl;K(j+17,j)=K(j+17,j)+l*kl;K(j+17,j+1)=K(j+17,j+1)+l*kl; K(j,j+16)=K(j,j+16)+l*kl;K(j,j+17)=K(j,j+17)+l*kl;K(j+1,j+16)=K(j+1,j+16)+l*kl;K(j+1,j+17)=K(j+1,j+17)+l*kl; K(j+16,j+16)=K(j+16,j+16)+l*kl;K(j+16,j+17)=K(j+16,j+17)+l*kl;K(j+17,j+16)=K(j+17,j+16)+l*kl;K(j+17,j+17)=K(j+17,j+17)+l*kl; end

Set up the M matrix
M = zeros(28,28);

M(i,i)=0.3*0.0001*5000;

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

for i = 1:12 M(i,i)=0.3*0.0001*5000*sqrt(2)+M(i,i); M(i+16,i+16)=0.3*0.0001*5000*sqrt(2)+M(i+16,i+16); end

for i = 3:12 M(i,i) = M(i,i)+0.3*0.0001*5000/2; M(i+14,i+14) = M(i+14,i+14)+0.3*0.0001*5000/2; end

b = zeros(28,1);

Determine the Eigenvalues and Eigenvectors
[L,X] = eigen(K,M)

L =

1.0e+08 *

0.7625   0.7625    0.7625    0.7625    0.7984    0.7984    0.9205    0.9205    0.9578    0.9578    0.9578    0.9578    1.2259    1.2259    1.5251    1.5251    1.5251    1.5251    1.8406    1.8406    1.9251    1.9251    1.9251    1.9251    2.2222    2.2222    2.2222    2.2222

X =

Columns 1 through 5

0.0000   0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000    0.0000   -0.8946   -0.5809    0.0362   -0.0684   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0759   -0.2460   -0.1249    1.0305    0.0000    0.0000    0.0000    0.0000   -0.0000    0.0000    0.5811   -0.8619    0.0773   -0.2392   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000    0.0029   -0.0537   -1.0587   -0.1414   -0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0679   -0.0000    0.0000    0.0000    0.0000   -1.3744   -0.0000   -0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.8946    0.5809   -0.0362    0.0684   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0759    0.2460    0.1249   -1.0305   -0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.5811    0.8619   -0.0773    0.2392    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0029    0.0537    1.0587    0.1414    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.4876    0.0000   -0.0000   -0.0000   -0.0000    0.4876

Columns 6 through 10

0.4876  -1.1750   -0.0000    0.0000   -0.0000    0.4876    1.1750   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0348   -0.3197    0.0000   -0.0000   -0.0000    0.1011    0.9291    0.0000    0.0000   -0.0000    0.0386    0.0973    0.0000   -0.0000    0.0000   -0.1121   -0.2827   -0.0000    0.0000    0.0000   -0.3438    0.0468    0.0000    0.0000   -0.0000    0.9991   -0.1361    0.0000    0.0000    0.0000   -0.0144   -0.0850   -0.0000   -0.0000   -0.0000    0.0420    0.2471   -0.0000    0.0000    0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0679   -0.0000    0.0000   -0.0000   -0.0000   -1.3744   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0348   -0.3197   -0.0000   -0.0000   -0.0000    0.1011    0.9291    0.0000    0.0000   -0.0000    0.0386    0.0973   -0.0000   -0.0000    0.0000   -0.1121   -0.2827    0.0000   -0.0000    0.0000   -0.3438    0.0468   -0.0000   -0.0000   -0.0000    0.9991   -0.1361    0.0000    0.0000    0.0000   -0.0144   -0.0850    0.0000   -0.0000   -0.0000    0.0420    0.2471   -0.0000   -0.0000    1.1750    0.0000    0.0000    0.0000   -0.0000   -1.1750   -0.0000   -0.0000

Columns 11 through 15

-0.0000  -0.0000   -0.0000   -0.9256    0.0000    0.0000    0.0000   -0.0000   -0.9256    0.0000   -0.0818   -0.1048   -0.0000   -0.0000    0.8937    0.2379    0.3045    0.0000   -0.0000   -0.0000    0.0270   -0.3307   -0.0000    0.0000   -0.5386   -0.0786    0.9613    0.0000   -0.0000   -0.0000   -0.0028   -0.0266   -0.0000    0.0000    0.2345    0.0083    0.0772    0.0000    0.0000   -0.0000    0.3371    0.0009   -0.0000    0.0000    0.0000   -0.9798   -0.0025    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.7827   -0.0000    0.0000    0.0000    0.0000    0.5054    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000    0.7827    0.0000   -0.0000   -0.0000   -0.0000   -0.5054   -0.0000   -0.0818   -0.1048    0.0000   -0.0000   -0.8937    0.2379    0.3045    0.0000    0.0000   -0.0000    0.0270   -0.3307    0.0000   -0.0000    0.5386   -0.0786    0.9613   -0.0000   -0.0000   -0.0000   -0.0028   -0.0266    0.0000   -0.0000   -0.2345    0.0083    0.0772    0.0000    0.0000   -0.0000    0.3371    0.0009    0.0000    0.0000    0.0000   -0.9798   -0.0025    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.9256    0.0000   -0.0000    0.0000    0.0000    0.9256   -0.0000         0

Columns 16 through 20

0.0000  -0.0000    0.0000   -0.5350   -0.0000    0.0000   -0.0000   -0.0000   -0.5350   -0.0000    0.1161    0.0021   -0.5759    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000    0.5802   -0.0106   -0.7189   -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.8903   -0.0322    0.5433   -0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0324    1.0690    0.0104    0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000    1.2924   -0.0000   -0.0000   -0.0000   -0.0000    0.3783    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.0000   -1.2924   -0.0000    0.0000   -0.0000   -0.0000   -0.3783   -0.0000   -0.1161   -0.0021    0.5759    0.0000    0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.5802    0.0106    0.7189   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000   -0.8903    0.0322   -0.5433   -0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0324   -1.0690   -0.0104    0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000    0.5350    0.0000    0.0000    0.0000   -0.0000    0.5350

Columns 21 through 25

-0.0000  -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000   -0.8943   -0.4535    0.0330    0.1273   -0.0000   -0.3077   -0.1560    0.0113    0.0438   -0.0000   -0.3734    0.8333   -0.1855    0.3932    0.0000   -0.1285    0.2867   -0.0638    0.1353    0.0000   -0.2824    0.2924   -0.0745   -0.9230    0.0000   -0.0972    0.1006   -0.0256   -0.3176    0.0000    0.0614   -0.1931   -0.9908    0.0000   -0.0000    0.0211   -0.0664   -0.3409    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000   -0.0000   -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.5675    0.0000    0.0000   -0.0000    0.0000   -0.3423    0.0000    0.0000   -0.0000   -0.0000   -2.4917   -0.0000   -0.0000    0.0000    0.0000   -0.1374   -0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.8943   -0.4535    0.0330    0.1273    0.0000   -0.3077   -0.1560    0.0113    0.0438   -0.0000   -0.3734    0.8333   -0.1855    0.3932   -0.0000   -0.1285    0.2867   -0.0638    0.1353    0.0000   -0.2824    0.2924   -0.0745   -0.9230    0.0000   -0.0972    0.1006   -0.0256   -0.3176   -0.0000    0.0614   -0.1931   -0.9908    0.0000    0.0000    0.0211   -0.0664   -0.3409    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000         0         0

Columns 26 through 28

-0.0000  -0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000    0.0000    0.0000   -0.9357    2.3366   -0.0972    2.3783    0.8522   -0.4088   -0.1325   -0.6608   -0.0622    0.3428    0.2098    2.5468    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000    0.0000    0.0000   -0.0000    0.0000    0.0000    0.0000    0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000   -0.0000         0         0         0

Set up the Origional Shape
L=0.3;

for i=1:7 pos(:,i) = [(i-1)*L;0]; pos(:,i+7) = [(i-1)*L;L]; end

for i = 1:14, x(i) = pos(1,i); y(i) = pos(2,i); end

for i = 1:6 conn(1,i)= i;    conn(2,i)= i+1; end

for i = 7:12 conn(1,i) = i+1; conn(2,i) = i+2; end

for i = 13:19 conn(1,i) = i-12; conn(2,i) = i-5; end

for i = 20:25; conn(1,i) = i-19; conn(2,i) = i-11; end

figure(1)

for i = 1:25 node_1 = conn(1,i); node_2 = conn(2,i); xx = [x(node_1),x(node_2)]; yy = [y(node_1),y(node_2)]; plot(xx,yy) hold on end

Add in the Eigenvectors
for i=1:14 j = i*2; y(i) = y(i)+X(j,1); end

for i=1:14 j = i*2-1; x(i) = x(i)+X(j,1); end

for i = 1:25 node_1 = conn(1,i); node_2 = conn(2,i); xx = [x(node_1),x(node_2)]; yy = [y(node_1),y(node_2)]; plot(xx,yy) end

CALFEM Solution
function R4p4 p = 5000; %kg/m3 A = 0.01; %m2 L = 0.3;  %m h = p*A*L; v = h; d = (sqrt((L^2)+(L^2)))*A*p; m = [(h/2)+(d/2)+(v/2);(h/2)+(d/2)+(v/2); (h/2)+(v/2);(h/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(h/2)+(d/2)+(v/2);(h/2)+(h/2)+(d/2)+(v/2); (h/2)+(v/2);(h/2)+(v/2); (h/2)+(d/2)+(v/2);(h/2)+(d/2)+(v/2)]; M = diag(m); Coord = [0 0;0 0.3;0.3 0;0.3 0.3;0.6 0; 0.6 0.3;0.9 0;0.9 0.3;1.2 0;1.2 0.3;    1.5 0;1.5 0.3;1.8 0;1.8 0.3]; Dof = [1 2;3 4;5 6;7 8;9 10;1 12;13 14;15 16; 17 18;19 20;21 22;23 24;25 26;27 28]; Edof = [1 1 2 5 6;2 5 6 9 10;3 9 10 13 14;4 13 14 17 18;5 17 18 21 22; 6 21 22 25 26;7 3 4 7 8;8 7 8 11 12;9 11 12 15 16;10 15 16 19 20;    11 19 20 23 24;12 23 24 27 28;13 1 2 3 4;14 5 6 7 8;15 9 10 11 12;     16 13 14 15 16;17 17 18 19 20;18 21 22 23 24;19 25 26 27 28;20 1 2 7 8;     21 5 6 11 12;22 9 10 15 16;23 13 14 19 20;24 17 18 23 24;25 21 22 27 28]; [Ex,Ey] = coordxtr(Edof,Coord,Dof,2); K = zeros(28); ep = [100000000000 0.01]; for i=1:25 Ke = bar2e(Ex(i,:),Ey(i,:),ep); K = assem(Edof(i,:),K,Ke); end [L,X] = eigen(K,M); eigval = L; eigvect = X;

Three lowest eigenvalues and eigenvectors j1eig = eigval(1) j1eigvx = eigvect(:,1) j1eigvy = eigvect(:,2) j2eig = eigval(2) j2eigvx = eigvect(:,3) j2eigvy = eigvect(:,4) j3eig = eigval(3) j3eigvx = eigvect(:,5) j3eigvy = eigvect(:,6) j1eig = -4.1672e-08 j1eigvx = -0.0018   0.0853    0.0136    0.0853   -0.0018    0.0699    0.0136    0.0699   -0.0018    0.0545    0.0136    0.0545   -0.0018    0.0391    0.0136    0.0391   -0.0018    0.0238    0.0136    0.0238   -0.0018    0.0084    0.0136    0.0084   -0.0018   -0.0070    0.0136   -0.0070 j1eigvy = -0.0485   0.0068   -0.0488    0.0068   -0.0485    0.0071   -0.0488    0.0071   -0.0485    0.0074   -0.0488    0.0074   -0.0485    0.0077   -0.0488    0.0077   -0.0485    0.0080   -0.0488    0.0080   -0.0485    0.0083   -0.0488    0.0083   -0.0485    0.0086   -0.0488    0.0086 j2eig = -1.0740e-08 j2eigvx = 0.0155  -0.0334   -0.0053   -0.0334    0.0155   -0.0127   -0.0053   -0.0127    0.0155    0.0081   -0.0053    0.0081    0.0155    0.0289   -0.0053    0.0289    0.0155    0.0496   -0.0053    0.0496    0.0155    0.0704   -0.0053    0.0704    0.0155    0.0912   -0.0053    0.0912 j2eigvy = -0.0242   0.0747    0.0200    0.0761   -0.0197    0.0156    0.0197    0.0202   -0.0092   -0.0374    0.0148   -0.0335    0.0040   -0.0572    0.0040   -0.0572    0.0148   -0.0335   -0.0092   -0.0374    0.0197    0.0202   -0.0197    0.0156    0.0200    0.0761   -0.0242    0.0747 j3eig = 1.2133e-07 j3eigvx = 0.0206  -0.0518   -0.0370   -0.0552    0.0097    0.0333   -0.0347    0.0284   -0.0031    0.0552   -0.0190    0.0633    0.0002   -0.0083   -0.0002    0.0083    0.0190   -0.0633    0.0031   -0.0552    0.0347   -0.0284   -0.0097   -0.0333    0.0370    0.0552   -0.0206    0.0518 j3eigvy = 0.0616  -0.0146    0.0727   -0.0164    0.0453    0.0010    0.0647   -0.0047    0.0125    0.0180    0.0453    0.0165   -0.0204   -0.0017    0.0204    0.0017   -0.0453   -0.0165   -0.0125   -0.0180   -0.0647    0.0047   -0.0453   -0.0010   -0.0727    0.0164   -0.0616    0.0146

Plotting the three lowest mode shapes for j=1:3 figure plot(eigvect(:,j)); title(['Mode Shape ',num2str(j)]) end



For animation using smartgifcreator, for j=1:28 clear plot ed = extract(Edof,X(:,j)); P = eldisp2(Ex,Ey,ed,plotpar,scale); W(j) = getframe; drawnow pause end