0% found this document useful (0 votes)
96 views

CLC Clear: %% Inputs %modulus of Elasticity (Gpa)

This MATLAB code defines variables and material properties for a composite material and calculates its effective stiffness properties for different fiber orientations and volume fractions. It takes user inputs for the modulus, thermal expansion coefficient, Poisson's ratio, shear modulus, volume fraction, orientation, and thickness of the fiber and matrix materials. It then calculates the transformed stiffness matrix for each ply and sums the contributions to determine the overall effective modulus, Poisson's ratio, and shear modulus of the composite for varying fiber orientation angles. Plots of the effective modulus versus orientation angle are generated.

Uploaded by

Alaa Mohammed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

CLC Clear: %% Inputs %modulus of Elasticity (Gpa)

This MATLAB code defines variables and material properties for a composite material and calculates its effective stiffness properties for different fiber orientations and volume fractions. It takes user inputs for the modulus, thermal expansion coefficient, Poisson's ratio, shear modulus, volume fraction, orientation, and thickness of the fiber and matrix materials. It then calculates the transformed stiffness matrix for each ply and sums the contributions to determine the overall effective modulus, Poisson's ratio, and shear modulus of the composite for varying fiber orientation angles. Plots of the effective modulus versus orientation angle are generated.

Uploaded by

Alaa Mohammed
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CODE

clc
clear all
%% inputs
%modulus of elasticity (GPa)
Em=input('please enter a value for Em = ')
Ef=input('please enter a value for Ef = ')
%thermal expansion coefficient (/c)
alpham=input('please enter a value for
alpham = ')
alphaf=input('please enter a value for
alphaf = ')
%poisson's ratio
neum=input('please enter a value for neum =
')
neuf=input('please enter a value for neuf =
')
%%shear modulus (GPa)
Gm=Em/(2*(1+neum))
Gf=Ef/(2*(1+neuf))
%volume fraction
Vf=input('please enter a value for Vf = ')
Vm=1-Vf;
%Orientation
theta(1)=input('please a enter value for
theta1 = ')
theta(2)=input('please a enter value for
theta2 = ')

theta(3)=input('please a enter value for


theta3 = ')
theta(4)=theta(3);
theta(5)=theta(2);
theta(6)=theta(1);
%thickness
z(1)=input('please
z(2)=input('please
z(3)=input('please
z(4)=input('please
z(5)=input('please
z(6)=input('please
z(7)=input('please

enter
enter
enter
enter
enter
enter
enter

a
a
a
a
a
a
a

value
value
value
value
value
value
value

for
for
for
for
for
for
for

z1
z2
z3
z4
z5
z6
z7

=
=
=
=
=
=
=

')
')
')
')
')
')
')

%% outputs
E1=Vf*Ef+Vm*Em;
E2=(Em*Ef)/(Vm*Ef+Vf*Em);
alpha1=(Vf*Ef*alphaf+Vm*Em*alpham)/(Vf*Ef+Vm
*Em);
alpha2=Vm*alpham+Vf*alphaf;
G12=(Gm*Gf)/(Vf*Gm+Vm*Gf);
neu12=Vf*neuf+Vm*neum;
delta=1-(((neu12)^2)*(E2/E1));
Q=[(E1/delta) ((neu12*E2)/delta) 0;
((neu12*E2)/delta) (E2/delta) 0; 0 0 G12];
t(1)=z(7)-z(6);
t(2)=z(6)-z(5);
t(3)=z(5)-z(4);
t(4)=t(3);
t(5)=t(2);

t(6)=t(1);
t_total=2*t(1)+2*t(2)+2*t(3);
t_theta1=t(1)+t(6);
t_theta2=t(2)+t(5);
t_theta3=t(3)+t(4);
A=zeros(3);
B=zeros(3);
D=zeros(3);
alpha=0:0.1:1;
gamma=0:0.1:1;
beta=0;
for i=1:1:6
for L=1:length(alpha)
for j=1:1:length(gamma)
C(i)=cosd(theta(i)) ;
S(i)=sind(theta(i));
T(:,:,i)=[(C(i)^2) (S(i)^2) (2*S(i)*C(i));
(S(i)^2) (C(i)^2) (-2*S(i)*C(i)); (C(i)*S(i)) (S(i)*C(i)) ((C(i)^2)-(S(i)^2))];
Q_bar(:,:,i)=inv(T(:,:,i))*Q*T(:,:,i);
if i==1|i==6
a(:,:,i)=Q_bar(:,:,i)*((alpha(L)*t_total)/2)
;
b(:,:,i)=Q_bar(:,:,i)*((alpha(L)*t_total)/2)
*(z(i+1)+z(i));
d(:,:,i)=Q_bar(:,:,i)*(((alpha(L)*t_total)/2
)^3+3*(z(i+1)^2*z(i)-z(i+1)*z(i)^2));
end
if i==2|i==5
a(:,:,i)=Q_bar(:,:,i)*((beta*t_total)/2);
b(:,:,i)=Q_bar(:,:,i)*((beta*t_total)/2)*(z(
i+1)+z(i));

d(:,:,i)=Q_bar(:,:,i)*(((beta*t_total)/2)^3+
3*(z(i+1)^2*z(i)-z(i+1)*z(i)^2));
end
if i==3|i==4
a(:,:,i)=Q_bar(:,:,i)*((gamma(j)*t_total)/2)
;
b(:,:,i)=Q_bar(:,:,i)*((gamma(j)*t_total)/2)
*(z(i+1)+z(i));
d(:,:,i)=Q_bar(:,:,i)*(((gamma(j)*t_total)/2
)^3+3*(z(i+1)^2*z(i)-z(i+1)*z(i)^2));
end
A(:,:,i)=zeros(3)+a(:,:,i);
B(:,:,i)=zeros(3)+b(:,:,i);
D(:,:,i)=zeros(3)+d(:,:,i);
Ex(j)=((A(1,1)*A(2,2))/(t_theta3*A(2,2)))(((A(1,2).^2)*gamma(j))/(t_theta3*A(2,2)));
neuxy(j)=A(1,2)/A(2,2);
Gxy(j)=(gamma(j)*A(3,3))/t_theta3;
Exb(j)=(gamma(j)^3*12*(D(1,1)*D(2,2)D(1,2).^2))/(D(2,2)*t_theta3.^3);
neuxyb(j)=D(1,2)/D(2,2);
end
plot (gamma, Ex)
hold on
grid on
xlabel('gamma')
ylabel('Ex')
end
end

Graph

You might also like