%% Function name % stress_gtol %% Revised: % 16 January 2014 %% Author % Abigail Lambert, Trey Moore, & Autar Kaw % Section: All % Semester: Fall 2012 %% Purpose % Given the global stresses and the angle of the ply for a unidirectional % lamina, output the local stresses %% Usage % function [stress_loc] = stress_gtol(stress_glo,angle) % Input variables % stress_glo=vector of global stress applied to unidirectional lamina % [stress_glo]=[sx;sy;sxy] % sx=longitudinal global stress % sy=transverse global stress % sxy=in-plane global stress % angle=angle of ply in degrees % Output variables % stress_loc=vector of local stress applied to unidirectional lamina % [stress_loc]=[s1;s2;s12] % Keyword % local stress matrix % global stress matrix % transformation of stress %% License Agreement % http://www.eng.usf.edu/~kaw/OCW/composites/license/limiteduse.pdf %% Code function [stress_loc] = stress_gtol(stress_glo,angle) % Global stresses % Sine of the angle of the lamina s=sind(angle); % Cosine of the angle of the lamina c=cosd(angle); % Transformation matrix T=[c^2, s^2, 2*s*c; s^2, c^2, -2*s*c; -s*c, s*c, c^2-s^2;]; % local stress stress_loc=T*stress_glo; end