Assignment3 Programming
Assignment3 Programming
SEMESTER 2 2022/2023
ASSIGNMENT 3
This report details the development and implementation of a MATLAB program designed
to analyze and visualize the distribution of shear force, bending moment, and deflection along a
beam subjected to a time-varying load. This analysis is important for understanding the structural
behavior of beams under dynamic loading conditions, which is a fundamental aspect of structural
engineering.
Beams are structural elements that typically withstand loads applied laterally to their axis.
Under such loads, beams experience shear forces, bending moments, and deflections. Accurate
calculation and visualization of these factors are critical for constructing safe and efficient
buildings. These computations are based on beam theory assumptions, such as the
Euler-Bernoulli beam theory.
The objective of this project is to create a MATLAB programme that estimates the shear
force, bending moment, and deflection distributions along a beam under a time-varying load.
Furthermore, the programme intends to generate graphical representations of these distributions
over time. This project aims to show the program's usefulness and correctness via sample test
cases, providing insights into the dynamic behavior of beams under changing loads.
This report covers the theoretical basis and governing equations employed in the analysis,
and provides a full explanation of these principles. It contains pseudocode and a flowchart to
demonstrate the algorithm and programme structure. Furthermore, the study gives an overview
of the MATLAB implementation, emphasizing the use of functions and charting methods. The
results of the programme are given and discussed, demonstrating the program's effectiveness in
performing complicated structural analysis. The report's extensive analysis seeks to provide a
detailed understanding of beam dynamics under time-varying loads.
2. Coding
Diagram Explanation
1 Declare the variable for every single value that we used to calculate
the moment of inertia,shear force,bending moment and deflection of
beam.Declare the formula to calculate the moment of inertia and
define x as the coordinates along the beam.Initialize the vectors to
storing the data for shear force,bending moment,and deflection by
using the function of zeros.
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 .
6. Appendix