image thumbnail
strglex.m
% Example: strglex
% ~~~~~~~~~~~~~~~~
% This example determines the stresses on
% a specified plane.
%
% Data is defined in the declaration statements
% below, where:
%
% Sigma_x - normal stress on x-axis
% Sigma_y - normal stress on y-axis
% Tau_xy  - shear stress
% Angle   - angle (in degrees) to determine
%           stresses for
% 
% NOTES: 1) normal stresses are + for tension,
%           - for compression
%        2) shear stresses are + when they
%           are directed down on the positive
%           x-axis face
%
% User m functions required:
%    strangle, strangpl, arrows, flpang,
%    genprint
%----------------------------------------------

clear;
%...Problem definition
Problem=1;
if Problem == 1
  Sigma_x=100; Sigma_y=60; Tau_xy=-48;
  Angle=30;
end

%...Find stresses on the plane
[Sx_ang,Sy_ang,Tau_ang]=strangle( ...
  Angle,Sigma_x,Sigma_y,Tau_xy);

fprintf ...
  ('\n\nDetermination of Stresses on a Plane');
fprintf ...
  ('\n------------------------------------\n');
fprintf('\n  Sigma_x: %g',Sigma_x);
fprintf('\n  Sigma_y: %g',Sigma_y);
fprintf('\n  Tau_xy:  %g\n',Tau_xy);
fprintf('\n  Sigma: %g at %g', ...
  Sx_ang,Angle);
fprintf('\n  Sigma: %g at %g', ...
  Sy_ang,Angle+90);
fprintf('\n  Tau:   %g at %g\n', ...
    Tau_ang,Angle);

%...Plot results
[NewAngle]=flpang(Angle,0);
strangpl(Sigma_x,Sigma_y,Tau_xy, ...
  NewAngle,Sx_ang,Sy_ang,Tau_ang);
%genprint('strangle')

Contact us at files@mathworks.com