%% Function name % tsaiwu %% Revised: % 23 January 2014 %% Author % Abiodun Yakub, Trey Moore, & Autar Kaw % Section: All % Semester: Fall 2012 %% Purpose % Given elastic modulii and ultimate strengths of a unidirectional % lamina, angle of the ply in degrees, and the global strains acting % on the lamina, output the strength ratio of the lamina based on % Tsai-Wu failure theory %% Usage % function [SR] = tsaiwu(strain_glo,angle,moduli,strength) % Input variables % moduli=vector with four elastic moduli of unidirectional lamina % [moduli]=[E1 E2 nu12 G12] % angle=angle of ply in degrees % E1=longitudinal elastic modulus % E2=transverse elastic modulus % nu12=major Poisson's ratio % G12=in-plane shear modulus % 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 % 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 % Tsai-Wu failure theory % strength ratio % angle ply %% License Agreement % http://www.eng.usf.edu/~kaw/OCW/composites/license/limiteduse.pdf %% Testing Code clc clear all %% Inputs % Material: Graphite/Epoxy [moduli]=[181E9 10.3E9 0.28 7.17E9]; [strength]=[1500E6 -1500E6 40E6 -246E6 68E6]; [strain_glo]=[4.42E-8;-1.238E-8;0]; fprintf('\nLongitudinal Elastic Modulus: %g ',moduli(1)) fprintf('\nTransverse Elastic Modulus: %g ',moduli(2)) fprintf('\nPoisson''s Ratio: %g ',moduli(3)) fprintf('\nShear Modulus: %g ',moduli(4)) fprintf('\nLongitudinal Global Strain: %g ',strain_glo(1)) fprintf('\nTransverse Global Strain: %g ',strain_glo(2)) fprintf('\nIn-Plane Global Shear Strain: %g ',strain_glo(3)) fprintf('\nUltimate Longitudinal Tensile Strength: %g ',strength(1)) fprintf('\nUltimate Longitudinal Compressive Strength: %g ',strength(2)) fprintf('\nUltimate Transverse Tensile Strength: %g ',strength(3)) fprintf('\nUltimate Transverse Compressive Strength: %g ',strength(4)) fprintf('\nUltimate In-Plane Shear Strength: %g ',strength(5)) %% Test 1 % Testing for individual angle % Input desired angle in degrees angle=0; % Call function: tsaihill [SR] = tsaiwu(strain_glo,angle,moduli,strength); % Results for a particular angle fprintf('\n\nAngle of Lamina: %G\n\n',angle) disp(' Strength Ratio for Lamina') disp('_______________________________________') fprintf('\n SR | %G\n\n\n\n',SR) %% Test 2 % Table of Strength Ratio of an Angle Lamina % as a Function of Fiber Angle for i = 1:10:91 angle(i)=i-1; [SR] = tsaiwu(strain_glo,angle(i),moduli,strength); sr(i)=SR; end disp('Angle Lamina Strength Ratio') disp('________________________________') disp(' angle SR') for i=1:10:91 fprintf(' \t%2.0f |\t %3.4f\n', angle(i),sr(i)) end %% Test 3 % Graphs of Strength Ratio of an Angle Lamina % as a Function of Fiber Angle for i=1:1:91 angle(i)=i-1; [SR] = tsaiwu(strain_glo,angle(i),moduli,strength); sr(i)=SR; end % Plot of strength ratio figure hold on plot(angle,sr,'b','LineWidth',2) grid legend('Strength Ratio (Tsai-Hill Failure Theory)') title('Strength Ratio vs. Fiber Angle') xlabel('Angle (degrees)') ylabel('Strength Ratio (Tsai-Hill Failure Theory)') hold off