User:Eml4500.f08.team.foskey.ckf/hw7 2barframe

 Note: A detailed explanation of the code was added. Also, extra functions used to solve the problem were also added.

Jin Yu Guan Eml4500.f08.team.guan 18:19, 10 December 2008 (UTC)

Two bar Frame system

Problem
This problem solves a two bar frame system.

MATLAB Code
The code starts out by computing the stiffness matrices of each of the frame elements using the function PlaneFrameElement. Then, it computes the results of the loading and returns the displacement and reactions of the loading by utilizing the PlaneFrameResults function. Upon obtaining the displacements, the function customized function segmentedcory.m was called to calculating the transverse and axial displacements of 50 discrete portions of each frame element. In doing so, the x and y global coordinates of each small displaced discrete element were then returned. Using two for loops (one for an element, and one for plotting the frame), the frames were then plotted according to the displacements obtained from segmentedcory.m.     It is obvious to see that the deformed frames are not linear. This is due to the fact that frames are subject to transverse and axial loading and thus suffer from transverse and axial displacement. Thus, frames are designed to carry transverse and axial loading as opposed to trusses in which only carry axial loading.

This code uses the follwing function, in addition to the functions used in the truss problem

The above code works basically like every other truss code, with the exception that it now takes into account rotational displacements and bending moments.

The function segments an element into pieces and helps plot the bent frame bars.

The PlaneFrameElement.m function is below.

The PlaneFrameResults.m function is below.

Output results
Data for Frame System

Figure
The following figure is generated by the above code