-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathpar.pre.fbl
189 lines (174 loc) · 3.15 KB
/
par.pre.fbl
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# <le=6> Wandlänge
# <wb=10.5> Wabenbreite
# <hw=10> Kernhöhe
# <esize=hw/4> Element size
# <divx=2>
# <divy=4>
# <divz=4>
# <lx=120>
# <ly=25>
# <x1=50>
# <x2=100>
# <radius=10>
# <tupper=1>
# <tlower=1>
# <tsingle=0.1>
# <tdouble=2*tsingle>
# <dx1=sqrt(le*le-wb*wb/4.)>
# <wl=dx1*2.+le> row spacing parallel
# <nx=int(lx/(wl+le))+1>
# <ny=int(ly/wb)+1>
# base cell
pnt p0 0 0 0
pnt p1 <dx1+le/2.> 0 0
pnt p2 <le/2.> <wb/2.> 0
pnt p3 0 <wb/2.> 0
line l1 p0 p1 <divx>
line l2 p1 p2 <divy>
line l3 p2 p3 <divx>
line l4 p3 p0 <divy>
surf s1 l1 l2 l3 l4
swep all new tra 0 0 <hw> <divz>
del s A002 A005
# rotation
pnt rc p1 p2 0.5 1
copy all new rot rc z 180
merg p all
merg l all
merg s all
# shell sets
seta lower s1 A006
seta upper A001 A007
seta single A003
seta double A004 A009
# complete base cell
copy all new mir D005 x a
copy all new mir p3 y a
merg p all
merg l all
merg s all
seta basey s all
# adjust orientations (skin normals outwards, wall normals in pos x or y)
seta toflip A00I A00M A00F A00B
seta toflip s1 A006 A00Q A00N
seta toflip A00G A003 A004 A00U A00D
flip toflip
# replicate in y direction
valu ny <ny>
valu count 1
valu dy <wb>
while count < ny
valu pos * count dy
copy basey rowy tra 0 pos 0 a
valu count + count 1
endwhile
merg p all
merg l all
merg s all
seta rowy se basey
# assign single thickness to wall in symmetry plane
seta wsym s A009 A00G
setr double se wsym
seta single se wsym
# replicate in x direction
valu nx <nx>
valu count 1
valu dx <(dx1+le)*2>
while count < nx
valu pos * count dx
copy rowy new tra pos 0 0 a
valu count + count 1
endwhile
merg p all
merg l all
merg s all
# meshing
#div all auto <esize>
asgn e 2
elty all qu4
mesh all
merg n all 0.01
# cut to size
seta nodes n all
enq nodes partx rec <lx/2.> _ _ <1.0001*lx/2.>
enq partx part rec _ <ly/2.> _ <1.001*ly/2.>
seta tozap n all
setr tozap n part
comp tozap up
zap tozap
merg n all
# images
seto outline
pnt po1 0 <ly> 0
swep outline po2 tra <lx> 0 0
swep po2 po3 tra 0 <-ly> 0
setc outline
rot -z
view elem
plot e all n
frame
plot e all n
plus s all
plus l outline b 6
frame
hcpy png size
rot -z
rot c 45
rot d 60
view back
frame
zoom 1.5
plot e lower n
plus e single t
plus e double b
hcpy png core
# cylinders
del se new
seto cyl1
pnt ! <radius> 0 0
swep cyl1 new rot y -360 40
swep cyl1 new tra 0 <1.1*ly> 0 10
setc
copy cyl1 cyl2 tra <x2> 0 <-tlower-radius>
move cyl1 tra <x1> 0 <hw+tupper+radius>
elty cyl1 qu4
elty cyl2 qu4
plot n all
hcpy png all_nodes_1
mesh cyl1
mesh cyl2
plot n all
plus n cyl1 g
plus n cyl2 t
hcpy png all_nodes_2
#comp * do
send all abq
send all abq nam
# symmetry boundaries
seta nodes n all
enq nodes ysym rec _ 0 _ 0.1 a
enq nodes xsym rec 0 _ _ 0.1 a
# write symmetry nodes
send ysym abq spc 2
send xsym abq spc 1
send xsym abq nam
send ysym abq nam
# contact surfaces
send cyl1 abq sur
send cyl2 abq sur
send lower abq sur
send upper abq sur
# displacement monitor node for cyl1
seta nc1 n cyl1
enq nc1 mon1 rec <x1> 0 <hw+tupper> 0.01
send mon1 abq nam
# displacement monitor node for center of specimen
seta nodes n all
enq nodes monc rec 0 0 0 0.01
send monc abq nam
view front
seta ! all
plus n mon1 t 8
plus n monc t 8
view ill
hcpy png quarter