User:Eml4500.f08.bottle.vitello/HW 5

Principle of Virtual Work
In order to use the Principle of Virtual Work method, we must show justification for the eliminations of rows 1, 2, 5, and 6 to obtain $$ \textbf{K}_{2x2} $$ in a two-bar truss.

The force displacement relation for a two-bar truss system is:

$$ \textbf{Kd}-\textbf{F}=\textbf{0}_{6x1}\ $$

For the Principle of Virtual Work, this is derived to:

$$ \textbf{W}_{6x1}\cdot (\textbf{Kd}-\textbf{F})_{6x1}=0_{1x1}\ $$

with W being the weighing matrix, for all $$ \textbf{W}_{6x1}\ $$

In order to prove that these two equations are both equivalent to each other, we use the following proof:

Proof: Select W at $$ \textbf{W}^{T}_{1x6}=\begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \end{bmatrix}_{1x6}\ $$ plugging W back into the Principle of Virtual Work equation gives: $$ \begin{bmatrix}1 & 0 & 0 & 0 & 0 & 0 \end{bmatrix} \cdot (\textbf{Kd}-\textbf{F}) = 1 \cdot \bigg[ \sum_{j=1}^{6}{K_{1j}d_{j}} - F_{1} \bigg]+ 0\cdot \bigg[\sum_{j=1}^{6}{K_{2-6j}d_{j}} - F_{2-6} \bigg]=0 $$ Therefore, $$ \textbf{W}\cdot (\textbf{Kd}-\textbf{F})=\sum_{j=1}^{6}{K_{1j}d_{j}=F_{1}}\ $$ Following through as before for the rest of the matrices gives these results: $$ \textbf{W}^{T}_{1x6}=\begin{bmatrix} 0 & 1 & 0 & 0 & 0 & 0 \end{bmatrix}_{1x6}\ $$ $$ \begin{bmatrix}0 & 1 & 0 & 0 & 0 & 0 \end{bmatrix} \cdot (\textbf{Kd}-\textbf{F}) = 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{1j}d_{j}} - F_{1} \bigg]+ 1\cdot \bigg[\sum_{j=1}^{6}{K_{2j}d_{j}} - F_{2} \bigg]+ 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{3-6j}d_{j}} - F_{3-6} \bigg]=0 $$ Therefore, $$ \textbf{W}\cdot (\textbf{Kd}-\textbf{F})=\sum_{j=1}^{6}{K_{2j}d_{j}=F_{2}}\ $$ $$ \textbf{W}^{T}_{1x6}=\begin{bmatrix} 0 & 0 & 1 & 0 & 0 & 0 \end{bmatrix}_{1x6}\ $$ $$ \begin{bmatrix}0 & 0 & 1 & 0 & 0 & 0 \end{bmatrix} \cdot (\textbf{Kd}-\textbf{F}) = 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{1-2j}d_{j}} - F_{1-2} \bigg]+ 1\cdot \bigg[\sum_{j=1}^{6}{K_{3j}d_{j}} - F_{3} \bigg]+ 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{4-6j}d_{j}} - F_{4-6} \bigg]=0 $$ Therefore, $$ \textbf{W}\cdot (\textbf{Kd}-\textbf{F})=\sum_{j=1}^{6}{K_{3j}d_{j}=F_{3}}\ $$ $$ \textbf{W}^{T}_{1x6}=\begin{bmatrix} 0 & 0 & 0 & 1 & 0 & 0 \end{bmatrix}_{1x6}\ $$ $$ \begin{bmatrix}0 & 0 & 0 & 1 & 0 & 0 \end{bmatrix} \cdot (\textbf{Kd}-\textbf{F}) = 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{1-3j}d_{j}} - F_{1-3} \bigg]+ 1\cdot \bigg[\sum_{j=1}^{6}{K_{4j}d_{j}} - F_{4} \bigg]+ 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{5-6j}d_{j}} - F_{5-6} \bigg]=0 $$ Therefore, $$ \textbf{W}\cdot (\textbf{Kd}-\textbf{F})=\sum_{j=1}^{6}{K_{4j}d_{j}=F_{4}}\ $$ $$ \textbf{W}^{T}_{1x6}=\begin{bmatrix} 0 & 0 & 0 & 0 & 1 & 0 \end{bmatrix}_{1x6}\ $$ $$ \begin{bmatrix}0 & 0 & 0 & 0 & 1 & 0 \end{bmatrix} \cdot (\textbf{Kd}-\textbf{F}) = 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{1-4j}d_{j}} - F_{1-4} \bigg]+ 1\cdot \bigg[\sum_{j=1}^{6}{K_{5j}d_{j}} - F_{5} \bigg]+ 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{6j}d_{j}} - F_{6} \bigg]=0 $$ Therefore, $$ \textbf{W}\cdot (\textbf{Kd}-\textbf{F})=\sum_{j=1}^{6}{K_{5j}d_{j}=F_{5}}\ $$ $$ \textbf{W}^{T}_{1x6}=\begin{bmatrix} 0 & 0 & 0 & 0 & 0 & 1 \end{bmatrix}_{1x6}\ $$ $$ \begin{bmatrix}0 & 0 & 0 & 0 & 0 & 1 \end{bmatrix} \cdot (\textbf{Kd}-\textbf{F}) = 0 \cdot \bigg[ \sum_{j=1}^{6}{K_{1-5j}d_{j}} - F_{1-5} \bigg]+ 1\cdot \bigg[\sum_{j=1}^{6}{K_{6j}d_{j}} - F_{6} \bigg]=0 $$ Therefore, $$ \textbf{W}\cdot (\textbf{Kd}-\textbf{F})=\sum_{j=1}^{6}{K_{6j}d_{j}=F_{6}}\ $$ Hence, adding up all of these results gives us $$ \textbf{Kd}=\textbf{F} $$.

Going back to the Principle of virtual work and the two-bar truss, we had originally removed the displacements at d1, d2, d5, and d6. These results for the weighing coefficient also result in $$ W_{1}=W_{2}=W_{5}=W_{6}=0 $$. Using only the virtual displacement at d3 and d4 of the two-bar truss system gives:

$$ \textbf{W}\cdot (\textbf{Kd}-\textbf{F})=\begin{Bmatrix} w_{3}\\w_{4}

\end{Bmatrix}\cdot (\textbf{K}_{2x2}\textbf{d}_{2x1}-\textbf{F}_{2x1})=0 $$

In which case the results for K, d, and F matrices gives:

$$ \textbf{K}=\begin{bmatrix} K_{33} & K_{34}\\ K_{43} & K_{44} \end{bmatrix} $$

$$ \textbf{d}=\begin{Bmatrix} d_{3}\\d_{4}

\end{Bmatrix} $$

$$ \textbf{F}=\begin{Bmatrix} F_{3}\\F_{4}

\end{Bmatrix} $$

We derive $$ k^{(e)}_{4X4}=T^{(e)^{T}}_{4X2}\hat{k}^{(e)}_{2X2}T^{(e)}_{2X4} $$ Recall the FD relationship with axial dof's $$q^{(e)}: \! $$ $$ \hat{k}^{(e)}_{2X4}q^{(e)}_{2X1}=p^{(e)}_{2X1} $$ $$ \Rightarrow equation (1) \hat{k}^{(e)}q^{(e)}-p^{(e)}= 0_{2X1}\! $$ Therefore: $$ \hat{W}_{2X1}\circ \underbrace{(\hat{k}^{(e)}q^{(e)}-p^{(e)})}_{2X1}=0_{1X1}$$ for all $$ \hat{W}_{2X1} \! $$

Recall that $$ q^{(e)}_{2X1}=T^{(e)}_{2X4}d^{(e)}_{4X1} $$ similarly, $$ \hat{w_{2X1}}=T^{(e)}_{2X4}w_{4X1}$$ where $$\hat{w}_{2X1}$$ is the virtual displacement corresponding to $$q^{(e)}_{2X1}$$ and $$w_{4X1} \!$$ is the virtual displacement in the global coordinate system corresponding to $$d^{(e)}_{4X1}$$

If we place equation $$ (3) \! $$ and $$ (4) \! $$ in equation $$ (2) \! $$ then we get $$ equation(5) = \! $$$$ (T^{(e)}w)\circ [\hat{k}^{(e)}(T^{(e)}d^{(e)})-P^{(e)}] =0 $$ for all $$ w_{4X1} \!$$

Recall: $$ equation (6) = \! $$$$ (AB)^{T}=B^{T}A^{T}\! $$  (see below for proof) and $$ equation (7) = \!$$ $$a\circ b=a^{T}b$$ Substituting equations $$ (6) \!$$ and $$ (7) \!$$ into $$ (5) \!$$ we get $$(T^{(e)}w)^{T}[\hat{k}^{(e)}(T^{(e)}d^{(e)})-P^{(e)}]=0_{1X1} $$ for all $$ w_{4X1} \! $$ $$ \Rightarrow w^{T}T^{(e)}[\hat{k}^{(e)}(T^{(e)}d^{(e)})-P^{(e)}]-0 $$ $$ \Rightarrow w\circ [\underbrace {(T^{(e)^{T}}\hat{k}^{(e)}T^{(e)})}_{k^{(e)}}d^{(e)}-\underbrace {(T^{(e)^{T}}P^{(e)})}_{f^{(e)}}]$$ for all $$ w_{4X1} \! $$  $$ \Rightarrow w\circ [k^{(e)}d^{(e)}-f^{(e)}]=0 $$ for all $$ w \! $$  therefore $$ k^{(e)}d^{(e)}=f^{(e)} \!$$

Continuous Case with PDE's
Motivational Model Problem: Elastic Bar with varying $$ A(x) \! $$ and $$ E(x) \! $$, subject to a varying axial load (distributed load), concentrated loading, and inertial forces (damping).



$$ \sum{F_{x}}=0=-N(x,t)+N(x +dx, t)+f(x,t)dx-m(x)\ddot{u} \! $$ $$ equation (1) \! $$$$=\frac{\partial N}{\partial x}+h.o.t.+f(x,t)-m(x)\ddot{u}dx \! $$ neglecting the higher order terms, we recall the Taylor series expansion: $$f(x+dx)=f(x)+\frac{df(x)}{dx}+ \underbrace {\frac{1}{2}\frac{d^{2}f(x)}{dx^{2}}dx^{2}+\cdots}_{h.o.t.} $$

Equation $$ (1) \! $$ becomes $$ equation (2) = \! $$$$\frac{\partial N}{\partial x}+f=m\ddot{u}\! $$ the equation for the motion of the elastic bar $$ equation (3)= \! $$ $$ N(x,t)=A(x)\underbrace {\sigma (x)}_{E(x)\underbrace {\varepsilon (x,t)}_{\frac{\partial u (x,t)}{\partial x}}}$$ equation $$ (3) \! $$ into equation $$ (2) \! $$ yields: $$ \frac{\partial }{\partial x}[A(x)E(x)\frac{\partial u}{\partial x}]+f(x,t)=m(x)\underbrace {\ddot{u}}_{\frac{\partial ^{2}u}{\partial t^{2}}} $$ In order to solve this problem, we need 2 boundary conditions and 2 initial conditions.

6-Bar Truss: Case 1
For the first case, all of the values for the modulus of elasticity and cross sectional area are the same.

The following code was compiled to produce the plot for the deformed and undeformed six bar truss.



6-Bar Truss: Case 2
For the second case, all of the values for the modulus of elasticity are different, while the values for the cross sectional area remain the same. The values for the different moduli can be found in the code below.

The following code was compiled to produce the plot for the deformed and undeformed six bar truss, including the deformed truss with the varying moduli of elasticity.



Truss Systems in 3D
The next section of HW 5 will be discussing truss systems in three dimensional space, which had previously not been considered. The axial force displacement relation, commonly referred to as the FD relation, is very similar when compared to the 2-D truss element. Note that the equation of the 2-D truss element is: $$\mathbf{kd}=\mathbf{F}$$ We also recall that the FD relation for axial displacement of each element in the notation used in class is as follows: $$\frac{EA}{L}\begin{pmatrix} 1 & -1\\ -1 & 1 \end{pmatrix} \begin{pmatrix} d_{1}\\d_{2} \end{pmatrix} = \begin{pmatrix} P_{1}\\P_{2} \end{pmatrix} \Rightarrow \mathbf{k^{(e)}q^{(e)}}=\mathbf{p^{(e)}}$$ The main difference for the 3-D truss is that each matrix is a bit larger to account for the movement in the z-direction. The local degrees of freedom become the 6x1 matrix $$\mathbf{d^{(e)}}=\begin{Bmatrix} d_{1}^{(e)} \\ d_{2}^{(e)} \\ d_{3}^{(e)} \\ d_{4}^{(e)} \\ d_{5}^{(e)} \\ d_{6}^{(e)} \end{Bmatrix}$$ and the local forces become the 6x1 matrix below. $$\mathbf{f^{(e)}}=\begin{Bmatrix} f_{1}^{(e)} \\ f_{2}^{(e)} \\ f_{3}^{(e)} \\ f_{4}^{(e)} \\ f_{5}^{(e)} \\ f_{6}^{(e)} \end{Bmatrix} $$ Now the transform matrix T(e) must contain two extra columns, but the axial displacement q(e) and axial load p(e) will remain as 2x1 matrices. The transform matrix will become: $$\mathbf{T^{(e)}}=\begin{pmatrix} l_{s} & m_{s} & n_{s} & 0 & 0 & 0\\ 0 & 0 & 0 & l_{s} & m_{s} & n_{s} \end{pmatrix}$$ The transform matrix for the 3-D truss system was derived similarly to the 2-D transform matrix in lecture 12. The figure below displays the unit vectors in the normal x-y coordinate axis along with the rotated coordinate axis. The displacement vector for a local node is defined as follows. $$ \bar{d}_{1}^{(e)}=d_{1}^{(e)}\hat{i}+d_{2}^{(e)}\hat{j}+d_{3}^{(e)}\hat{k} $$ It is possible to take the dot product of the displacement vector and the rotated unit vector and carry out the steps listed below. $$ q_{1}^{(e)}=(d_{1}^{(e)}\hat{i}+d_{2}^{(e)}\hat{j}+d_{3}^{(e)}\hat{k})\hat{\tilde{i}} $$ $$ q_{1}^{(e)}=d_{1}^{(e)}(\hat{i}\cdot\hat{\tilde{i}})+d_{2}^{(e)}(\hat{j}\cdot\hat{\tilde{i}})+d_{3}^{(e)}(\hat{k}\cdot\hat{\tilde{i}}) $$ $$ q_{1}^{(e)}=l^{(e)}d_{1}^{(e)}+m^{(e)}d_{2}^{(e)}+n^{(e)}d_{3}^{(e)} $$ $$ q_{1}^{(e)}=\begin{bmatrix} l^{(e)} & m^{(e)} & n^{(e)} \end{bmatrix} \begin{Bmatrix} d_{1}^{(e)}\\ d_{2}^{(e)}\\ d_{3}^{(e)} \end{Bmatrix} $$ And Similarly, for local node 2, the following can also be said. $$ q_{2}^{(e)}=\begin{bmatrix} l^{(e)} & m^{(e)} & n^{(e)} \end{bmatrix} \begin{Bmatrix} d_{4}^{(e)}\\ d_{5}^{(e)}\\ d_{6}^{(e)} \end{Bmatrix} $$ Combining the axial displacements into one expression results in the following expression: $$ \begin{Bmatrix} q_{1}^{(e)}\\ q_{2}^{(e)} \end{Bmatrix}= \begin{bmatrix} l^{(e)} & m^{(e)} & n^{(e)} & 0 & 0 & 0\\ 0 & 0 & 0 & l^{(e)} & m^{(e)} & n^{(e)} \end{bmatrix} \begin{Bmatrix} d_{1}^{(e)}\\ d_{2}^{(e)}\\ d_{3}^{(e)}\\ d_{4}^{(e)}\\ d_{5}^{(e)}\\ d_{6}^{(e)} \end{Bmatrix} $$ This expression can be written in its most simple form as the following: $$\mathbf{q}^{(e)}=\mathbf{T}^{(e)}\mathbf{d}^{(e)}$$ Similarly, the local forces can be multiplied by the same transform matrix to equal the axial forces. $$\mathbf{p}^{(e)}=\mathbf{T}^{(e)}\mathbf{f}^{(e)}$$

Knowing the definition of T, k and r can be expressed as $$k_l d_l = r_l$$ $$k_l T d = r_l$$ $$k d = r$$ $$k = T^T k_l T$$ $$r = T^T r_l$$ Where the element equation for a space truss element can be expressed as:

$$ (EA/L) \begin{bmatrix} l_{s}^{2} & m_{s}l_{s} & n_{s}l_{s} & -l_{s}^{2} & -m_{s}l_{s} & -n_{s}l_{s}\\ m_{s}l_{s}& m_{s}^{2} & m_{s}n_{s} & -m_{s}l_{s} & -m_{s}^{2} & -m_{s}n_{s}\\  n_{s}l_{s}& m_{s}n_{s} & n_{s}^{2} & -n_{s}l_{s} & -m_{s}n_{s} & -n_{s}^{2}\\  -l_{s}^{2}& -m_{s}l_{s} & -n_{s}l_{s} & l_{s}^{2} & m_{s}l_{s} & n_{s}l_{s}\\  -m_{s}l_{s}& -m_{s}^{2} & -m_{s}n_{s} & m_{s}l_{s} & m_{s}^{2} & m_{s}n_{s}\\  -n_{s}l_{s}& -m_{s}n_{s} & -n_{s}^{2} & n_{s}l_{s} & m_{s}n_{s} & n_{s}^{2} \end{bmatrix} \begin{bmatrix} u_1\\v_1\\w_1\\u_2\\v_2\\w_2 \end{bmatrix} = \begin{bmatrix} F_1x\\F_1y\\F_1z\\F_2x\\F_2y\\F_2z \end{bmatrix} $$

Running the following code from the course textbook:

Results in:

Knowing that

$$\sum{F_{x}}= R_{1}l^{(1)} + R_{2}l^{(2)} + R_{3}l^{(3)} = 0$$ $$ \sum{F_{y}}= R_{1}m^{(1)} + R_{2}m^{(2)} + R_{3}m^{(3)} = -P$$ $$ \sum{F_{z}}= R_{1}n^{(1)} + R_{2}n^{(2)} + R_{3}n^{(3)} = 0$$

and from the MATLAB solution (which corresponds to the forces defined on page 231 of the course textbook)

$$ R_{1} = 20375$$ $$ R_{2} = 13214$$ $$ R_{3} = -23149$$

With $$ A_{1} = 200$$ $$ A_{2} = 200$$ $$ A_{3} = 600$$

It follows that $$ \sigma_{1} = \frac{R_{1}}{A_{1}} = \frac{20375}{200} = 101.87$$ $$ \epsilon_{1} = \frac{\sigma_{1}}{E_{1}} = \frac{101.875}{200\times10^{3}} = 5.0936\times10^{-4}$$ $$ \sigma_{2} = \frac{R_{2}}{A_{2}} = \frac{13214}{200} = 66.072$$ $$ \epsilon_{2} = \frac{\sigma_{2}}{E_{2}} = \frac{66.07}{200\times10^{3}} = 3.3036\times10^{-4}$$ $$ \sigma_{3} = \frac{R_{3}}{A_{3}} = \frac{-23149}{600} = -38.58$$ $$ \epsilon_{3} = \frac{\sigma_{3}}{E_{3}} = \frac{-38.58}{200\times10^{3}} = -1.929\times10^{-4}$$

Which were already determined through calculations via the MATLAB code above, and hence proving that the problem is statically determinate as solved by both statics and FEA.

The following is MATLAB code written to model the deformed and undeformed 3-bar 3D truss system:

The following plots correspond to the deformed and undeformed 3-Bar 3D truss.

The first three plots correspond to views along the x-, y-, and z- axes.

Also included are views from [-2, -2, 3] and for clarity [3, 3, 3].

Note that the magnifying factor for these images is 1.0.











Prove AB Transpose = B Transpose A Transpose
Given:

$$\textbf{A} = \begin{bmatrix} 1 & 2 & 3\\ 4 & 5 & 6 \end{bmatrix}

\textbf{B} = \begin{bmatrix} 7 & 8 & 9\\ 1 & 2 & 3\\ 4 & 5 & 6 \end{bmatrix}

$$ Such that $$

\mathbf{AB} = \begin{bmatrix} 21 & 27 & 33\\ 57 & 72 & 87 \end{bmatrix}

\mathbf{AB}^T = \begin{bmatrix} 21 & 57 \\ 27 & 72 \\ 33 & 87 \\ \end{bmatrix}

$$ While $$

\textbf{A}^T = \begin{bmatrix} 1 & 4 \\ 2 & 5 \\ 3 & 6 \\ \end{bmatrix}

\textbf{B}^T = \begin{bmatrix} 7 & 1 & 4\\ 8 & 2 & 5\\ 9 & 3 & 6 \end{bmatrix}

\mathbf{B}^T\mathbf{A}^T = \begin{bmatrix} 21 & 57 \\ 27 & 72 \\ 33 & 87 \\ \end{bmatrix} $$

Hence, $$\mathbf{B}^T\mathbf{A}^T = \mathbf{(AB)}^T$$

Research of Composite Materials
 Composite materials  are materials created from at least two constituent materials, generally with differing physical or chemical characteristics such that the resulting material contains properties each contributing element. Consider it as equivalent to a holistic Gestalt approach to fabrication synthesis, such that the final synergetic compound reflects the invested engineering aimed at deriving the resultant requisite material properties.

Historically, basic composite materials included the combination of mud and straw to provide both structure, strength, and formability. More advanced and modern composites include carbon fiber, plywood, fiberglass, and asphalt concrete. Common to most composites is the existence of a matrix element and a reinforcement element. The matrix is considered the composite constituent which encases and provides form for the reinforcement material. The reinforcement, in turn, provide enhancements to the matrix via its own complementary material properties.

Typically, the combination of the matrix and reinforcement material(s) occurs in what's considered a melding event. This results in the finite combination of the two or more materials, hence creating the composite. Further, the physical properties of composites are usually not isotropic, implying that the direction of load will affect the material in different ways. If particular reinforcing fibers are arranged in such a way that a load is applied parallel to their axis of orientation, the composite will fair much better than if the load was applied perpendicular to the fiber arrangement axis. This can sometimes result in failure, which can also be experienced if the reinforcing material comes separated from the matrix.



For more information, it is recommended that the reader consider using the following resource as endorsed by Professor Vu-Quoc's Vision:

http://en.wikipedia.org/wiki/Composite_materials

Weighting Coefficients
Given that $$K d - F = 0 $$ and $$ w ( K d - F) = 0 $$ If w refers to any set of weighting coefficients, it is possible to choose the set which can be defined as $$ w_1 = 0, $$ $$ w_2 = w_3 = ... w_6 = 0 $$ Thus $$ w^{T} = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \end{bmatrix} $$ Which can be expressed as $$w ( K d - F) = 1 * \left[{\sum_{j=1}^{6}K_{1j}d_{j}-F_1} \right] + 0 * \left[{\sum_{j=1}^{6}K_{2j}d_{j}-F_2} \right] + 0 * \left[{\sum_{j=1}^{6}K_{3j}d_{j}-F_3} \right] + ... 0 * \left[{\sum_{j=1}^{6}K_{6j}d_{j}-F_6} \right] = 0 $$ Hence $$w ( K d - F) = 1 * \left[{\sum_{j=1}^{6}K_{1j}d_{j}-F_1} \right] $$ It follows that the choice of w element as a value of 1 will result in the corresponding sum per that chosen w element if all other elements are chosen as a value of 0, as observed through a similar pattern as seen above.

Axial Displacements
From above, if $$ w^{T} = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \end{bmatrix} $$

Then the quotient w (K q - p) for axial displacement can be written as

$$w (K q - p) = 1 * \left[{\sum_{j=1}^{6}K_{1j}q_{j}-p_1} \right] + 0 * \left[{\sum_{j=1}^{6}K_{2j}q_{j}-p_2} \right] + 0 * \left[{\sum_{j=1}^{6}K_{3j}q_{j}-p_3} \right] + ... 0 * \left[{\sum_{j=1}^{6}q_{6j}d_{j}-p_6} \right]$$

Such that

$$w (K q - p) = 1 * \left[{\sum_{j=1}^{6}K_{1j}q_{j}-p_1} \right]$$

It follows that this relationship is true per w element for all w elements selected as value of 1 where all other w elements are selected as 0.

Debugging of Two Bar Truss Code
The code given in conjunction with the second homework report contained an error which was to be corrected. The previous code returned an error when attempting to generate a results matrix. This error was caused by the lines:

for i=1:elems results = [results; PlaneTrussResults(e, A, ...           nodes(conn(i,:),:), d(lmm(i,:)))]; end

This section of code attempted to pass two arrays as scalar values.

To fix this problem, the code was modified to read:

for i=1:elems results = [results; PlaneTrussResults(e(i), A(i), ...   nodes(conn(i,:),:), d(lmm(i,:)))]; end

The code in its entirety is as follows:

% Debugged Two-Bar Truss System Code clear all; e = [3 5]; A = [1 2]; P = 7; L=[4 2]; alpha = pi/3; beta = pi/4; nodes = [ 0, 0; % x,y position of node 1 L(1)*cos(pi/2-alpha), L(1)*sin(pi/2-alpha); % x,y position of node 2 L(1)*cos(pi/2-alpha)+L(2)*sin(beta),L(1)*sin(pi/2-alpha)-L(2)*cos(beta) % x,y position of node 3 ]; dof=2*length(nodes); conn=[1,2; 2,3]; lmm = [1, 2, 3, 4; 3, 4, 5, 6]; elems=size(lmm,1); K=zeros(dof); R = zeros(dof,1); debc = [1, 2, 5, 6]; ebcVals = zeros(length(debc),1); %load vector R = zeros(dof,1); R(4) = P; % Assemble global stiffness matrix K=zeros(dof); for i=1:elems lm=lmm(i,:); con=conn(i,:); k_local=e(i)*A(i)/L(i)*[1 -1; -1 1] k=PlaneTrussElement(e(i), A(i), nodes(con,:)) K(lm, lm) = K(lm, lm) + k; end K R % Nodal solution and reactions [d, reactions] = NodalSoln(K, R, debc, ebcVals) results=[]; for i=1:elems results = [results; PlaneTrussResults(e(i), A(i), ...   nodes(conn(i,:),:), d(lmm(i,:)))]; end format short g results

This correction yields the following results:

k_local = 0.750  -0.750   -0.750    0.750 k = 0.5625   0.3248   -0.5625   -0.3248    0.3248    0.1875   -0.3248   -0.1875   -0.5625   -0.3248    0.5625    0.3248   -0.3248   -0.1875    0.3248    0.1875 k_local = 5   -5    -5     5 k = 2.5000  -2.5000   -2.5000    2.5000   -2.5000    2.5000    2.5000   -2.5000   -2.5000    2.5000    2.5000   -2.5000    2.5000   -2.5000   -2.5000    2.5000 K = 0.5625   0.3248   -0.5625   -0.3248         0         0    0.3248    0.1875   -0.3248   -0.1875         0         0   -0.5625   -0.3248    3.0625   -2.1752   -2.5000    2.5000   -0.3248   -0.1875   -2.1752    2.6875    2.5000   -2.5000         0         0   -2.5000    2.5000    2.5000   -2.5000         0         0    2.5000   -2.5000   -2.5000    2.5000 R = 0    0     0     7     0     0 d = 0        0    4.3520    6.1271         0         0 reactions = -4.4378  -2.5622    4.4378   -4.4378 results = 1.7081      5.1244       5.1244       0.6276        3.138        6.276

Individual Contributions
Eml4500.f08.bottle.vitello 15:51, 30 October 2008 (UTC) Eml4500.f08.bottle.butler 22:29, 3 November 2008 (UTC) Eml4500.f08.bottle.hipps 11:28, 4 November 2008 (UTC) Eml4500.f08.bottle.loschak 09:04, 5 November 2008 (UTC) Eml4500.f08.bottle.ranto 05:10, 6 November 2008 (UTC) Eml4500.f08.bottle.barnes 18:30, 6 November 2008 (UTC) Eml4500.f08.bottle.brockmiller 21:57, 6 November 2008 (UTC)