User:Eml4500.f08.ramrod.D/HW7

Functions
The functions PlaneTrussElement.m, NodalSoln.m, PlaneTrussResults.m were all called in the code for the 5 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.

MATLAB Code to analyze a varying area and modulus of elasticity
Below is the code for a truss system that contains a varying modulus of elasticity and varying area.

2 Bar Frame System
Below is the code for solving the 2 bar system as a frame. The displaced results are shown in the plot the system in the section below.

Plots Comparing Different 2 Bar Truss Systems
Below is the code to plot the three 2 bar truss systems that were analyzed above. The dotted line is the original 2 bar truss system, the solid blue line is the deformed original system, the red line is the deformed varying 2 bar truss system, and the green is the frame system.

Electric Pylon Frame Analysis
The following code attempts to analyze the electric pylon with the frame technique.