image thumbnail
shrcon.m
% Example: shrcon
% ~~~~~~~~~~~~~~~
% This example determines the shear stresses
% in the bolts/rivets of an eccentric shear
% connection.
%
% Data is defined in the declaration statements
% below, where:
%
% Fx            - applied force in x
% Fy            - applied force in y
% M             - applied moment
% Diameter      - diameters of bolt/rivets
% Areai         - areas of bolt/rivets
% x             - x positions of bolt/rivets
% y             - y positions of bolt/rivets
%
% NOTES: a) The origin of the coordinate 
%           system must be located at the
%           point of application of the load
%           vector.
%        b) Either the "Diameter" or "Areai"
%           must be specified.  If "Diameter"
%           is specified the area is 
%           calculated as (pi*diameter^2/4).
%
% User m functions required:
%    genprint
%----------------------------------------------

clear;
%...Input definitions
Problem=3;
if Problem == 1
  Fx=0; Fy=-24; M=Fy*5; 
  Diameter =[7/8 7/8 7/8 7/8 7/8 7/8];
  x        =[0 0 0 4 4 4];
  y        =[2 5 8 2 5 8];
  Area=pi*Diameter(1).^2/4;
  Areai=[Area Area Area Area Area Area];
elseif Problem == 2
  Fx=0; Fy=-24; M=0; Diameter=[];
  Areai=[0.601 0.601 0.601 0.601 0.601 0.601];
  x    =[-7    -7    -7    -3    -3    -3];
  y    =[-8    -5    -2    -8    -5    -2];
elseif Problem == 3
  Fx=8; Fy=-6; M=0; 
  Diameter =[ 1  1  1  1];
  x        =[-9 -9 -5 -5];
  y        =[-6  0 -6  0];
  Area=pi*Diameter(1).^2/4;
  Areai=[Area Area Area Area];
end
Nbolts=length(x);

%...Area
%if length(Areai) == 0
%  Areai=pi*Diameter.^2/4; 
%end
Area=sum(Areai);

%...Centroid of bolt system
xbar=sum(x.*Areai)/Area; 
ybar=sum(y.*Areai)/Area;

%...Shift to centroidal axes
xs=x-xbar; ys=y-ybar;

J=sum(Areai.*(xs.^2+ys.^2));
Mtot=M+Fx*ybar-Fy*xbar;

%...Shear stresses
TauX=Fx/Area-Mtot*ys/J; TauY=Fy/Area-Mtot*xs/J;
Tau=sqrt(TauX.^2+TauY.^2);

fprintf( ...
  '\n\nStresses In Eccentric Shear Connection');
fprintf( ...
    '\n--------------------------------------');
fprintf('\n\nApplied Loads:');
fprintf(  '\n  Fx: %g',Fx);
fprintf(  '\n  Fy: %g',Fy);
fprintf(  '\n  M:  %g',M);
fprintf( ...
  '\n\nTotal moment at centroid: %g',Mtot);
for i=1:Nbolts
  fprintf('\n\nBolt/Rivet #: %g',i);
  if length(Diameter) > 0
    fprintf('\n  Diameter:   %g', Diameter(i));
  end
  fprintf('\n  Area:       %g', Areai(i));
  fprintf('\n  x position: %g', x(i));
  fprintf('\n  y position: %g', y(i));
  fprintf('\n  Stress (x): %g', TauX(i));
  fprintf('\n  Stress (y): %g', TauY(i));
  fprintf('\n  Stress:     %g', Tau(i));
end
fprintf('\n');

clf;
plot(x,y,'o',[0],[0],'*')
  axis('equal');
  title( ...
  'Stresses In Eccentric Shear Connection');
  xlabel('x'); ylabel('y');
  tmp=legend(' Bolt/Rivet', ...
             ' Load Point','Location','Best');
  axes(tmp); drawnow;
% genprint('shrcon');

Contact us at files@mathworks.com