mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
726
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.ele
Normal file
726
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.ele
Normal file
@ -0,0 +1,726 @@
|
|||||||
|
724 4 0
|
||||||
|
1 48 170 84 171
|
||||||
|
2 78 202 171 213
|
||||||
|
3 16 48 45 171
|
||||||
|
4 128 159 108 191
|
||||||
|
5 167 168 77 200
|
||||||
|
6 72 166 25 199
|
||||||
|
7 8 197 44 198
|
||||||
|
8 162 166 72 199
|
||||||
|
9 50 84 83 196
|
||||||
|
10 67 126 17 172
|
||||||
|
11 48 125 45 171
|
||||||
|
12 103 150 63 210
|
||||||
|
13 102 177 59 194
|
||||||
|
14 119 172 75 213
|
||||||
|
15 10 157 69 208
|
||||||
|
16 126 167 119 172
|
||||||
|
17 30 157 107 190
|
||||||
|
18 52 182 180 209
|
||||||
|
19 88 192 105 205
|
||||||
|
20 152 194 104 203
|
||||||
|
21 107 187 150 190
|
||||||
|
22 23 141 86 192
|
||||||
|
23 97 99 140 184
|
||||||
|
24 55 189 133 207
|
||||||
|
25 97 138 31 151
|
||||||
|
26 35 142 60 194
|
||||||
|
27 27 118 74 164
|
||||||
|
28 101 127 21 152
|
||||||
|
29 126 171 167 200
|
||||||
|
30 90 109 55 133
|
||||||
|
31 21 178 152 203
|
||||||
|
32 134 173 93 174
|
||||||
|
33 27 83 50 84
|
||||||
|
34 85 127 29 211
|
||||||
|
35 164 176 111 202
|
||||||
|
36 65 153 105 156
|
||||||
|
37 149 186 59 203
|
||||||
|
38 88 87 129 130
|
||||||
|
39 23 141 97 151
|
||||||
|
40 177 178 136 203
|
||||||
|
41 76 164 43 198
|
||||||
|
42 84 176 126 202
|
||||||
|
43 89 116 90 133
|
||||||
|
44 40 112 71 113
|
||||||
|
45 40 70 71 112
|
||||||
|
46 125 126 45 171
|
||||||
|
47 133 161 66 176
|
||||||
|
48 65 105 14 156
|
||||||
|
49 66 189 187 207
|
||||||
|
50 67 68 38 110
|
||||||
|
51 60 144 62 61
|
||||||
|
52 124 165 33 204
|
||||||
|
53 52 128 108 191
|
||||||
|
54 26 90 89 116
|
||||||
|
55 114 164 76 198
|
||||||
|
56 150 190 104 192
|
||||||
|
57 59 186 102 194
|
||||||
|
58 69 157 103 190
|
||||||
|
59 120 170 196 122
|
||||||
|
60 116 164 117 197
|
||||||
|
61 5 112 41 113
|
||||||
|
62 37 110 107 157
|
||||||
|
63 132 181 32 189
|
||||||
|
64 121 122 18 196
|
||||||
|
65 84 123 27 202
|
||||||
|
66 73 195 163 199
|
||||||
|
67 182 204 137 209
|
||||||
|
68 140 97 23 99
|
||||||
|
69 96 136 135 178
|
||||||
|
70 28 80 57 81
|
||||||
|
71 23 99 97 141
|
||||||
|
72 153 156 63 193
|
||||||
|
73 100 152 21 178
|
||||||
|
74 148 151 146 190
|
||||||
|
75 115 43 15 213
|
||||||
|
76 138 186 139 188
|
||||||
|
77 48 125 84 170
|
||||||
|
78 105 153 65 155
|
||||||
|
79 108 204 182 209
|
||||||
|
80 104 193 192 205
|
||||||
|
81 18 83 40 121
|
||||||
|
82 32 111 89 133
|
||||||
|
83 59 95 94 149
|
||||||
|
84 135 136 34 178
|
||||||
|
85 95 137 132 189
|
||||||
|
86 57 80 52 108
|
||||||
|
87 104 151 149 186
|
||||||
|
88 186 194 59 203
|
||||||
|
89 152 191 150 193
|
||||||
|
90 115 197 8 198
|
||||||
|
91 170 125 201 48
|
||||||
|
92 140 183 7 184
|
||||||
|
93 9 108 52 128
|
||||||
|
94 70 5 71 112
|
||||||
|
95 44 116 26 117
|
||||||
|
96 84 126 125 171
|
||||||
|
97 66 159 126 161
|
||||||
|
98 52 191 108 209
|
||||||
|
99 41 112 72 113
|
||||||
|
100 108 191 159 209
|
||||||
|
101 125 170 201 160
|
||||||
|
102 77 168 167 169
|
||||||
|
103 103 157 30 190
|
||||||
|
104 52 9 57 108
|
||||||
|
105 127 152 101 193
|
||||||
|
106 38 68 37 110
|
||||||
|
107 133 189 66 207
|
||||||
|
108 8 76 115 198
|
||||||
|
109 65 153 143 154
|
||||||
|
110 31 151 138 206
|
||||||
|
111 62 144 6 61
|
||||||
|
112 192 193 105 205
|
||||||
|
113 153 154 101 211
|
||||||
|
114 72 163 111 199
|
||||||
|
115 13 101 100 212
|
||||||
|
116 104 187 150 191
|
||||||
|
117 13 154 101 212
|
||||||
|
118 23 97 86 151
|
||||||
|
119 102 61 144 194
|
||||||
|
120 153 193 63 211
|
||||||
|
121 20 159 126 160
|
||||||
|
122 14 88 130 156
|
||||||
|
123 30 107 37 159
|
||||||
|
124 65 154 2 155
|
||||||
|
125 42 111 89 162
|
||||||
|
126 85 150 30 191
|
||||||
|
127 194 205 142 212
|
||||||
|
128 97 141 99 151
|
||||||
|
129 120 82 50 170
|
||||||
|
130 22 60 61 102
|
||||||
|
131 66 161 126 176
|
||||||
|
132 30 128 85 191
|
||||||
|
133 59 139 102 186
|
||||||
|
134 54 89 26 90
|
||||||
|
135 70 112 40 114
|
||||||
|
136 66 159 107 187
|
||||||
|
137 32 132 91 181
|
||||||
|
138 49 124 80 160
|
||||||
|
139 56 91 12 92
|
||||||
|
140 126 159 37 161
|
||||||
|
141 78 168 46 169
|
||||||
|
142 144 177 102 194
|
||||||
|
143 113 121 40 196
|
||||||
|
144 86 148 129 192
|
||||||
|
145 7 184 183 185
|
||||||
|
146 17 109 90 133
|
||||||
|
147 141 192 88 205
|
||||||
|
148 167 168 45 169
|
||||||
|
149 97 184 139 185
|
||||||
|
150 2 154 64 155
|
||||||
|
151 111 195 181 199
|
||||||
|
152 78 123 47 171
|
||||||
|
153 84 176 111 195
|
||||||
|
154 49 160 80 201
|
||||||
|
155 43 197 115 198
|
||||||
|
156 38 67 24 68
|
||||||
|
157 93 174 173 189
|
||||||
|
158 150 152 104 191
|
||||||
|
159 24 167 77 200
|
||||||
|
160 122 170 49 201
|
||||||
|
161 71 112 5 113
|
||||||
|
162 163 195 111 199
|
||||||
|
163 17 172 126 176
|
||||||
|
164 124 160 49 195
|
||||||
|
165 37 106 30 159
|
||||||
|
166 40 113 71 121
|
||||||
|
167 136 178 96 203
|
||||||
|
168 127 191 152 193
|
||||||
|
169 67 167 126 172
|
||||||
|
170 139 185 102 186
|
||||||
|
171 66 187 107 207
|
||||||
|
172 104 187 149 206
|
||||||
|
173 40 74 19 114
|
||||||
|
174 84 170 123 171
|
||||||
|
175 107 110 37 161
|
||||||
|
176 42 164 114 198
|
||||||
|
177 63 193 150 211
|
||||||
|
178 39 161 107 207
|
||||||
|
179 50 123 84 170
|
||||||
|
180 49 170 160 201
|
||||||
|
181 46 168 4 169
|
||||||
|
182 84 170 49 196
|
||||||
|
183 49 195 84 196
|
||||||
|
184 183 184 99 185
|
||||||
|
185 111 114 42 164
|
||||||
|
186 31 158 146 190
|
||||||
|
187 109 161 39 207
|
||||||
|
188 54 90 55 175
|
||||||
|
189 44 197 117 198
|
||||||
|
190 111 163 84 195
|
||||||
|
191 117 164 42 198
|
||||||
|
192 73 121 113 163
|
||||||
|
193 86 97 31 151
|
||||||
|
194 90 133 55 175
|
||||||
|
195 125 160 84 170
|
||||||
|
196 80 160 81 201
|
||||||
|
197 160 176 126 195
|
||||||
|
198 144 100 34 177
|
||||||
|
199 139 149 59 188
|
||||||
|
200 103 146 69 190
|
||||||
|
201 74 114 40 163
|
||||||
|
202 107 150 30 190
|
||||||
|
203 74 118 43 164
|
||||||
|
204 4 168 77 169
|
||||||
|
205 27 84 50 123
|
||||||
|
206 189 206 187 207
|
||||||
|
207 151 192 141 205
|
||||||
|
208 163 195 73 196
|
||||||
|
209 71 18 40 121
|
||||||
|
210 149 151 138 186
|
||||||
|
211 43 118 15 213
|
||||||
|
212 35 145 141 205
|
||||||
|
213 146 148 86 151
|
||||||
|
214 100 194 152 203
|
||||||
|
215 36 138 97 139
|
||||||
|
216 147 192 190 210
|
||||||
|
217 107 158 39 207
|
||||||
|
218 95 132 94 149
|
||||||
|
219 60 102 22 145
|
||||||
|
220 183 140 99 184
|
||||||
|
221 89 111 32 162
|
||||||
|
222 28 81 48 201
|
||||||
|
223 34 177 100 178
|
||||||
|
224 146 147 53 148
|
||||||
|
225 111 162 72 199
|
||||||
|
226 60 142 13 194
|
||||||
|
227 181 195 66 204
|
||||||
|
228 108 160 33 204
|
||||||
|
229 31 138 93 206
|
||||||
|
230 119 167 126 171
|
||||||
|
231 107 161 66 207
|
||||||
|
232 180 191 52 209
|
||||||
|
233 126 202 176 213
|
||||||
|
234 45 126 68 200
|
||||||
|
235 53 146 103 147
|
||||||
|
236 38 37 10 110
|
||||||
|
237 15 118 78 213
|
||||||
|
238 101 152 100 212
|
||||||
|
239 138 151 149 206
|
||||||
|
240 26 116 89 117
|
||||||
|
241 10 110 37 157
|
||||||
|
242 171 202 126 213
|
||||||
|
243 129 147 87 148
|
||||||
|
244 100 101 21 152
|
||||||
|
245 97 98 36 139
|
||||||
|
246 52 80 33 108
|
||||||
|
247 48 170 79 201
|
||||||
|
248 98 184 7 185
|
||||||
|
249 153 154 65 155
|
||||||
|
250 55 173 133 189
|
||||||
|
251 149 151 104 206
|
||||||
|
252 143 2 65 154
|
||||||
|
253 78 171 119 213
|
||||||
|
254 58 108 9 128
|
||||||
|
255 9 52 51 128
|
||||||
|
256 60 62 144 194
|
||||||
|
257 94 138 93 188
|
||||||
|
258 132 149 95 189
|
||||||
|
259 9 58 57 108
|
||||||
|
260 104 190 151 192
|
||||||
|
261 105 192 156 193
|
||||||
|
262 69 103 53 146
|
||||||
|
263 70 40 19 114
|
||||||
|
264 95 149 137 189
|
||||||
|
265 192 193 150 210
|
||||||
|
266 58 81 57 108
|
||||||
|
267 102 145 60 194
|
||||||
|
268 57 81 80 108
|
||||||
|
269 52 127 51 191
|
||||||
|
270 12 92 91 179
|
||||||
|
271 60 61 102 194
|
||||||
|
272 150 192 104 193
|
||||||
|
273 30 150 103 190
|
||||||
|
274 130 88 87 156
|
||||||
|
275 13 142 100 194
|
||||||
|
276 53 147 129 148
|
||||||
|
277 125 126 84 160
|
||||||
|
278 55 109 39 207
|
||||||
|
279 129 131 88 130
|
||||||
|
280 30 159 128 191
|
||||||
|
281 86 141 23 151
|
||||||
|
282 153 155 105 193
|
||||||
|
283 40 114 112 163
|
||||||
|
284 27 196 84 202
|
||||||
|
285 85 128 51 191
|
||||||
|
286 160 195 33 204
|
||||||
|
287 94 134 93 174
|
||||||
|
288 109 133 17 161
|
||||||
|
289 109 110 39 161
|
||||||
|
290 84 160 49 170
|
||||||
|
291 89 90 54 175
|
||||||
|
292 96 137 92 179
|
||||||
|
293 31 146 86 151
|
||||||
|
294 117 197 164 198
|
||||||
|
295 15 78 46 119
|
||||||
|
296 91 92 56 166
|
||||||
|
297 112 113 40 163
|
||||||
|
298 45 168 167 200
|
||||||
|
299 68 126 67 200
|
||||||
|
300 136 177 34 178
|
||||||
|
301 49 122 121 196
|
||||||
|
302 92 137 91 179
|
||||||
|
303 63 103 85 150
|
||||||
|
304 92 165 56 166
|
||||||
|
305 167 171 45 200
|
||||||
|
306 81 160 125 201
|
||||||
|
307 29 85 51 127
|
||||||
|
308 46 119 78 169
|
||||||
|
309 172 176 75 213
|
||||||
|
310 131 130 129 3
|
||||||
|
311 88 129 87 192
|
||||||
|
312 119 171 126 213
|
||||||
|
313 39 158 55 207
|
||||||
|
314 105 193 155 212
|
||||||
|
315 15 119 75 213
|
||||||
|
316 33 182 108 204
|
||||||
|
317 104 187 152 203
|
||||||
|
318 16 123 48 171
|
||||||
|
319 107 159 66 161
|
||||||
|
320 123 170 48 171
|
||||||
|
321 84 125 48 171
|
||||||
|
322 124 195 165 204
|
||||||
|
323 146 151 31 190
|
||||||
|
324 74 83 27 163
|
||||||
|
325 37 159 107 161
|
||||||
|
326 47 4 46 168
|
||||||
|
327 136 149 59 203
|
||||||
|
328 20 68 45 126
|
||||||
|
329 82 123 50 170
|
||||||
|
330 20 106 68 126
|
||||||
|
331 37 110 68 161
|
||||||
|
332 80 81 28 201
|
||||||
|
333 24 68 67 200
|
||||||
|
334 46 78 47 168
|
||||||
|
335 67 126 68 161
|
||||||
|
336 93 138 134 188
|
||||||
|
337 68 106 37 126
|
||||||
|
338 20 126 125 160
|
||||||
|
339 163 196 27 202
|
||||||
|
340 72 114 111 163
|
||||||
|
341 33 108 80 160
|
||||||
|
342 55 173 54 175
|
||||||
|
343 45 125 20 126
|
||||||
|
344 50 170 84 196
|
||||||
|
345 133 173 55 175
|
||||||
|
346 80 124 33 160
|
||||||
|
347 63 193 156 210
|
||||||
|
348 68 126 37 161
|
||||||
|
349 104 152 150 193
|
||||||
|
350 133 164 116 176
|
||||||
|
351 145 194 186 205
|
||||||
|
352 126 160 66 176
|
||||||
|
353 107 206 158 207
|
||||||
|
354 12 96 92 179
|
||||||
|
355 118 164 27 202
|
||||||
|
356 164 197 43 198
|
||||||
|
357 89 133 90 175
|
||||||
|
358 67 109 17 161
|
||||||
|
359 105 193 35 205
|
||||||
|
360 55 133 109 207
|
||||||
|
361 33 160 124 195
|
||||||
|
362 173 174 11 175
|
||||||
|
363 137 187 149 203
|
||||||
|
364 79 170 122 201
|
||||||
|
365 39 158 107 190
|
||||||
|
366 150 191 85 211
|
||||||
|
367 40 121 83 196
|
||||||
|
368 32 133 132 189
|
||||||
|
369 56 165 25 166
|
||||||
|
370 42 114 111 162
|
||||||
|
371 141 145 99 205
|
||||||
|
372 27 163 83 196
|
||||||
|
373 92 137 96 182
|
||||||
|
374 149 187 104 203
|
||||||
|
375 126 167 67 200
|
||||||
|
376 137 180 96 182
|
||||||
|
377 102 186 145 194
|
||||||
|
378 62 60 13 194
|
||||||
|
379 15 75 115 213
|
||||||
|
380 85 103 30 150
|
||||||
|
381 49 160 84 195
|
||||||
|
382 137 181 66 204
|
||||||
|
383 59 149 139 186
|
||||||
|
384 98 139 97 184
|
||||||
|
385 51 127 85 191
|
||||||
|
386 149 187 137 189
|
||||||
|
387 91 166 32 181
|
||||||
|
388 139 184 98 185
|
||||||
|
389 31 190 151 206
|
||||||
|
390 100 178 177 194
|
||||||
|
391 150 187 107 191
|
||||||
|
392 149 186 138 188
|
||||||
|
393 51 128 52 191
|
||||||
|
394 108 182 52 209
|
||||||
|
395 59 136 95 149
|
||||||
|
396 93 138 94 149
|
||||||
|
397 94 149 132 189
|
||||||
|
398 132 133 32 175
|
||||||
|
399 135 136 96 179
|
||||||
|
400 92 182 33 204
|
||||||
|
401 137 187 66 189
|
||||||
|
402 137 181 132 189
|
||||||
|
403 88 141 23 192
|
||||||
|
404 187 206 107 207
|
||||||
|
405 107 110 39 208
|
||||||
|
406 37 126 106 159
|
||||||
|
407 94 149 138 188
|
||||||
|
408 11 173 134 174
|
||||||
|
409 159 191 187 209
|
||||||
|
410 13 100 62 194
|
||||||
|
411 105 155 142 212
|
||||||
|
412 35 205 193 212
|
||||||
|
413 152 187 104 191
|
||||||
|
414 60 145 35 194
|
||||||
|
415 14 105 88 156
|
||||||
|
416 33 165 92 204
|
||||||
|
417 133 181 66 189
|
||||||
|
418 107 190 157 208
|
||||||
|
419 39 190 107 208
|
||||||
|
420 20 125 81 160
|
||||||
|
421 80 108 81 160
|
||||||
|
422 100 177 144 194
|
||||||
|
423 138 139 36 188
|
||||||
|
424 49 170 122 196
|
||||||
|
425 132 174 94 189
|
||||||
|
426 139 186 149 188
|
||||||
|
427 134 138 36 188
|
||||||
|
428 144 62 100 194
|
||||||
|
429 91 137 92 181
|
||||||
|
430 92 166 91 181
|
||||||
|
431 107 187 159 191
|
||||||
|
432 141 151 86 192
|
||||||
|
433 165 199 181 204
|
||||||
|
434 150 159 30 191
|
||||||
|
435 129 148 87 192
|
||||||
|
436 100 142 13 212
|
||||||
|
437 52 180 21 191
|
||||||
|
438 107 159 150 191
|
||||||
|
439 142 205 35 212
|
||||||
|
440 37 107 30 157
|
||||||
|
441 21 127 52 191
|
||||||
|
442 92 181 137 204
|
||||||
|
443 129 88 131 192
|
||||||
|
444 103 147 146 190
|
||||||
|
445 137 182 92 204
|
||||||
|
446 87 156 88 192
|
||||||
|
447 91 137 95 179
|
||||||
|
448 135 96 12 179
|
||||||
|
449 164 202 118 213
|
||||||
|
450 110 157 10 208
|
||||||
|
451 101 193 152 212
|
||||||
|
452 152 205 194 212
|
||||||
|
453 21 152 127 191
|
||||||
|
454 193 205 152 212
|
||||||
|
455 59 149 94 188
|
||||||
|
456 30 106 58 159
|
||||||
|
457 67 110 109 161
|
||||||
|
458 68 110 67 161
|
||||||
|
459 66 204 108 209
|
||||||
|
460 32 181 133 189
|
||||||
|
461 17 126 67 161
|
||||||
|
462 106 126 20 159
|
||||||
|
463 111 114 72 162
|
||||||
|
464 40 83 74 163
|
||||||
|
465 48 79 28 201
|
||||||
|
466 30 150 107 159
|
||||||
|
467 108 128 58 159
|
||||||
|
468 58 128 30 159
|
||||||
|
469 39 110 107 161
|
||||||
|
470 83 121 18 196
|
||||||
|
471 134 94 93 188
|
||||||
|
472 86 129 131 192
|
||||||
|
473 126 159 66 160
|
||||||
|
474 66 159 108 160
|
||||||
|
475 166 181 165 199
|
||||||
|
476 186 194 104 205
|
||||||
|
477 81 108 58 160
|
||||||
|
478 108 159 58 160
|
||||||
|
479 81 106 20 160
|
||||||
|
480 106 159 20 160
|
||||||
|
481 99 186 151 205
|
||||||
|
482 52 108 33 182
|
||||||
|
483 178 194 100 203
|
||||||
|
484 78 169 119 171
|
||||||
|
485 58 106 81 160
|
||||||
|
486 58 159 106 160
|
||||||
|
487 112 114 72 163
|
||||||
|
488 111 164 133 176
|
||||||
|
489 54 173 11 175
|
||||||
|
490 177 194 178 203
|
||||||
|
491 25 166 165 199
|
||||||
|
492 19 74 43 164
|
||||||
|
493 19 114 74 164
|
||||||
|
494 111 163 114 164
|
||||||
|
495 114 163 74 164
|
||||||
|
496 152 178 100 203
|
||||||
|
497 111 181 162 199
|
||||||
|
498 76 19 43 164
|
||||||
|
499 76 114 19 164
|
||||||
|
500 89 117 116 164
|
||||||
|
501 116 133 89 164
|
||||||
|
502 42 117 89 164
|
||||||
|
503 89 111 42 164
|
||||||
|
504 89 133 111 164
|
||||||
|
505 48 82 79 170
|
||||||
|
506 82 48 16 170
|
||||||
|
507 48 123 16 170
|
||||||
|
508 16 123 82 170
|
||||||
|
509 43 115 76 198
|
||||||
|
510 75 164 116 197
|
||||||
|
511 126 171 84 202
|
||||||
|
512 84 196 163 202
|
||||||
|
513 84 171 123 202
|
||||||
|
514 78 118 27 202
|
||||||
|
515 120 1 82 170
|
||||||
|
516 120 122 1 170
|
||||||
|
517 82 1 79 170
|
||||||
|
518 1 122 79 170
|
||||||
|
519 47 168 78 171
|
||||||
|
520 45 168 47 171
|
||||||
|
521 16 45 47 171
|
||||||
|
522 47 123 16 171
|
||||||
|
523 59 194 177 203
|
||||||
|
524 152 191 21 203
|
||||||
|
525 32 133 89 175
|
||||||
|
526 104 186 149 203
|
||||||
|
527 119 169 167 171
|
||||||
|
528 167 169 45 171
|
||||||
|
529 45 169 168 171
|
||||||
|
530 168 169 78 171
|
||||||
|
531 104 194 186 203
|
||||||
|
532 59 177 136 203
|
||||||
|
533 137 149 95 203
|
||||||
|
534 95 149 136 203
|
||||||
|
535 17 161 133 176
|
||||||
|
536 126 161 17 176
|
||||||
|
537 116 164 75 176
|
||||||
|
538 75 172 116 176
|
||||||
|
539 90 133 116 176
|
||||||
|
540 116 172 90 176
|
||||||
|
541 17 133 90 176
|
||||||
|
542 90 172 17 176
|
||||||
|
543 150 193 63 210
|
||||||
|
544 195 199 165 204
|
||||||
|
545 66 181 137 189
|
||||||
|
546 81 125 48 201
|
||||||
|
547 165 166 92 181
|
||||||
|
548 32 162 111 181
|
||||||
|
549 32 166 162 181
|
||||||
|
550 45 171 126 200
|
||||||
|
551 111 133 32 181
|
||||||
|
552 147 148 146 190
|
||||||
|
553 105 156 153 193
|
||||||
|
554 66 161 133 207
|
||||||
|
555 91 132 95 181
|
||||||
|
556 132 137 95 181
|
||||||
|
557 95 137 91 181
|
||||||
|
558 99 151 141 205
|
||||||
|
559 111 176 133 181
|
||||||
|
560 133 176 66 181
|
||||||
|
561 66 176 111 181
|
||||||
|
562 40 163 113 196
|
||||||
|
563 145 186 99 205
|
||||||
|
564 88 105 35 205
|
||||||
|
565 113 163 121 196
|
||||||
|
566 84 195 163 196
|
||||||
|
567 121 163 73 196
|
||||||
|
568 187 191 152 203
|
||||||
|
569 83 163 40 196
|
||||||
|
570 83 84 27 196
|
||||||
|
571 138 149 93 206
|
||||||
|
572 107 190 158 206
|
||||||
|
573 97 151 99 186
|
||||||
|
574 144 61 60 194
|
||||||
|
575 187 190 107 206
|
||||||
|
576 157 190 69 208
|
||||||
|
577 22 145 102 186
|
||||||
|
578 102 185 22 186
|
||||||
|
579 104 192 151 205
|
||||||
|
580 126 176 84 195
|
||||||
|
581 67 167 24 200
|
||||||
|
582 116 117 44 197
|
||||||
|
583 97 139 138 186
|
||||||
|
584 138 151 97 186
|
||||||
|
585 162 181 166 199
|
||||||
|
586 66 181 111 195
|
||||||
|
587 99 145 22 186
|
||||||
|
588 97 185 139 186
|
||||||
|
589 66 176 160 195
|
||||||
|
590 183 99 22 186
|
||||||
|
591 183 185 99 186
|
||||||
|
592 22 185 183 186
|
||||||
|
593 99 184 97 186
|
||||||
|
594 99 185 184 186
|
||||||
|
595 184 185 97 186
|
||||||
|
596 111 176 66 195
|
||||||
|
597 84 160 126 195
|
||||||
|
598 35 141 88 205
|
||||||
|
599 87 148 147 192
|
||||||
|
600 137 204 66 209
|
||||||
|
601 86 151 148 192
|
||||||
|
602 181 199 195 204
|
||||||
|
603 174 175 173 189
|
||||||
|
604 173 175 133 189
|
||||||
|
605 132 175 174 189
|
||||||
|
606 133 175 132 189
|
||||||
|
607 133 161 109 207
|
||||||
|
608 159 187 66 209
|
||||||
|
609 93 149 94 189
|
||||||
|
610 94 174 93 189
|
||||||
|
611 146 190 158 208
|
||||||
|
612 158 190 39 208
|
||||||
|
613 66 187 137 209
|
||||||
|
614 180 182 137 209
|
||||||
|
615 108 159 66 209
|
||||||
|
616 190 192 150 210
|
||||||
|
617 85 191 127 211
|
||||||
|
618 127 193 101 211
|
||||||
|
619 101 193 153 211
|
||||||
|
620 103 190 150 210
|
||||||
|
621 69 190 146 208
|
||||||
|
622 88 156 105 192
|
||||||
|
623 63 150 85 211
|
||||||
|
624 23 131 88 192
|
||||||
|
625 86 131 23 192
|
||||||
|
626 151 190 148 192
|
||||||
|
627 148 190 147 192
|
||||||
|
628 101 154 143 211
|
||||||
|
629 29 127 101 211
|
||||||
|
630 29 101 143 211
|
||||||
|
631 143 154 153 211
|
||||||
|
632 78 119 15 213
|
||||||
|
633 118 202 78 213
|
||||||
|
634 33 195 124 204
|
||||||
|
635 93 158 31 206
|
||||||
|
636 158 190 31 206
|
||||||
|
637 107 157 110 208
|
||||||
|
638 66 160 108 204
|
||||||
|
639 165 181 92 204
|
||||||
|
640 66 195 160 204
|
||||||
|
641 156 193 192 210
|
||||||
|
642 149 189 93 206
|
||||||
|
643 187 189 149 206
|
||||||
|
644 170 120 196 50
|
||||||
|
645 73 124 121 196
|
||||||
|
646 73 195 124 196
|
||||||
|
647 121 124 49 196
|
||||||
|
648 124 195 49 196
|
||||||
|
649 50 83 18 196
|
||||||
|
650 50 18 120 196
|
||||||
|
651 18 122 120 196
|
||||||
|
652 151 186 104 205
|
||||||
|
653 73 165 124 199
|
||||||
|
654 165 195 124 199
|
||||||
|
655 124 195 73 199
|
||||||
|
656 73 163 113 199
|
||||||
|
657 25 165 73 199
|
||||||
|
658 73 113 41 199
|
||||||
|
659 41 113 72 199
|
||||||
|
660 113 72 163 112
|
||||||
|
661 72 113 163 199
|
||||||
|
662 41 72 25 199
|
||||||
|
663 25 73 41 199
|
||||||
|
664 111 176 84 202
|
||||||
|
665 27 123 78 202
|
||||||
|
666 123 171 78 202
|
||||||
|
667 84 163 111 202
|
||||||
|
668 163 164 111 202
|
||||||
|
669 74 163 27 202
|
||||||
|
670 74 164 163 202
|
||||||
|
671 27 164 74 202
|
||||||
|
672 95 179 137 203
|
||||||
|
673 136 179 95 203
|
||||||
|
674 137 179 96 203
|
||||||
|
675 96 179 136 203
|
||||||
|
676 96 178 21 203
|
||||||
|
677 147 190 103 210
|
||||||
|
678 156 192 87 210
|
||||||
|
679 87 192 147 210
|
||||||
|
680 96 180 137 203
|
||||||
|
681 21 180 96 203
|
||||||
|
682 35 194 145 205
|
||||||
|
683 43 164 118 213
|
||||||
|
684 142 194 35 205
|
||||||
|
685 152 193 104 205
|
||||||
|
686 104 194 152 205
|
||||||
|
687 126 176 172 213
|
||||||
|
688 126 172 119 213
|
||||||
|
689 151 190 104 206
|
||||||
|
690 150 187 104 206
|
||||||
|
691 150 190 187 206
|
||||||
|
692 104 190 150 206
|
||||||
|
693 93 206 189 207
|
||||||
|
694 158 206 93 207
|
||||||
|
695 158 173 55 207
|
||||||
|
696 173 189 55 207
|
||||||
|
697 93 173 158 207
|
||||||
|
698 93 189 173 207
|
||||||
|
699 187 203 137 209
|
||||||
|
700 137 203 180 209
|
||||||
|
701 191 203 187 209
|
||||||
|
702 21 191 180 209
|
||||||
|
703 21 203 191 209
|
||||||
|
704 180 203 21 209
|
||||||
|
705 150 193 191 211
|
||||||
|
706 191 193 127 211
|
||||||
|
707 13 142 64 212
|
||||||
|
708 64 154 13 212
|
||||||
|
709 152 194 100 212
|
||||||
|
710 100 194 142 212
|
||||||
|
711 105 142 35 212
|
||||||
|
712 35 193 105 212
|
||||||
|
713 64 155 154 212
|
||||||
|
714 142 155 64 212
|
||||||
|
715 154 155 153 212
|
||||||
|
716 155 193 153 212
|
||||||
|
717 101 154 153 212
|
||||||
|
718 153 193 101 212
|
||||||
|
719 75 176 164 213
|
||||||
|
720 176 202 164 213
|
||||||
|
721 43 197 164 213
|
||||||
|
722 164 197 75 213
|
||||||
|
723 75 197 115 213
|
||||||
|
724 115 197 43 213
|
||||||
|
# Generated by tetgen -qfa0.005 beam.poly
|
||||||
1619
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.face
Normal file
1619
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.face
Normal file
File diff suppressed because it is too large
Load Diff
215
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.node
Normal file
215
applications/utilities/mesh/conversion/tetgenToFoam/beam.1.node
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
213 3 0 0
|
||||||
|
1 0 0 0
|
||||||
|
2 2 0 0
|
||||||
|
3 2 1 0
|
||||||
|
4 0 1 0
|
||||||
|
5 0 0 1
|
||||||
|
6 2 0 1
|
||||||
|
7 2 1 1
|
||||||
|
8 0 1 1
|
||||||
|
9 1.0000469999999999 0 0
|
||||||
|
10 0.999668 1 0
|
||||||
|
11 0.99944500000000003 1 1
|
||||||
|
12 1.000594 0 1
|
||||||
|
13 2 0 0.50021530000000003
|
||||||
|
14 2 0.50012599999999996 0
|
||||||
|
15 0 1 0.50045629999999997
|
||||||
|
16 0 0.49964989999999998 0
|
||||||
|
17 0.62483357601847556 1 0.49991643678795222
|
||||||
|
18 0 0 0.5
|
||||||
|
19 0 0.5 1
|
||||||
|
20 0.62494657145582122 0.49985790875808178 0
|
||||||
|
21 1.375120204581187 0 0.4997949845615941
|
||||||
|
22 2 0.5 1
|
||||||
|
23 2 1 0.5
|
||||||
|
24 0.499834 1 0
|
||||||
|
25 0.50029699999999999 0 1
|
||||||
|
26 0.49972250000000001 1 1
|
||||||
|
27 0 0.50000006130646835 0.49999993869353165
|
||||||
|
28 0.50002349999999995 0 0
|
||||||
|
29 1.5000235 0 0
|
||||||
|
30 1.1458145624989733 0.5000553177266871 0
|
||||||
|
31 1.3748336567109987 1 0.5000836868059465
|
||||||
|
32 0.75044549999999999 0.49971323947400004 1
|
||||||
|
33 0.75044549999999999 0 0.50013668162500002
|
||||||
|
34 1.500297 0 1
|
||||||
|
35 2 0.49999999206099965 0.49999999206099965
|
||||||
|
36 1.4997225000000001 1 1
|
||||||
|
37 0.88530655619767451 0.69523571541331353 0
|
||||||
|
38 0.74975100000000006 1 0
|
||||||
|
39 0.99985800700011418 1 0.39062501526316751
|
||||||
|
40 0 0.2500000613064608 0.7499999386935392
|
||||||
|
41 0.2501485 0 1
|
||||||
|
42 0.37527044007359472 0.62466041202689604 1
|
||||||
|
43 0 0.7497720581817594 0.74999999997204392
|
||||||
|
44 0.24986125000000001 1 1
|
||||||
|
45 0.31241083060970776 0.68739558038665782 0
|
||||||
|
46 0 1 0.25022814999999998
|
||||||
|
47 0 0.74982495000000005 0
|
||||||
|
48 0.3125356465289606 0.31239559711921033 0
|
||||||
|
49 0.37524548555134551 0 0.37523962153691648
|
||||||
|
50 0 0.25000000002145584 0.25017492745143088
|
||||||
|
51 1.2500352499999998 0 0
|
||||||
|
52 1.0626973305232652 0 0.34361890927552119
|
||||||
|
53 1.4998339999999999 1 0
|
||||||
|
54 0.74958374999999999 1 1
|
||||||
|
55 0.88519156134454835 1 0.69523493182271912
|
||||||
|
56 0.75044549999999999 0 1
|
||||||
|
57 0.75003524999999993 0 0
|
||||||
|
58 0.88545457775712011 0.3046775110714553 0
|
||||||
|
59 1.4999999173907641 0.49999999435116604 1
|
||||||
|
60 2 0.25010760364761792 0.74999999999829137
|
||||||
|
61 2 0.25 1
|
||||||
|
62 2 0 0.75010765000000001
|
||||||
|
63 1.5729133203896351 0.4271084905205621 0
|
||||||
|
64 2 0 0.25010765000000001
|
||||||
|
65 2 0.25006299999999998 0
|
||||||
|
66 0.81619988117037301 0.51616065956439328 0.48387527405505287
|
||||||
|
67 0.62479250000000008 1 0.23434098330631092
|
||||||
|
68 0.62479250000000008 0.7655391212272894 0
|
||||||
|
69 1.2497509999999998 1 0
|
||||||
|
70 0 0.25 1
|
||||||
|
71 0 0 0.75
|
||||||
|
72 0.37522274999999999 0.29980854989635936 1
|
||||||
|
73 0.37522274999999999 0 0.70013946473134281
|
||||||
|
74 0 0.49988605975809192 0.74988593714516283
|
||||||
|
75 0.31255174452459605 1 0.65638401293888804
|
||||||
|
76 0 0.75 1
|
||||||
|
77 0.249917 1 0
|
||||||
|
78 0 0.70831779089254521 0.29167340665919461
|
||||||
|
79 0.25001174999999998 0 0
|
||||||
|
80 0.62526649037406934 0 0.25017085386153537
|
||||||
|
81 0.625029375 0.23429805042184107 0
|
||||||
|
82 0 0.24982494999999999 0
|
||||||
|
83 0 0.25008755567468249 0.50008743306175329
|
||||||
|
84 0.33552291795286748 0.37713361953826796 0.37295234921245662
|
||||||
|
85 1.3275022682494733 0.27703395451399626 0
|
||||||
|
86 1.6873917295541676 1 0.31254602883562033
|
||||||
|
87 1.7393002110516891 0.73944000928409781 0
|
||||||
|
88 2 0.7499999999989998 0.25006298412499983
|
||||||
|
89 0.62528740222670842 0.74964177558619371 1
|
||||||
|
90 0.62465312500000003 1 0.76556323888302447
|
||||||
|
91 0.87551975000000004 0.24985661973700002 1
|
||||||
|
92 0.87551975000000004 0 0.75006834081249996
|
||||||
|
93 1.1922864636768418 1 0.75390684273024755
|
||||||
|
94 1.24958375 0.74986113453803516 1
|
||||||
|
95 1.1698804466514103 0.41956399899988917 1
|
||||||
|
96 1.187959730551635 0 0.74997433471920583
|
||||||
|
97 1.6874419282782818 1 0.68754603555472626
|
||||||
|
98 1.7498612499999999 1 1
|
||||||
|
99 2 0.74999999206099988 0.74999999206099988
|
||||||
|
100 1.6597700161872737 0 0.69432640578660343
|
||||||
|
101 1.6597808229817657 0 0.30542952755181008
|
||||||
|
102 1.7499999601075902 0.375 1
|
||||||
|
103 1.3990667318832528 0.69603906683685635 0
|
||||||
|
104 1.4950021306707608 0.49065317884606224 0.49500212996719484
|
||||||
|
105 2 0.37509449999999989 0.24996850198475024
|
||||||
|
106 0.82837583873678577 0.49993500845038119 0
|
||||||
|
107 1.0695558475797649 0.66971322958604163 0.29687786818700823
|
||||||
|
108 0.85307867962811157 0.24362257622712302 0.31516017245746403
|
||||||
|
109 0.82827226523186892 1 0.49992109713449329
|
||||||
|
110 0.85617934854666022 1 0.20723770847200895
|
||||||
|
111 0.52956259724790877 0.46221182650782827 0.70815142735106607
|
||||||
|
112 0.197844687328108 0.19781366296788089 1
|
||||||
|
113 0.19785716305721113 0 0.8021738538924329
|
||||||
|
114 0.2208783106844166 0.46225714309073845 1
|
||||||
|
115 0 1 0.75022814999999998
|
||||||
|
116 0.43264896150206789 1 0.81375076634557386
|
||||||
|
117 0.374791875 0.83312128766119486 1
|
||||||
|
118 0 0.72915434172921567 0.52082680685839422
|
||||||
|
119 0.25758862433333551 1 0.37534222499999997
|
||||||
|
120 0 0 0.25
|
||||||
|
121 0.22089000562634489 0 0.53767874257955828
|
||||||
|
122 0.21890193241166289 0 0.21890047052636122
|
||||||
|
123 0 0.48262354769989868 0.23265983080935737
|
||||||
|
124 0.52955330709238257 0 0.53770034194467331
|
||||||
|
125 0.49219718763882514 0.367036574432759 0
|
||||||
|
126 0.5505556528350013 0.63265541955504201 0.30493806376468496
|
||||||
|
127 1.4081582558189005 0 0.24254676799800692
|
||||||
|
128 1.1015512434437607 0.21206527974784434 0
|
||||||
|
129 1.7499169999999999 1 0
|
||||||
|
130 2 0.75006299999999992 0
|
||||||
|
131 2 1 0.25
|
||||||
|
132 0.99401036538229792 0.63676792199224752 1
|
||||||
|
133 0.75067050430146165 0.71769786903092825 0.71464771158468776
|
||||||
|
134 1.24958375 1 1
|
||||||
|
135 1.2504455000000001 0 1
|
||||||
|
136 1.3860715978416591 0.24993221667186555 1
|
||||||
|
137 1.0317202752404047 0.31469238410894046 0.6853270709080328
|
||||||
|
138 1.4426349216014702 1 0.74140038799848562
|
||||||
|
139 1.6247918750000001 0.75006931305374525 1
|
||||||
|
140 2 1 0.75
|
||||||
|
141 2 0.74996849602949978 0.50003148809249964
|
||||||
|
142 2 0.24999994966813449 0.49999998078418173
|
||||||
|
143 1.7500117500000001 0 0
|
||||||
|
144 1.7501484999999999 0 1
|
||||||
|
145 2 0.5000537978534545 0.74994618626854503
|
||||||
|
146 1.3747924999999996 1 0.23440908488585499
|
||||||
|
147 1.5571177737167572 0.81232629338982021 0
|
||||||
|
148 1.5545253193695066 1 0.17972930755262501
|
||||||
|
149 1.3104200347998118 0.56041577372755713 0.74814782862252316
|
||||||
|
150 1.3685266838244452 0.48564116582667954 0.21802764397288932
|
||||||
|
151 1.5873602781685263 0.78126669962189421 0.50005942609143139
|
||||||
|
152 1.5838618227448735 0.20899413185535243 0.49987585715718413
|
||||||
|
153 1.7498120256325995 0.25018792583716926 0
|
||||||
|
154 1.8148371462917434 0 0.18519382949207305
|
||||||
|
155 2 0.18752406345187056 0.18753523208397008
|
||||||
|
156 1.7770110643184227 0.51886547556217666 0
|
||||||
|
157 1.1389013076817112 0.76226887437066193 0
|
||||||
|
158 1.1602175406966813 1 0.53828850106094039
|
||||||
|
159 0.90095306490776128 0.48470516503498373 0.2446998657917499
|
||||||
|
160 0.57742475390278236 0.27551969863450299 0.27345305390889807
|
||||||
|
161 0.81036655925196366 0.7630643710333207 0.35054165377955776
|
||||||
|
162 0.52956259724790877 0.46221182650782827 1
|
||||||
|
163 0.29250079461431827 0.2842960350422109 0.71570127112180726
|
||||||
|
164 0.27385619515889037 0.6248453002643185 0.71436194557321087
|
||||||
|
165 0.62168045737651678 0 0.77560610491729931
|
||||||
|
166 0.62537124999999993 0.2188435803315899 1
|
||||||
|
167 0.40196038774740384 1 0.20267603513549107
|
||||||
|
168 0.17704223351222992 0.82288246470050785 0
|
||||||
|
169 0.18892018646284411 1 0.18899622733072144
|
||||||
|
170 0.23373058746113159 0.23679172957531613 0.21078402860060638
|
||||||
|
171 0.24428427259573549 0.59937304517793366 0.24724219230200442
|
||||||
|
172 0.42388190576270124 1 0.4887158204143946
|
||||||
|
173 1.0208555875954755 1 0.81817459887813815
|
||||||
|
174 1.0669175695053206 0.81733378836053194 1
|
||||||
|
175 0.8464712840664248 0.80134170756139955 1
|
||||||
|
176 0.60552202714220704 0.62419153018194229 0.54239960836207701
|
||||||
|
177 1.606777848712118 0.19973253606683206 1
|
||||||
|
178 1.4250560553222698 0 0.732249791887851
|
||||||
|
179 1.12551975 0.19352873225326209 1
|
||||||
|
180 1.1620342234529084 0 0.53548179044497457
|
||||||
|
181 0.77419059143108437 0.35536625456813642 0.76865650139332142
|
||||||
|
182 0.95600842566592681 0 0.52050427577014857
|
||||||
|
183 2 0.75 1
|
||||||
|
184 1.8229055680968635 1 0.82294606919028224
|
||||||
|
185 1.8124074661770861 0.8124421408239394 1
|
||||||
|
186 1.6847465495324894 0.55699324455967203 0.74450659675858755
|
||||||
|
187 1.1945125727535346 0.47020737648361044 0.48501348343009743
|
||||||
|
188 1.4371531545555845 0.81243056656291324 1
|
||||||
|
189 1.0230031981183827 0.60745624022002409 0.70905352953001077
|
||||||
|
190 1.3178218537541635 0.74283221838842173 0.24644567916733129
|
||||||
|
191 1.2298563370114035 0.23209604059822986 0.27403980288191482
|
||||||
|
192 1.7289412043422971 0.73378563235104455 0.27218740896208421
|
||||||
|
193 1.6944192651948711 0.39497422853539144 0.28096087015676863
|
||||||
|
194 1.719021973042385 0.27206088666699435 0.73925099693622187
|
||||||
|
195 0.51628118103442489 0.26487001488387318 0.53136856951372224
|
||||||
|
196 0.22693818747394334 0.22584860839480125 0.50499300132112901
|
||||||
|
197 0.18870598201308805 1 0.81131589108741564
|
||||||
|
198 0.18140974929389231 0.81855222162009078 1
|
||||||
|
199 0.52377345173705003 0.22575111801259504 0.77599180569982884
|
||||||
|
200 0.44512574719134834 0.82031319413422632 0
|
||||||
|
201 0.43769402753141229 0 0.18763960779463965
|
||||||
|
202 0.23194582827732274 0.56348972010969589 0.48517047319960538
|
||||||
|
203 1.404605953982319 0.2885118284317002 0.71332319773860509
|
||||||
|
204 0.83285106746651061 0.22679389369216291 0.56316489552371896
|
||||||
|
205 1.746191712341544 0.57096666984982924 0.48834249131610469
|
||||||
|
206 1.2698479063322867 0.73902081556323673 0.53223169180184582
|
||||||
|
207 1.0027339377070847 0.7783240018776667 0.51915438810718473
|
||||||
|
208 1.1247094999999998 1 0.19525173141898322
|
||||||
|
209 1.0585177272595161 0.22306568484158776 0.45497453797743681
|
||||||
|
210 1.5766743500280587 0.62019545180903912 0
|
||||||
|
211 1.5362846212581589 0.2135856104587727 0
|
||||||
|
212 1.7956396187713533 0.19223457391785517 0.37621602432494938
|
||||||
|
213 0.2338562054207384 0.80644498148268706 0.52587899633894741
|
||||||
|
# Generated by tetgen -qfa0.005 beam.poly
|
||||||
@ -154,10 +154,77 @@ void insertDuplicateMerge
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces)
|
||||||
|
{
|
||||||
|
// Get all duplicate face labels (in boundaryFaces indices!).
|
||||||
|
labelList duplicates = localPointRegion::findDuplicateFaces
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
boundaryFaces
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Check that none are on processor patches
|
||||||
|
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||||
|
|
||||||
|
forAll(duplicates, bFaceI)
|
||||||
|
{
|
||||||
|
if (duplicates[bFaceI] != -1)
|
||||||
|
{
|
||||||
|
label faceI = mesh.nInternalFaces() + bFaceI;
|
||||||
|
label patchI = patches.whichPatch(faceI);
|
||||||
|
|
||||||
|
if (isA<processorPolyPatch>(patches[patchI]))
|
||||||
|
{
|
||||||
|
FatalErrorIn("findBaffles(const polyMesh&, const labelList&)")
|
||||||
|
<< "Duplicate face " << faceI
|
||||||
|
<< " is on a processorPolyPatch."
|
||||||
|
<< "This is not allowed." << nl
|
||||||
|
<< "Face:" << faceI
|
||||||
|
<< " is on patch:" << patches[patchI].name()
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Write to faceSet for ease of postprocessing.
|
||||||
|
{
|
||||||
|
faceSet duplicateSet
|
||||||
|
(
|
||||||
|
mesh,
|
||||||
|
"duplicateFaces",
|
||||||
|
(mesh.nFaces() - mesh.nInternalFaces())/256
|
||||||
|
);
|
||||||
|
|
||||||
|
forAll(duplicates, bFaceI)
|
||||||
|
{
|
||||||
|
label otherFaceI = duplicates[bFaceI];
|
||||||
|
|
||||||
|
if (otherFaceI != -1 && otherFaceI > bFaceI)
|
||||||
|
{
|
||||||
|
duplicateSet.insert(mesh.nInternalFaces() + bFaceI);
|
||||||
|
duplicateSet.insert(mesh.nInternalFaces() + otherFaceI);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pout<< "Writing " << duplicateSet.size()
|
||||||
|
<< " duplicate faces to faceSet " << duplicateSet.objectPath()
|
||||||
|
<< nl << endl;
|
||||||
|
duplicateSet.write();
|
||||||
|
}
|
||||||
|
|
||||||
|
return duplicates;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
argList::validOptions.insert("split", "");
|
argList::validOptions.insert("split", "");
|
||||||
argList::validOptions.insert("overwrite", "");
|
argList::validOptions.insert("overwrite", "");
|
||||||
|
argList::validOptions.insert("detectOnly", "");
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
runTime.functionObjects().off();
|
runTime.functionObjects().off();
|
||||||
@ -165,6 +232,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
bool split = args.options().found("split");
|
bool split = args.options().found("split");
|
||||||
bool overwrite = args.options().found("overwrite");
|
bool overwrite = args.options().found("overwrite");
|
||||||
|
bool detectOnly = args.options().found("detectOnly");
|
||||||
|
|
||||||
// Collect all boundary faces
|
// Collect all boundary faces
|
||||||
labelList boundaryFaces(mesh.nFaces() - mesh.nInternalFaces());
|
labelList boundaryFaces(mesh.nFaces() - mesh.nInternalFaces());
|
||||||
@ -175,6 +243,15 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (detectOnly)
|
||||||
|
{
|
||||||
|
findBaffles(mesh, boundaryFaces);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Read objects in time directory
|
// Read objects in time directory
|
||||||
IOobjectList objects(mesh, runTime.timeName());
|
IOobjectList objects(mesh, runTime.timeName());
|
||||||
|
|
||||||
@ -238,62 +315,7 @@ int main(int argc, char *argv[])
|
|||||||
<< nl << endl;
|
<< nl << endl;
|
||||||
|
|
||||||
// Get all duplicate face labels (in boundaryFaces indices!).
|
// Get all duplicate face labels (in boundaryFaces indices!).
|
||||||
labelList duplicates = localPointRegion::findDuplicateFaces
|
labelList duplicates(findBaffles(mesh, boundaryFaces));
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
boundaryFaces
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
// Check that none are on processor patches
|
|
||||||
const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
|
||||||
|
|
||||||
forAll(duplicates, bFaceI)
|
|
||||||
{
|
|
||||||
if (duplicates[bFaceI] != -1)
|
|
||||||
{
|
|
||||||
label faceI = mesh.nInternalFaces() + bFaceI;
|
|
||||||
label patchI = patches.whichPatch(faceI);
|
|
||||||
|
|
||||||
if (isA<processorPolyPatch>(patches[patchI]))
|
|
||||||
{
|
|
||||||
FatalErrorIn(args.executable())
|
|
||||||
<< "Duplicate face " << faceI
|
|
||||||
<< " is on a processorPolyPatch."
|
|
||||||
<< "This is not allowed." << nl
|
|
||||||
<< "Face:" << faceI
|
|
||||||
<< " is on patch:" << patches[patchI].name()
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Write to faceSet for ease of postprocessing.
|
|
||||||
{
|
|
||||||
faceSet duplicateSet
|
|
||||||
(
|
|
||||||
mesh,
|
|
||||||
"duplicateFaces",
|
|
||||||
(mesh.nFaces() - mesh.nInternalFaces())/256
|
|
||||||
);
|
|
||||||
|
|
||||||
forAll(duplicates, bFaceI)
|
|
||||||
{
|
|
||||||
label otherFaceI = duplicates[bFaceI];
|
|
||||||
|
|
||||||
if (otherFaceI != -1 && otherFaceI > bFaceI)
|
|
||||||
{
|
|
||||||
duplicateSet.insert(mesh.nInternalFaces() + bFaceI);
|
|
||||||
duplicateSet.insert(mesh.nInternalFaces() + otherFaceI);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Pout<< "Writing " << duplicateSet.size()
|
|
||||||
<< " duplicate faces to faceSet " << duplicateSet.objectPath()
|
|
||||||
<< nl << endl;
|
|
||||||
duplicateSet.write();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Merge into internal faces.
|
// Merge into internal faces.
|
||||||
insertDuplicateMerge(mesh, duplicates, meshMod);
|
insertDuplicateMerge(mesh, duplicates, meshMod);
|
||||||
|
|||||||
@ -714,9 +714,11 @@ commandStatus parseAction(const word& actionName)
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
# include "addRegionOption.H"
|
||||||
|
# include "addTimeOptions.H"
|
||||||
|
|
||||||
argList::validOptions.insert("noVTK", "");
|
argList::validOptions.insert("noVTK", "");
|
||||||
argList::validOptions.insert("batch", "file");
|
argList::validOptions.insert("batch", "file");
|
||||||
# include "addTimeOptions.H"
|
|
||||||
|
|
||||||
# include "setRootCase.H"
|
# include "setRootCase.H"
|
||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
@ -730,7 +732,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
runTime.setTime(Times[startTime], startTime);
|
runTime.setTime(Times[startTime], startTime);
|
||||||
|
|
||||||
# include "createPolyMesh.H"
|
# include "createNamedPolyMesh.H"
|
||||||
|
|
||||||
// Print some mesh info
|
// Print some mesh info
|
||||||
printMesh(runTime, mesh);
|
printMesh(runTime, mesh);
|
||||||
|
|||||||
@ -79,12 +79,12 @@ int main(int argc, char *argv[])
|
|||||||
Info<< " Reading volScalarField " << fieldName << endl;
|
Info<< " Reading volScalarField " << fieldName << endl;
|
||||||
volScalarField field(fieldHeader, mesh);
|
volScalarField field(fieldHeader, mesh);
|
||||||
|
|
||||||
scalar area = sum(mesh.magSf().boundaryField()[patchi]);
|
scalar area = gSum(mesh.magSf().boundaryField()[patchi]);
|
||||||
scalar sumField = 0;
|
scalar sumField = 0;
|
||||||
|
|
||||||
if (area > 0)
|
if (area > 0)
|
||||||
{
|
{
|
||||||
sumField = sum
|
sumField = gSum
|
||||||
(
|
(
|
||||||
mesh.magSf().boundaryField()[patchi]
|
mesh.magSf().boundaryField()[patchi]
|
||||||
* field.boundaryField()[patchi]
|
* field.boundaryField()[patchi]
|
||||||
|
|||||||
@ -75,14 +75,14 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Give patch area
|
// Give patch area
|
||||||
Info<< " Patch area = " << sum(mesh.Sf().boundaryField()[patchi]) << endl;
|
Info<< " Patch area = " << gSum(mesh.Sf().boundaryField()[patchi]) << endl;
|
||||||
|
|
||||||
if (fieldHeader.headerClassName() == "volScalarField")
|
if (fieldHeader.headerClassName() == "volScalarField")
|
||||||
{
|
{
|
||||||
Info<< " Reading volScalarField " << fieldName << endl;
|
Info<< " Reading volScalarField " << fieldName << endl;
|
||||||
volScalarField field(fieldHeader, mesh);
|
volScalarField field(fieldHeader, mesh);
|
||||||
|
|
||||||
vector sumField = sum
|
vector sumField = gSum
|
||||||
(
|
(
|
||||||
mesh.Sf().boundaryField()[patchi]
|
mesh.Sf().boundaryField()[patchi]
|
||||||
* field.boundaryField()[patchi]
|
* field.boundaryField()[patchi]
|
||||||
@ -97,7 +97,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< " Reading surfaceScalarField " << fieldName << endl;
|
Info<< " Reading surfaceScalarField " << fieldName << endl;
|
||||||
|
|
||||||
surfaceScalarField field(fieldHeader, mesh);
|
surfaceScalarField field(fieldHeader, mesh);
|
||||||
scalar sumField = sum(field.boundaryField()[patchi]);
|
scalar sumField = gSum(field.boundaryField()[patchi]);
|
||||||
|
|
||||||
Info<< " Integral of " << fieldName << " over patch "
|
Info<< " Integral of " << fieldName << " over patch "
|
||||||
<< patchName << '[' << patchi << ']' << " = "
|
<< patchName << '[' << patchi << ']' << " = "
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
#
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
export CINTSYSDIR=~/pub/CINT/cint
|
export CINTSYSDIR=~/pub/CINT/cint7
|
||||||
export PATH=$PATH:$CINTSYSDIR
|
export PATH=$PATH:$CINTSYSDIR
|
||||||
export MANPATH=$MANPATH:$CINTSYSDIR/doc
|
export MANPATH=$MANPATH:$CINTSYSDIR/doc
|
||||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$CINTSYSDIR
|
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$CINTSYSDIR
|
||||||
|
|||||||
@ -218,7 +218,8 @@ Foam::label Foam::autoSnapDriver::getCollocatedPoints
|
|||||||
// Calculate displacement as average of patch points.
|
// Calculate displacement as average of patch points.
|
||||||
Foam::pointField Foam::autoSnapDriver::smoothPatchDisplacement
|
Foam::pointField Foam::autoSnapDriver::smoothPatchDisplacement
|
||||||
(
|
(
|
||||||
const motionSmoother& meshMover
|
const motionSmoother& meshMover,
|
||||||
|
const List<labelPair>& baffles
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
const indirectPrimitivePatch& pp = meshMover.patch();
|
const indirectPrimitivePatch& pp = meshMover.patch();
|
||||||
@ -253,6 +254,34 @@ Foam::pointField Foam::autoSnapDriver::smoothPatchDisplacement
|
|||||||
const pointField& points = pp.points();
|
const pointField& points = pp.points();
|
||||||
const polyMesh& mesh = meshMover.mesh();
|
const polyMesh& mesh = meshMover.mesh();
|
||||||
|
|
||||||
|
// Get labels of faces to count (master of coupled faces and baffle pairs)
|
||||||
|
PackedList<1> isMasterFace(syncTools::getMasterFaces(mesh));
|
||||||
|
|
||||||
|
{
|
||||||
|
forAll(baffles, i)
|
||||||
|
{
|
||||||
|
label f0 = baffles[i].first();
|
||||||
|
label f1 = baffles[i].second();
|
||||||
|
|
||||||
|
if (isMasterFace.get(f0) == 1)
|
||||||
|
{
|
||||||
|
// Make f1 a slave
|
||||||
|
isMasterFace.set(f1, 0);
|
||||||
|
}
|
||||||
|
else if (isMasterFace.get(f1) == 1)
|
||||||
|
{
|
||||||
|
isMasterFace.set(f0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FatalErrorIn("autoSnapDriver::smoothPatchDisplacement(..)")
|
||||||
|
<< "Both sides of baffle consisting of faces " << f0
|
||||||
|
<< " and " << f1 << " are already slave faces."
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Get average position of boundary face centres
|
// Get average position of boundary face centres
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@ -266,9 +295,14 @@ Foam::pointField Foam::autoSnapDriver::smoothPatchDisplacement
|
|||||||
|
|
||||||
forAll(pFaces, pfI)
|
forAll(pFaces, pfI)
|
||||||
{
|
{
|
||||||
avgBoundary[patchPointI] += pp[pFaces[pfI]].centre(points);
|
label faceI = pFaces[pfI];
|
||||||
|
|
||||||
|
if (isMasterFace.get(pp.addressing()[faceI]) == 1)
|
||||||
|
{
|
||||||
|
avgBoundary[patchPointI] += pp[faceI].centre(points);
|
||||||
|
nBoundary[patchPointI]++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
nBoundary[patchPointI] = pFaces.size();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
syncTools::syncPointList
|
syncTools::syncPointList
|
||||||
@ -886,7 +920,7 @@ void Foam::autoSnapDriver::preSmoothPatch
|
|||||||
checkFaces[faceI] = faceI;
|
checkFaces[faceI] = faceI;
|
||||||
}
|
}
|
||||||
|
|
||||||
pointField patchDisp(smoothPatchDisplacement(meshMover));
|
pointField patchDisp(smoothPatchDisplacement(meshMover, baffles));
|
||||||
|
|
||||||
// The current mesh is the starting mesh to smooth from.
|
// The current mesh is the starting mesh to smooth from.
|
||||||
meshMover.setDisplacement(patchDisp);
|
meshMover.setDisplacement(patchDisp);
|
||||||
@ -1008,9 +1042,11 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurface
|
|||||||
// Displacement per patch point
|
// Displacement per patch point
|
||||||
vectorField patchDisp(localPoints.size(), vector::zero);
|
vectorField patchDisp(localPoints.size(), vector::zero);
|
||||||
|
|
||||||
|
|
||||||
if (returnReduce(localPoints.size(), sumOp<label>()) > 0)
|
if (returnReduce(localPoints.size(), sumOp<label>()) > 0)
|
||||||
{
|
{
|
||||||
|
// Current surface snapped to
|
||||||
|
labelList snapSurf(localPoints.size(), -1);
|
||||||
|
|
||||||
// Divide surfaces into zoned and unzoned
|
// Divide surfaces into zoned and unzoned
|
||||||
labelList zonedSurfaces;
|
labelList zonedSurfaces;
|
||||||
labelList unzonedSurfaces;
|
labelList unzonedSurfaces;
|
||||||
@ -1039,16 +1075,9 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurface
|
|||||||
patchDisp[pointI] =
|
patchDisp[pointI] =
|
||||||
hitInfo[pointI].hitPoint()
|
hitInfo[pointI].hitPoint()
|
||||||
- localPoints[pointI];
|
- localPoints[pointI];
|
||||||
|
|
||||||
|
snapSurf[pointI] = hitSurface[pointI];
|
||||||
}
|
}
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// WarningIn("autoSnapDriver::calcNearestSurface(..)")
|
|
||||||
// << "For point:" << pointI
|
|
||||||
// << " coordinate:" << localPoints[pointI]
|
|
||||||
// << " did not find any surface within:"
|
|
||||||
// << 4*snapDist[pointI]
|
|
||||||
// << " meter." << endl;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1060,6 +1089,7 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurface
|
|||||||
// Surfaces with zone information
|
// Surfaces with zone information
|
||||||
const wordList& faceZoneNames = surfaces.faceZoneNames();
|
const wordList& faceZoneNames = surfaces.faceZoneNames();
|
||||||
|
|
||||||
|
// Current best snap distance
|
||||||
scalarField minSnapDist(snapDist);
|
scalarField minSnapDist(snapDist);
|
||||||
|
|
||||||
forAll(zonedSurfaces, i)
|
forAll(zonedSurfaces, i)
|
||||||
@ -1105,19 +1135,25 @@ Foam::vectorField Foam::autoSnapDriver::calcNearestSurface
|
|||||||
minSnapDist[pointI],
|
minSnapDist[pointI],
|
||||||
mag(patchDisp[pointI])
|
mag(patchDisp[pointI])
|
||||||
);
|
);
|
||||||
|
|
||||||
|
snapSurf[pointI] = zoneSurfI;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if all points are being snapped
|
||||||
|
forAll(snapSurf, pointI)
|
||||||
|
{
|
||||||
|
if (snapSurf[pointI] == -1)
|
||||||
{
|
{
|
||||||
WarningIn("autoSnapDriver::calcNearestSurface(..)")
|
WarningIn("autoSnapDriver::calcNearestSurface(..)")
|
||||||
<< "For point:" << pointI
|
<< "For point:" << pointI
|
||||||
<< " coordinate:" << localPoints[pointI]
|
<< " coordinate:" << localPoints[pointI]
|
||||||
<< " did not find any surface within:"
|
<< " did not find any surface within:"
|
||||||
<< 4*minSnapDist[pointI]
|
<< minSnapDist[pointI]
|
||||||
<< " meter." << endl;
|
<< " meter." << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
scalarField magDisp(mag(patchDisp));
|
scalarField magDisp(mag(patchDisp));
|
||||||
|
|||||||
@ -100,7 +100,11 @@ class autoSnapDriver
|
|||||||
|
|
||||||
//- Calculate displacement per patch point to smooth out patch.
|
//- Calculate displacement per patch point to smooth out patch.
|
||||||
// Quite complicated in determining which points to move where.
|
// Quite complicated in determining which points to move where.
|
||||||
pointField smoothPatchDisplacement(const motionSmoother&) const;
|
pointField smoothPatchDisplacement
|
||||||
|
(
|
||||||
|
const motionSmoother&,
|
||||||
|
const List<labelPair>&
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Check that face zones are synced
|
//- Check that face zones are synced
|
||||||
void checkCoupledFaceZones() const;
|
void checkCoupledFaceZones() const;
|
||||||
|
|||||||
@ -382,10 +382,12 @@ private:
|
|||||||
|
|
||||||
//- Finds zone per cell for cells inside closed named surfaces.
|
//- Finds zone per cell for cells inside closed named surfaces.
|
||||||
// (uses geometric test for insideness)
|
// (uses geometric test for insideness)
|
||||||
|
// Adapts namedSurfaceIndex so all faces on boundary of cellZone
|
||||||
|
// have corresponding faceZone.
|
||||||
void findCellZoneGeometric
|
void findCellZoneGeometric
|
||||||
(
|
(
|
||||||
const labelList& closedNamedSurfaces,
|
const labelList& closedNamedSurfaces,
|
||||||
const labelList& namedSurfaceIndex,
|
labelList& namedSurfaceIndex,
|
||||||
const labelList& surfaceToCellZone,
|
const labelList& surfaceToCellZone,
|
||||||
labelList& cellToZone
|
labelList& cellToZone
|
||||||
) const;
|
) const;
|
||||||
|
|||||||
@ -47,6 +47,7 @@ License
|
|||||||
#include "motionSmoother.H"
|
#include "motionSmoother.H"
|
||||||
#include "polyMeshGeometry.H"
|
#include "polyMeshGeometry.H"
|
||||||
#include "IOmanip.H"
|
#include "IOmanip.H"
|
||||||
|
#include "cellSet.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -1490,7 +1491,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::mergeBaffles
|
|||||||
void Foam::meshRefinement::findCellZoneGeometric
|
void Foam::meshRefinement::findCellZoneGeometric
|
||||||
(
|
(
|
||||||
const labelList& closedNamedSurfaces, // indices of closed surfaces
|
const labelList& closedNamedSurfaces, // indices of closed surfaces
|
||||||
const labelList& namedSurfaceIndex, // per face index of named surface
|
labelList& namedSurfaceIndex, // per face index of named surface
|
||||||
const labelList& surfaceToCellZone, // cell zone index per surface
|
const labelList& surfaceToCellZone, // cell zone index per surface
|
||||||
|
|
||||||
labelList& cellToZone
|
labelList& cellToZone
|
||||||
@ -1627,6 +1628,76 @@ void Foam::meshRefinement::findCellZoneGeometric
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Adapt the namedSurfaceIndex
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// for if any cells were not completely covered.
|
||||||
|
|
||||||
|
for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
|
||||||
|
{
|
||||||
|
label ownZone = cellToZone[mesh_.faceOwner()[faceI]];
|
||||||
|
label neiZone = cellToZone[mesh_.faceNeighbour()[faceI]];
|
||||||
|
|
||||||
|
if (namedSurfaceIndex[faceI] == -1 && (ownZone != neiZone))
|
||||||
|
{
|
||||||
|
// Give face the zone of the owner
|
||||||
|
namedSurfaceIndex[faceI] = findIndex
|
||||||
|
(
|
||||||
|
surfaceToCellZone,
|
||||||
|
max(ownZone, neiZone)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
labelList neiCellZone(mesh_.nFaces()-mesh_.nInternalFaces());
|
||||||
|
for
|
||||||
|
(
|
||||||
|
label faceI = mesh_.nInternalFaces();
|
||||||
|
faceI < mesh_.nFaces();
|
||||||
|
faceI++
|
||||||
|
)
|
||||||
|
{
|
||||||
|
label own = mesh_.faceOwner()[faceI];
|
||||||
|
neiCellZone[faceI-mesh_.nInternalFaces()] = cellToZone[own];
|
||||||
|
}
|
||||||
|
syncTools::swapBoundaryFaceList(mesh_, neiCellZone, false);
|
||||||
|
|
||||||
|
const polyBoundaryMesh& patches = mesh_.boundaryMesh();
|
||||||
|
|
||||||
|
forAll(patches, patchI)
|
||||||
|
{
|
||||||
|
const polyPatch& pp = patches[patchI];
|
||||||
|
|
||||||
|
if (pp.coupled())
|
||||||
|
{
|
||||||
|
forAll(pp, i)
|
||||||
|
{
|
||||||
|
label faceI = pp.start()+i;
|
||||||
|
label ownZone = cellToZone[mesh_.faceOwner()[faceI]];
|
||||||
|
label neiZone = neiCellZone[faceI-mesh_.nInternalFaces()];
|
||||||
|
|
||||||
|
if (namedSurfaceIndex[faceI] == -1 && (ownZone != neiZone))
|
||||||
|
{
|
||||||
|
// Give face the zone of the owner
|
||||||
|
namedSurfaceIndex[faceI] = findIndex
|
||||||
|
(
|
||||||
|
surfaceToCellZone,
|
||||||
|
max(ownZone, neiZone)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sync
|
||||||
|
syncTools::syncFaceList
|
||||||
|
(
|
||||||
|
mesh_,
|
||||||
|
namedSurfaceIndex,
|
||||||
|
maxEqOp<label>(),
|
||||||
|
false
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1656,7 +1727,7 @@ void Foam::meshRefinement::findCellZoneTopo
|
|||||||
blockedFace[faceI] = true;
|
blockedFace[faceI] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
syncTools::syncFaceList(mesh_, blockedFace, orEqOp<bool>(), false);
|
// No need to sync since namedSurfaceIndex already is synced
|
||||||
|
|
||||||
// Set region per cell based on walking
|
// Set region per cell based on walking
|
||||||
regionSplit cellRegion(mesh_, blockedFace);
|
regionSplit cellRegion(mesh_, blockedFace);
|
||||||
@ -2149,8 +2220,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::splitMesh
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"meshRefinement::findCellZoneTopo"
|
"meshRefinement::splitMesh"
|
||||||
"(const point&, const labelList&, const labelList&, labelList&)"
|
"(const label, const labelList&, const point&)"
|
||||||
) << "Point " << keepPoint
|
) << "Point " << keepPoint
|
||||||
<< " is not inside the mesh." << nl
|
<< " is not inside the mesh." << nl
|
||||||
<< "Bounding box of the mesh:" << mesh_.globalData().bb()
|
<< "Bounding box of the mesh:" << mesh_.globalData().bb()
|
||||||
@ -2703,6 +2774,79 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Put the cells into the correct zone
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
// Closed surfaces with cellZone specified.
|
||||||
|
labelList closedNamedSurfaces(surfaces_.getClosedNamedSurfaces());
|
||||||
|
|
||||||
|
// Zone per cell:
|
||||||
|
// -2 : unset
|
||||||
|
// -1 : not in any zone
|
||||||
|
// >=0: zoneID
|
||||||
|
labelList cellToZone(mesh_.nCells(), -2);
|
||||||
|
|
||||||
|
|
||||||
|
// Set using geometric test
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
if (closedNamedSurfaces.size() > 0)
|
||||||
|
{
|
||||||
|
findCellZoneGeometric
|
||||||
|
(
|
||||||
|
closedNamedSurfaces, // indices of closed surfaces
|
||||||
|
namedSurfaceIndex, // per face index of named surface
|
||||||
|
surfaceToCellZone, // cell zone index per surface
|
||||||
|
cellToZone
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//{
|
||||||
|
// Pout<< "** finding out blocked faces." << endl;
|
||||||
|
//
|
||||||
|
// cellSet zonedCellsGeom(mesh_, "zonedCellsGeom", 100);
|
||||||
|
// forAll(cellToZone, cellI)
|
||||||
|
// {
|
||||||
|
// if (cellToZone[cellI] >= 0)
|
||||||
|
// {
|
||||||
|
// zonedCellsGeom.insert(cellI);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// Pout<< "Writing zoned cells to " << zonedCellsGeom.objectPath()
|
||||||
|
// << endl;
|
||||||
|
// zonedCellsGeom.write();
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// faceSet zonedFaces(mesh_, "zonedFaces", 100);
|
||||||
|
// forAll(namedSurfaceIndex, faceI)
|
||||||
|
// {
|
||||||
|
// label surfI = namedSurfaceIndex[faceI];
|
||||||
|
//
|
||||||
|
// if (surfI != -1)
|
||||||
|
// {
|
||||||
|
// zonedFaces.insert(faceI);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// Pout<< "Writing zoned faces to " << zonedFaces.objectPath() << endl;
|
||||||
|
// zonedFaces.write();
|
||||||
|
//}
|
||||||
|
|
||||||
|
// Set using walking
|
||||||
|
// ~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
//if (returnReduce(nSet, sumOp<label>()) < mesh_.globalData().nTotalCells())
|
||||||
|
{
|
||||||
|
// Topological walk
|
||||||
|
findCellZoneTopo
|
||||||
|
(
|
||||||
|
keepPoint,
|
||||||
|
namedSurfaceIndex,
|
||||||
|
surfaceToCellZone,
|
||||||
|
cellToZone
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Topochange container
|
// Topochange container
|
||||||
polyTopoChange meshMod(mesh_);
|
polyTopoChange meshMod(mesh_);
|
||||||
|
|
||||||
@ -2770,50 +2914,6 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify
|
|||||||
// Put the cells into the correct zone
|
// Put the cells into the correct zone
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// Closed surfaces with cellZone specified.
|
|
||||||
labelList closedNamedSurfaces(surfaces_.getClosedNamedSurfaces());
|
|
||||||
|
|
||||||
// Zone per cell:
|
|
||||||
// -2 : unset
|
|
||||||
// -1 : not in any zone
|
|
||||||
// >=0: zoneID
|
|
||||||
labelList cellToZone(mesh_.nCells(), -2);
|
|
||||||
|
|
||||||
|
|
||||||
// Set using geometric test
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
if (closedNamedSurfaces.size() > 0)
|
|
||||||
{
|
|
||||||
findCellZoneGeometric
|
|
||||||
(
|
|
||||||
closedNamedSurfaces, // indices of closed surfaces
|
|
||||||
namedSurfaceIndex, // per face index of named surface
|
|
||||||
surfaceToCellZone, // cell zone index per surface
|
|
||||||
cellToZone
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Set using walking
|
|
||||||
// ~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
//if (returnReduce(nSet, sumOp<label>()) < mesh_.globalData().nTotalCells())
|
|
||||||
{
|
|
||||||
// Topological walk
|
|
||||||
findCellZoneTopo
|
|
||||||
(
|
|
||||||
keepPoint,
|
|
||||||
namedSurfaceIndex,
|
|
||||||
surfaceToCellZone,
|
|
||||||
cellToZone
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Actually move the cells to their zone
|
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
forAll(cellToZone, cellI)
|
forAll(cellToZone, cellI)
|
||||||
{
|
{
|
||||||
label zoneI = cellToZone[cellI];
|
label zoneI = cellToZone[cellI];
|
||||||
|
|||||||
@ -107,6 +107,7 @@ $(pointSources)/faceToPoint/faceToPoint.C
|
|||||||
$(pointSources)/boxToPoint/boxToPoint.C
|
$(pointSources)/boxToPoint/boxToPoint.C
|
||||||
$(pointSources)/surfaceToPoint/surfaceToPoint.C
|
$(pointSources)/surfaceToPoint/surfaceToPoint.C
|
||||||
$(pointSources)/zoneToPoint/zoneToPoint.C
|
$(pointSources)/zoneToPoint/zoneToPoint.C
|
||||||
|
$(pointSources)/nearestToPoint/nearestToPoint.C
|
||||||
|
|
||||||
surfaceSets/surfaceSets.C
|
surfaceSets/surfaceSets.C
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,6 @@ License
|
|||||||
|
|
||||||
#include "searchableSurfaceWithGaps.H"
|
#include "searchableSurfaceWithGaps.H"
|
||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "SortableList.H"
|
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "ListOps.H"
|
#include "ListOps.H"
|
||||||
|
|
||||||
@ -82,7 +81,7 @@ Foam::Pair<Foam::vector> Foam::searchableSurfaceWithGaps::offsetVecs
|
|||||||
|
|
||||||
// Do second offset vector perp to original edge and first offset vector
|
// Do second offset vector perp to original edge and first offset vector
|
||||||
offsets[1] = n ^ offsets[0];
|
offsets[1] = n ^ offsets[0];
|
||||||
offsets[1] *= gap_/mag(offsets[1]);
|
offsets[1] *= gap_;
|
||||||
}
|
}
|
||||||
|
|
||||||
return offsets;
|
return offsets;
|
||||||
@ -207,6 +206,10 @@ void Foam::searchableSurfaceWithGaps::findLine
|
|||||||
List<pointIndexHit>& info
|
List<pointIndexHit>& info
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Test with unperturbed vectors
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
surface().findLine(start, end, info);
|
surface().findLine(start, end, info);
|
||||||
|
|
||||||
// Count number of misses. Determine map
|
// Count number of misses. Determine map
|
||||||
@ -215,6 +218,10 @@ void Foam::searchableSurfaceWithGaps::findLine
|
|||||||
|
|
||||||
if (returnReduce(nMiss, sumOp<label>()) > 0)
|
if (returnReduce(nMiss, sumOp<label>()) > 0)
|
||||||
{
|
{
|
||||||
|
//Pout<< "** retesting with offset0 " << nMiss << " misses out of "
|
||||||
|
// << start.size() << endl;
|
||||||
|
|
||||||
|
// extract segments according to map
|
||||||
pointField compactStart(start, compactMap);
|
pointField compactStart(start, compactMap);
|
||||||
pointField compactEnd(end, compactMap);
|
pointField compactEnd(end, compactMap);
|
||||||
|
|
||||||
@ -228,20 +235,36 @@ void Foam::searchableSurfaceWithGaps::findLine
|
|||||||
offset1
|
offset1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Test with offset0 perturbed vectors
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// test in pairs: only if both perturbations hit something
|
// test in pairs: only if both perturbations hit something
|
||||||
// do we accept the hit.
|
// do we accept the hit.
|
||||||
|
|
||||||
|
const vectorField smallVec(SMALL*(compactEnd-compactStart));
|
||||||
|
|
||||||
List<pointIndexHit> plusInfo;
|
List<pointIndexHit> plusInfo;
|
||||||
surface().findLine(compactStart+offset0, compactEnd+offset0, plusInfo);
|
surface().findLine
|
||||||
|
(
|
||||||
|
compactStart+offset0-smallVec,
|
||||||
|
compactEnd+offset0+smallVec,
|
||||||
|
plusInfo
|
||||||
|
);
|
||||||
List<pointIndexHit> minInfo;
|
List<pointIndexHit> minInfo;
|
||||||
surface().findLine(compactStart-offset0, compactEnd-offset0, minInfo);
|
surface().findLine
|
||||||
|
(
|
||||||
|
compactStart-offset0-smallVec,
|
||||||
|
compactEnd-offset0+smallVec,
|
||||||
|
minInfo
|
||||||
|
);
|
||||||
|
|
||||||
// Extract any hits
|
// Extract any hits
|
||||||
forAll(plusInfo, i)
|
forAll(plusInfo, i)
|
||||||
{
|
{
|
||||||
if (plusInfo[i].hit() && minInfo[i].hit())
|
if (plusInfo[i].hit() && minInfo[i].hit())
|
||||||
{
|
{
|
||||||
info[compactMap[i]] = plusInfo[i].hitPoint()-offset0[i];
|
info[compactMap[i]] = plusInfo[i];
|
||||||
|
info[compactMap[i]].rawPoint() -= offset0[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,6 +273,12 @@ void Foam::searchableSurfaceWithGaps::findLine
|
|||||||
|
|
||||||
if (returnReduce(nMiss, sumOp<label>()) > 0)
|
if (returnReduce(nMiss, sumOp<label>()) > 0)
|
||||||
{
|
{
|
||||||
|
//Pout<< "** retesting with offset1 " << nMiss << " misses out of "
|
||||||
|
// << start.size() << endl;
|
||||||
|
|
||||||
|
// Test with offset1 perturbed vectors
|
||||||
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
// Extract (inplace possible because of order)
|
// Extract (inplace possible because of order)
|
||||||
forAll(plusMissMap, i)
|
forAll(plusMissMap, i)
|
||||||
{
|
{
|
||||||
@ -266,17 +295,18 @@ void Foam::searchableSurfaceWithGaps::findLine
|
|||||||
offset0.setSize(plusMissMap.size());
|
offset0.setSize(plusMissMap.size());
|
||||||
offset1.setSize(plusMissMap.size());
|
offset1.setSize(plusMissMap.size());
|
||||||
|
|
||||||
|
const vectorField smallVec(SMALL*(compactEnd-compactStart));
|
||||||
|
|
||||||
surface().findLine
|
surface().findLine
|
||||||
(
|
(
|
||||||
compactStart+offset1,
|
compactStart+offset1-smallVec,
|
||||||
compactEnd+offset1,
|
compactEnd+offset1+smallVec,
|
||||||
plusInfo
|
plusInfo
|
||||||
);
|
);
|
||||||
surface().findLine
|
surface().findLine
|
||||||
(
|
(
|
||||||
compactStart-offset1,
|
compactStart-offset1-smallVec,
|
||||||
compactEnd-offset1,
|
compactEnd-offset1+smallVec,
|
||||||
minInfo
|
minInfo
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -285,7 +315,8 @@ void Foam::searchableSurfaceWithGaps::findLine
|
|||||||
{
|
{
|
||||||
if (plusInfo[i].hit() && minInfo[i].hit())
|
if (plusInfo[i].hit() && minInfo[i].hit())
|
||||||
{
|
{
|
||||||
info[compactMap[i]] = plusInfo[i].hitPoint()-offset1[i];
|
info[compactMap[i]] = plusInfo[i];
|
||||||
|
info[compactMap[i]].rawPoint() -= offset1[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,13 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
searchableSurface using multiple slightly shifted underlying surfaces
|
searchableSurface using multiple slightly shifted underlying surfaces
|
||||||
to make sure pierces don't go through gaps.
|
to make sure pierces don't go through gaps:
|
||||||
|
- shift test vector with two small vectors (of size gap_) perpendicular
|
||||||
|
to the original.
|
||||||
|
Test with + and - this vector. Only if both register a hit is it seen
|
||||||
|
as one.
|
||||||
|
- extend the test vector slightly (with SMALL) to account for numerical
|
||||||
|
inaccuracies.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
searchableSurfaceWithGaps.C
|
searchableSurfaceWithGaps.C
|
||||||
|
|||||||
154
src/meshTools/sets/pointSources/nearestToPoint/nearestToPoint.C
Normal file
154
src/meshTools/sets/pointSources/nearestToPoint/nearestToPoint.C
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "nearestToPoint.H"
|
||||||
|
#include "polyMesh.H"
|
||||||
|
#include "meshSearch.H"
|
||||||
|
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(nearestToPoint, 0);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable(topoSetSource, nearestToPoint, word);
|
||||||
|
|
||||||
|
addToRunTimeSelectionTable(topoSetSource, nearestToPoint, istream);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::topoSetSource::addToUsageTable Foam::nearestToPoint::usage_
|
||||||
|
(
|
||||||
|
nearestToPoint::typeName,
|
||||||
|
"\n Usage: nearestToPoint (pt0 .. ptn)\n\n"
|
||||||
|
" Select the nearest point for each of the points pt0 ..ptn\n\n"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::nearestToPoint::combine(topoSet& set, const bool add) const
|
||||||
|
{
|
||||||
|
// Do linear search since usually just a few points.
|
||||||
|
|
||||||
|
forAll(points_, pointI)
|
||||||
|
{
|
||||||
|
const pointField& pts = mesh_.points();
|
||||||
|
|
||||||
|
if (pts.size() > 0)
|
||||||
|
{
|
||||||
|
label minPointI = 0;
|
||||||
|
scalar minDistSqr = magSqr(pts[minPointI] - points_[pointI]);
|
||||||
|
|
||||||
|
for (label i = 1; i < pts.size(); i++)
|
||||||
|
{
|
||||||
|
scalar distSqr = magSqr(pts[i] - points_[pointI]);
|
||||||
|
|
||||||
|
if (distSqr < minDistSqr)
|
||||||
|
{
|
||||||
|
minDistSqr = distSqr;
|
||||||
|
minPointI = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
addOrDelete(set, minPointI, add);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Construct from components
|
||||||
|
Foam::nearestToPoint::nearestToPoint
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const pointField& points
|
||||||
|
)
|
||||||
|
:
|
||||||
|
topoSetSource(mesh),
|
||||||
|
points_(points)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Construct from dictionary
|
||||||
|
Foam::nearestToPoint::nearestToPoint
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
|
:
|
||||||
|
topoSetSource(mesh),
|
||||||
|
points_(dict.lookup("points"))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Construct from Istream
|
||||||
|
Foam::nearestToPoint::nearestToPoint
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
Istream& is
|
||||||
|
)
|
||||||
|
:
|
||||||
|
topoSetSource(mesh),
|
||||||
|
points_(checkIs(is))
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
Foam::nearestToPoint::~nearestToPoint()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::nearestToPoint::applyToSet
|
||||||
|
(
|
||||||
|
const topoSetSource::setAction action,
|
||||||
|
topoSet& set
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
if ((action == topoSetSource::NEW) || (action == topoSetSource::ADD))
|
||||||
|
{
|
||||||
|
Info<< " Adding points nearest to " << points_ << endl;
|
||||||
|
|
||||||
|
combine(set, true);
|
||||||
|
}
|
||||||
|
else if (action == topoSetSource::DELETE)
|
||||||
|
{
|
||||||
|
Info<< " Removing points nearest to " << points_ << endl;
|
||||||
|
|
||||||
|
combine(set, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
122
src/meshTools/sets/pointSources/nearestToPoint/nearestToPoint.H
Normal file
122
src/meshTools/sets/pointSources/nearestToPoint/nearestToPoint.H
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2008 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::nearestToPoint
|
||||||
|
|
||||||
|
Description
|
||||||
|
A topoSetSource to select points nearest to points.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
nearestToPoint.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef nearestToPoint_H
|
||||||
|
#define nearestToPoint_H
|
||||||
|
|
||||||
|
#include "topoSetSource.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class nearestToPoint Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class nearestToPoint
|
||||||
|
:
|
||||||
|
public topoSetSource
|
||||||
|
{
|
||||||
|
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
//- Add usage string
|
||||||
|
static addToUsageTable usage_;
|
||||||
|
|
||||||
|
//- points to select nearest to
|
||||||
|
pointField points_;
|
||||||
|
|
||||||
|
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
void combine(topoSet& set, const bool add) const;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("nearestToPoint");
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from components
|
||||||
|
nearestToPoint
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const pointField& points
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from dictionary
|
||||||
|
nearestToPoint
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
const dictionary& dict
|
||||||
|
);
|
||||||
|
|
||||||
|
//- Construct from Istream
|
||||||
|
nearestToPoint
|
||||||
|
(
|
||||||
|
const polyMesh& mesh,
|
||||||
|
Istream&
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~nearestToPoint();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
virtual void applyToSet
|
||||||
|
(
|
||||||
|
const topoSetSource::setAction action,
|
||||||
|
topoSet&
|
||||||
|
) const;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -164,7 +164,7 @@ inline Foam::scalar Foam::janafThermo<equationOfState>::hc() const
|
|||||||
(
|
(
|
||||||
(((a[4]/5.0*Tstd + a[3]/4.0)*Tstd + a[2]/3.0)*Tstd + a[1]/2.0)*Tstd
|
(((a[4]/5.0*Tstd + a[3]/4.0)*Tstd + a[2]/3.0)*Tstd + a[1]/2.0)*Tstd
|
||||||
+ a[0]
|
+ a[0]
|
||||||
)*Tstd
|
)*Tstd + a[5]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,6 +27,7 @@ dynMixedSmagorinsky/dynMixedSmagorinsky.C
|
|||||||
|
|
||||||
/*Smagorinsky2/Smagorinsky2.C*/
|
/*Smagorinsky2/Smagorinsky2.C*/
|
||||||
|
|
||||||
|
kOmegaSSTSAS/kOmegaSSTSAS.C
|
||||||
|
|
||||||
/* Wall functions */
|
/* Wall functions */
|
||||||
wallFunctions=derivedFvPatchFields/wallFunctions
|
wallFunctions=derivedFvPatchFields/wallFunctions
|
||||||
|
|||||||
@ -0,0 +1,447 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "kOmegaSSTSAS.H"
|
||||||
|
#include "addToRunTimeSelectionTable.H"
|
||||||
|
#include "wallDist.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace incompressible
|
||||||
|
{
|
||||||
|
namespace LESModels
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeNameAndDebug(kOmegaSSTSAS, 0);
|
||||||
|
addToRunTimeSelectionTable(LESModel, kOmegaSSTSAS, dictionary);
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
|
tmp<volScalarField> kOmegaSSTSAS::F1(const volScalarField& CDkOmega) const
|
||||||
|
{
|
||||||
|
volScalarField CDkOmegaPlus = max
|
||||||
|
(
|
||||||
|
CDkOmega,
|
||||||
|
dimensionedScalar("1.0e-10", dimless/sqr(dimTime), 1.0e-10)
|
||||||
|
);
|
||||||
|
|
||||||
|
volScalarField arg1 = min
|
||||||
|
(
|
||||||
|
min
|
||||||
|
(
|
||||||
|
max
|
||||||
|
(
|
||||||
|
(scalar(1)/betaStar_)*sqrt(k_)/(omega_*y_),
|
||||||
|
scalar(500)*nu()/(sqr(y_)*omega_)
|
||||||
|
),
|
||||||
|
(4*alphaOmega2_)*k_/(CDkOmegaPlus*sqr(y_))
|
||||||
|
),
|
||||||
|
scalar(10)
|
||||||
|
);
|
||||||
|
|
||||||
|
return tanh(pow4(arg1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<volScalarField> kOmegaSSTSAS::F2() const
|
||||||
|
{
|
||||||
|
volScalarField arg2 = min
|
||||||
|
(
|
||||||
|
max
|
||||||
|
(
|
||||||
|
(scalar(2)/betaStar_)*sqrt(k_)/(omega_*y_),
|
||||||
|
scalar(500)*nu()/(sqr(y_)*omega_)
|
||||||
|
),
|
||||||
|
scalar(100)
|
||||||
|
);
|
||||||
|
|
||||||
|
return tanh(sqr(arg2));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<volScalarField> kOmegaSSTSAS::Lvk2
|
||||||
|
(
|
||||||
|
const volScalarField& S2
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return kappa_*sqrt(S2)
|
||||||
|
/(
|
||||||
|
mag(fvc::laplacian(U()))
|
||||||
|
+ dimensionedScalar
|
||||||
|
(
|
||||||
|
"ROOTVSMALL",
|
||||||
|
dimensionSet(0, -1 , -1, 0, 0, 0, 0),
|
||||||
|
ROOTVSMALL
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
kOmegaSSTSAS::kOmegaSSTSAS
|
||||||
|
(
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
transportModel& transport,
|
||||||
|
const word& modelName
|
||||||
|
)
|
||||||
|
:
|
||||||
|
LESModel(modelName, U, phi, transport),
|
||||||
|
|
||||||
|
alphaK1_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"alphaK1",
|
||||||
|
coeffDict(),
|
||||||
|
0.85034
|
||||||
|
)
|
||||||
|
),
|
||||||
|
alphaK2_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"alphaK2",
|
||||||
|
coeffDict(),
|
||||||
|
1.0
|
||||||
|
)
|
||||||
|
),
|
||||||
|
alphaOmega1_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"alphaOmega1",
|
||||||
|
coeffDict(),
|
||||||
|
0.5
|
||||||
|
)
|
||||||
|
),
|
||||||
|
alphaOmega2_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"alphaOmega2",
|
||||||
|
coeffDict(),
|
||||||
|
0.85616
|
||||||
|
)
|
||||||
|
),
|
||||||
|
gamma1_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"gamma1",
|
||||||
|
coeffDict(),
|
||||||
|
0.5532
|
||||||
|
)
|
||||||
|
),
|
||||||
|
gamma2_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"gamma2",
|
||||||
|
coeffDict(),
|
||||||
|
0.4403
|
||||||
|
)
|
||||||
|
),
|
||||||
|
beta1_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"beta1",
|
||||||
|
coeffDict(),
|
||||||
|
0.075
|
||||||
|
)
|
||||||
|
),
|
||||||
|
beta2_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"beta2",
|
||||||
|
coeffDict(),
|
||||||
|
0.0828
|
||||||
|
)
|
||||||
|
),
|
||||||
|
betaStar_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"betaStar",
|
||||||
|
coeffDict(),
|
||||||
|
0.09
|
||||||
|
)
|
||||||
|
),
|
||||||
|
a1_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"a1",
|
||||||
|
coeffDict(),
|
||||||
|
0.31
|
||||||
|
)
|
||||||
|
),
|
||||||
|
c1_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"c1",
|
||||||
|
coeffDict(),
|
||||||
|
10.0
|
||||||
|
)
|
||||||
|
),
|
||||||
|
alphaPhi_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"alphaPhi",
|
||||||
|
coeffDict(),
|
||||||
|
0.666667
|
||||||
|
)
|
||||||
|
),
|
||||||
|
zetaTilda2_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"zetaTilda2",
|
||||||
|
coeffDict(),
|
||||||
|
1.755
|
||||||
|
)
|
||||||
|
),
|
||||||
|
FSAS_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"FSAS",
|
||||||
|
coeffDict(),
|
||||||
|
1.25
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
omega0_("omega0", dimless/dimTime, SMALL),
|
||||||
|
omegaSmall_("omegaSmall", dimless/dimTime, SMALL),
|
||||||
|
y_(mesh_),
|
||||||
|
Cmu_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"Cmu",
|
||||||
|
coeffDict(),
|
||||||
|
0.09
|
||||||
|
)
|
||||||
|
),
|
||||||
|
kappa_
|
||||||
|
(
|
||||||
|
dimensioned<scalar>::lookupOrAddToDict
|
||||||
|
(
|
||||||
|
"kappa",
|
||||||
|
*this,
|
||||||
|
0.4187
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
|
k_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"k",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh_
|
||||||
|
),
|
||||||
|
|
||||||
|
omega_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"omega",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh_
|
||||||
|
),
|
||||||
|
|
||||||
|
nuSgs_
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"nuSgs",
|
||||||
|
runTime_.timeName(),
|
||||||
|
mesh_,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh_
|
||||||
|
)
|
||||||
|
{
|
||||||
|
printCoeffs();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void kOmegaSSTSAS::correct(const tmp<volTensorField>& gradU)
|
||||||
|
{
|
||||||
|
LESModel::correct(gradU);
|
||||||
|
|
||||||
|
if (mesh_.changing())
|
||||||
|
{
|
||||||
|
y_.correct();
|
||||||
|
}
|
||||||
|
|
||||||
|
volScalarField S2 = magSqr(symm(gradU()));
|
||||||
|
gradU.clear();
|
||||||
|
|
||||||
|
volVectorField gradK = fvc::grad(k_);
|
||||||
|
volVectorField gradOmega = fvc::grad(omega_);
|
||||||
|
volScalarField L = sqrt(k_)/(pow(Cmu_, 0.25)*(omega_ + omegaSmall_));
|
||||||
|
volScalarField CDkOmega = (2.0*alphaOmega2_)*(gradK & gradOmega)/(omega_ + omegaSmall_);
|
||||||
|
volScalarField F1 = this->F1(CDkOmega);
|
||||||
|
volScalarField G = nuSgs_*2.0*S2;
|
||||||
|
|
||||||
|
// Turbulent kinetic energy equation
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
fvm::ddt(k_)
|
||||||
|
+ fvm::div(phi(), k_)
|
||||||
|
- fvm::Sp(fvc::div(phi()), k_)
|
||||||
|
- fvm::laplacian(DkEff(F1), k_)
|
||||||
|
==
|
||||||
|
min(G, c1_*betaStar_*k_*omega_)
|
||||||
|
- fvm::Sp(betaStar_*omega_, k_)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
bound(k_, k0());
|
||||||
|
|
||||||
|
volScalarField grad_omega_k = max
|
||||||
|
(
|
||||||
|
magSqr(gradOmega)/
|
||||||
|
sqr(omega_ + omegaSmall_),
|
||||||
|
magSqr(gradK)/
|
||||||
|
sqr(k_ + k0())
|
||||||
|
);
|
||||||
|
|
||||||
|
// Turbulent frequency equation
|
||||||
|
solve
|
||||||
|
(
|
||||||
|
fvm::ddt(omega_)
|
||||||
|
+ fvm::div(phi(), omega_)
|
||||||
|
- fvm::Sp(fvc::div(phi()), omega_)
|
||||||
|
- fvm::laplacian(DomegaEff(F1), omega_)
|
||||||
|
==
|
||||||
|
gamma(F1)*2.0*S2
|
||||||
|
- fvm::Sp(beta(F1)*omega_, omega_)
|
||||||
|
- fvm::SuSp // cross diffusion term
|
||||||
|
(
|
||||||
|
(F1 - scalar(1))*CDkOmega/omega_,
|
||||||
|
omega_
|
||||||
|
)
|
||||||
|
+ FSAS_
|
||||||
|
*max
|
||||||
|
(
|
||||||
|
dimensionedScalar("zero",dimensionSet(0, 0 , -2, 0, 0),0. ),
|
||||||
|
zetaTilda2_*kappa_*S2*(L/Lvk2(S2))- 2.0/alphaPhi_*k_*grad_omega_k
|
||||||
|
)
|
||||||
|
|
||||||
|
);
|
||||||
|
bound(omega_, omega0_);
|
||||||
|
|
||||||
|
// Re-calculate viscosity
|
||||||
|
nuSgs_ == a1_*k_/max(a1_*omega_, F2()*sqrt(S2));
|
||||||
|
nuSgs_.correctBoundaryConditions();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<volScalarField> kOmegaSSTSAS::epsilon() const
|
||||||
|
{
|
||||||
|
return 2.0*nuEff()*magSqr(symm(fvc::grad(U())));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<volSymmTensorField> kOmegaSSTSAS::B() const
|
||||||
|
{
|
||||||
|
return ((2.0/3.0)*I)*k() - nuSgs()*twoSymm(fvc::grad(U()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<volSymmTensorField> kOmegaSSTSAS::devBeff() const
|
||||||
|
{
|
||||||
|
return -nuEff()*dev(twoSymm(fvc::grad(U())));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
tmp<fvVectorMatrix> kOmegaSSTSAS::divDevBeff(volVectorField& U) const
|
||||||
|
{
|
||||||
|
return
|
||||||
|
(
|
||||||
|
- fvm::laplacian(nuEff(), U) - fvc::div(nuEff()*dev(fvc::grad(U)().T()))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool kOmegaSSTSAS::read()
|
||||||
|
{
|
||||||
|
if (LESModel::read())
|
||||||
|
{
|
||||||
|
alphaK1_.readIfPresent(coeffDict());
|
||||||
|
alphaK2_.readIfPresent(coeffDict());
|
||||||
|
alphaOmega1_.readIfPresent(coeffDict());
|
||||||
|
alphaOmega2_.readIfPresent(coeffDict());
|
||||||
|
gamma1_.readIfPresent(coeffDict());
|
||||||
|
gamma2_.readIfPresent(coeffDict());
|
||||||
|
beta1_.readIfPresent(coeffDict());
|
||||||
|
beta2_.readIfPresent(coeffDict());
|
||||||
|
betaStar_.readIfPresent(coeffDict());
|
||||||
|
a1_.readIfPresent(coeffDict());
|
||||||
|
c1_.readIfPresent(coeffDict());
|
||||||
|
alphaPhi_.readIfPresent(coeffDict());
|
||||||
|
zetaTilda2_.readIfPresent(coeffDict());
|
||||||
|
FSAS_.readIfPresent(coeffDict());
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace LESModels
|
||||||
|
} // End namespace incompressible
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
@ -0,0 +1,258 @@
|
|||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright (C) 1991-2007 OpenCFD Ltd.
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::LESmodels::kOmegaSSTSAS
|
||||||
|
|
||||||
|
Description
|
||||||
|
kOmegaSSTSAS LES turbulence model for incompressible flows
|
||||||
|
|
||||||
|
Note: does not have an explicit dependency on spatial discretisation
|
||||||
|
i.e. LESdelta not used.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
kOmegaSSTSAS.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef kOmegaSSTSAS_H
|
||||||
|
#define kOmegaSSTSAS_H
|
||||||
|
|
||||||
|
#include "LESModel.H"
|
||||||
|
#include "volFields.H"
|
||||||
|
#include "wallDist.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace incompressible
|
||||||
|
{
|
||||||
|
namespace LESModels
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class kOmegaSSTSAS Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class kOmegaSSTSAS
|
||||||
|
:
|
||||||
|
public LESModel
|
||||||
|
{
|
||||||
|
// Private member functions
|
||||||
|
|
||||||
|
// Disallow default bitwise copy construct and assignment
|
||||||
|
kOmegaSSTSAS(const kOmegaSSTSAS&);
|
||||||
|
kOmegaSSTSAS& operator=(const kOmegaSSTSAS&);
|
||||||
|
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
|
// Protected data
|
||||||
|
|
||||||
|
// Model constants
|
||||||
|
|
||||||
|
dimensionedScalar alphaK1_;
|
||||||
|
dimensionedScalar alphaK2_;
|
||||||
|
|
||||||
|
dimensionedScalar alphaOmega1_;
|
||||||
|
dimensionedScalar alphaOmega2_;
|
||||||
|
|
||||||
|
dimensionedScalar gamma1_;
|
||||||
|
dimensionedScalar gamma2_;
|
||||||
|
|
||||||
|
dimensionedScalar beta1_;
|
||||||
|
dimensionedScalar beta2_;
|
||||||
|
|
||||||
|
dimensionedScalar betaStar_;
|
||||||
|
|
||||||
|
dimensionedScalar a1_;
|
||||||
|
dimensionedScalar c1_;
|
||||||
|
|
||||||
|
dimensionedScalar alphaPhi_;
|
||||||
|
dimensionedScalar zetaTilda2_;
|
||||||
|
dimensionedScalar FSAS_;
|
||||||
|
|
||||||
|
dimensionedScalar omega0_;
|
||||||
|
dimensionedScalar omegaSmall_;
|
||||||
|
|
||||||
|
wallDist y_;
|
||||||
|
dimensionedScalar Cmu_;
|
||||||
|
dimensionedScalar kappa_;
|
||||||
|
|
||||||
|
|
||||||
|
// Fields
|
||||||
|
|
||||||
|
volScalarField k_;
|
||||||
|
volScalarField omega_;
|
||||||
|
volScalarField nuSgs_;
|
||||||
|
|
||||||
|
|
||||||
|
// Protected member functions
|
||||||
|
|
||||||
|
tmp<volScalarField> Lvk2
|
||||||
|
(
|
||||||
|
const volScalarField& S2
|
||||||
|
) const;
|
||||||
|
|
||||||
|
tmp<volScalarField> F1(const volScalarField& CDkOmega) const;
|
||||||
|
tmp<volScalarField> F2() const;
|
||||||
|
|
||||||
|
tmp<volScalarField> blend
|
||||||
|
(
|
||||||
|
const volScalarField& F1,
|
||||||
|
const dimensionedScalar& psi1,
|
||||||
|
const dimensionedScalar& psi2
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return F1*(psi1 - psi2) + psi2;
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp<volScalarField> alphaK
|
||||||
|
(
|
||||||
|
const volScalarField& F1
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return blend(F1, alphaK1_, alphaK2_);
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp<volScalarField> alphaOmega
|
||||||
|
(
|
||||||
|
const volScalarField& F1
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return blend(F1, alphaOmega1_, alphaOmega2_);
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp<volScalarField> beta
|
||||||
|
(
|
||||||
|
const volScalarField& F1
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return blend(F1, beta1_, beta2_);
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp<volScalarField> gamma
|
||||||
|
(
|
||||||
|
const volScalarField& F1
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
return blend(F1, gamma1_, gamma2_);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("kOmegaSSTSAS");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Constructor from components
|
||||||
|
kOmegaSSTSAS
|
||||||
|
(
|
||||||
|
const volVectorField& U,
|
||||||
|
const surfaceScalarField& phi,
|
||||||
|
transportModel& transport,
|
||||||
|
const word& modelName = typeName
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Destructor
|
||||||
|
virtual ~kOmegaSSTSAS()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return SGS kinetic energy
|
||||||
|
tmp<volScalarField> k() const
|
||||||
|
{
|
||||||
|
return k_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return omega
|
||||||
|
tmp<volScalarField> omega() const
|
||||||
|
{
|
||||||
|
return omega_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return the effective diffusivity for k
|
||||||
|
tmp<volScalarField> DkEff(const volScalarField& F1) const
|
||||||
|
{
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField("DkEff", alphaK(F1)*nuSgs_ + nu())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return the effective diffusivity for omega
|
||||||
|
tmp<volScalarField> DomegaEff(const volScalarField& F1) const
|
||||||
|
{
|
||||||
|
return tmp<volScalarField>
|
||||||
|
(
|
||||||
|
new volScalarField("DomegaEff", alphaOmega(F1)*nuSgs_ + nu())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return sub-grid disipation rate
|
||||||
|
tmp<volScalarField> epsilon() const;
|
||||||
|
|
||||||
|
//- Return SGS viscosity
|
||||||
|
tmp<volScalarField> nuSgs() const
|
||||||
|
{
|
||||||
|
return nuSgs_;
|
||||||
|
}
|
||||||
|
|
||||||
|
//- Return the sub-grid stress tensor.
|
||||||
|
tmp<volSymmTensorField> B() const;
|
||||||
|
|
||||||
|
//- Return the effective sub-grid turbulence stress tensor
|
||||||
|
// including the laminar stress
|
||||||
|
tmp<volSymmTensorField> devBeff() const;
|
||||||
|
|
||||||
|
//- Return the deviatoric part of the divergence of Beff
|
||||||
|
// i.e. the additional term in the filtered NSE.
|
||||||
|
tmp<fvVectorMatrix> divDevBeff(volVectorField& U) const;
|
||||||
|
|
||||||
|
//- Solve the turbulence equations (k-w) and correct the turbulence viscosity
|
||||||
|
virtual void correct(const tmp<volTensorField>& gradU);
|
||||||
|
|
||||||
|
//- Read turbulenceProperties dictionary
|
||||||
|
virtual bool read();
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace LESModels
|
||||||
|
} // End namespace incompressible
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
||||||
Reference in New Issue
Block a user