1 /*--------------------------------*- C++ -*----------------------------------*\
3 | \\ / F ield | foam-extend: Open Source CFD |
4 | \\ / O peration | Version: 3.0 |
5 | \\ / A nd | Web: http://www.extend-project.de |
6 | \\/ M anipulation | |
7 \*---------------------------------------------------------------------------*/
15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
16 // General macros to create 2D/extruded-2D meshes
18 //define(calc, [esyscmd(echo $1 | bc | tr -d \\n)])
20 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
26 // Impeller-tip radius
34 // Thickness of 2D slab
40 // Number of cells radially between hub and impeller tip
42 // Number of cells radially in each of the two regions between
43 // impeller and baffle tips
45 // Number of cells radially between baffle tip and tank
47 // Number of cells azimuthally in each of the 8 blocks
49 // Number of cells in the thickness of the slab
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 (0.2 0 0) // Vertex r0b = 0
58 (0.2 0 0) // Vertex r0sb = 1
59 (0.141421356364228 -0.141421356110391 0) // Vertex r1b = 2
60 (3.58979347393082e-10 -0.2 0) // Vertex r2b = 3
61 (3.58979347393082e-10 -0.2 0) // Vertex r2sb = 4
62 (-0.141421355856554 -0.141421356618065 0) // Vertex r3b = 5
63 (-0.2 7.17958694786164e-10 0) // Vertex r4b = 6
64 (-0.2 7.17958694786164e-10 0) // Vertex r4sb = 7
65 (-0.141421355856554 0.141421356618065 0) // Vertex r5b = 8
66 (3.58979347393082e-10 0.2 0) // Vertex r6b = 9
67 (3.58979347393082e-10 0.2 0) // Vertex r6sb = 10
68 (0.141421356364228 0.141421356110391 0) // Vertex r7b = 11
70 (0.5 0 0) // Vertex rb0b = 12
71 (0.353553390910569 -0.353553390275978 0) // Vertex rb1b = 13
72 (8.97448368482705e-10 -0.5 0) // Vertex rb2b = 14
73 (-0.353553389641386 -0.353553391545162 0) // Vertex rb3b = 15
74 (-0.5 1.79489673696541e-09 0) // Vertex rb4b = 16
75 (-0.353553389641386 0.353553391545162 0) // Vertex rb5b = 17
76 (8.97448368482705e-10 0.5 0) // Vertex rb6b = 18
77 (0.353553390910569 0.353553390275978 0) // Vertex rb7b = 19
79 (0.6 0 0) // Vertex ri0b = 20
80 (0.424264069092683 -0.424264068331174 0) // Vertex ri1b = 21
81 (1.07693804217925e-09 -0.6 0) // Vertex ri2b = 22
82 (-0.424264067569663 -0.424264069854194 0) // Vertex ri3b = 23
83 (-0.6 2.15387608435849e-09 0) // Vertex ri4b = 24
84 (-0.424264067569663 0.424264069854194 0) // Vertex ri5b = 25
85 (1.07693804217925e-09 0.6 0) // Vertex ri6b = 26
86 (0.424264069092683 0.424264068331174 0) // Vertex ri7b = 27
88 (0.7 0 0) // Vertex Rb0b = 28
89 (0.494974747274797 -0.494974746386369 0) // Vertex Rb1b = 29
90 (1.25642771587579e-09 -0.7 0) // Vertex Rb2b = 30
91 (-0.49497474549794 -0.494974748163226 0) // Vertex Rb3b = 31
92 (-0.7 2.51285543175157e-09 0) // Vertex Rb4b = 32
93 (-0.49497474549794 0.494974748163226 0) // Vertex Rb5b = 33
94 (1.25642771587579e-09 0.7 0) // Vertex Rb6b = 34
95 (0.494974747274797 0.494974746386369 0) // Vertex Rb7b = 35
97 (1 0 0) // Vertex R0b = 36
98 (0.707106781821139 -0.707106780551956 0) // Vertex R1b = 37
99 (0.707106781821139 -0.707106780551956 0) // Vertex R1sb = 38
100 (1.79489673696541e-09 -1 0) // Vertex R2b = 39
101 (-0.707106779282772 -0.707106783090323 0) // Vertex R3b = 40
102 (-0.707106779282772 -0.707106783090323 0) // Vertex R3sb = 41
103 (-1 3.58979347393082e-09 0) // Vertex R4b = 42
104 (-0.707106779282772 0.707106783090323 0) // Vertex R5b = 43
105 (-0.707106779282772 0.707106783090323 0) // Vertex R5sb = 44
106 (1.79489673696541e-09 1 0) // Vertex R6b = 45
107 (0.707106781821139 0.707106780551956 0) // Vertex R7b = 46
108 (0.707106781821139 0.707106780551956 0) // Vertex R7sb = 47
110 (0.2 0 0.1) // Vertex r0t = 48
111 (0.2 0 0.1) // Vertex r0st = 49
112 (0.141421356364228 -0.141421356110391 0.1) // Vertex r1t = 50
113 (3.58979347393082e-10 -0.2 0.1) // Vertex r2t = 51
114 (3.58979347393082e-10 -0.2 0.1) // Vertex r2st = 52
115 (-0.141421355856554 -0.141421356618065 0.1) // Vertex r3t = 53
116 (-0.2 7.17958694786164e-10 0.1) // Vertex r4t = 54
117 (-0.2 7.17958694786164e-10 0.1) // Vertex r4st = 55
118 (-0.141421355856554 0.141421356618065 0.1) // Vertex r5t = 56
119 (3.58979347393082e-10 0.2 0.1) // Vertex r6t = 57
120 (3.58979347393082e-10 0.2 0.1) // Vertex r6st = 58
121 (0.141421356364228 0.141421356110391 0.1) // Vertex r7t = 59
123 (0.5 0 0.1) // Vertex rb0t = 60
124 (0.353553390910569 -0.353553390275978 0.1) // Vertex rb1t = 61
125 (8.97448368482705e-10 -0.5 0.1) // Vertex rb2t = 62
126 (-0.353553389641386 -0.353553391545162 0.1) // Vertex rb3t = 63
127 (-0.5 1.79489673696541e-09 0.1) // Vertex rb4t = 64
128 (-0.353553389641386 0.353553391545162 0.1) // Vertex rb5t = 65
129 (8.97448368482705e-10 0.5 0.1) // Vertex rb6t = 66
130 (0.353553390910569 0.353553390275978 0.1) // Vertex rb7t = 67
132 (0.6 0 0.1) // Vertex ri0t = 68
133 (0.424264069092683 -0.424264068331174 0.1) // Vertex ri1t = 69
134 (1.07693804217925e-09 -0.6 0.1) // Vertex ri2t = 70
135 (-0.424264067569663 -0.424264069854194 0.1) // Vertex ri3t = 71
136 (-0.6 2.15387608435849e-09 0.1) // Vertex ri4t = 72
137 (-0.424264067569663 0.424264069854194 0.1) // Vertex ri5t = 73
138 (1.07693804217925e-09 0.6 0.1) // Vertex ri6t = 74
139 (0.424264069092683 0.424264068331174 0.1) // Vertex ri7t = 75
141 (0.7 0 0.1) // Vertex Rb0t = 76
142 (0.494974747274797 -0.494974746386369 0.1) // Vertex Rb1t = 77
143 (1.25642771587579e-09 -0.7 0.1) // Vertex Rb2t = 78
144 (-0.49497474549794 -0.494974748163226 0.1) // Vertex Rb3t = 79
145 (-0.7 2.51285543175157e-09 0.1) // Vertex Rb4t = 80
146 (-0.49497474549794 0.494974748163226 0.1) // Vertex Rb5t = 81
147 (1.25642771587579e-09 0.7 0.1) // Vertex Rb6t = 82
148 (0.494974747274797 0.494974746386369 0.1) // Vertex Rb7t = 83
150 (1 0 0.1) // Vertex R0t = 84
151 (0.707106781821139 -0.707106780551956 0.1) // Vertex R1t = 85
152 (0.707106781821139 -0.707106780551956 0.1) // Vertex R1st = 86
153 (1.79489673696541e-09 -1 0.1) // Vertex R2t = 87
154 (-0.707106779282772 -0.707106783090323 0.1) // Vertex R3t = 88
155 (-0.707106779282772 -0.707106783090323 0.1) // Vertex R3st = 89
156 (-1 3.58979347393082e-09 0.1) // Vertex R4t = 90
157 (-0.707106779282772 0.707106783090323 0.1) // Vertex R5t = 91
158 (-0.707106779282772 0.707106783090323 0.1) // Vertex R5st = 92
159 (1.79489673696541e-09 1 0.1) // Vertex R6t = 93
160 (0.707106781821139 0.707106780551956 0.1) // Vertex R7t = 94
161 (0.707106781821139 0.707106780551956 0.1) // Vertex R7st = 95
167 hex (0 2 13 12 48 50 61 60)
170 simpleGrading (1 1 1)
173 hex (2 4 14 13 50 52 62 61)
176 simpleGrading (1 1 1)
179 hex (3 5 15 14 51 53 63 62)
182 simpleGrading (1 1 1)
185 hex (5 7 16 15 53 55 64 63)
188 simpleGrading (1 1 1)
191 hex (6 8 17 16 54 56 65 64)
194 simpleGrading (1 1 1)
197 hex (8 10 18 17 56 58 66 65)
200 simpleGrading (1 1 1)
203 hex (9 11 19 18 57 59 67 66)
206 simpleGrading (1 1 1)
209 hex (11 1 12 19 59 49 60 67)
212 simpleGrading (1 1 1)
215 hex (12 13 21 20 60 61 69 68)
218 simpleGrading (1 1 1)
221 hex (13 14 22 21 61 62 70 69)
224 simpleGrading (1 1 1)
227 hex (14 15 23 22 62 63 71 70)
230 simpleGrading (1 1 1)
233 hex (15 16 24 23 63 64 72 71)
236 simpleGrading (1 1 1)
239 hex (16 17 25 24 64 65 73 72)
242 simpleGrading (1 1 1)
245 hex (17 18 26 25 65 66 74 73)
248 simpleGrading (1 1 1)
251 hex (18 19 27 26 66 67 75 74)
254 simpleGrading (1 1 1)
257 hex (19 12 20 27 67 60 68 75)
260 simpleGrading (1 1 1)
263 hex (20 21 29 28 68 69 77 76)
265 simpleGrading (1 1 1)
268 hex (21 22 30 29 69 70 78 77)
270 simpleGrading (1 1 1)
273 hex (22 23 31 30 70 71 79 78)
275 simpleGrading (1 1 1)
278 hex (23 24 32 31 71 72 80 79)
280 simpleGrading (1 1 1)
283 hex (24 25 33 32 72 73 81 80)
285 simpleGrading (1 1 1)
288 hex (25 26 34 33 73 74 82 81)
290 simpleGrading (1 1 1)
293 hex (26 27 35 34 74 75 83 82)
295 simpleGrading (1 1 1)
298 hex (27 20 28 35 75 68 76 83)
300 simpleGrading (1 1 1)
303 hex (28 29 38 36 76 77 86 84)
305 simpleGrading (1 1 1)
308 hex (29 30 39 37 77 78 87 85)
310 simpleGrading (1 1 1)
313 hex (30 31 41 39 78 79 89 87)
315 simpleGrading (1 1 1)
318 hex (31 32 42 40 79 80 90 88)
320 simpleGrading (1 1 1)
323 hex (32 33 44 42 80 81 92 90)
325 simpleGrading (1 1 1)
328 hex (33 34 45 43 81 82 93 91)
330 simpleGrading (1 1 1)
333 hex (34 35 47 45 82 83 95 93)
335 simpleGrading (1 1 1)
338 hex (35 28 36 46 83 76 84 94)
340 simpleGrading (1 1 1)
345 arc 0 2 (0.184775906536601 -0.0765366863901046 0)
346 arc 2 4 (0.0765366867217582 -0.184775906399226 0)
347 arc 3 5 (-0.0765366860584508 -0.184775906673977 0)
348 arc 5 7 (-0.18477590626185 -0.0765366870534118 0)
349 arc 6 8 (-0.18477590626185 0.0765366870534118 0)
350 arc 8 10 (-0.0765366860584508 0.184775906673977 0)
351 arc 9 11 (0.0765366867217582 0.184775906399226 0)
352 arc 11 1 (0.184775906536601 0.0765366863901046 0)
354 arc 12 13 (0.461939766341503 -0.191341715975262 0)
355 arc 13 14 (0.191341716804395 -0.461939765998065 0)
356 arc 14 15 (-0.191341715146127 -0.461939766684942 0)
357 arc 15 16 (-0.461939765654626 -0.19134171763353 0)
358 arc 16 17 (-0.461939765654626 0.19134171763353 0)
359 arc 17 18 (-0.191341715146127 0.461939766684942 0)
360 arc 18 19 (0.191341716804395 0.461939765998065 0)
361 arc 19 12 (0.461939766341503 0.191341715975262 0)
363 arc 20 21 (0.554327719609804 -0.229610059170314 0)
364 arc 21 22 (0.229610060165275 -0.554327719197677 0)
365 arc 22 23 (-0.229610058175352 -0.55432772002193 0)
366 arc 23 24 (-0.554327718785551 -0.229610061160235 0)
367 arc 24 25 (-0.554327718785551 0.229610061160235 0)
368 arc 25 26 (-0.229610058175352 0.55432772002193 0)
369 arc 26 27 (0.229610060165275 0.554327719197677 0)
370 arc 27 20 (0.554327719609804 0.229610059170314 0)
372 arc 28 29 (0.646715672878104 -0.267878402365366 0)
373 arc 29 30 (0.267878403526154 -0.64671567239729 0)
374 arc 30 31 (-0.267878401204578 -0.646715673358918 0)
375 arc 31 32 (-0.646715671916476 -0.267878404686941 0)
376 arc 32 33 (-0.646715671916476 0.267878404686941 0)
377 arc 33 34 (-0.267878401204578 0.646715673358918 0)
378 arc 34 35 (0.267878403526154 0.64671567239729 0)
379 arc 35 28 (0.646715672878104 0.267878402365366 0)
381 arc 36 38 (0.923879532683006 -0.382683431950523 0)
382 arc 37 39 (0.382683433608791 -0.923879531996129 0)
383 arc 39 41 (-0.382683430292254 -0.923879533369883 0)
384 arc 40 42 (-0.923879531309252 -0.382683435267059 0)
385 arc 42 44 (-0.923879531309252 0.382683435267059 0)
386 arc 43 45 (-0.382683430292254 0.923879533369883 0)
387 arc 45 47 (0.382683433608791 0.923879531996129 0)
388 arc 46 36 (0.923879532683006 0.382683431950523 0)
390 arc 48 50 (0.184775906536601 -0.0765366863901046 0.1)
391 arc 50 52 (0.0765366867217582 -0.184775906399226 0.1)
392 arc 51 53 (-0.0765366860584508 -0.184775906673977 0.1)
393 arc 53 55 (-0.18477590626185 -0.0765366870534118 0.1)
394 arc 54 56 (-0.18477590626185 0.0765366870534118 0.1)
395 arc 56 58 (-0.0765366860584508 0.184775906673977 0.1)
396 arc 57 59 (0.0765366867217582 0.184775906399226 0.1)
397 arc 59 49 (0.184775906536601 0.0765366863901046 0.1)
399 arc 60 61 (0.461939766341503 -0.191341715975262 0.1)
400 arc 61 62 (0.191341716804395 -0.461939765998065 0.1)
401 arc 62 63 (-0.191341715146127 -0.461939766684942 0.1)
402 arc 63 64 (-0.461939765654626 -0.19134171763353 0.1)
403 arc 64 65 (-0.461939765654626 0.19134171763353 0.1)
404 arc 65 66 (-0.191341715146127 0.461939766684942 0.1)
405 arc 66 67 (0.191341716804395 0.461939765998065 0.1)
406 arc 67 60 (0.461939766341503 0.191341715975262 0.1)
408 arc 68 69 (0.554327719609804 -0.229610059170314 0.1)
409 arc 69 70 (0.229610060165275 -0.554327719197677 0.1)
410 arc 70 71 (-0.229610058175352 -0.55432772002193 0.1)
411 arc 71 72 (-0.554327718785551 -0.229610061160235 0.1)
412 arc 72 73 (-0.554327718785551 0.229610061160235 0.1)
413 arc 73 74 (-0.229610058175352 0.55432772002193 0.1)
414 arc 74 75 (0.229610060165275 0.554327719197677 0.1)
415 arc 75 68 (0.554327719609804 0.229610059170314 0.1)
417 arc 76 77 (0.646715672878104 -0.267878402365366 0.1)
418 arc 77 78 (0.267878403526154 -0.64671567239729 0.1)
419 arc 78 79 (-0.267878401204578 -0.646715673358918 0.1)
420 arc 79 80 (-0.646715671916476 -0.267878404686941 0.1)
421 arc 80 81 (-0.646715671916476 0.267878404686941 0.1)
422 arc 81 82 (-0.267878401204578 0.646715673358918 0.1)
423 arc 82 83 (0.267878403526154 0.64671567239729 0.1)
424 arc 83 76 (0.646715672878104 0.267878402365366 0.1)
426 arc 84 86 (0.923879532683006 -0.382683431950523 0.1)
427 arc 85 87 (0.382683433608791 -0.923879531996129 0.1)
428 arc 87 89 (-0.382683430292254 -0.923879533369883 0.1)
429 arc 88 90 (-0.923879531309252 -0.382683435267059 0.1)
430 arc 90 92 (-0.923879531309252 0.382683435267059 0.1)
431 arc 91 93 (-0.382683430292254 0.923879533369883 0.1)
432 arc 93 95 (0.382683433608791 0.923879531996129 0.1)
433 arc 94 84 (0.923879532683006 0.382683431950523 0.1)
559 // ************************************************************************* //