3.2 MATLAB Functions Used 29 3.2 MATLAB Functions Used The six MATLAB functions used in this chapter to calculate the elastic ma- terial constants are: E1(Vf,Elf,Em)-This function calculates the longitudinal Young's modulus E for the lamina.Its input consists of three arguments as illustrated in the listing below. NU12(Vf,NU12f,NUm)-This function calculates Poisson's ratio v12 for the lamina.Its input consists of three arguments as illustrated in the listing below. E2(Vf,E2f,Em,Eta,NU12f,NU21f,NUm,Elf,p)-This function calcu- lates the transverse Young's modulus E2 for the lamina.Its input consists of nine arguments as illustrated in the listing below.Use the value zero for any argument not needed in the calculations. G12(Vf,G12f,Gm,EtaPrime,p)-This function calculates the shear mod- ulus Gi2 for the lamina.Its input consists of five arguments as illustrated in the listing below.Use the value zero for any argument not needed in the calculations. Alphal(Vf,Elf,Em,Alphalf,Alpham)-This function calculates the co- efficient of thermal expansion a for the lamina.Its input consists of five arguments as illustrated in the listing below. Alpha2(Vf,Alpha2f,Alpham,E1,Elf,Em,NUIf,NUm,Alphalf,p)-This function calculates the coefficient of thermal expansion o2 for the lamina.Its input consists of ten arguments as illustrated in the listing below.Use the value zero for any argument not needed in the calculations. The following is a listing of the MATLAB source code for each function: function y E1(Vf,Eif,Em) %E1 This function returns Young's modulus in the % longitudinal direction.Its input are three values: % Vf -fiber volume fraction % Eif -longitudinal Young's modulus of the fiber 名 Em -Young's modulus of the matrix This function uses the simple rule-of-mixtures formula 名 of equation (3.2) Vm =1-Vf; y Vf*E1f Vm+Em; function y NU12(Vf,NU12f,NUm) %NU12 This function returns Poisson's ratio NU12 % Its input are three values: Vf -fiber volume fraction 名 NU12f -Poisson's ratio NU12 of the fiber % NUm-Poisson's ratio of the matrix3.2 MATLAB Functions Used 29 3.2 MATLAB Functions Used The six MATLAB functions used in this chapter to calculate the elastic material constants are: E1 (Vf, E1f, Em) – This function calculates the longitudinal Young’s modulus E1 for the lamina. Its input consists of three arguments as illustrated in the listing below. NU12 (Vf, NU12f, NUm) – This function calculates Poisson’s ratio ν12 for the lamina. Its input consists of three arguments as illustrated in the listing below. E2 (Vf, E2f, Em, Eta, NU12f, NU21f, NUm, E1f, p) – This function calculates the transverse Young’s modulus E2 for the lamina. Its input consists of nine arguments as illustrated in the listing below. Use the value zero for any argument not needed in the calculations. G12 (Vf, G12f, Gm, EtaPrime, p) – This function calculates the shear modulus G12 for the lamina. Its input consists of five arguments as illustrated in the listing below. Use the value zero for any argument not needed in the calculations. Alpha1 (Vf, E1f, Em, Alpha1f, Alpham) – This function calculates the coefficient of thermal expansion α1 for the lamina. Its input consists of five arguments as illustrated in the listing below. Alpha2 (Vf, Alpha2f, Alpham, E1, E1f, Em, NU1f, NUm, Alpha1f, p) – This function calculates the coefficient of thermal expansion α2 for the lamina. Its input consists of ten arguments as illustrated in the listing below. Use the value zero for any argument not needed in the calculations. The following is a listing of the MATLAB source code for each function: function y = E1(Vf,E1f,Em) %E1 This function returns Young’s modulus in the % longitudinal direction. Its input are three values: % Vf - fiber volume fraction % E1f - longitudinal Young’s modulus of the fiber % Em - Young’s modulus of the matrix % This function uses the simple rule-of-mixtures formula % of equation (3.2) Vm = 1 - Vf; y = Vf*E1f + Vm*Em; function y = NU12(Vf,NU12f,NUm) %NU12 This function returns Poisson’s ratio NU12 % Its input are three values: % Vf - fiber volume fraction % NU12f - Poisson’s ratio NU12 of the fiber % NUm - Poisson’s ratio of the matrix