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

A BBD Matrix Mat Lab Code

This Matlab code calculates the ABD matrix for a composite laminate given the material properties and ply orientations of the laminate layers. The code takes in material properties and ply orientations as input, calculates transformation matrices for each ply, and sums the results to obtain the A, B, and D matrices, which are combined into the full ABD matrix output. The code was written as a homework assignment for a composite materials mechanics class.

Uploaded by

Alex Oliveira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

A BBD Matrix Mat Lab Code

This Matlab code calculates the ABD matrix for a composite laminate given the material properties and ply orientations of the laminate layers. The code takes in material properties and ply orientations as input, calculates transformation matrices for each ply, and sums the results to obtain the A, B, and D matrices, which are combined into the full ABD matrix output. The code was written as a homework assignment for a composite materials mechanics class.

Uploaded by

Alex Oliveira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Matlab Code to Produce the ABD Matrix for Composite

Material Laminate

This code has been written as a homework for the Mechanics of


Composite Materials Class

The Code can be used with acknowledgement of the developers:

Mohammad A. Al-Qaralleh
Moath H. Al-Safasfeh

Key words: Fiber Reinforcement Polymers (FRP), Lamina, Constitutive relationship,


Stress tensor, Strain tensor,
%% input the material properties
%% E1,E2,V12,G12

fprintf('please insert the material properties \n');


promptE1 = 'please insert E1 ';
promptE2 = 'please insert E2 ';
promptV12 = 'please insert V12 ';
promptG12 = 'please insert G12 ';
E1=input(promptE1);E2=input(promptE2);V12=input(promptV12);G12=input(promptG1
2);V21=E2*V12/E1;
prompt_thickness='please insert the ply thickness ';
t=input(prompt_thickness);
promptK = 'please insert number of plies';
K=input(promptK);

orientation=zeros(1,K);

fprintf('please insert the plies orientation form bottom to top \n')


%%%%%%%Orientation Matrix
for i= 1:K

fprintf('please insert the material properties theta %i \n',i);


prompt_theta = '';
theta=input(prompt_theta);
orientation(1,i)=theta;

end
%disp(orientation);

%%%%%%%%%% Q matrix elements


Q11= E1/(1-V12*V21); Q22= E2/(1-V12*V21); Q12=(V12*E2)/(1-
V12*V21);Q21=(V12*E2)/(1-V12*V21);
Q66= G12;

Q=[Q11 Q12 0; Q21 Q22 0; 0 0 Q66];

R=[1 0 0;0 1 0; 0 0 2];


Rinv=[1 0 0;0 1 0; 0 0 0.5];
%%%%%%%%%% for looop starting for different layers
M = cell(K, 1) ;

for n= 1:K

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%Calculate the vlues of m & n
c=cosd(orientation(1,n));%% degree
s=sind(orientation(1,n));%% degree

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Transformation Matrix
a11=c.^2; a12=s.^2; a13=2*c*s;
a21=s.^2; a22=c.^2; a23=(-2*c*s);
a31=(-c*s); a32=c*s; a33=c.^2-s.^2;
T=[a11 a12 a13;a21 a22 a23;a31 a32 a33];
Q_bar=inv(T)*Q*R*T*Rinv;
%Q_bar=R*inv(T)*Rinv*Q*T;
%disp(Q_bar);
M{n}=Q_bar;
end

%%%%%%%%% Z loop
Z=zeros(1,(K+1));
h=K*t;
for j=1:K+1
Z(1,j)=h/2-t*(j-1);

end
%disp(Z);
%%%%%%%%%%%%% end of for layers
aa=0;
bb=0;
dd=0;
A=zeros(3,3);
B=zeros(3,3);
D=zeros(3,3);

for yy=1:3
for zz= 1:3

for xx= 1:n


aa= aa+(M{xx}(yy,zz))*(Z(1,(xx))-Z(1,xx+1));
bb=(bb+(M{xx}(yy,zz))*(Z(1,(xx+1))^2-(Z(1,xx))^2));
dd=(dd+(M{xx}(yy,zz))*(Z(1,(xx))^3-(Z(1,xx+1))^3));

end
A(zz,yy)=aa;
B(zz,yy)=0.5*bb;
D(zz,yy)=(1/3)*dd;
aa=0;
bb=0;
dd=0;
end%%% for zz
end%%%for yy

fprintf('Matrix A = \n'); disp (A);


fprintf('Matrix B = \n'); disp (B);
fprintf('Matrix D = \n'); disp (D);

ABBD=zeros(6,6);

ABBD=[A(1,1) A(1,2) A(1,3) B(1,1) B(1,2) B(1,3);


A(2,1) A(2,2) A(2,3) B(2,1) B(2,2) B(2,3);
A(3,1) A(3,2) A(3,3) B(3,1) B(3,2) B(3,3);
B(1,1) B(1,2) B(1,3) D(1,1) D(1,2) D(1,3);
B(2,1) B(2,2) B(2,3) D(2,1) D(2,2) D(2,3);
B(3,1) B(3,2) B(3,3) D(3,1) D(3,2) D(3,3)];
fprintf('Matrix ABBD = \n'); disp (ABBD);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

You might also like