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
% ricardo_avila@hotmail.com
%
% Problem 1.33, Hibbeler, 'Mechanics of Materials', 8th. ed.
% the 'theta' angle is measured with respect to the longitudinal
% axis of the loaded material.
clear
% for Windows 10, select graphics toolkit
graphics_toolkit("fltk")
disp('________________________________________________________')
h = input('Height of material dimension: ');
P = input('Applied load: ');
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
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
plot(theta, sigma) % Plot variation of normal stress with angle theta
grid
xlabel('theta, radians')
ylabel('sigma, normal stress')
grid
xlabel('theta, radians')
ylabel('tau, shear stress')
line(sigma, tau)
axis equal
grid on
xlabel('sigma, normal stress')
ylabel('tau, shear stress')
disp('____________________________________')
No comments:
Post a Comment