-
Notifications
You must be signed in to change notification settings - Fork 0
/
truss_2d_example.m
53 lines (49 loc) · 1.04 KB
/
truss_2d_example.m
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
a = 1;
P = 500;
MatsSets(1).E = 210e9;
MatsSets(1).A = 4e-4;
MatsSets(1).rho = 7.1;
MatsSets(2).E = 70e9;
MatsSets(2).A = 3e-3;
MatsSets(2).rho = 3.5;
PD.N = 6;
PD.NodePos = [0, 0, 0;
a, 0, 0;
a/2, a, 0;
4*a/3, a, 0;
a, 2*a, 0;
2*a, 2*a, 0];
PD.NE = 9;
PD.ElmConnect = [1, 2;
1, 3;
2, 3;
2, 4;
3, 5;
3, 4;
4, 5;
4, 6;
5, 6];
PD.NM = 2;
PD.MatsSets = MatsSets;
PD.ElmMats = [2;
1;
2;
1;
1;
2;
2;
1;
2];
PD.BCType = [1, 1, 1;
0, 1, 1;
0, 0, 1;
0, 0, 1;
0, 0, 1;
0, 0, 1];
PD.BCVal = [0, 0, 0;
0, 0, 0;
0, 0, 0;
0, 0, 0;
0, 0, 0;
P*cos(30*pi/180), -P*sin(30*pi/180), 0];
PDans = PD_truss_static(PD);