User:Uf.team.wiki/HW5

 Comment: This is a resubmission of HW 5 and fixes one slight mistake made in the original submission, specifically located in the contributing member section. The new revision is listed and is indicated with (NEW) as part of the link name.

A comparison between the original submission and the new submission can be seen here

Eml4500.f08.wiki.barcia 21:43, 27 November 2008 (UTC)

Principal of Virtual Work I
Looking back to our discussion to virtual work,

Global Force-Displacement Relationship vs. Principal of Virtual Work
Justification of eliminating rows 1,2,5,6 to obtain $$\overline {\underset{2 \times 2}\mathbf K}\quad$$ in the original 2-bar truss problem:

Global Force-Displacement Relationship:

$${\underset{6 \times 6}\mathbf K} {\underset{6 \times 1}\mathbf d}= {\underset{6 \times 1}\mathbf F} \quad \Rightarrow \quad \mathbf {Kd}-\mathbf F = {\underset{6 \times 6}\mathbf 0} \qquad (1)$$

Principal of Virtual Work:

$${\underset{6 \times 1}\mathbf W} \cdot (\mathbf {Kd}- \mathbf F) = \underbrace_{scalar}\hookrightarrow for all \quad{\underset{6 \times 1}\mathbf W} \qquad (2)$$

Proof: $$(1) \iff (2)$$
$$Eq. (1) \iff Eq. (2)$$

Proof:
 * A) $$\quad (1) \iff (2)\quad$$ : trivial
 * B) Want to show $$\quad (2) \Rightarrow (1)\quad$$:
 * $$(2) \Rightarrow \mathbf W \cdot (\mathbf {Kd}- \mathbf F) = 0 \quad$$ for\quad all $$\mathbf W $$

CHOICE 1: Select W such that W1=1, W2=...=W6=0
 * $${\underset{1 \times 6}\mathbf W^T}= \begin{bmatrix}

1 & 0 & 0 & 0 & 0 & 0 \\ \end{bmatrix}_{1 \times 6}$$

Thus,

$$ \mathbf W \cdot (\mathbf{Kd}-\mathbf F) = 1 \cdot [\sum_{j=1}^6 K_{1j}d_j - F_1] + 0 \cdot [\sum_{j=1}^6 K_{2j}d_j - F_2] + ... + 0 \cdot [\sum_{j=1}^6 K_{6j}d_j - F_6] = 0 \Rightarrow$$

$$\sum_{j=1}^6 K_{1j}d_j = F_1 \qquad \qquad (1st \quad Equation)$$

CHOICE 2: Select W such that W1=0, W2=0, W3=...=W6=0
 * $${\underset{1 \times 6}\mathbf W^T}= \begin{bmatrix}

0 & 1 & 0 & 0 & 0 & 0 \\ \end{bmatrix}_{1 \times 6}$$

Thus,

$$ \mathbf W \cdot (\mathbf{Kd}-\mathbf F) = 0 \cdot [\sum_{j=1}^6 K_{1j}d_j - F_1] + 1 \cdot [\sum_{j=1}^6 K_{2j}d_j - F_2] + 0 \cdot [\sum_{j=1}^6 K_{3j}d_j - F_3] + ... + 0 \cdot [\sum_{j=1}^6 K_{6j}d_j - F_6] = 0 \Rightarrow$$

$$\sum_{j=1}^6 K_{2j}d_j = F_2 \qquad \qquad (2nd \quad Equation)$$

CHOICE 3: Select W such that W1=W2=0, W3=1, W4=...=W6=0
 * $${\underset{1 \times 6}\mathbf W^T}= \begin{bmatrix}

0 & 0 & 1 & 0 & 0 & 0 \\ \end{bmatrix}_{1 \times 6}$$

Thus,

$$ \mathbf W \cdot (\mathbf{Kd}-\mathbf F) = 0 \cdot [\sum_{j=1}^6 K_{1j}d_j - F_1] + 0 \cdot [\sum_{j=1}^6 K_{2j}d_j - F_2] + 1 \cdot [\sum_{j=1}^6 K_{3j}d_j - F_3] + 0 \cdot [\sum_{j=1}^6 K_{4j}d_j - F_4] + ... + 0 \cdot [\sum_{j=1}^6 K_{6j}d_j - F_6] = 0 \Rightarrow$$

$$\sum_{j=1}^6 K_{3j}d_j = F_3 \qquad \qquad (3rd \quad Equation)$$

CHOICE 4: Select W such that W1=...=W3=0, W4=1, W5=W6=0
 * $${\underset{1 \times 6}\mathbf W^T}= \begin{bmatrix}

0 & 0 & 0 & 1 & 0 & 0 \\ \end{bmatrix}_{1 \times 6}$$

Thus,

$$ \mathbf W \cdot (\mathbf{Kd}-\mathbf F) = 0 \cdot [\sum_{j=1}^6 K_{1j}d_j - F_1] + ... + 0 \cdot [\sum_{j=1}^6 K_{3j}d_j - F_3] + 1 \cdot [\sum_{j=1}^6 K_{4j}d_j - F_4] + 0 \cdot [\sum_{j=1}^6 K_{5j}d_j - F_5] + 0 \cdot [\sum_{j=1}^6 K_{6j}d_j - F_6] = 0 \Rightarrow$$

$$\sum_{j=1}^6 K_{4j}d_j = F_4 \qquad \qquad (4th \quad Equation)$$

CHOICE 5: Select W such that W1=...=W4=0, W5=1, W6=0
 * $${\underset{1 \times 6}\mathbf W^T}= \begin{bmatrix}

0 & 0 & 0 & 0 & 1 & 0 \\ \end{bmatrix}_{1 \times 6}$$

Thus,

$$ \mathbf W \cdot (\mathbf{Kd}-\mathbf F) = 0 \cdot [\sum_{j=1}^6 K_{1j}d_j - F_1] + ... + 0 \cdot [\sum_{j=1}^6 K_{4j}d_j - F_4] + 1 \cdot [\sum_{j=1}^6 K_{5j}d_j - F_5] + 0 \cdot [\sum_{j=1}^6 K_{6j}d_j - F_6] = 0 \Rightarrow$$

$$\sum_{j=1}^6 K_{5j}d_j = F_5 \qquad \qquad (5th \quad Equation)$$

CHOICE 6: Select W such that W1=...=W5=0, W6=1
 * $${\underset{1 \times 6}\mathbf W^T}= \begin{bmatrix}

0 & 0 & 0 & 0 & 0 & 1 \\ \end{bmatrix}_{1 \times 6}$$

Thus,

$$ \mathbf W \cdot (\mathbf{Kd}-\mathbf F) = 0 \cdot [\sum_{j=1}^6 K_{1j}d_j - F_1] + ... + 0 \cdot [\sum_{j=1}^6 K_{5j}d_j - F_5] + 1 \cdot [\sum_{j=1}^6 K_{6j}d_j - F_6] = 0 \Rightarrow$$

$$\sum_{j=1}^6 K_{6j}d_j = F_6 \qquad \qquad (6th \quad Equation)$$

Hence, $$ \quad \mathbf{Kd}=\mathbf F \quad$$ [or Eqn. (1)] is verified.

Principal of Virtual Work: Revisited
Accounting for boundary conditions:

2 bar truss example:

d1 = d2 = d5 = d6 = 0  →   W1 = W2 = W5 = W6 = 0


 * Weighting Coefficient must be "kinematically admissible", ie: cannot violate the boundary conditions.


 * Weighting Coefficients = Virtual Displacements (Calculus of Variations)

$$\mathbf W \cdot (\mathbf {Kd}- \mathbf F) = \begin{pmatrix} W_3 \\ W_4 \end{pmatrix} \cdot (\overline{\underset{2 \times 2}\mathbf K} \overline{\underset{2 \times 1}\mathbf d} - \overline{\underset{2 \times 1}\mathbf F}) = 0 \qquad \qquad  for \quad all \quad \begin{pmatrix} W_3 \\ W_4 \end{pmatrix} \qquad (3)$$

Recall:

\begin{bmatrix} K_{33} & K_{34} \\ K_{43} & K_{44} \\ \end{bmatrix}$$
 * $$ \quad \overline \mathbf K =

d_3 \\ d_4 \end{pmatrix}$$
 * $$ \quad \overline \mathbf d =\begin{pmatrix}

F_3 \\ F_4 \end{pmatrix}$$
 * $$ \quad \overline \mathbf F =\begin{pmatrix}

$$\overline \mathbf K \overline \mathbf d = \overline \mathbf F \qquad (4)$$

Proof: $$ (3) \iff (4) $$
$$Eq. (3) \iff Eq. (4)$$

Proof:
 * A) $$\quad (4) \iff (3)\quad$$ : trivial
 * B) Want to show $$\quad (3) \Rightarrow (4)\quad$$:
 * $$(3) \Rightarrow \mathbf W \cdot (\overline \mathbf {Kd}- \overline \mathbf F) = 0 \qquad for \quad all \quad \begin{pmatrix}

W_3 \\ W_4 \end{pmatrix}$$

CHOICE 1: Select W such that W3=1, W4=0
 * $${\underset{2 \times 1}\mathbf W}= \begin{pmatrix}

1 \\ 0 \\ \end{pmatrix}_{2 \times 1}$$

Thus,

$$ \mathbf W \cdot (\mathbf{Kd}-\mathbf F) = 1 \cdot [\sum_{j=3}^4 K_{3j}d_j - F_3] + 0 \cdot [\sum_{j=3}^4 K_{4j}d_j - F_4] = 0 \Rightarrow$$

$$\sum_{j=1}^6 K_{3j}d_j = F_3 \qquad \qquad (1st \quad Equation)$$

CHOICE 2: Select W such that W3=0, W4=1
 * $${\underset{2 \times 1}\mathbf W}= \begin{pmatrix}

0 \\ 1 \\ \end{pmatrix}_{2 \times 1}$$

Thus,

$$ \mathbf W \cdot (\mathbf{Kd}-\mathbf F) = 0 \cdot [\sum_{j=3}^4 K_{3j}d_j - F_3] + 1 \cdot [\sum_{j=3}^4 K_{4j}d_j - F_4] = 0 \Rightarrow$$

$$\sum_{j=1}^6 K_{4j}d_j = F_4 \qquad \qquad (2nd \quad Equation)$$

Hence, $$ \quad \overline \mathbf K \overline \mathbf d= \overline \mathbf F \quad$$ [or Eqn. (4)] is verified.

Review
$$d^{i}_{4x1}\Rightarrow\mathbf{d(lmm(i,:))}$$


 * Element DOF'S in the global (x,y) coordinate system for element (i)

$$d_{6x1}$$


 * 6 bar truss DOF's in global (x,y) coordinate system


 * Note: On a side note, the bug is explained in component element forces. Correct the code and rerun 2 bar truss problem and interpret "results"

$$ \mathbf{\underset{2 \times 1}q^{(e)}}=\mathbf{\underset{2 \times 4}T^{(e)}}\mathbf{\underset{4 \times 1}d^{(e)}} $$
 * Remember

Principle of Virtual Work II

 * The course grade is an example of a linear combination:
 * $$\alpha_o$$ x hw grade + $$sum_i=1)^3 \alpha_i$$, Exam i


 * Dereving:

$$\mathbf k^{e} = \mathbf {T^{(e)^T} \hat k^{(e)} T^{(e)}}$$ which is also found on p14-3 and p32-3


 * Recall FD relation with axial DOF'S  $$\mathbf{q^{e}}$$

$$ \mathbf{\underset{2 \times 2} \hat k^{(e)}}\mathbf{\underset{2 \times 1}q^{(e)}}=\mathbf{\underset{2 \times 1}p^{(e)}} $$

$$\Rightarrow\mathbf{\underset{2 \times 2} \hat k^{(e)}}\mathbf{\underset{2 \times 1}q^{(e)}}-\mathbf{\underset{2 \times 1}p^{(e)}}=0_{2x1}\;\;(1)$$


 * PVW: $$\mathbf{w}\cdot\mathbf{\underset{2 \times 2} \hat k^{(e)}}\mathbf{\underset{2 \times 1}q^{(e)}}-\mathbf{\underset{2 \times 1}p^{(e)}}=0_{2x1}\;\;(2)$$  for all $$\mathbf{\hat w_{2x1}}$$


 * Proof:


 * We showed that (1)   $$\Leftrightarrow$$   (2)     p24-1

$$ \mathbf{\underset{2 \times 1}q^{(e)}}=\mathbf{\underset{2 \times 4}T^{(e)}}\mathbf{\underset{4 \times 1}d^{(e)}} $$


 * Where $$\mathbf{\underset{2 \times 1}q^{(e)}}$$ is the real displacement

$$ \mathbf{\underset{2 \times 1}\hat w}=\mathbf{\underset{2 \times 4}T^{(e)}}\mathbf{\underset{4 \times 1}w} $$
 * Similarly
 * Where $$\mathbf{\underset{2 \times 1}\hat w}$$ is the virtual displacement

Conversion of Force Displacement

 * It is important to take note and go back into the book and review Chapter 2 sections 2.1,2.2,2.6,2.7

$$\mathbf{\underset{2 \times 1}\hat w}=$$ virtual axial displacement

$$\mathbf{\underset{4 \times 1}w}=$$ virtual displacement in global coordinate system, corresponding to $$\mathbf{\underset{4 \times 1}d^{(e)}}$$

Now we replace Equations (3) and (4) into equation (2) (p 26-2)

$$(\mathbf{T^{(e)}}\mathbf{w})\cdot\mathbf{ \hat k^{(e)}}(\mathbf{T^{(e)}}\mathbf{d^{(e)}})-\mathbf{p^{(e)}}=0\;\;(5)$$  for all $$\mathbf{w_{4x1}}$$

Recall: $$(\mathbf{AB^T}=\mathbf{B^T}\mathbf{A^T}\;\;(6)$$

For example: $$\begin{bmatrix} 1 & 2 & 3     \\  3 & 4 & 5 \end{bmatrix} $$

Recall:

$$\mathbf{a_{1}b}=\mathbf{a^{T}b}\;\;(7)$$ is a scalar

now applying (7) and (6) to (5)

$$(\mathbf{T^{(e)}}\mathbf{w})^{T}\cdot\mathbf{ \hat k^{(e)}}(\mathbf{T^{(e)}}\mathbf{d^{(e)}})-\mathbf{p^{(e)}}=0_{1x1}$$ for all $$\mathbf{w_{4x1}}$$

$$\rightarrow$$  $$(\mathbf{T^{(e)T}}\mathbf{w^{T}})^{T}\cdot\mathbf{ \hat k^{(e)}}(\mathbf{T^{(e)}}\mathbf{d^{(e)}})-\mathbf{p^{(e)}}=0_{1x1}$$  for all $$\mathbf{w_{4x1}}$$

$$\rightarrow$$  $$\mathbf{w}\cdot[(\mathbf {T^{(e)^T} \hat k^{(e)} T^{(e)}})\mathbf{d^{(e)}})-(\mathbf{T^{(e)}}\mathbf{p^{(e)}})]=0$$  for all $$\mathbf{w_{4x1}}$$

$$\rightarrow$$  $$(\mathbf{T^{(e)T} \hat k^{(e)} T^{(e)}})= \mathbf{k^{(e)}}$$

$$\rightarrow$$  $$(\mathbf{T^{(e)}}\mathbf{p^{(e)}})=\mathbf{f^{(e)}}$$


 * Now we can say and prove

$$\rightarrow$$   $${\mathbf W} \cdot [(\mathbf {K^{(e)}d^{(e)}}- \mathbf {f^{(e)}}) = 0$$ for all $$\mathbf{w}$$

Review:


 * So far we have been dealing with a discrete case (not continuous) [matrices]

Setup for a Continous Case Using Partial Differential Equations (PDE's)
Using a sample motivational problem, we look at the following two conditions:


 * The elastic bar with varying cross sectional area $$\mathbf{A(x)}$$,$$\mathbf{E(x)}$$, also subject to a varying axial load(distributed and time independent) + concentrated load + inertia force(dyn)



Working with Partial Differential Equations and Boundary Conditions
Looking back on the infinitesimal element, dx it is shown below in Figure 3.



$$\sum{F_x}=0= -N(x,t) +N(x +dx,t) + f(x,t)dx - m(x) \ddot{u}dx$$

$$= \frac{\partial N}{\partial x}(x,t)dx + h.o.t. + f(x,t)dx + m(x)\ddot{u}dx\;\;(1)$$

$$f(x +dx) = F(x) + \frac{df}{dx}(x) dx + \frac{1}{2}\frac{{d^2}f}{dx^2} + ..... $$

Equation (1) $$\rightarrow$$ $$\frac{\partial N}{\partial x}+ f = m\ddot{u}\;\;(2)$$ which is the equation of motion (EDM)

$$N(x,t)=A(x)\sigma(x)\;\;(3)$$ is the constructive relation where

$$\sigma(x) = E(x)\epsilon(x,t)$$ where

$$\epsilon(x,t)=\frac{\partial U}{\partial x}(x,t)$$

PDE of motion

(3) in (2) yields: $$\frac{\partial}{\partial x}[A(x)E(x)\frac{\partial u}{\partial x}] + f(x,t) = m(x) \ddot{u}\;\;(4)$$ where $$\ddot{u} = \frac{{\partial^2}u}{\partial t^2}$$


 * Need:
 * 2 BC'S (2nd order derivation with respect to x)
 * 2 IC'S (initial displacement, initial velocity)



$$u(o,t)=0=u(L,t)$$

(2nd derivative with respect to t)



1) $$u(o,t) = 0$$

$$N(L,t) = F$$

$$N(L,t)=A(L)\sigma(L,t)$$ where $$(\sigma(L,t) = E(L)\epsilon(L,t)$$ where $$\epsilon(x,t)=\frac{\partial U}{\partial x}(x,t)$$

3-Bar Space Truss System
This section solves a 3-Bar Space Truss System found in p230 of the textbook. It is similar to the 3-Bar Truss System in HW3, but is in the x-y-z plane.

Statics Method
The 3-Bar Truss System was proved to be Statically Indeterminate. (See the previous link for the proof.) This 3-Bar Space Truss System is Statically Determinate. The addition of the z-axis gives another equation to solve for the reaction forces. Therefore, three equations are given to solve for three unknowns.

$$\sum{F_{x}}=0$$ $$\sum{F_{y}}=0$$ $$\sum{F_{z}}=0$$

The following MATLAB code helps solve the reaction forces for each element.

The results are shown below:

Therefore, according to the Statics Method the reaction forces for each element are:

$$\R_{1}=20375 N$$ $$\R_{2}=13214 N$$ $$\R_{3}=-23148 N$$

FEA Method
Another method to solve the 3-Bar Space Truss System is using the FEA Method. This will implement the cross-sectional area and modulus of elasticity of each element to solve for the displacement.

Required MATLAB Functions
Before running the 3-Bar Space Truss System program, the following three MATLAB program functions must be in the same directory. They are obtained from the textbook website (See HW1 for textbook information). Matlab Truss Files

SpaceTrussElement.m
This function takes the Modulus of Elasticity (e), the Cross-Sectional Area (A) and the Nodal Coordinates (coord) of the element and generates the local stiffness matrix.

NodalSoln.m
This function takes the Global Stiffness Matrix (K), the Global Force vector (R), and two inputs that are the boundary conditions. The output is an array of the displacement and reaction forces.

SpaceTrussResults.m
This function inputs the Modulus of Elasticity (e), Cross-Sectional Area (A), Nodes of Each Element (coord), and the Displacement calculated in the previous function (disps). The output are the Strain, Stress, and Axial Force of each element.

Main MATLAB Function
The following MATLAB program (ThreeBarSpaceTrussEx.m) was also taken from the ZIP file provided by the textbook. This uses the FEA Method to calculate the displacement and forces. Note: "% ***" comments are modifications to the function. They decrease the amount of code lines, but still performs the same way.

Results
The following are the results of the previous program. The Connectivity Array (conn), Location Matrix Master Array (lmm), Displacement (d), Reactions (reactions), and Strain/Stress/Axial Forces (results)

The Reactions calculated using the FEA Method are equal to the Statics Method.

$$\R_{1}=20375 N$$ $$\R_{2}=13214 N$$ $$\R_{3}=-23148 N$$

Plot
The following MATLAB function is used to plot the 3-Bar Space Truss System. There are comments embedded in the function.

The Deformed Displacement is magnified by a factor of 500 for better viewing.

Plane View Down the X-Axis

Plane View Down the Y-Axis

Plane View Down the Z-Axis

Overall View

2-Bar Truss System
The 2-Bar Truss System of HW2 must be revisited due to a bug found in the MATLAB program to calculate the Strain, Stress, and Axial Forces of the elements.

Required MATLAB Functions
Before running the 2-Bar Truss System program, the following three MATLAB program functions must be in the same directory. They are obtained from the textbook website (See HW1 for textbook information). Matlab Truss Files

PlaneTrussElement.m
This function takes the Modulus of Elasticity (e), the Cross-Sectional Area (A) and the Nodal Coordinates (coord) of the element and generates the local stiffness matrix.

NodalSoln.m
NodalSoln.m

PlaneTrussResults.m
This function inputs the Modulus of Elasticity (e), Cross-Sectional Area (A), Nodes of Each Element (coord), and the Displacement calculated in the previous function (disps). The output are the Strain, Stress, and Axial Force of each element.

Bugged Original MATLAB Function
The source of the bug is in this line of code:

The array of e and A are passed though, where it should only be the e and A specifically to the element being passed though. The whole bugged function can be found below.

Fixed MATLAB Function
To fix this bug, "(i)" must be added to the e and A inputs in order for the specific elemental values to be passed into the function. The fixed function can be found below.

Results Array
The following results array is from the bugged function. The values have no meaning to the problem.

The following results array is from the fixed function. These values are right at showing the Strain, Stress, and Axial Force of each element.

These values can be compared to the results of the Statics Solution

6-Bar Space Truss System
This section solves the 6-Bar Truss System found in p226 of the textbook.

Required MATLAB Functions
Before running the 6-Bar Truss System program, the following three MATLAB program functions must be in the same directory. They are obtained from the textbook website (See HW1 for textbook information). Matlab Truss Files

PlaneTrussElement.m
PlaneTrussElement.m

NodalSoln.m
NodalSoln.m

PlaneTrussResults.m
PlaneTrussResults.m

Main MATLAB Function
The following MATLAB program (SixBarTrussEx.m) was also taken from the ZIP file provided by the textbook. It is the main function to break down the 6-Bar Truss System.

Results
The following are the results of the 6-Bar Truss System

Plot
The following MATLAB function is used to plot the 6-Bar Truss System. There are comments embedded in the function.

The Deformed Plot displacement is magnified by 1000 for better viewing.

Modified Main MATLAB Function
The following function is a modification to SixBarTrussEx.m when the elements do not have the same Modulus of Elasticity (e).

Results
The following are the results to the modified 6-Bar Truss System

Plot
The following MATLAB function is used to plot the two cases of the 6-Bar Truss System. Case 1 is where the Modulus of Elasticity are equal for all the elements. Case 2 is where the Modulus of Elasticity are not equal for all the elements. There are comments embedded in the function.

In both Deformed Plot displacements is magnified by 2000 for better viewing.

Contributing Members
The following Team Wiki members contributed to this report.

Rodney Dagulo --Eml4500.f08.wiki.dagulo.r 6:44, 6 November 2008 (UTC)

Renee Hood --Eml4500.f08.wiki.hood 6:44, 7 November 2008 (UTC)

Thomas Kehoe --Eml4500.f08.wiki.Kehoe 8:49, 7 November 2008 (UTC)

Cortland Glowacki --Eml4500.f08.wiki.cort 11:13, 7 November 2008 (UTC)

Ricardo Lopez --Eml4500.f08.wiki.Lopez 4:.08, 7 November 2008 (UTC)

Gonzalo Barcia --Eml4500.f08.wiki.barcia 12:12, 12 November 2008 (UTC)