%% Function name % principalstresses %% Revised: % 16 January 2014 %% Author % Adam Wolfe, Trey Moore, & Autar Kaw % Section: All % Semester: Fall 2012 %% Purpose % Given the global stresses acting on the lamina, output the % longitudinal, transverse and in plane principal stresses of a lamina %% Usage % function [ps1,ps2,tmax] = principalstresses(stress_glo) % Input variables % stress_glo=vector of global stress applied to unidirectional lamina % [stress_glo]=[sx;sy;txy] % sx=longitudinal global stress % sy=transverse global stress % txy=in-plane shear stress % Output variables % ps1=principal stress in direction 1 [pricipal stress 1, angle] % ps2=principal stess in direction 2 [pricipal stress 2, angle] % tmax=maximum shear stress % thetaps=angle at which principal stress occurs % thetass=angle at which maximum shear stress occurs % Keyword % global stresses % principal stresses %% License Agreement % http://www.eng.usf.edu/~kaw/OCW/composites/license/limiteduse.pdf %% Code function [ps1,ps2,tmax,thetaps,thetass] = principalstresses(stress_glo) % Stress in the x direction sx=stress_glo(1); % Stress in the y direction sy=stress_glo(2); % Stress in the x-y plane txy=stress_glo(3); % Longitudinal and Transverse Stresses ps_1=((sx+sy)/2)+sqrt((((sx-sy)/2)^2)+((txy)^2)); ps_2=((sx+sy)/2)-sqrt((((sx-sy)/2)^2)+((txy)^2)); thetaps=atand((2*txy)/(sx-sy))/2; if ps_1 > ps_2 ps1=ps_1; ps2=ps_2; else ps1=ps_2; ps2=ps_1; end % Shear Stresses tmax=sqrt((((sx-sy)/2)^2)+(txy^2)); thetass=atand(-(sx-sy)/(2*txy))/2; end