%% Function name % maximumstress %% Revised % 16 January 2014 %% Author % Autar Kaw & Trey Moore % Section : All % Semester : Fall 2012 %% Purpose % Given ultimate strengths of a unidirectional lamina, angle of the % ply in degrees, and the global stresses acting on the lamina, output % the strength ratio of the lamina based on maximum strain theory %% Usage % function [SR] = maximumstress(stress_glo,angle,strength) % 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 % angle=angle of ply in degrees % strength=vector of the five ultimate strain strengths of the % unidirectional lamina % [strength]=[s1tu s1cu s2tu s2cu s12u] % s1tu=ultimite longitudinal tensile strength % s1cu=ultimite longitudinal compressive strength % s2tu=ultimite transverse tensile strength % s2cu=ultimite transverse compressive strength % s12u=ultimite in-plane shear strength % Output variable % SR=Strength Ratio % Keyword % maximum stress failure theory % strength ratio % angle ply %% License Agreement % http://www.eng.usf.edu/~kaw/OCW/composites/license/limiteduse.pdf %% Code function [SR] = maximumstress(stress_glo,angle,strength) % Sine of the angle of the lamina s=sind(angle); % Cosine of the angle of the lamina c=cosd(angle); % Inverse 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 local strains stress_loc=T*stress_glo; if stress_loc(1)>0 SRp(1)=strength(1)/stress_loc(1); end if stress_loc(1)<0 SRp(1)=-strength(2)/stress_loc(1); end if stress_loc(2)>0 SRp(2)=strength(3)/stress_loc(2); end if stress_loc(2)<0 SRp(2)=-strength(4)/stress_loc(2); end if stress_loc(3)>0 SRp(3)=strength(5)/stress_loc(3); end if stress_loc(3)<0 SRp(3)=-strength(5)/stress_loc(3); end % Defining the Strength Ratio Vector SR=min(SRp); end