Clear Filters
Clear Filters

Calculate normal and shear stress of a beam where values of depth and width are under certain conditions

5 views (last 30 days)
close all
clear
clc
b = 1:200;
d = 1:200;
A = 2640;
F = 300e3;
d_max = 125;
b_min = 20;
NL = length(b);
sigma_max = zeros(1,NL);
tau_max = zeros(1,NL);
for i = 1
if (b(i)>=d(i)) && (d(i)<=d_max) && (b(i)>=b_min) && (b(i)*d(i)==A)
My = F*(b(i)/2);
Iyy = (b(i)*d(i)^3)/12;
sigma_max(i) = (My*Iyy)*(d(i)/2);
Qy = (b(i)*d(i)^2)/8;
tau_max(i) = (Vz/(Iyy*b(i)))*Qy;
end
end

Accepted Answer

VBBV
VBBV on 31 Mar 2023
Edited: VBBV on 31 Mar 2023
close all
clear
clc
b = 1:200;
d = 1:200;
A = 2640;
F = 300e3;
d_max = 125;
b_min = 20;
NL = length(b);
sigma_max = zeros(1,NL);
tau_max = zeros(1,NL);
for i = 1:NL
if ((b(i)>=d(i)) | (d(i)<=d_max)) & ((b(i)>=b_min) | (b(i)*d(i)==A))
My(i) = F*(b(i)/2);
Iyy(i) = (b(i)*d(i)^3)/12;
sigma_max(i) = (My(i)/Iyy(i))*(d(i)/2);
Qy(i) = (d(i)*b(i)^2)/6;
tau_max(i) = (My(i)/Iyy(i))*(d(i)/2)*Qy(i);
end
end
% normal stress
figure
bar(b,sigma_max)
xlim([min(b) max(b)])
%shear stress
figure
bar(b,tau_max)
xlim([min(b) max(b)])
  1 Comment
Zara
Zara on 4 Apr 2023
How can I get the values for sigma_max and tau_max to be saved in the arrays I created to allow for further calculations in the future?

Sign in to comment.

More Answers (0)

Categories

Find more on Stress and Strain in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!