# University of Florida/Eml4507/s13 Team 3 Report 1

Report 1

## Problem 2: Equation of Motion of a Spring-Mass-Dashpot System
### Problem Statement

Derive the equation of motions for the two spring-mass-dashpot systems in series.

### Solution

In order to derive an equation of motion, all of the forces must be analyzed. In the spring-mass-dashpot model there are forces from the spring, driving force, and a damping force.
The force of a spring oriented in the y-direction is given by Hooke's Law:
    $\displaystyle F_{k}=ky$
The force of a damper oriented in the y-direction is:
    $\displaystyle F_{c}=cy'$
Summing the forces with respect to their directions in the Free Body Diagram:
    $\displaystyle -F_{k}-F_{c}-my''+F(t)=0$
Plugging in spring and damper values:
    $\displaystyle -ky-cy'-my''+F(t)=0$
Reorganizing the equation we get:$\displaystyle$
    $\displaystyle my''+cy'+ky=F(t)$

### Solution

In order to derive an equation of motion, all of the forces must be analyzed. Once again, in the spring-mass-dashpot model there are forces from the spring, driving force, and damping force.
The forces directions with respect to the Free Body Diagram:
    $\displaystyle my''+F_{1}=F(t)$
To find the force from the spring and damper, we set them equal to eachother:
    $\displaystyle F_{k}=F_{c}$
    $\displaystyle ky_{k}=Cy'_{c}$
Solving for dampers velocity: Summing the forces with respect to their directions in the Free Body Diagram:
    $\displaystyle y''_{c}=y_{k}{\frac {k}{c}}$
Plugging into acceleration equations after taking the derivative:
    $\displaystyle y''=y''_{c}+y''_{k}$
    $\displaystyle y''=y''_{k}+y'_{k}{\frac {k}{c}}$
Plugging into the original:$\displaystyle$
    $\displaystyle m(y''_{k}+y_{k}{\frac {k}{c}})+ky_{k}=F(t)$

## Problem 3: Finding the numerical values for the element stiff matrices k$^{(1)}$ and k$^{(2)}$
### Problem Statement

Part 1: Provide the numerical values for the element stiffness matrices $\mathbf {k^{(1)}}$ and $\mathbf {k^{(2)}}$.
Part 2: Find the coordinates of the global nodes 1 and 3 when the global node 2 is at the origin of the global coordinate system.
The following are physical parameters:
$E^{(1)}=3,E^{(2)}=5,$
$A^{(1)}=1,A^{(2)}=2,$
$L^{(1)}=4,L^{(2)}=2$
$\theta ^{(1)}=30^{o},\theta ^{(2)}=-45^{o}$

### Problem Solution
#### Part 1

$\mathbf {k^{(e)}} =k^{(e)}{\begin{bmatrix}(l^{(e)})^{2}&l^{(e)}m^{(e)}&-(l^{(e)})^{2}&-l^{(e)}m^{(e)}\\l^{(e)}m^{(e)}&(m^{(e)})^{2}&-l^{(e)}m^{(e)}&-(m^{(e)})^{2}\\-(l^{(e)})^{2}&-l^{(e)}m^{(e)}&(l^{(e)})^{2}&l^{(e)}m^{(e)}\\-l^{(e)}m^{(e)}&-(m^{(e)})^{2}&l^{(e)}m^{(e)}&(m^{(e)})^{2}\end{bmatrix}}$
where
$l^{(e)}=cos(\theta ^{(e)}),m^{(e)}=sin(\theta ^{(e)})$
and
$k^{(e)}={\frac {E^{(e)}A^{(e)}}{L^{(e)}}}$
As given in the problem statement,
$E^{(1)}=3,E^{(2)}=5,$
$A^{(1)}=1,A^{(2)}=2,$
$L^{(1)}=4,L^{(2)}=2$
$\theta ^{(1)}=30^{o},\theta ^{(2)}=-45^{o}$
Therefore,
$k^{(1)}={\frac {3*1}{4}}={\frac {3}{4}},k^{(2)}={\frac {5*2}{2}}=5,$
$(l^{(1)})^{2}=.75,(m^{(1)})^{2}=.25,l^{(1)}m^{(1)}=.433$
and
$(l^{(2)})^{2}=.5,(m^{(2)})^{2}=.5,l^{(2)}m^{(2)}=-.5$
Substituting these values back into the original stiffness matrix, $\mathbf {k^{(e)}}$ yields:
$\mathbf {k^{(1)}} =.75{\begin{bmatrix}.75&.433&-.75&-.433\\.433&.25&-.433&-.25\\-.75&-.433&.75&.433\\-.433&-.25&.433&.25\end{bmatrix}}={\begin{bmatrix}.5625&.3248&-.5625&-.3248\\.3248&.1875&-.3248&-.1875\\-.5625&-.3248&.5625&.3248\\-.3248&-.1875&.3248&.1875\end{bmatrix}}$
and
$\mathbf {k^{(2)}} =5{\begin{bmatrix}.5&-.5&-.5&.5\\-.5&.5&.5&-.5\\-.5&.5&.5&-.5\\.5&-.5&-.5&.5\end{bmatrix}}={\begin{bmatrix}2.5&-2.5&-2.5&2.5\\-2.5&2.5&2.5&-2.5\\-2.5&2.5&2.5&-2.5\\2.5&-2.5&-2.5&2.5\end{bmatrix}}$

#### Part 2

Global Nodes 1 and 2 can be located in our coordinate system using the angle and length of each respective element.
However, each angle must be measured from the right horizontal on global node 2. $\theta ^{(2)}$ remains the same, but $\theta ^{(1)}=210^{o}$.
Trigonometry shows that the coordinates of global nodes 1 and 3,
$(x_{1},y_{1})$ and $(x_{2},y_{2})$
can be written as
$(L^{(1)}cos(\theta ^{(1)}),L^{(1)}sin(\theta ^{(1)}))$ and $(L^{(2)}cos(\theta ^{(2)}),L^{(2)}sin(\theta ^{(2)}))$ respectively.
Therefore, global nodes 1 and 3 have the following coordinates:
$(-2{\sqrt {3}},-2)$ and $(2{\sqrt {2}},-2{\sqrt {2}})$

## Problem 4: Analysis of a truss with three members in CALFEM
### Problem Statement

Consider a plane truss consisting of tree bars with the properties E = 200 GPa, A$_1$ = 6.0 · 10$^{-4}$ m$^2$, A$_2$ = 3.0 · 10$^{-4}$ m$^2$ and A$_3$ = 10.0 · 10$^{-4}$ m$^2$, and loaded by a single force P = 80 kN. The corresponding finite element model consists of three elements and eight degrees of freedom.

### Solution

The free body diagram is defined by the matrix
Where the first number in each row is the element, and the four other numbers are the degrees of freedom at each node of the element.
Next, create the n x n stiffness matrix K, and the n x 1 load vector f
The axial rigidity of the elements are defined by the element property vectors
and the element coordinate vectors ex1, ex2, ex3, ey1, ey2, ey3
Using bar2e, compute Ke1, Ke2, and Ke3
Assemble the element stiffness matrices to create the global stiffness matrix
Create a prescribed displacement matrix bc
Then solve the system of equations using solveq, which results in displacements a and support forces r
From the displacement matrix, it can be seen that the vertical displacement at the point of loading is 1.15 mm. Obtain the element displacements ed1, ed2, and ed3 using extract.
Then calculate the normal forces N1, N2, and N3 using bar2s.
The normal forces are N$_1$ = −29.84 kN, N$_2$ = 57.62 kN and N$_3$ = 37.31 kN.

## Problem 5: Derivation of standard L2-ODE-CC
### Problem Statement

$\lambda _{1}=-0.5\lambda _{2}=-1.5$ $\lambda _{1}=\lambda _{2}=-0.5$ $\lambda _{1},_{2}=-0.5+i2$
For each case find the standard L2-ODE-CC and the homogeneous solution. Plot each individual solution, and plot all solutions together for comparison

### Case 1

$(\lambda -\lambda _{1})(\lambda -\lambda _{2})=0$ $(\lambda +.5)(\lambda +1.5)=0$ $\lambda ^{2}+2\lambda +0.75=0$
The standard L2-ODE-CC is then $y''+2y'+.75=0$
Homogeneous solution $y_{h}=c_{1}e^{-.5x}+c_{2}e^{-1.5x}$ $y'_{h}=-.5c_{1}e^{-.5x}-1.5c_{2}e^{-1.5x}$ Plug in initial values $y(0)=1=c_{1}+c_{2}$ $y'(0)=0=-.5c_{1}-1.5c_{2}$
$c_{1}=1-c_{2}$ $0=-.5(1-c_{2})-1.5c_{2}$ $.5=-1c_{2}$ $c_{2}=-.5$ $c_{1}=1.5$
The solution is then $y_{h}=1.5e^{-.5x}-.5e^{-1.5x}$

### Case 2

$(\lambda -\lambda _{1})(\lambda -\lambda _{2})$ $(\lambda +.5)(\lambda +.5)$ $\lambda ^{2}+1\lambda +0.25=0$
The standard L2-ODE-CC is then $y''+y'+.25=0$
Homogeneous solution $y_{h}=c_{1}e^{-.5x}+c_{2}xe^{-.5x}$ $y'_{h}=-.5c_{1}e^{-.5x}+c_{2}(e^{-.5x}-.5xe^{-.5x}$ Plug in initial values $y(0)=1=c_{1}$ $y'(0)=0=-.5c_{1}+c_{2}$
$c_{1}=1$ $0=-.5c_{1}+c_{2}$ $0=-.5+c_{2}$ $c_{2}=.5$
The solution is then $y_{h}=e^{-.5x}-.5xe^{-.5x}$

### Case 3

$(\lambda -\lambda _{1})(\lambda -\lambda _{2})$ $(\lambda +.5+i2)(\lambda +.5-i2)$ $\lambda ^{2}+.5\lambda -i2\lambda +.5\lambda +.25+.5i2+i2\lambda -.5i2+4$ $\lambda ^{2}+1\lambda +4.25=0$
The standard L2-ODE-CC is then $y''+y'+4.25y=0$
Homogeneous solution $y_{h}=e^{-.5x}(c_{1}cos(2x)+c_{2}sin(2x))$ $y'_{h}=-.5e^{-.5x}(c_{1}cos(2x)+c_{2}sin(2x))+e^{-.5x}(-2c_{1}sin(2x)+2c_{2}cos(2x))$ Plug in initial values $y(0)=1=1*(c_{1}+0)$ $y'(0)=0=-.5(c_{1}+0)+1*(0+2c_{2})$
$c_{1}=1$ $0=-.5c_{1}+2c_{2}$ $.5=2c_{2}$ $c_{2}=.25$
The solution is then $y_{h}=e^{-.5x}(cos(2x)+.25sin(2x))$

## Problem 6: Computing the element stiffness matrices for elements in a truss system
### Define Input/Output Variables

The program begins with the definition of the input and output variables and then clears any existing variables.

### Global Node Information

Then the number of global nodes in the problem is input into the variable "G". An array "g" is then created of size "G" to stor the numbers of each node. Then three arrays "x", "y" and "z" are created of size "G" to store the value of each of the corresponding coordinates of each global node. The user is prompted to enter this information using a for loop that loops "G" times.

### Element Information

Here the user is prompted to enter the number of elements in the system into variable "E." Then the user is asked if the Young's Modulus and Area is the same for each element in the problem. Afterwards five arrays are constructed; "e" stores the element number information, "l1" stores the global node corresponding to local node one for each element, "l2" stores the global node corresponding to local node two for each element, "Modulus" stores the Young's Modulus for each element and "Area" stores the Area for each element.

### Modulus, Area and Local Node Information

Here the program enters a if statement if "same_modulus" is equal to one, then the user is prompted to enter the Young's Modulus for all of the elements. Afterward a if statement is used again for the Area of each element. If "same_modulus" and "same_area" are equal to zero the program enters a for loop that prompts the user to enter the Young's Modulus, area and local node information of each element.

### Element Computation

For the computation of the element matrix five arrays have to be defined; "L" is the length of each element, "l" is the director cosine of each element, "m" is the director sine of each element, "n" is, "k_elem" is a 3 by 3 stiffness matrix that can represent the entire 6 by 6 stiffness matrix for each element.

### Stiffness Matrix Construction

This section of code initializes the total stiffness matrix "k." Then several for loops are used to place the "k_elem" matrix into the total stiffness matrix. The code in these for loops places each "k_elem" matrix based on the global node and local node associated with it.

### 1D or 2D

Here the code finds rows and columns in the final stiffness matrix that contain all zeros and removes them from the total stiffness matrix.

## Member Forces
### Eliminate Unknown Forces

The the rows 12, 11 and 8 correspond to the unknown forces so they are removed.

### Eliminate Known Displacements

The columns 12, 11 and 8 correspond to the known displacements so they are removed.

### Calculation of q

The matrix "q" is the displacements found using the reduced "k" matrix and the reduced "f" matrix.

### Member Forces

Forces in Element 1: Fx1 = -7318,
Fy1 = 0,
Fx2 = 4636, Fy2 = 0
Forces in Element 2: Fx3 = -8516, Fy3 = 0, Fx4 = 6300, Fy4 = 0
Forces in Element 3: Fx5 = 6516, Fy5 = 0,
Fx6 = -800,
Fy6 = 0
Forces in Element 4: Fx7 = 7204,
Fy7 = 0,
Fx8 = 1474,
Fy8 = 0
Forces in Element 5: Fx9 = 8855,
Fy9 = 0,
Fx10 = 7318, Fy10 = 0
Forces in Element 6: Fx11 = -4636, Fy11 = 0, Fx12 = 8516, Fy12 = 0
Forces in Element 7: Fx13 = -6300, Fy13 = 0, Fx14 = -6516, Fy14 = 0
Forces in Element 8: Fx15 = 800, Fy15 = 0, Fx16 = -7204, Fy16 = 0
Forces in Element 9: Fx17 = -1474, Fy17 = 0, Fx18 = -8855, Fy18 = 0