User:Eml4500.f08.ramrod.D/HW6

Principle of Virtual Work (the continuous case) of the dynamics of an elastic bar (Monday Nov 3)
The partial differential equation that describes this phenomena is below:


 * $$ {\partial \over \partial x}[ (EA) {\partial u \over \partial x} ]+ f = m{\ddot{u}} $$   (equation 1)

The representative equation of motion to the above equation is:


 * $$ \mathbf{-k} \mathbf{d} + \mathbf{k} \mathbf{d} = \mathbf{M} \mathbf{\ddot{d}}$$


 * $$ \mathbf{M} \mathbf{\ddot{d}} + \mathbf{k} \mathbf{d} = \mathbf{F} $$  (equation 2)

The above equation is called the multiple degrees of freedom system which is from vibrations.

Deriving (equation 2) from (equation 1)


 * $$\int_0^L w(x)\ [ { {\partial \over \partial x} [ (EA) {\partial u \over \partial x} ] } +f - m{\ddot{u}} ] = 0$$

This equation works for all possible weighting functions, $$ w(x) $$. This equation os the principal of virtual work for a partial differential equation.

Equation 1 can be transformed into Equation 3 trivially but Equation 3 does not transform into Equation 1 trivially.

Equation 3 can be rewritten as:


 * $$\int w(x) g(x) dx = 0 $$ for all $$ w(x)$$

Since Equation 3 holds true for all $$w(x)$$ then choose $$w(x)$$ equal to $$g(x)$$. Equation 3 becomes:


 * $$\int g^2(x) dx = 0$$

Where $$\ g^2(x) \ge 0$$

Therefore $$\ g(x) = 0$$

Electric Pylon Code
Below is the code to solve the the electric pylon truss system using the finite element method. The code solves the systems reaction forces, plots the undeformed and deformed system and calculates the systems maximum tensile stress and maximum compressive stress.

MATLAB Code Results
Below are the values for the variable results which has the values of axial stress of all 91 trusses.

Below are the resulting maximum tensile stress and maximum compressive stress with their corresponding element number.

Functions
The functions PlaneTrussElement.m, NodalSoln.m, PlaneTrussResults.m were all called in the code for solving the electric pylon truss system. They are all necessary for the completion of the truss problem.

PlaneTrussElement.m

This function take the Young's Modulus (e), the Area of the element (A) and the coordinates of the element ends (coord) and generates the stiffness matrix for a plane truss element. The function first calculates the lengths of the the elements. Once those are calculated the stiffness matrix is calculated.

NodalSoln.m

The function takes the global coefficient matrix (K), the global right hand side vector (R), the list of degrees of freedom with specified values, and the specified values to determine the displacements and reactions at each node. The dof of the the system is first found by using the  command which finds the longest dimension of R. df then finds the difference between the dofs that have known values (a value of zero) and the dof that were found in the previous line. The displacements and the reactions are then calculated.

PlaneTrussResults.m

This function computes the plane truss element results. It takes in the modulus of elasticity (e), the area of the cross-section (A), the coordinates at the element ends (coord), and the displacements at the elemtent ends (disps) and calculates the axial strain (eps), stress(sigma) and force (force). The results are stored in the variable  and sent back to the main program.

Plots
Below is the plot of the underformed and deformed truss system. The undeformed system is plotted with dotted lines and the deformed system is plotted in solid lines. The elements that contain the maximum tensile and maximum compressive stresses are marked by the lines.