-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPreprocess.m
More file actions
67 lines (59 loc) · 1.96 KB
/
Preprocess.m
File metadata and controls
67 lines (59 loc) · 1.96 KB
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
classdef Preprocess<handle
% Only reads
properties
end
methods(Static)
function [coord, connec] = readFromGiD()
coord = [
1 0 0 0
2 0.01 0.01 0
3 0 0.02 0
4 0.02 0 0
5 0.02 0.02 0
6 0.01 0.03 0
7 0.03 0.01 0
8 0 0.04 0
9 0.04 0 0
10 0.03 0.03 0
11 0.04 0.02 0
12 0.02 0.04 0
13 0.04 0.04 0
];
%%
connec = [
1 5 2 4 0
2 3 2 5 0
3 1 2 3 0
4 4 2 1 0
5 12 6 5 0
6 8 6 12 0
7 3 6 8 0
8 5 6 3 0
9 11 7 9 0
10 5 7 11 0
11 4 7 5 0
12 9 7 4 0
13 13 10 11 0
14 12 10 13 0
15 5 10 12 0
16 11 10 5 0
];
end
function [fixnodes, forces] = getBC()
% Dirichlet
% Node - Dimension - Value
fixnodes = [
1 1 0
1 2 0
3 1 0
3 2 0
8 1 0
8 2 0
];
% Neumann --> Fpunc (global)
forces = [
11 2 -1
];
end
end
end