%% Function name % principalstrains %% Revised: % 16 January 2014 %% Author % Adam Wolfe, Trey Moore, & Autar Kaw % Section: All % Semester: Fall 2012 %% Purpose % Given the global strains acting on the lamina, output the % longitudinal, transverse and in plane principal strains of a lamina %% Usage % function [pe1,pe2,gmax,thetap,thetas] = principalstrains(strain_glo) % Input variables % strain_glo=vector of global strain applied to unidirectional lamina % [strain_glo]=[epsx;epsy;epsxy] % epsx=longitudinal global strain % epsy=transverse global strain % epsxy=in-plane global strain % Output variables % pe1=principal strain in direction 1 % pe2=principal strain in direction 2 % gmax=maximum shear strain % thetape=angle at which principal strain occurs % thetase=angle at which maximum shear strain occurs % Keyword % global strains % principal strains %% License Agreement % http://www.eng.usf.edu/~kaw/OCW/composites/license/limiteduse.pdf %% Code function [pe1,pe2,gmax,thetape,thetase] = principalstrains(strain_glo) % Strain in the x-direction epsx=strain_glo(1); % Strain in the y-direction epsy=strain_glo(2); % Strain in the x-y plane epsxy=strain_glo(3); % Longitudinal and Transverse Stresses pe_1=((epsx+epsy)/2)+sqrt((((epsx-epsy)/2)^2)+((epsxy)^2)); pe_2=((epsx+epsy)/2)-sqrt((((epsx-epsy)/2)^2)+((epsxy)^2)); thetape=atand((2*epsxy)/(epsx-epsy))/2; if pe_1 > pe_2 pe1=pe_1; pe2=pe_2; else pe1=pe_2; pe2=pe_1; end % Shear Stresses gmax=sqrt((((epsx-epsy)/2)^2)+(epsxy^2)); thetase=atand(-(epsx-epsy)/(2*epsxy))/2; end