Wednesday, September 11, 2013

Shearing force and bending moment diagram: aircraft wing problem.


Problem 6-38 of "Mechanics of Materials", by Hibbeler, 8th. edition,
in US system of customary units (Lb, in).

The problem is to draw the diagrams for shearing force and
bending moment for a beam, which is the wing of an aircraft,
while it is static on the ground. The forces applied on the structure
are a concentrated weight of 3000 Lb corresponding to an engine,
the weight carried by the landing gear is 15000 Lb, and the
weight of the structure itself (this may include the fuel inside
the wings), which is a distributed uniformly varying load.

The values of shear force and bending moment have to be
calculated at point A, which is the attachment point of the
wing to the fuselage of the aircraft.
________________________________________________________

% prob6_38.m
% Ricardo Ernesto Avila Montoya, Sep. 9, 2013.
% Universidad Autonoma de Ciudad Juarez, Mexico

clc
clear
disp(' ')
disp('Problem 6-38, Hibbeler, "Mechanics of Materials", 8th. ed.')
disp(' ')

% Data input section

% The units of the problem are US customary system (Lb, inch)
% The wing of an aircraft is loaded with a 3000 Lb engine,    
% the reaction from the ground through the landing gear,  
% and the distributed load of the structure itself.

delta_x = .5;           % Increment for discretization of x axis.
x = (0: delta_x: 156)'; % Generate column array for x-axis (156 inch). 

N = size(x, 1);         % Size of the x-axis discretization array

V = zeros(N, 1);        % Shear force function of x.
M = V;                  % Bending moment function of x.

% Data processing section

for index = 1: N;       % For every discrete point along x.

   % First portion of the beam, 0 < x < 96, inch
   V(index) = -125 * x(index)^2 / (8*12^2);
   M(index) = V(index) * x(index)/3;

   if x(index) > 96;    % Engine weight minus distributed load 
   V(index) = V(index)-3000 + 6.25* (x(index)-96)^2 / (10*12^2);
   M(index) = M(index)-3000*(x(index)-96)...
        +6.25* (x(index)-96)^3 / (30*12^2);
   end

   if x(index) > 120;   % Last portion of wing, next to fuselage
       V(index) = V(index) + 15000;
       M(index) = M(index) + 15000*(x(index)-120);
   end   

end

% Data post-processing section

% Shear force diagram

figure(1)
plot(x,V, 'b', 'linewidth', 2.5)
grid
xlabel('x, inch')
ylabel('Shear force, Lb')
title('Shear force diagram')
axis tight

% Bending moment diagram
figure(2)
plot(x,M, 'r', 'linewidth', 2.5)
grid
xlabel('x, inch')
ylabel('Bending moment, Lb-in')
title('Bending Moment diagram')
axis tight

format long e
disp('Shear force at point A: ')
disp(V(N))
disp(' ')

disp('Bending moment at point A: ')
disp(M(N))
disp('_______________________________________')
format short

disp('*** Successful execution of program ***')

% end of Matlab program

figure(1)




figure(2)
 



Saturday, September 7, 2013

Beam with uniformly varying distributed load: Matlab


Matlab program solves problem 6-73 of the textbook
"Mechanics of Materials", 8th. edition, by Hibbeler.

Applying the symmetry of the problem, only half of the beam
is calculated.


% prob6_73.m
% Ricardo E. Avila, Sep. 6, 2013
% Universidad Autonoma de Ciudad Juarez, Mexico

clc
clear
disp(' ')
disp('Problem 6-73, Hibbeler, "Mechanics of Materials", 8th. ed.')

% Data input section

% The units of the problem are US customary, not SI (Lb, inch)
% A beam supports a uniformly varying load applied on 24 ft. span length.   
% At midpoint of beam load is 500 Lb/ft, going down to 0 at both ends.
% Only half the problem is solved (12 ft.), using symmetry of beam.

I = 152.34;             % Moment of inertia, in^4, steel beam section.
E = 29e6;               % Elastic modulus, Lb/in^2, ASTM A-36 steel
delta_x = .5;           % Increment for discretization of x axis.
x = (0: delta_x: 144)'; % Generate column array for x-axis. 

N = size(x, 1);         % Size of the x-axis discretization

V = zeros(N, 1);        % Shear force function of x.
M = V;                  % Bending moment function of x.
y = V;                  % Coordinates of elastic curve.
C1 = -1250 * 12^4;      % Integration constant. (dy/dx) = 0 @ x = 144 in.

 

% Data processing section

for index = 1: N;   % For every discrete point along x.
   % First half of the beam, 0 < x < 144 (inch)
   V(index) = 3000 - 1.446759259259259e-001 * x(index)^2;
   M(index) = 3000 * x(index) - 4.822530864197531e-002 * x(index)^3;
   y(index) = 500 * x(index)^3 ...
       - 2.411265432098765e-003 * x(index)^5 + C1 * x(index);
end

y = y / (E*I); % E and I are constants, through the beam length.

% Data post-processing section

% Shear force diagram
figure(1)
plot(x,V, 'b', 'linewidth', 2.5)
grid
xlabel('x, inch')
ylabel('Shear force, Lb')
title('Shear force diagram')
axis tight

% Bending moment diagram
figure(2)
plot(x,M, 'r', 'linewidth', 2.5)
grid
xlabel('x, inch')
ylabel('Bending moment, Lb-in')
title('Bending Moment diagram')
axis tight

% Beam deflection: elastic curve
figure(3)
plot(x,y, 'k', 'linewidth', 2.5)
grid
xlabel('x, inch')
ylabel('Elastic Curve, in')
title('Bending Deflection')
axis tight

format long e
disp('Maximum deflection of beam: ')
disp(min(y))
disp(' ')
format short

disp('*** Successful execution of program ***')

% end of Matlab program
_____________________________________________________________________

Problem 6-73, Hibbeler, "Mechanics of Materials", 8th. ed.
Maximum deflection of beam:
   -5.407113851502764e-001


*** Successful execution of program ***

_____________________________________________________________________

figure(1)


figure(2)
 


figure(3)



Saturday, August 31, 2013

Shear force and Bending Moment diagrams using Matlab


Matlab program prob6_3 below shows how to generate
shear force and bending moment diagrams for a beam.
Problem 6.3 of Hibbeler’s textbook,
‘Mechanics of Materials’, 8th. edition,
using US system of customary units.


% prob6_3.m
% Daniel A. Landeros Rojas / Ricardo E. Avila Montoya  
% Mechanics of Materials / August 30, 2013
% ricardo_avila@hotmail.com
% Chihuahua, Mexico

clc
clear
disp(' ')
disp('Problem 6.3, Hibbeler, 8th. edition')

% Data input section
% The units of the problem are US customary, not SI
% A crane lifts a 1200 Lb load applied at its end, with the 
% power of a hydraulic cylinder. Length of beam is 8 feet.

delta_x = .5;           % Increment for discretization of x axis.
x = (0: delta_x: 96)';  % Generate column array for x-axis. 

FAy = -2000;    % Vertical force at point A
FBy = 3200;     % Vertical force at point B
FCy = -1200;    % Applied load at point C

N = size(x, 1); % Size of the x-axis discretization

V = zeros(N, 1);    % Shear force function of x.
M = V;              % Bending moment function of x.

% Data processing section

for index = 1: N;   % For every discrete point along x.

   % First portion of the beam, 0 < x < 36 (inch)
   V(index) = FAy;
   M(index) = FAy*x(index);

   % Second portion of the beam, 36 < x < 96 (inch)
   if(x(index)>=36)
        V(index) = V(index) + FBy;
        M(index) = M(index) + FBy*(x(index)-36);
   end

end

V(N) = V(N) + FCy;  % Shear force for last point of diagram

% Data post-processing section

% Shear force diagram
figure(1)
plot(x,V, 'b', 'linewidth', 2.5)
grid
xlabel('x, inch')
ylabel('Shear force, Lb')
title('Shear force diagram')
axis tight

% Bending moment diagram
figure(2)
plot(x,M, 'r', 'linewidth', 2.5)
grid
xlabel('x, inch')
ylabel('Bending moment, Lb-in')
title('Bending Moment diagram')
axis tight

disp(' ')
disp('*** Successful execution of program ***')
% end of Matlab program


figure(1)



figure(2)


________________________________________________________________________


Tuesday, August 27, 2013

Mohr circle using Matlab


This is a proposed solution to problem 1-33 of the textbook
"Mechanics of Materials", 8th. edition, by R. C. Hibbeler,
using a simple Matlab program. The program solves a system
of two linear equations, for each value of the angle, in order to
calculate the values of normal and shear stress; these values are
functions of the angle 'theta'. The angle 'theta' is formed between
a vector, perpendicular to the area on which the stresses are being
observed or calculated, and a horizontal or longitudinal axis in
the material.

Mohr's circle for values of stress is generated by the solution of the problem,
since the normal stress acts as a sine function, and the shear stress
like a cosine function.

The program can be run with unity input values, for lack of other information:
base = 1
height = 1
applied load = 1


% prob1_33.m
% Ricardo E. Avila / University of Ciudad Juarez / Aug. 28, 2013
% ricardo_avila@hotmail.com
% Chihuahua, Mexico

% Problem 1.33, Hibbeler, 'Mechanics of Materials', 8th. ed.

% 'theta' is the angle in radians of a vector normal to
% the inclined area = base * height, A = b * h;
% the 'theta' angle is measured with respect to the longitudinal
% axis of the loaded material.  

clc
clear

disp(' ')
disp('Problem 1.33, Hibbeler, Mechanics of Materials, 8th. ed.')
disp('________________________________________________________')

% Data input
b = input('Base of material dimension: ');
h = input('Height of material dimension: ');
P = input('Applied load: ');

% Data processing
delta_theta = pi/180; % Generate data every 1 degree of angle
theta = (0: delta_theta : pi)';     % Generate column array: theta
sigma = zeros(size(theta,1), 1);    % sigma: normal stress
tau = sigma;                        % tau: shear stress
A = zeros(2, 2);                    % 2x2 matrix
RHS = zeros(2, 1);                  % Right-hand side of linear system
RHS(1,1) = P;                       % Applied load
bh = b * h;                         % Material: base * height

% Solve linear system for solution of equations
for index = 1: size(theta,1)
  A(1, 1) = bh ;
  A(1, 2) = bh * tan(theta(index));
  A(2, 1) = tan(theta(index));
  A(2, 2) = -1;
  stress = A \ RHS;             % Solve linear system of equations
  sigma(index) = stress(1, 1);  % normal stress
  tau(index) = stress(2, 1);    % shear stress
end

% Post-processing of data
figure(1)
plot(theta, sigma)  % Plot variation of normal stress with angle theta
grid
xlabel('theta, radians')
ylabel('sigma, normal stress')

figure(2)
plot(theta, tau)    % Plot variation of shear stress with angle theta
grid
xlabel('theta, radians')
ylabel('tau, shear stress')

figure(3)
% Generate Mohr's circle with values of (sigma, tau)
line(sigma, tau)
axis equal
grid on
xlabel('sigma, normal stress')
ylabel('tau, shear stress')

disp(' ')
disp('*** Successful program execution ***')
disp('____________________________________')

figure(1)
 figure(2)
 figure(3)