# University of Florida/Eml4507/s13.team3.Guzy

## Problem 2.5: Finite Analysis Of A Spring System

The free body diagram is defined by the matrix

 EDU>> Edof=[1 1 2;2 2 3;3 2 3];


Next, create the load force matrix

 EDU>> f=[0 100 0];


Next each element stiffness matrix is created

 EDU>> K= [0 0 0;0 0 0;0 0 0];
EDU>> k=1500;
EDU>> ep1=k;
EDU>> ep2=2*k;
EDU>> Ke1=springle(ep1);
EDU>> Ke2=springle(ep2);


Now we create the global stiffness matrix

 EDU>> K=assem(Edof(1,:),K,Ke2);
EDU>> K=assem(Edof(2,:),K,Ke1);
EDU>> K=assem(Edof(3,:),K,Ke2);


Boundary conditions are now applied

 EDU>> bc=[1 0; 3 0];
EDU>> [a,r]=solveq(K,f,bc);


Displacements are found:

 EDU>> ed1=extract(Edof(1,:),a)
ed1 =
0      0.0133
EDU>> ed2=extract(Edof(2,:),a)
ed2 =
0.0133      0
EDU>> ed3=extract(Edof(3,:),a)
ed3 =
0.0133      0


Spring forces are evaluated

 EDU>> es1=spring1s(ep2,ed1)
es1 =
40
EDU>> es2=spring1s(ep1,ed2)
es2 =
-20
EDU>> es3=spring1s(ep2,ed3)
es3 =
-40



By hand:

 $\displaystyle f=kd$ $\displaystyle f=force$ $\displaystyle k=stiffness$ $\displaystyle d=displacement$ In matrix form:

${\begin{bmatrix}f_{1x}\\f_{2x}\\\end{bmatrix}}={\begin{bmatrix}k&-k\\-k&k\\\end{bmatrix}}{\begin{bmatrix}d_{1x}\\d_{2x}\\\end{bmatrix}}$ First we create a matrix to show the systems Degree of Freedoms.

The first column represents each spring(#1,#2,#3). The second and third column represent the connectivity of each node.

$DOF={\begin{bmatrix}1&1&2\\2&2&3\\3&2&3\\\end{bmatrix}}$ The following is a matrix of the Force vector

$F={\begin{bmatrix}F_{1x}\\F_{2x}\\F_{3x}\\\end{bmatrix}}$ Next we need each element stiffness matrix for every spring:

Element stiffness matrix for Spring #1:

$k_{1}={\begin{bmatrix}3000&-3000\\-3000&3000\\\end{bmatrix}}={\begin{bmatrix}3000&-3000&0\\-3000&3000&0\\0&0&0\\\end{bmatrix}}$ Element stiffness matrix for Spring #2:

$k_{2}={\begin{bmatrix}1500&-1500\\-1500&1500\\\end{bmatrix}}={\begin{bmatrix}0&0&0\\0&1500&-1500\\0&-1500&1500\\\end{bmatrix}}$ Element stiffness matrix for Spring #3:

$k_{3}={\begin{bmatrix}3000&-3000\\-3000&3000\\\end{bmatrix}}={\begin{bmatrix}0&0&0\\0&3000&-3000\\0&-3000&3000\\\end{bmatrix}}$ To get the global stiffness matrix, we add up each element stiffness matrix:

$K={\begin{bmatrix}3000&-3000&0\\-3000&3000&0\\0&0&0\\\end{bmatrix}}+{\begin{bmatrix}0&0&0\\0&1500&-1500\\0&-1500&1500\\\end{bmatrix}}+{\begin{bmatrix}0&0&0\\0&3000&-3000\\0&-3000&3000\\\end{bmatrix}}={\begin{bmatrix}3000&-3000&0\\-3000&7500&-4500\\0&-4500&4500\\\end{bmatrix}}$ Plugging each matrix into Hooke's Law we obtain:

${\begin{bmatrix}3000&-3000&0\\-3000&7500&-4500\\0&-4500&4500\\\end{bmatrix}}{\begin{bmatrix}d_{1x}\\d_{2x}\\d_{3x}\\\end{bmatrix}}={\begin{bmatrix}F_{1x}\\F_{2x}\\F_{3x}\\\end{bmatrix}}$ Because node one and three are attached to the wall, their displacements are zero:

 $\displaystyle d_{1x}=0$ $\displaystyle d_{3x}=0$ Now we solve the follwing equation:

${\begin{bmatrix}3000&-3000&0\\-3000&7500&-4500\\0&-4500&4500\\\end{bmatrix}}{\begin{bmatrix}0\\d_{2x}\\0\\\end{bmatrix}}={\begin{bmatrix}F_{1x}\\F_{2x}\\F_{3x}\\\end{bmatrix}}$ Solving the System we obtain the following equations:

 $\displaystyle 3000*0-3000*d_{2x}+0*d_{3x}=F_{1x}$ $\displaystyle -3000*0+7500*d_{2x}-4500*d_{3x}=F_{2x}$ $\displaystyle 0*0-4500*d_{2x}+4500*d_{3x}=F_{3x}$ Simplifying the above equations we obtain:

 $\displaystyle -3000*d_{2x}=F_{1x}$ $\displaystyle 7500*d_{2x}-4500*d_{3x}=F_{2x}$ $\displaystyle -4500*d_{2x}+4500*d_{3x}=F_{3x}$ Solving we obtain:

 $\displaystyle F_{1x}=40$ Plugging this value in

 $\displaystyle {\frac {40}{-3000}}=d_{2x}=-0.01333$ Using substitution for the remaining values, we obtain magnitudes of:

$d_{1x}=0$ $d_{2x}=0.01333$ $d_{3x}=0$ $F_{1x}=40$ $F_{2x}=20$ $F_{3x}=40$ 