University of The Witwatersrand, Johannesburg School of Mechanical, Industrial & Aeronautical Engineering

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

1

University of the Witwatersrand, Johannesburg School of Mechanical, Industrial & Aeronautical Engineering
MECN2003: Software Development MatLab Project
Due Date: 2012-04-13 1700 Problem Description A program is required that will calculate the shear force and bending moment diagrams for a cantilevered beam of arbitrary length. The loads may be point loads or distributed loads, but no moments will be directly applied to the beam. A schematic of a generally loaded beam is given below:
T

y, F +

T 1 PF DF1 c c c c c c c c c c c c c c c c c c c c c c c cx E T T T T T T DF2 PF PF c 2 c 3

Where: P Fi are point loads in N DFi are distributed loads in N.m-1 The user will be required to specify the length of the cantilevered beam from the wall in metres. The user will then be required to indicate if the loads applied to the beam are only point loads, only distributed loads or a combination of constant distributed and point loads. Based on this input, they will then be required to select either one or two .xlsx les containing the specication of the applied loads. The calculated shear force and bending moment diagrams must then be presented to the user. If the user wishes to, they must be allowed to enter axis labels and a legend for each of these and then save these diagrams. Once the gures have been closed, the shear force and bending moment data must be saved to LoadingData.csv in the same directory as the input point force data (or distributed data if no point loads are applied) which must contain the distance along the beam in metres, with a minimum resolution of 1 mm, in the rst column, the shear force in Newtons in the second column and the bending moment in Newton-metres in the third column. At the same time, the reaction shear force and moment at the wall must be displayed to the user. All distances must be given in the reference frame shown in the gure above and all forces will be given according to the indicated notation. In the point load input les, there will be two columns of data. The rst column will contain the distance from the wall in metres at which the load (in Newtons) indicated in the second column is applied. Similarly, the distributed load input les will contain data in three columns of data. The rst two columns will give the limits in metres from the wall, in no particular order, between which the distributed load is applied. The constant value of the distributed load,

2 in Newtons per metre, will be given in the third column. In both cases there is no limit to the number of loads (i.e. rows of data) which may be applied. If the les contain a load which is applied beyond the end of the beam, the program must ignore that load entirely. The shear force diagram can be calculated by determining the shear force diagram for each of the applied loads and adding all of these diagrams together (the principle of superposition). Once the shear force diagram is known, the bending moment diagram can be determined by integrating the shear force diagram from the free end to the beam support (since the bending moment at the free end must be zero). A simple method of integrating the shear force diagram to produce the bending moment diagram is the trapezoidal method. This is a common numerical method for approximating the integral of a curve by the sum of the trapezoidal areas between the curve and the axis. Although the method is, by denition, inexact for curves of orders other than 1 or 0, the error can be minimised to a negligible level by reducing the width of the trapezia used to calculate the integral. An example of the method is given below: (x1 ,y1 ) (x2 ,y2 ) (x3 ,y3 ) 1 x1 x2 2 x3
E

The area of trapezoids 1 and 2 are, respectively: 1 A1 = (y2 + y1 )(x2 x1 ) 2 1 A2 = (y3 + y2 )(x3 x2 ) 2 And the area of a general trapezium is: 1 Ai = (yi+1 + yi )(xi+1 xi ) 2 If the trapezia are all of equal width x, then the typical area is: 1 Ai = (yi+1 + yi )x 2 Since the total area represented under the curve is:
n

(1) (2)

(3)

(4)

A=
i

Ai

(5)

The total area under a curve where the trapezia are of equal width is: 1 A = x 2
n

(yi + yi1 )
i=2 n1

(6)

1 A = x(y1 + 2 2

yi + yn )
i=2

(7)

All user interface must be via GUIs. Bonus marks, up to a maximum of 10%, are allowed for features that make the program more generically applicable, exible or decidedly robust.

3 Supplied Material Sample les (PointLoads.xlsx and DistLoads.xlsx) of point loads and distributed loads respectively, originally specied for a beam of 1m length. All les to be analysed by this program will adhere to this format. Deliverables Each student is to submit only a single m-le code named BeamLoad[StudentNumber].m e.g. For John Smith, student number 312345, the code would be named BeamLoad312345.m (If le extensions are not shown on the computer used for development the le must be named BeamLoad312345 otherwise the code will not run. Please clarify whether this is the case with one of the tutors or Mr Paton) Each code must contain an opening comment with the student name and student number as well as the date of nalization of the code Codes are to be submitted via the Ignite system under the MatLab Project item. Any code received not following the outlined naming convention and submission instructions will penalised. Each student may submit only 1 code. Consultation Process Consultation for the project will be at the following times. e-mail correspondence for consultative purposes will be limited and, in general, any unsolicited correspondence will result in penalties against the project mark. Table 1: Consultation Times for MECN2003 MatLab Project Date Time Venue 2011-03-30 14:00 - 17:00 NWE F16 2011-04-09 14:00 - 17:00 NWE F16 2011-04-10 14:00 - 17:00 NWE F16 2011-04-11 14:00 - 17:00 PC Pool A roster will be posted outside room SWE110 where students can book 10-minute consultation slots on the relevant days. Failure to arrive promptly for a consultation will result in the time being given to the next waiting student. Students must bring their existing code on a USB drive to the consultation, or if there are queries about their owchart must bring the existing owchart. Note on Submission Date The date for submission of the MatLab project is three weeks after the completion of the MatLab lectures and one month before the submission date of the Python project. This was done to accomodate the mid-term break but students are encouraged to submit earlier if possible so as not to impact their performance in the Python project or other courses.

You might also like