%% Function name % strain_ltog %% Revised: % 21 January 2014 %% Author % Ahmad Hares, Trey Moore, & Autar Kaw % Section: All % Semester: Fall 2012 %% Purpose % Given the local strains and the angle of the ply for a unidirectional % lamina, output the global strains %% Usage % function [strain_glo] = strain_ltog(strain_loc,angle) % Input variables % strain_loc=vector of local strain applied to unidirectional lamina % [strain_loc]=[eps1;eps2;eps12] % eps1=longitudinal local strain % eps2=transverse local strain % eps12=in-plane local strain % angle=angle of ply in degrees % Output variables % strain_glo=vector of global strain applied to unidirectional lamina % [strain_glo]=[epsx;epsy;epsxy] % Keyword % local strain matrix % global strain matrix % transformation of strains %% License Agreement % http://www.eng.usf.edu/~kaw/OCW/composites/license/limiteduse.pdf %% Code function [strain_glo] = strain_ltog(strain_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 strain_glo=inv(T)*strain_loc; % Calculating espxy strain_glo(3)=strain_glo(3)*2; end