View raw

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