## Shear Force Bending Moment

This function SFBM.m calculates and draw the shear force and bending moment diagrams.

9.3K 次下载

This file explains how to use the SFBM.m code. as well as supporting
accessories. SFBM means Shear Force & Bending Moment.
This program calculates the shear force and bending moment profiles, draw
the free body, shear force and bending moment diagrams of the problem.
Under the free body diagram, the equations of each section is clearly
written with Latex
To use this program, you call the function placing the arguments in cells
with keywords at the beginning of each cell except for the first 2 arguments.
First Argument
The first argument is the name of the problem as a string e.g.: 'PROB 1'.
Second Argument
-Simply supported beam
The second argument is a row vector containing length of the beam and
location of the supports, for example, if the length of the beam is 20m and
has 2 supports, one at 3m and the other at 17m, the second argument will
thus be: [20, 3, 17]
-Cantilever
If the problem is a cantilever problem, then you have only one clamped
support, at the beginning or end of the beam. In such a case, the number is
second argument contains 2 elements instead of three. For instance, fir a
cantilever of length 20m, supported at the beginning, the second argument
would be [20,0], and if supported at the end, we have [20,20].
-Beam on the floor
Its possible to have a problem in which the body is lying on the floor
without any point support. In such scenario, the second argument will just
be the length of the beam
Third argument and on
From the third argument and onward, we use cells. The first element of the
cell contains a keyword describing what type of load is inside the argument.
The second element is the magnitude of the load while, the third element of
a cell argument is its location.
Moment = 'M'
To add a downward point load of magnitude 5N at location 4m, the argument
would be {'CF',-5,4}. Note the negative sign. If the force is acting upward
the argument would be {'CF',5,4};
To add a clockwise moment of magnitude 10N-m at location 14m, the argument
would be {'M',-10,14}. Note the negative sign. If the moment is anticlockwise
the argument would be {'M',10,14};
To add distributed load we need to describe all of them with the minimum
number of point required to describe the profile with the highest
complexity. For example, a linear profile can be described as {'DF',[5,5],[2,10]}
meaning uniform force per unit length of 5N/m from point 2m to 10m. If the
values of the profile were given at 3 points, the code will automatically
assume it to be quadratic. If profile is uniform, the coefficient of the
second and first degrees would be zero.Hence describing the constant 5N/m
from 2m to 10m as {'DF',5,[2,10]}, {'DF',[5,5],[2,10]}, {'DF',[5,5,5],[2,8,10]}
will make no difference. But in case where the values in the force vector
are different, SFBM will generate a polynomial fit for the forces as a
function of position. For instance {'DF',[1,5,5],[2,8,10]} will generate a
quadratic function, while {'DF',[1,4,5],[2,8,10]} will generate a linear
expression and {'DF',[5,5,5],[2,8,10]}will generate a degree zero expression
There is no limit to the number degree of polynomial that can be used.
its is important that all concentrated loads and torques are listed in the
order of locations
For example:
SFBM('Prob 200',[20,5,20],{'CF',-2,0},{'M',10,8},{'DF',5,[1,3]},{'M',-10,12},{'DF',-4,[14,17]})
Name : Prob 200
Length: 20m
Supports: 5m and 20m
Point Load: 2N at point 0
Distributed Load: Constant 5N/m from 1m to 3m and Constant -4N/m from 14m to 17m
Moment: ACW 10Nm at point 8m and CW 10Nm at point 12
Solution:
The Freebody (with Legend), Shear Force and Bending moment diagrams are generated and saved in picture format titles Prob 200.png.

### 引用格式

Lateef Adewale Kareem (2023). Shear Force Bending Moment (https://www.mathworks.com/matlabcentral/fileexchange/51047-shear-force-bending-moment), MATLAB Central File Exchange. 检索来源 .

##### 平台兼容性
Windows macOS Linux

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

#### SFBM

3.7.0

Update for beam lying on the floor

3.6.0

Cantilever drawing update

3.5.0

Better example

2.5.0

2.4.0.11

fixed repeated tick problem

2.4.0.10

A little modification with latex axis labelling

2.4.0.9

Updated the plot function for more efficiency

2.4.0.8

handles the error of parent function sharing variable with a nested function

2.4.0.7

corrected commenting error

2.4.0.6

Corrected a rendering problem for cases where no force is applied.

2.4.0.5

Updated to ensure compatibility with Matlab R2018b.

2.4.0.4

Changed the image

2.4.0.3

just changed the image

2.4.0.2

improved on the equation display

2.4.0.1

There is a major bug. Where the special point function returns a polynomial an order higher than the polynomial describing the curve.

This has been corrected after being pointed out by David Zhang

2.4.0.0

Corrected an bug in the use of arrow in line 86 of Diagram.

2.3.0.0

added new function Round to perform the function of round(v,n) in version of matlab later than 2012b. Another function DrawArrow has been added to draw better arrows than the ones drawn by quiver function.

2.2.0.0

corrected a scaling bug int he display.

2.1.0.0

A bug concerning failure of the code to return the equations of bending moment and shear force from the beginning of the beam was fixed

2.0.0.0

This file has now been updated to deal with cantilever (a system with just one support). It can also handle cases of beams lying on the floor with the reaction being just distributed load.

Equation texts is now interpreted with latex

1.0.0.0

bugs in arrow function removed.