-
Notifications
You must be signed in to change notification settings - Fork 0
/
Computational Project Code 1.txt
66 lines (63 loc) · 1.36 KB
/
Computational Project Code 1.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
clc
clear all
%Read Data
data = xlsread('Project_1__data','A1:G8');
%sort Data
sizedata = size(data);
N = sizedata(1);
tp = data(:,6);
E1 = data(:,2);
E2 = data(:,3);
G12 = data(:,4);
nu12 = data(:,5);
thetad = data(:,7)
%laminate thickness
tl = 0;
N
for i = 1:N
tl = tl+tp(i);
end
tl
Atotal = zeros(3);
Btotal = zeros(3);
Dtotal = zeros(3);
%calculate A, B, D matrix for Each Ply, then add together
for i = 1:N
%calculate constants for each ply
Sply = Smatrix(E1(i),E2(i),G12(i),nu12(i));
Qply = Qmatrix(Sply);
Qbarply = Qbar(Qply,thetad(i)*pi/180);
%establish locaction for each ply on zaxis
zkm1 = -tl*.5+tp(i)*(i-1);
zk = -tl*.5+tp(i)*i;
%calculate matrices
for r = 1:3
for c = 1:3
A(r,c) = Qbarply(r,c)*(zk-zkm1);
B(r,c) = Qbarply(r,c)*(zk^2-zkm1^2);
D(r,c) = Qbarply(r,c)*(zk^3-zkm1^3);
end
end
Atotal = Atotal+A;
Btotal = Btotal+(1/2)*B ;%for symmetrical laminate B should end up as zero
Dtotal = Dtotal + (1/3)*D;
%Calculate matrix A
%Calculate Matrix B
%Calculate Matrix D
end
Atotal
Btotal
Dtotal
Qeq = (1/tl)*Atotal;
Seq = Qeq^-1
E1eq = 1/Seq(1,1)
E2eq = 1/Seq(2,2)
G12eq = 1/Seq(3,3)
v12eq = -Seq(1,2)*E1eq
G12check = E1eq/(2*(1+v12eq))
Qeqalt = (12/tl^3)*Dtotal;
Seqalt = Qeqalt^-1
E1eqalt = 1/Seqalt(1,1)
E2eqalt = 1/Seqalt(2,2)
G12eqalt= 1/Seqalt(3,3)
v12eqalt = -Seqalt(1,2)*E1eqalt