%% 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 %% Testing Code clc clear all %% Inputs % Material: Boron/Epoxy [stress_glo]=[0.7486;-1.157;2.306]*10^6; [strength]=[1260E6 2500E6 61E6 202E6 67E6]; fprintf('\nLongitudinal Global Stress: %g ',stress_glo(1)) fprintf('\nTransverse Global Stress: %g ',stress_glo(2)) fprintf('\nIn-Plane Global Shear Stress: %g ',stress_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=60; % Call function: maximumstress [SR] = maximumstress(stress_glo,angle,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] = maximumstress(stress_glo,angle(i),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] = maximumstress(stress_glo,angle(i),strength); sr(i)=SR; end % Plot of strength ratio figure hold on plot(angle,sr,'b','LineWidth',2) grid legend('Strength Ratio (Maximum Stress Failure Theory)') title('Strength Ratio vs. Fiber Angle') xlabel('Angle (degrees)') ylabel('Strength Ratio (Maximum Stress Failure Theory)') hold off