# University of Florida/Eml4507/Team7 Report2
## Problem 1
#### Find

Verify the equilibrium of node 2; Explain the assembly process; Using CALFEM verify the results of the 2-D truss system with 2 inclined members

#### Given

$P=7;f_{3}^{(1)}=4.4378f_{4}^{(1)}=2.5622;f_{1}^{(2)}=-4.4378;f_{2}^{(2)}2=4.4578$

#### Solution
##### Equilibrium of Node 2

| ${\begin{aligned}&\Sigma F_{x}=0\\\end{aligned}}$ | (1.1) |
| ${\begin{aligned}&\left(-f_{3}^{(1)}\right)+0+\left(-f_{1}^{(2)}\right)=0\\\end{aligned}}$ | (1.2) |
${\begin{aligned}&-4.4378+0+4.4378=0\\\end{aligned}}$
| ${\begin{aligned}&\Sigma F_{y}=0\\\end{aligned}}$ | (1.3) |
| ${\begin{aligned}&\left(-f_{4}^{(1)}\right)+P+\left(-f_{2}^{(2)}\right)=0\\\end{aligned}}$ | (1.4) |
${\begin{aligned}&-2.5622+7-4.4578=0\\\end{aligned}}$

##### Explanation for the Assembly Process

To assemble the global stiffness matrix for the structure; sum the force-displacement matrices in global coordinates:
| ${\begin{Bmatrix}F_{1}\\F_{2}\\F_{3}\\F_{4}\\F_{5}\\F_{6}\\\end{Bmatrix}}={\begin{bmatrix}f_{1}^{(1)}\\f_{2}^{(1)}\\f_{3}^{(1)}\\f_{4}^{(1)}\\f_{5}^{(1)}\\f_{6}^{(1)}\\\end{bmatrix}}+{\begin{bmatrix}f_{1}^{(2)}\\f_{2}^{(2)}\\f_{3}^{(2)}\\f_{4}^{(2)}\\f_{5}^{(2)}\\f_{6}^{(2)}\\\end{bmatrix}}$ | (1.5) |
Substituting for the force displacement matrix for each element:
| ${\begin{Bmatrix}F_{1}\\F_{2}\\F_{3}\\F_{4}\\F_{5}\\F_{6}\\\end{Bmatrix}}={\begin{bmatrix}k_{11}^{(1)}&k_{12}^{(1)}&k_{13}^{(1)}&k_{14}^{(1)}&k_{15}^{(1)}&k_{16}^{(1)}\\k_{21}^{(1)}&k_{22}^{(1)}&k_{23}^{(1)}&k_{24}^{(1)}&k_{25}^{(1)}&k_{26}^{(1)}\\k_{31}^{(1)}&k_{32}^{(1)}&k_{33}^{(1)}&k_{34}^{(1)}&k_{35}^{(1)}&k_{36}^{(1)}\\k_{41}^{(1)}&k_{42}^{(1)}&k_{43}^{(1)}&k_{44}^{(1)}&k_{45}^{(1)}&k_{46}^{(1)}\\k_{51}^{(1)}&k_{52}^{(1)}&k_{53}^{(1)}&k_{54}^{(1)}&k_{55}^{(1)}&k_{56}^{(1)}\\k_{61}^{(1)}&k_{62}^{(1)}&k_{63}^{(1)}&k_{64}^{(1)}&k_{65}^{(1)}&k_{66}^{(1)}\\\end{bmatrix}}{\begin{Bmatrix}d_{1}\\d_{2}\\d_{3}\\d_{4}\\d_{5}\\d_{6}\\\end{Bmatrix}}+{\begin{bmatrix}k_{11}^{(2)}&k_{12}^{(2)}&k_{13}^{(2)}&k_{14}^{(2)}&k_{15}^{(2)}&k_{16}^{(2)}\\k_{21}^{(2)}&k_{22}^{(2)}&k_{23}^{(2)}&k_{24}^{(2)}&k_{25}^{(2)}&k_{26}^{(2)}\\k_{31}^{(2)}&k_{32}^{(2)}&k_{33}^{(2)}&k_{34}^{(2)}&k_{35}^{(2)}&k_{36}^{(2)}\\k_{41}^{(2)}&k_{42}^{(2)}&k_{43}^{(2)}&k_{44}^{(2)}&k_{45}^{(2)}&k_{46}^{(2)}\\k_{51}^{(2)}&k_{52}^{(2)}&k_{53}^{(2)}&k_{54}^{(2)}&k_{55}^{(2)}&k_{56}^{(2)}\\k_{61}^{(2)}&k_{62}^{(2)}&k_{63}^{(2)}&k_{64}^{(2)}&k_{65}^{(2)}&k_{66}^{(2)}\\\end{bmatrix}}{\begin{Bmatrix}d_{1}\\d_{2}\\d_{3}\\d_{4}\\d_{5}\\d_{6}\\\end{Bmatrix}}$ | (1.6) |
Substituting zero for where there is no stiffness for each element and changing to local coordinates:
| ${\begin{Bmatrix}F_{1}\\F_{2}\\F_{3}\\F_{4}\\F_{5}\\F_{6}\\\end{Bmatrix}}={\begin{bmatrix}k_{11}^{(1)}&k_{12}^{(1)}&k_{13}^{(1)}&k_{14}^{(1)}&0&0\\k_{21}^{(1)}&k_{22}^{(1)}&k_{23}^{(1)}&k_{24}^{(1)}&0&0\\k_{31}^{(1)}&k_{32}^{(1)}&k_{33}^{(1)}&k_{34}^{(1)}&0&0\\k_{41}^{(1)}&k_{42}^{(1)}&k_{43}^{(1)}&k_{44}^{(1)}&0&0\\0&0&0&0&0&0\\0&0&0&0&0&0\\\end{bmatrix}}{\begin{Bmatrix}d_{1}\\d_{2}\\d_{3}\\d_{4}\\d_{5}\\d_{6}\\\end{Bmatrix}}+{\begin{bmatrix}0&0&0&0&0&0\\0&0&0&0&0&0\\0&0&k_{11}^{(2)}&k_{12}^{(2)}&k_{13}^{(2)}&k_{14}^{(2)}\\0&0&k_{21}^{(2)}&k_{22}^{(2)}&k_{23}^{(2)}&k_{24}^{(2)}\\0&0&k_{31}^{(2)}&k_{32}^{(2)}&k_{33}^{(2)}&k_{34}^{(2)}\\0&0&k_{41}^{(2)}&k_{42}^{(2)}&k_{44}^{(2)}&k_{44}^{(2)}\\\end{bmatrix}}{\begin{Bmatrix}d_{1}\\d_{2}\\d_{3}\\d_{4}\\d_{5}\\d_{6}\\\end{Bmatrix}}$ | (1.7) |
Summing the matrices:
| ${\begin{Bmatrix}F_{1}\\F_{2}\\F_{3}\\F_{4}\\F_{5}\\F_{6}\\\end{Bmatrix}}={\begin{bmatrix}k_{11}^{(1)}&k_{12}^{(1)}&k_{13}^{(1)}&k_{14}^{(1)}&0&0\\k_{21}^{(1)}&k_{22}^{(1)}&k_{23}^{(1)}&k_{24}^{(1)}&0&0\\k_{31}^{(1)}&k_{32}^{(1)}&\left(k_{33}^{(1)}+k_{11}^{(2)}\right)&\left(k_{34}^{(1)}+k_{12}^{(2)}\right)&k_{13}^{(2)}&k_{14}^{(2)}\\k_{41}^{(1)}&k_{42}^{(1)}&\left(k_{43}^{(1)}+k_{21}^{(2)}\right)&\left(k_{44}^{(1)}+k_{22}^{(2)}\right)&k_{23}^{(2)}&k_{24}^{(2)}\\0&0&k_{31}^{(2)}&k_{32}^{(2)}&k_{33}^{(2)}&k_{34}^{(2)}\\0&0&k_{41}^{(2)}&k_{42}^{(2)}&k_{43}^{(2)}&k_{44}^{(2)}\\\end{bmatrix}}{\begin{Bmatrix}d_{1}\\d_{2}\\d_{3}\\d_{4}\\d_{5}\\d_{6}\\\end{Bmatrix}}$ | (1.8) |

##### CALFEM for 2-D Truss System

MATLAB script file:
MATLAB output:

## Problem 2
#### Find

Homogenous L2-ODE-CC, damping ratio zeta, plot of the solution, log decrement delta, quality factor Q and loss factor eta.

#### Given

Consider the spring-mass damper system on p.53-2.
Initial Conditions:

#### Solution

Case: Underdamped
$\Delta =a^{2}-4b<0$
$\alpha =-0.5,\beta =2$
$(\lambda -(-0.5+2i))(\lambda -(-0.5-2i))=0$
$\lambda ^{2}+1\lambda +2.25=0$
$a=1,b=2.25$
| $\omega ^{2}=b$ | (2.1) |
| $2\omega \zeta =a$ | (2.2) |
Solving equation (2.1) and (2.2)
$\omega =1.5$
$\zeta =0.333$
Therefore L2-ODE-CC: $y_{h}''+y_{h}'+2.25y_{h}=0$
$y=C_{1}e^{(\alpha x)}cos(\beta x)+C_{2}e^{(\alpha x)}sin(\beta x)$
| $y=C_{1}e^{(-0.5x)}cos(2x)+C_{2}e^{(-0.5x)}sin(2x)$ | (2.3) |
| $y'=-0.5C_{1}e^{(-0.5x)}cos(2x)-2C_{1}e^{(-0.5x)}sin(2x)-0.5C_{2}e^{(-0.5x)}sin(2x)+2C_{2}e^{(-0.5x)}cos(2x)$ | (2.4) |
Using the two initial conditions and solving equation (2.3) and (2.4) the coefficients are as follows: $C_{1}=1,C_{2}=.25$
Therefore,
$y=e^{(-0.5x)}cos(2x)+0.25e^{(-0.5x)}sin(2x)$
The next step in analyzing the model is comparing and evaluating Log Decrements. This can be done numerically and by a formula. The log decrement in this case was done both ways and then compared to verify the value.
Numerical method: $\delta ^{(n)}=log[(y_{h}^{(n)})/(y_{h}^{(n+1)})]$
The log decrement was calculated by finding the average value: $\delta =[1/3](\delta ^{(1)}+\delta ^{(2)}+\delta ^{(3)})$
Verifying the log decrement value by using the formula: $\delta =(2\pi \zeta )/{\sqrt {1-\zeta ^{2}}}$
Comparing the two values: $\delta =2.21$
Finding the quality factor : $Q=\delta /\pi$
$Q=0.703$
Finding the loss factor: $\eta =1/Q$
$\eta =1.42$

## Problem 3
#### Find

Determine the member force and axial stress in each member of the truss shown in the figure using one of the FE analysis programs in the Appendix. Assume that Young’s modulus is 104 psi and all cross-sections are circular with a diameter of 2 in. Compare the results with the exact solutions that are obtained from the free-body diagram.
Write a matlab program to assemble the global stiffness matrix, compute the unknown disp dofs, the reaction forces, the member forces; compare the results with exact hand calculation (Statics, Mechanics of Materials).
Run CALFEM to verify the results, but now do this problem in a different way (as in commercial FE codes).
First, establish 2 arrays: (1) the global node coordinate array “coord”, and (2) the elem connectivity array “conn”. next, write a matlab code to loop over the number of element to call the function “bar2e” of CALFEM to compute the element stiffness matrices. with this method, you let your matlab code construct the arrays ex1, ey1, ex2, ey2, etc. for you, using the info from the arrays “coord” and “conn”.

#### Solution
##### By Hand Calculations

| $\sum F_{x}=0=400lb+T_{1x}$ | (3.1) |
$T_{1x}=-400lb$
| $\sum M_{1}=0=-1200lb(24')-400lb(9')+T_{4y}(36')$ | (3.2) |
$T_{4y}=900lb$
| $\sum F_{y}=0=-1200lb+900lb+T_{1y}$ | (3.3) |
$T_{1y}=300lb$
| $\sum M_{6}=0=-300lb(12')-400lb(9')+F_{8}(9')$ | (3.4) |
$F_{8}=800lb$
| $\sum M_{3}=0=-300lb(24')+F_{2}(9')$ | (3.5) |
$F_{8}=800lb$
| $\sum F_{y}=0=300lb-{\frac {3}{5}}F_{5}$ | (3.6) |
$F_{5}=500lb$

##### By MATLAB

MATLAB script file:
MATLAB output:
>> report2
X =
For element 1
k =
For element 2
k =
For element 3
k =
For element 4
k =
For element 5
k =
For element 6
k =
For element 7
k =
For element 8
k =
For element 9
k =

## Problem 4
### Part 1
#### Find

For each case, derive the corresponding standard L2-ODE-CC, find the overall homogeneous solution, and plot the solution in a separate figure; then plot all 3 solutions in the same figure for comparison.

#### Given

Two Roots: $\lambda _{1}=-0.5,\lambda _{2}=-1.5$
Initial conditions y(0)=1, y'(0)=0

#### Solution

Since \lambda_1 and \lambda_2 are unequal and negative, the system is overdamped. Currently we have:
$(\lambda +0.5)(\lambda +1.5)=0$
Standard form
$(\lambda ^{2}+2*\lambda +0.75)=0$
The standard homogeneous L2-ODE-CC, or the equation of motion, is therefore:
$y_{h}''+2y_{h}'+0.75y_{h}=0$
The general solution is given by:
$y_{h}(t)=c_{1}e^{(-0.5t)}+c_{2}e^{(-1.5t)}$
Using the given initial conditions, we solve for the constants:
$y^{'}(0)=0=-0.5c_{1}-1.5c_{2}$
$c_{1}={\frac {3}{4}},c_{2}=-{\frac {1}{4}}$
Plugging these in to find the overall homogeneous solution:
$y_{p}(t)={\frac {3}{4}}e^{(-0.5t)}-{\frac {1}{4}}e^{(-1.5t)}$
The graph of the solution is:

### Part 3
#### Find

Derive the corresponding standard L2-ODE-CC, find the overall homogeneous solution, and plot the solution in a separate figure; then plot all 3 solutions in the same figure for comparison.

#### Given

Two roots: $\lambda _{1}=-0.5+i2,\lambda _{2}=-1.5-i2$
Initial conditions:
$y(0)=1,y'(0)=v_{0}=0$

#### Solution

From the characteristic equation:
$(\lambda -\lambda _{1})(\lambda -\lambda _{2})=0$
$(\lambda +0.5-i2)(\lambda +0.5+i2)=0$
Multiplying out to the standard form:
$\lambda ^{2}+\lambda +4.25=0$
$\lambda ^{2}+a\lambda +b=0$
Where:
$a=c/m=1andb=k/m=4.25$
The standard homogeneous L2-ODE-CC, or the equation of motion, is therefore:
$y_{h}''+y_{h}'+4.25y_{h}=0$
The general solution is given by:
$y_{h}(t)=Ae^{-at/2}cos(\omega _{d}-\phi )$
The variables for this equation are found to be:
$\omega _{n}={\sqrt {b}}=2.06<math>rad/s<math>\zeta =a/(2\omega _{n})=0.243$
$\omega _{d}=\omega _{n}{\sqrt {1-\zeta ^{2}}}=2.00$ rad/s
$A={\sqrt {((v_{0}+\zeta \omega _{n}y_{0})^{2}+(y_{0}\omega _{d})^{2})/(\omega _{d})^{2}}}=1.03$
$\phi =tan^{-1}(y_{0}\omega _{d})/(v_{0}+\zeta \omega _{n}y_{0}))=75.9$
Therefore:
$y_{h}(t)=1.03e^{-0.5t}cos(2t-75.9)$
On our honor, we did this assignment on our own, without looking at the solutions in previous semesters or other online solutions.

## Problem 5
#### Find

The general procedure in linear finite element calculations.
Generate element matrices, assemble element matrices into the Global System of equations. Solve the global system of equations and evaluate element forces.

#### Solution

Using Matlab, we first define the topology matrix by Edof containing element numbers and global degrees of freedom
Now the global stiffness matrix K $(3x3)$ of zeros.
The load vector $f(3x1)$ with load $F=100$ and load it in position 2.
Stiffness matrices are generated by using the function spring1e The function is given by:
Now we can set the element property as ep for the springs with their respective spring constants $k$ and $2k$ Where $k=1500$
Commands in matlab are as follows:
With the assem function we can assemble stiffness matrices into the global stiffness matrix K. Which leads too:
assem function:
Stiffness matrix K:
The Global system of equations is solved with boundary condtions given in bc as well as with function solveq.
Function solveq is as follows:
With Matlab commands it results in:
Element forces are now computed from the element displacements. These are obtained from global displacements a using the function extract.
Function extract:
Now the corresponding Matlab commands are as follows:
The last step is to evaluate the spring forces by using the function spring1s.
We have function spring1s as written below:
We can now finally evaluate the spring forces. Using Matlab the forces are as follows:
* Note: Instructions and commands were all followed from CALFEM 3.4 Manual.

## Problem 6
#### Find

Find the displacements of the three bodies and the forces ( tensile/compressive) in the springs. What are the reactions at the walls? Assume only horizontal translation.

#### Solution

The nodes and elements are labeled in the problem. Create a connectivity table.
Construct Elemental equilibrium equations for all 6 elements.
Here is a sample equilibrium equation for element 3:
| ${\binom {f_{2}^{(3)}}{f_{3}^{(3)}}}=k_{3}{\begin{bmatrix}1&-1\\-1&1\\\end{bmatrix}}{\begin{bmatrix}u_{2}\\u_{3}\\\end{bmatrix}}$ | (6.1) |
The notation for : The superscript parenthesis signifies the element number, while the subscript signifies the associated node number.
With element forces calculated, a node equilibrium can be established. Start with a free-body diagram of each node, and then create the five nodal equations:
Make sure all forces are positive and modeled in tension.
Combine your elemental equilibrium equations with your nodal equilibrium equations for the global stiffness correlation:
| $[F_{s}]=[Q_{s}][K_{s}]$ | (6.2) |
| ${\begin{bmatrix}F_{1}=R_{1}\\F_{2}=0\\F_{3}=1000\\F_{4}=0\\F_{5}=R_{5}\end{bmatrix}}={\begin{bmatrix}k_{1}+k_{4}&-k_{1}&-k_{4}&0&0\\-k_{1}&k_{1}+k_{2}+k_{3}&-k_{3}&-k_{2}&0\\-k_{4}&-k_{3}&k_{3}+k_{4}+k_{5}&-k_{5}&0\\0&-k_{4}&-k_{4}&k_{2}+k_{5}+k_{6}&0\\0&0&0&-k_{6}&k_{6}\end{bmatrix}}{\begin{bmatrix}u_{1}\\u_{2}\\u_{3}\\u_{4}\\u_{5}\\\end{bmatrix}}$ | (6.3) |

##### Solving via MATLAB

Resulting in the answers (in units mm for the displacements and N for the Reaction):

##### Solving via CALFEM

Resulting in the answers (in units mm for the displacements and N for the Reaction):