%% Function name % alpha_gtol %% Revised: % 13 January 2014 %% Author % Atif Amir, Trey Moore, & Autar Kaw % Section: All % Semester: Fall 2012 %% Purpose % Given the longitudinal and transverse coefficients of thermal % expansion of a unidirectional lamina, and the angle of the ply, % output the coefficients of thermal expansion for an angle lamina. %% Usage % function [alphaxy] = alpha_gtol(alpha12,angle) % Input variables % alpha12=vector of thermal expansion of unidirectional lamina % in 1,2 direction % [alpha12]=[alpha1;alpha2;zero] % alpha1=longitudinal coefficient of thermal expansion % alpha2=transverse coefficient of thermal expansion. % alpha12=in-plane coefficient of thermal expansion. % angle=angle of ply in degrees % Output variables % alphaxy=vector of coefficients of thermal expansion for angle % in x,y direction % [alphax,alphay,alphaxy] % Keywords % coefficient of thermal expansion % angle ply %% License Agreement % http://www.eng.usf.edu/~kaw/OCW/composites/license/limiteduse.pdf %% Testing Code clc clear all %% Inputs % Material: Glass/Epoxy alpha1=8.6E-6; alpha2=22.1E-6; [alpha12]=[alpha1;alpha2;0]; fprintf('\nLongitudinal Coeff. of Thermal Expansion: %g ',alpha1) fprintf('\nTransverse Coeff. of Thermal Expansion: %g ',alpha2) %% Test 1 % Testing for individual angle % Input desired angle in degrees angle=60; % Call function: alpha_gtol [alphaxy] = alpha_gtol(alpha12,angle); % Results for a particular angle fprintf('\n\nAngle of Lamina: %G\n\n',angle) disp(' Lamina Coefficient of Thermal Expansion') disp('___________________________________________________') fprintf('\n alphax | %G\n alphay | %G\n alphaxy | %G\n\n\n\n',... alphaxy(1),alphaxy(2),alphaxy(3)) %% Test 2 % Table of Thermal Expansion Coefficients of an Angle Lamina % as a Function of Fiber Angle for i=1:5:91 angle(i)=i-1; [alphaxy] = alpha_gtol(alpha12,angle(i)); alphax(i)=alphaxy(1); alphay(i)=alphaxy(2); alpha_xy(i)=alphaxy(3); end disp(' Lamina Coefficient of Thermal Expansion') disp('_________________________________________________________________') disp(' angle alphax alphay alphaxy ') for i=1:5:91 fprintf('\t%2.0f |\t %E |\t %E |\t %E \n',angle(i),alphax(i),alphay(i),alpha_xy(i)) end %% Test 3 % Graph of Thermal Expansion Coefficients of an Angle Lamina % as a Function of Fiber Angle for i=1:1:91 angle(i)=i-1; [alphaxy] = alpha_gtol(alpha12,angle(i)); alphax(i)=alphaxy(1); alphay(i)=alphaxy(2); alpha_xy(i)=alphaxy(3); end hold on plot(angle,alphax,'b','LineWidth',2) plot(angle,alphay,'r','LineWidth',2) plot(angle,alpha_xy,'m','LineWidth',2) grid legend('alphax','alphay','alphaxy') title('Coefficient of Thermal Expansion vs. Fiber Angle') xlabel('Angle (degrees)') ylabel('Coefficient of Thermal Expansion') hold off