User:Eml4500.f08.gravy.sms/HW6

Modification of 2-bar truss code to accommodate general k(i)
The first modification to the 2-bar truss code was adding the values for E1(i), E2(i), A1(i), and A2(i) to the matrices at the beginning of the code. This was done with a 2x2 matrix for both E and A. The columns represent the elements, and the rows represent the nodes. Therefore, e(1,2) is E1(2). These values were then used to caculate k(i) using the following general formula:

$$k_{2x2}(\tilde{x})^{(i)} = \frac{\begin{bmatrix} 2 \left ( A_1 * E_1 \right ) +  \left ( A_2 * E_1 \right ) + \left ( A_1 * E_2 \right ) + 2\left ( A_2 * E_2 \right ) \end{bmatrix}}{6*L^{(i)}}\begin{bmatrix} 1 & -1 \\ -1 & 1 \end{bmatrix}$$

Then, the values of E1(i), E2(i), A1(i), and A2(i) were fed into the modified versions of PlaneTrussElement.m and PlaneTrussResults.m that are shown below.

The results were then plotted on the same graph as the deformed two bar truss without tapering. The blue dashed line represents the initial conditions, the green line is the non-tapered deformation, and the red line is the deformation of the tapered bars.