Assignment3 Programming
Assignment3 Programming
SEMESTER 2 2022/2023
ASSIGNMENT 3
Diagram Explanation
1 Declare the variable for each and every value to determine the beam's
deflection, shear force, bending moment, and moment of inertia.
Define x as the coordinates along the beam and declare the formula
to compute the moment of inertia. Use the function of zeros to
initialize the vectors so that they store the values for shear force,
bending moment, and deflection.
3 Create a figure to generate plots for shear force, bending moment and
deflection distribution at each time step. In this code, we are using a
for-loop for each distribution. ‘Subplot’ function is used to create a
grid of subplots within a single figure window, ‘plot’ function is
used to generate each distribution along a beam and the ‘title’
function is used to set the title of subplot.
Based on the graph above, the shear force is inversely proportional to the length of the
beam. This is because the more length of beam increases, the less shear force. The maximum
shear force is 21N.
According to the graph 1.2 , the bending moment is directly proportional to the length of
the beam . Therefore, when the bending moment increases, the length of the beam increases. The
minimum bending moment is -105 Nm.
Based on graph deflection against length of the beam above, when the length is
increased, the deflection of the beam will stay the same. The deflection that we got is 0.215m .
5. Appendix