Mechanical engineering/civil engineering Truss related project using matlab.

profilepleasehelpmeplease
matlab_instructions.pdf

CEE/CNE 210 Statics SSEBE Mechanics Group

Arizona State University

1

Computing Project 3: Connectivity and Unit Vectors

Program

Computing Project 3 is preparatory for CP4 which will be the analysis of truss structures. In other words,

a good performance on CP3 will make CP4 much easier for you.

A truss consists of straight, slender bars pinned together at their end points. Truss members are considered

to be axial force members, which means that all the external and internal forces act only along the axis of

the bar. To analyze a truss we study the forces acting at each pin joint, one at a time. It is therefore essential

to determine the axis direction of each truss member. The position vector between the end points of each

truss member, from one pin joint to the next, will allow us to determine the length of each member and the

direction of each member’s axis, which is described by a unit vector along the axis.

So, the focus of CP3 is to determine the geometric arrangement of the members of any given truss. To do

this you must input the coordinates of the pin joints and the relationships of the truss members in order to

determine the direction vectors along the axis of each member.

What you need to do

Part 1

For this computing project, you first need to input all the coordinates of the joint locations for the two

trusses (see Figures 1 and 2). It is convenient to label each joint with a unique number (also known as the

“node number”). Create a Joint Coordinate Array that is 3 columns wide and has the number of rows equal

to the number of joints in the truss. Each row of the joint coordinate array should contain the x, y, and z

coordinates of the point. The node number is the same as the row number where the coordinates are stored

in the joint coordinate array. For 2-D trusses just leave the z coordinate as zero for each joint.

Once the coordinates of the joints are stored in the program, you will need to input how those points are

connected to each other by the members of the truss. Not every member is connected to every joint or to

each other so you need to identify which members are connected together and at which joints. In order to

describe how the members connect to the nodes you will want to label each member with a “member num-

ber” (see Figures 1 and 2). This connectivity array should be 2 columns wide and have the number of rows

equal to the number of members in the truss. Each row of the Member Connectivity Array should contain

the start node and end node of the member. The joints and members can be numbered in any way you

want, but it can sometimes be advantageous to use some sort of logical, sequential order if you can discern

one. For example, member BK in Fig. 1 starts at joint 2, which has coordinates of x = 2 m and y = 0, and

ends at joint 11, which has coordinates of x = 4 m and y = 3 m.

The coordinate array and connectivity array will allow you to calculate the position vector along each mem-

ber. Using a for loop, compute the position vector for each member, the length of each member and a unit

vector to describe the direction of each member. The direction of the unit vector will depend on which end

of the member is arbitrarily designated as the start node and which end is designated the end node.

CEE/CNE 210 Statics SSEBE Mechanics Group

Arizona State University

2

Verify your code by using external references (textbook examples, online, etc.) and computing the unit

direction vectors for other truss structures. Plot all your trusses including all nodes and members. If your

plot looks like the original truss then you were successful. For a 3-dimensional truss, the plot can be ro-

tated to see all three axes.

Figure 1a: Planar Truss

Figure 1b: Planar Truss with node numbers

Figure 2a: Space Truss Figure 2b: Space Truss with node numbers

CEE/CNE 210 Statics SSEBE Mechanics Group

Arizona State University

3

Part 2

The second part of this project is to consider a polygon with points that lie on a half circle. The task in this

case is to generate the coordinate array and connectivity arrays for the points with the flexibility to specify

any number of sides on the polygon, say n sides. This simulates a truss of any shape and with any number

of members.

Figure 3: Arc

The semi-circular arc shown in Figure 3 has been described by 5 members with 6 joints. The coordinates

of each point can be described as a function of R and θ (which should be values input in the program at

the start). A for loop can be used to generate the coordinates of each point. Once the coordinates have

been created, a second for loop can be used to compute the connections between each point along with the

unit vector that describes the direction of each connection. The number of points and the radius of the arc

should be able to be varied by one small input change in the program. Plot the polygon trusses you cre-

ate.

Can you expand on this part further? Can you create an actual polygon truss consisting of a large arc and

a small arc with members connecting the two arcs together? Can you generalize this algorithm to be able

to use any number of points on the top arc and bottom arc? This is your time to play around with the con-

nectivity between nodes and members and see what you can get MATLAB to do.

Use the provided MATLAB code template, “CP_3_Template.m” to get you started. Change the file name

to include your name (eg. “CP_3-John Doe.m”).

Report

Write a report documenting your work and the results (in accord with the specifications given in the docu-

ment CEE210 Guidelines for Computing Project Reports). Include figures, plots, and results. Discuss your

discoveries and explorations. Include your name in the report file name and convert the file to PDF (eg.

“CP3 Report-John Doe.pdf”).

Upload your report .pdf file to Blackboard prior to the deadline. Upload your .m program file to Blackboard

as well. Remember if your code doesn’t run then you get zero for the project. However, most of your grade

on the project is earned from the report.