Coding Project 1
Coding Project 1
EID: rs48746
Coding Project 1
5
5
3
7
4
6
4
7
10
11
12
11
15
14
13
8
16
9
17
18
21
20
19
10
13
25
22
24
23
26
12
14
27
15
28
16
29
17
Figure 1. The truss structure under analysis comprised of 17 nodes and 29 elements
The truss structure considered for analysis is shown above in Fig. 1, complete with the
node and element numbering that was used to create the input file. The truss is subjected to load
Q at node 8 and 2Q at node 10., with Q set to 1000 lbs. All 29 members are of the same modulus,
30 x 106 psi, and the length parameter L = 1 ft. The outer members (indicated by thick lines) have
cross-sectional area 16 in2 while the inner members(indicated by thinner lines) are 4 in2 in area.
The requisite matrix structural analysis techniques presented during lecture were used to
develop a 2d truss analysis code in MATLAB. The code first extracts truss geometry, boundary
conditions, and applied loads from the input file. The truss geometry is subsequently used to
develop the global stiffness matrix with the subroutine build_KP.m. Furthermore, using the
boundary conditions, the penalty method is implemented within bound.cond.m to allow us to
immediately solve for the unknown displacements at each node. The penalty factor, M, used
throughout the analysis was 108 larger than the elastic modulus of the members. The final
subroutine, forces.m, computes the reactions, the internal forces in each member, and the stress
in each member. Multiple sample problems were used to ensure the accuracy of the code. The
results of the analysis on the following page in Fig 2, 3 and 4.
Ryan Scurlock
EID: rs48746
After
in Fig. 1, the
highest tensile
and compressive
stresses were
identified. Element 15
experiences the
stress at 2597.5
reactions at the
reference of the
deformed and
undeformed
shown in Fig. 5
Ryan Scurlock
EID: rs48746
Ryan Scurlock
EID: rs48746
511.079
psi
22
20
-511.079
psi
2
P1x
P1y
P2y
P2x
P16x
16
P16y
Figure 5. Deformed and undeformed structure. Deformation is highly exaggerated using a magnification factor of 1000. Reactions
at the supports and members under highest tensile and compressive stress are as labeled
17 P17x
P16y