%% Function name % stress_ltog %% Revised: % 21 January 2014 %% Author % Casey McKenzie, Trey Moore, & Autar Kaw % Section: All % Semester: Fall 2012 %% Purpose % Given the local stresses and the angle of the ply for a unidirectional % lamina, output the global stresses %% Usage % function [stress_glo] = stress_ltog(stress_loc,angle) % Input variables % stress_loc=vector of local stress applied to unidirectional lamina % [stress_loc]=[s1;s2;s12] % s1=longitudinal local stress % s2=transverse local stress % s12=in-plane local stress % angle=angle of ply in degrees % Output variables % stress_glo=vector of global stress applied to unidirectional lamina % [stress_glo]=[sx;sy;sxy] % 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_glo] = stress_ltog(stress_loc,angle) % 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;]; % Calculating the global strain vector using the Tinv matrix stress_glo=inv(T)*stress_loc; end