-
Notifications
You must be signed in to change notification settings - Fork 1
/
fileHandler.yaml
413 lines (393 loc) · 12.8 KB
/
fileHandler.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
---
version: 0.3
order:
- meta
- foam
- static
---
"0":
U:
FoamFile: &FoamFile
version: 2.0
format: ascii
class: volVectorField
object: U
dimensions: "[0 1 -1 0 0 0 0]"
internalField: uniform (0 0 0)
boundaryField:
outlet:
type: zeroGradient
value: uniform (0 0 0)
walls:
type: noSlip
frontAndBack:
type: noSlip
constant:
g:
FoamFile:
class: dictionary
object: g
<<: *FoamFile
dimensions: "[0 1 -2 0 0 0 0]"
value: (0 -9.81 0)
transportProperties:
FoamFile:
class: dictionary
object: transportProperties
<<: *FoamFile
nu: "[0 2 -1 0 0 0 0] 0.025"
kinematicCloudPositions:
FoamFile:
class: dictionary
object: kinematicCloudPositions
<<: *FoamFile
"":
- (0.286 0.077 0.0032)
- (0.286 0.083 0.0032)
- (0.286 0.089 0.0032)
- (0.286 0.095 0.0032)
- (0.286 0.101 0.0032)
- (0.286 0.107 0.0032)
- (0.286 0.113 0.0032)
- (0.286 0.119 0.0032)
- (0.286 0.125 0.0032)
- (0.286 0.131 0.0032)
- (0.286 0.137 0.0032)
- (0.286 0.143 0.0032)
- (0.286 0.149 0.0032)
- (0.286 0.155 0.0032)
- (0.286 0.161 0.0032)
- (0.286 0.167 0.0032)
- (0.286 0.173 0.0032)
- (0.286 0.179 0.0032)
- (0.286 0.185 0.0032)
- (0.286 0.191 0.0032)
- (0.286 0.197 0.0032)
- (0.286 0.203 0.0032)
- (0.286 0.209 0.0032)
- (0.286 0.215 0.0032)
- (0.286 0.221 0.0032)
- (0.286 0.227 0.0032)
- (0.286 0.233 0.0032)
- (0.286 0.239 0.0032)
- (0.286 0.245 0.0032)
- (0.286 0.251 0.0032)
- (0.286 0.257 0.0032)
- (0.286 0.263 0.0032)
- (0.286 0.269 0.0032)
- (0.286 0.275 0.0032)
- (0.286 0.281 0.0032)
- (0.286 0.287 0.0032)
- (0.286 0.293 0.0032)
- (0.286 0.299 0.0032)
- (0.286 0.305 0.0032)
- (0.286 0.311 0.0032)
- (0.286 0.317 0.0032)
- (0.286 0.323 0.0032)
- (0.286 0.329 0.0032)
- (0.286 0.335 0.0032)
- (0.286 0.341 0.0032)
- (0.286 0.347 0.0032)
- (0.286 0.353 0.0032)
- (0.286 0.359 0.0032)
- (0.286 0.365 0.0032)
- (0.286 0.371 0.0032)
- (0.286 0.377 0.0032)
- (0.286 0.383 0.0032)
- (0.286 0.389 0.0032)
- (0.286 0.395 0.0032)
- (0.286 0.401 0.0032)
- (0.286 0.407 0.0032)
- (0.286 0.413 0.0032)
- (0.286 0.419 0.0032)
- (0.286 0.425 0.0032)
- (0.286 0.431 0.0032)
- (0.286 0.437 0.0032)
- (0.286 0.443 0.0032)
- (0.286 0.449 0.0032)
- (0.286 0.455 0.0032)
- (0.286 0.461 0.0032)
- (0.286 0.467 0.0032)
- (0.286 0.473 0.0032)
- (0.286 0.479 0.0032)
- (0.286 0.485 0.0032)
- (0.286 0.491 0.0032)
- (0.286 0.497 0.0032)
kinematicCloudProperties:
FoamFile:
class: dictionary
object: kinematicCloudProperties
<<: *FoamFile
solution:
active: true
coupled: false
transient: yes
cellValueSourceCorrection: off
maxCo: 0.3
interpolationSchemes:
rho: cell
U: cellPoint
mu: cell
integrationSchemes:
U: Euler
constantProperties:
rho0: 964
youngsModulus: 6e8
poissonsRatio: 0.35
subModels:
particleForces:
sphereDrag: ""
gravity: ""
injectionModels:
model1:
type: manualInjection
massTotal: 0
parcelBasisType: fixed
nParticle: 1
SOI: 0
positionsFile: kinematicCloudPositions
U0: (0 0 0)
sizeDistribution:
type: fixedValue
fixedValueDistribution:
value: 0.006
dispersionModel: none
patchInteractionModel: none
surfaceFilmModel: none
stochasticCollisionModel: none
collisionModel: pairCollision
pairCollisionCoeffs:
# Maximum possible particle diameter expected at any time
maxInteractionDistance: 0.006
writeReferredParticleCloud: no
pairModel: pairSpringSliderDashpot
pairSpringSliderDashpotCoeffs:
useEquivalentSize: no
alpha: 0.12
b: 1.5
mu: 0.52
cohesionEnergyDensity: 0
collisionResolutionSteps: 12
wallModel: wallLocalSpringSliderDashpot
wallLocalSpringSliderDashpotCoeffs:
useEquivalentSize: no
collisionResolutionSteps: 12
walls:
youngsModulus: 1e10
poissonsRatio: 0.23
alpha: 0.12
b: 1.5
mu: 0.43
cohesionEnergyDensity: 0
frontAndBack:
youngsModulus: 1e10
poissonsRatio: 0.23
alpha: 0.12
b: 1.5
mu: 0.1
cohesionEnergyDensity: 0
cloudFunctions: {}
transportProperties:
FoamFile:
class: dictionary
object: transportProperties
<<: *FoamFile
rhoInf: "[1 -3 0 0 0 0 0] 1.2"
transportModel: Newtonian
nu: "[0 2 -1 0 0 0 0] 1e-05"
turbulenceProperties:
FoamFile:
class: dictionary
object: turbulenceProperties
<<: *FoamFile
simulationType: laminar
system:
blockMeshDict:
FoamFile:
class: dictionary
object: blockMeshDict
<<: *FoamFile
convertToMeters: 0.001
vertices:
- (0 77.9423 6.2)
- (135 0 6.2)
- (165 0 6.2)
- (300 77.9423 6.2)
- (300 500 6.2)
- (0 500 6.2)
- (0 77.9423 0)
- (135 0 0)
- (165 0 0)
- (300 77.9423 0)
- (300 500 0)
- (0 500 0)
blocks:
- hex (6 9 10 11 0 3 4 5) (20 40 1) simpleGrading (1 1 1)
- hex (7 8 9 6 1 2 3 0) (20 8 1) simpleGrading (1 1 1)
boundary:
- walls:
type: wall
faces:
- (1 7 8 2)
- (0 6 7 1)
- (2 8 9 3)
- (0 5 11 6)
- (3 4 10 9)
- (4 10 11 5)
- frontAndBack:
type: wall
faces:
- (0 3 4 5)
- (1 2 3 0)
- (6 11 10 9)
- (6 9 8 7)
controlDict:
FoamFile:
class: dictionary
object: controlDict
<<: *FoamFile
application: icoUncoupledKinematicParcelFoam
startFrom: latestTime
startTime: 0
stopAt: writeNow
endTime: 0.25
deltaT: 5e-5
writeControl: runTime
writeInterval: 0.05
purgeWrite: 0
writeFormat: binary
writePrecision: 6
writeCompression: off
timeFormat: general
timePrecision: 6
runTimeModifiable: yes
decomposeParDict:
FoamFile:
class: dictionary
object: decomposeParDict
<<: *FoamFile
numberOfSubdomains: 4
method: simple
simpleCoeffs:
n: (4 1 1)
delta: 0.001
hierarchicalCoeffs:
n: (4 1 1)
delta: 0.001
order: xyz
manualCoeffs:
dataFile: >
""
distributed: no
roots: []
fvSchemes:
FoamFile:
class: dictionary
object: fvSchemes
<<: *FoamFile
ddtSchemes:
default: none
gradSchemes:
default: none
divSchemes:
default: none
laplacianSchemes:
default: none
interpolationSchemes:
default: linear
fvSolution:
FoamFile:
class: dictionary
object: fvSolution
<<: *FoamFile
solvers: {}
---
-
name: Allrun
type: [embed, text]
data: |
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
application=$(getApplication)
runApplication blockMesh
#- Test writing collated format
runApplication decomposePar -fileHandler collated
runParallel $application -fileHandler collated
runApplication reconstructPar -latestTime -fileHandler collated
#- Test writing uncollated format
runApplication -s uncollated decomposePar -fileHandler uncollated -force
runParallel -s uncollated $application -fileHandler uncollated
#- Test uncollated+distributed running: copy to different roots
rm -rf machineA/fileHandler
mkdir -p machineA/fileHandler
( cd machineA/fileHandler && \
cp -r ../../processor[0-1] . && \
cp -r ../../system . && \
mkdir -p constant && cp ../../constant/* constant
)
#- Note: slave node does not need constant&system since these are global
rm -rf machineB/fileHandler
mkdir -p machineB/fileHandler
( cd machineB/fileHandler && \
cp -r ../../processor[2-3] .
)
#- Run with different roots
( d=$PWD && \
cd machineA/fileHandler && \
runParallel -s multiRoot $application \
-fileHandler masterUncollated -ioRanks '(0 2)' \
-roots "(\"$d/machineA\" \"$d/machineB\" \"$d/machineB\")"
)
#- Restart from uncollated
runParallel -s collated $application -fileHandler collated
runApplication -s collated reconstructPar -latestTime -fileHandler collated
#- Convert the parallel format to uncollated
runParallel foamFormatConvert -fileHandler uncollated
#- Restart with multiple IO ranks
runParallel -s multiCollated \
$application -fileHandler collated -ioRanks '(0 2)'
#- Reconstruct the multi-rank format. Delete the collated directory
# since conflicts with the multi-collated directory
rm -rf processors4
runApplication -s multiCollated reconstructPar -latestTime \
-fileHandler collated -ioRanks '(0 2)'
#- Convert the multi-rank format to uncollated
runParallel -s uncollated foamFormatConvert -fileHandler uncollated
#- Restart from multiCollated using collated
runParallel -s uncollated_from_multiCollated \
$application -fileHandler uncollated
#- Test collated+distributed running: copy to different roots
# Important: make sure to copy uniform since we're copying it
#- Delete all processor directories
runApplication -s collated decomposePar \
-fileHandler collated -force -copyUniform
rm -rf machineA/fileHandler
mkdir -p machineA/fileHandler
( cd machineA/fileHandler && \
cp -r ../../processor* . && \
cp -r ../../system . && \
mkdir -p constant && cp ../../constant/* constant
)
#- Note: slave node does not need constant&system since these are global
rm -rf machineB/fileHandler
mkdir -p machineB/fileHandler
#- Run with different roots
( d=$PWD && \
cd machineA/fileHandler && \
runParallel -s distributed_multiCollated $application \
-fileHandler collated -ioRanks '(0 2)' \
-roots "(\"$d/machineA\" \"$d/machineB\" \"$d/machineB\")"
)
-
name: Allclean
type: [embed, text]
data: |
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
cleanCase
rm -rf machineA
rm -rf machineB