MEC85 - Matlab S2023

You might also like

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

ME C85 / CE C30 Matlab Project

Spring 2023

1 Part A — Verification
Perform an analytical calculation to generate the shear and moment diagrams for the beam shown
below (Figure 1). Then, using the provided Matlab script smd.m, generate the shear and moment
diagrams. Show both analytical and computational diagrams. To verify your coding ability, make
sure that the analytical and numerical solutions agree.
• w = 15 N/cm
• F = 120 N

Figure 1: Simple Beam with Uniformly Distributed Load and Concentrated Force

1
2 Part B — Design Problem
The beam shown in Figure 2 has a uniform distributed load w on top and three supports on the bottom.
During functional loading of this beam, the middle support can be placed anywhere along the beam. This
results in an overall beam with unequal spans l1 and l2. The beam has a circular cross-section, its diameter
being uniform along the length of the beam. We seek to design the beam diameter so that a specified maximum
level of stress is not exceeded — while accounting for a variable location of the middle support.

Write a Matlab function vmd.m to generate the shear and moment diagrams for the two (unequal) spans
of the beam shown below. vmd.m should have one input (l1; the overall length is fixed) and two outputs
(shear and moment as vectors). This function should also plot the shear and moment diagrams when
called.

Write a function stress.m having three inputs (cross section diameter, shear force, and bending
moment) and three outputs (max shear stress, max normal (bending) stress, and maximum principal
stress). This function is to be applied at any cross-section. The beam has a circular cross-section.

Assuming l1 = l2, write a script caseEqual.m that calls vmd.m and stress.m. Script caseEqual.m
should determine the minimal-diameter diagram, that is, at each location along the beam, the value of the
cross-sectional diameter such that the maximum principal stress in that cross-section does not exceed the
maximum allowable stress. The output of caseEqual.m is the minimal diameter as a vector (length = 100),
and a plot showing the minimal diameter diagram.

Assuming l1 can be an arbitrary value, write a script caseGeneral.m that also calls vmd.m and
stress.m. Script caseGeneral.m should determine the design-diameter diagram, that is, at each
location along the beam, the value of the cross-sectional diameter such that the maximum principal stress in
that cross-section does not exceed the maximum allowable stress for any value of l1. The output of
caseGeneral.m is the design diameter as a vector (length = 100), and a plot showing the design-diameter
diagram. (Hint: do a similar task as caseEqual.m for various values of l1 and take the maximum diameter
among all values of l1).
Some geometry, material parameters, and beam theory solutions:
• w = 120 N/cm
• l1 + l2 = 30 cm
• maximum allowable stress = 290 MPa
• elastic modulus = 72 GPa

Figure 2: Continuous Beam with a Uniformly Distributed Load and Unequal Spans

2
3 To submit
Please submit one PDF file containing the following:

• Analytical and numerical shear and moment diagrams of the beams from Part A.

• Four scripts: vmd.m, stress.m, caseEqual.m, caseGeneral.m with the required input
and output formats for Part B.

• The shear and moment diagrams when l1 = 3l2 in Part B.

• The minimal-diameter diagram when l1 = l2 in Part B.

• The design-diameter diagram in Part B.

4 Deadlines
This optional assignment is due 11:59 pm Sunday April 23.

Graded scores will be provided by Sunday April 30.

Students will have the opportunity to improve their grade by revising and resubmitting their assignment by
11:59 pm Friday May 5.

Because of the tight grading schedule, no late assignments will be accepted.

You might also like