Finding Shear Force and Bending Moment

41 Ansichten (letzte 30 Tage)
Zaakir  Essop
Zaakir Essop am 1 Apr. 2016
hi all
Basically I need to find the shear force and bending moment of a beam. The length of the beam as well as forces and their distances are given. However the SF and BM must be calculated at every o.ooo5m. The forces can be Point Loads or Uniform Distributed Loads and there can be many forces of each type.
The data is given in a matrix eg:[ 2000N 5m] or [2000N/m 5m 10m].
This is what I have so far but it does not seem to be working out:
Positions = 0:0.0005:BeamLength
%Shear force from support reaction
ReactionShearForce = -ReactionForce
%shear force from PointLoads
for y = 1:1:length(Positions)
x = Position(1,y)
if x > PointLoads(:,2)
PointLoadsSection = PointLoads(PointLoads(:,2)>x,1)
end
end
The Problem I am facing is that it is giving me a 4x1 matrix instead 0f a 1x19001 matrix.

Antworten (1)

Nathan Hardenberg
Nathan Hardenberg am 25 Mai 2023
Here is how I would approach this problem:
BeamLength = 10;
% N m
PointLoads = [200 0
-100 3;
-100 7;
200 10];
% N/m m m
DistLoads = [-100 1 2;
-100 8 9];
increments = 0.0005;
Positions = 0:increments:BeamLength;
Q = zeros(1, length(Positions) + 1); % shear force (initalization)
[nrOfPLoads, ~] = size(PointLoads);
[nrOfDLoads, ~] = size(DistLoads);
Itterate over every position:
for y = 1:length(Positions)
x = Positions(y); % current position
Q(y+1) = Q(y); % set next position to be the same as the one before (default case)
% pointloads
if ~isempty(PointLoads)
for i = 1:nrOfPLoads % go trough all pointloads
if PointLoads(i,2) == x % position of a pointload
Q(y+1) = Q(y) + PointLoads(i,1); % add shear according to numerical value
end
end
end
% distributed loads
if ~isempty(DistLoads)
for i = 1:nrOfDLoads % go trough all pointloads
if x > DistLoads(i,2) && x < DistLoads(i,3) % position is in between
% add shear (with increment size in mind)
Q(y+1) = Q(y) + DistLoads(i,1) * increments;
end
end
end
end
Now you can leverage that the bending Moment M can be discribed as:
M = -cumtrapz(Q); % do numerical integration
And then plot the results:
figure(1); clf; hold on; grid on;
plot(Positions, Q(1:end-1), LineWidth=2); title("Shear-Force")
figure(2); clf; hold on; grid on;
plot(Positions, M(1:end-1), LineWidth=2); title("Bending Moment")
A few important Notes:
It is important that the beam is already solved and the bearing-forces are represented as point-loads. Otherwise the result will be wrong. Also in this "implementation" distributed loads can not overlap and no pointload can be inside a distributed load. But this should not be a problem in most situations.
Because of the numerical integration the increments should be very small to avoid wrong results. The 0.0005 are sufficient here. Saying this it is also important that the exact position of the point-loads are reached. Otherwise they will be skipped, since I have a "=="-operator to check if the pointload is on this positon.
If such a calculation is nessecary, there are also many online recources which allow to solve a beam and plot the shear-forces and bending moments numerically. You just have to google "solve beam online" and you'll get a few results. There are also recources where the beam-setup can be solved symbolicly. Python has a nice library:
and I also wrote my own program to solve a beam-setup symbolically in MATLAB:
Obviously solving numerically is also possiible there.

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by