-
Notifications
You must be signed in to change notification settings - Fork 0
/
I_Beam_example.m
69 lines (47 loc) · 2.01 KB
/
I_Beam_example.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
% Bending/Shear stress example
close all;
length = 20; % in
force = 10000; %lbs
%eye-beam dimensions
max_width = 4; % in
min_width = 1; % in
y_max = 4; % in
center_y = 2; % in
%max bending moment at the root...
M = force*length;
I = min_width*(2*center_y)^3/12 + 2*( max_width*(y_max-center_y)^3/12 + ...
max_width*(y_max-center_y)*((y_max+center_y)/2)^2);
sigma_max = M * y_max / I;
% solve for shear stress distribution
% V / (I * t) * int(y*da)
% Point 1: evaluated at location just before thickness changes from 4 to 1 in
tempCoeff = force / (I * max_width);
int_y_da = ((y_max+center_y)/2) * max_width*(y_max-center_y);
shear_1 = tempCoeff*int_y_da;
% Point 2: evaluated at location just after thickness changes from 4 to 1 in
tempCoeff = force / (I * min_width);
shear_2 = tempCoeff*int_y_da;
% Point 3: evaluated at center of beam
tempCoeff = force / (I * min_width);
int_y_da = (center_y/2) * min_width*center_y;
shear_3 = shear_2+tempCoeff*int_y_da;
%evaluating continous integral for width of 4..
int_y_da_4 = force / (I * max_width)*4*(y_max^2/2 - (center_y:.1:y_max).^2/2);
%evaluating continous integral for width of 1..
int_y_da_1 = shear_2 + force / (I * min_width)*1*(center_y^2/2 - (0:.1:center_y).^2/2);
figure; grid on; hold on;set(gcf,'color',[1 1 1]);
plot(int_y_da_4,center_y:.1:y_max,'linewidth',2)
plot(int_y_da_1,0:.1:center_y,'linewidth',2)
plot(int_y_da_1,0:-.1:-center_y,'linewidth',2)
plot(int_y_da_4,-center_y:-.1:-y_max,'linewidth',2)
plot([shear_1 shear_2],[center_y center_y],'linewidth',2)
plot([shear_1 shear_2],[-center_y -center_y],'linewidth',2)
plot(shear_1,center_y,'o')
plot(shear_2,center_y,'o')
plot(shear_3,0,'o')
plot(shear_2,-center_y,'o')
plot(shear_1,-center_y,'o')
xlabel('shear stress (lb/in^2)','fontsize',16,'fontweight','bold');ylabel('Distance from Center (in)','fontsize',16,'fontweight','bold')
set(gca,'FontSize',16,'fontweight','bold');
figure; grid on; hold on;set(gcf,'color',[1 1 1]);
plot([0 4 4 2.5 2.5 4 4 0 0 1.5 1.5 0 0],[4 4 2 2 -2 -2 -4 -4 -2 -2 2 2 4],'linewidth',2)