Wednesday, March 5, 2014

Shear force and bending moment diagrams for hyperstatic beam problem

Matlab program for problem 12-121 of Hibbeler's
"Mechanics of Materials", 8th. edition
 

% hibbeler12_121.m
% Luis Adan Villa Chaparro / Ricardo E. Avila Montoya
% 3 Mar. 2014 / ricardo_avila@hotmail.com

clc
clear

disp(' ')
disp('Problem 12-121, Hibbeler''s ')
disp('"Mechanics of Materials", 8th. ed.')
disp(' ')

% The beam is hyperstatic, so the method of superposition
% has to be used in order to find the reactions at the
% supports of the shaft.
L = 4;              % Total length of beam 
dx = L/400;         % Division is 1 centimeter
x = [0 : dx : L]';  % x-axis is defined
n = size(x, 1);     % Size of the x-axis column of data
V = zeros(n, 1);    % Initialize structures to data
M = V;             
Y = V;

% Each half of the beam exerts a moment of 150 N-m
% on the other half, in order to achieve dy/dx = 0 @ x = 2,
% otherwise the shaft will break in two parts, if the
% derivative were not countinuous at the middle of the shaft.

% The necessary moment of 150 N-m is found by superposition,
% using the formulas at appendix C of the textbook.

% Support force on left end: 125 N
% Support force on middle of shaft: 550 N
% Support force on right end: 125 N

% Data processing
for index = 1 : n
  V(index) = 125 ;
  M(index) = 125*x(index);
  Y(index) = 20.83333*x(index)^3 - 50*x(index);

  if  x(index) >= 1
      V(index) = V(index) - 400;
      M(index) = M(index) - 400*(x(index)-1);
      Y(index)= Y(index)  - 66.66666*(x(index)-1)^3;

  if  x(index) >= 2
      V(index) = V(index) + 550;
      M(index) = M(index) + 550*(x(index)-2);
      Y(index) = Y(index) + 91.66666*(x(index)-2)^3;

  if  x(index) >= 3
      V(index) = V(index)-400;
      M(index) = M(index) - 400*(x(index)-3);
      Y(index) = Y(index) - 66.66666*(x(index)-3)^3;
  end
  end
  end
end

% Material and geometric properties are temporarily made unit value:
E = 1;      % Elastic constant is unit value (not calculated)
I = 1;      % Moment of Inertia is unit value (not calculated)

% Post-processing
figure(1)
plot(x, V, 'r', 'linewidth', 3)
xlabel('x, m')
ylabel('V(x), N')
grid
title('Shear Force Diagram')

figure(2)
plot(x, M, 'b', 'linewidth', 3)
grid
xlabel('x, m')
ylabel('M(x), m')
title('Bending Moment Diagram')

figure(3)
plot(x, Y, 'b', 'linewidth', 3)
grid
xlabel('x, m')
title('Elastic Curve Diagram')

disp(' ')
disp('_______________________________________')
disp('Successful execution of Matlab program.')

% end of Matlab program

figure(1)



figure(2)
 


figure(3)
The deflection of the beam is exaggerated because E=1, I=1. It is necessary to design
the beam, in order to have a diameter determined, and to select a proper material,
in order to determine proper values for E and I.
 

No comments:

Post a Comment