pycphy 0.1.0__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. pycphy/__init__.py +11 -0
  2. pycphy/cli.py +145 -0
  3. pycphy/config_manager.py +373 -0
  4. pycphy/foamCaseDeveloper/__init__.py +60 -41
  5. pycphy/foamCaseDeveloper/config/__init__.py +69 -26
  6. pycphy/foamCaseDeveloper/config/cad_mesh_config.py +62 -0
  7. pycphy/foamCaseDeveloper/config/config_hfdibdem.py +193 -0
  8. pycphy/foamCaseDeveloper/config/constant/__init__.py +23 -0
  9. pycphy/foamCaseDeveloper/config/constant/dynamic_mesh_config.py +208 -0
  10. pycphy/foamCaseDeveloper/config/constant/gravity_field_config.py +379 -0
  11. pycphy/foamCaseDeveloper/config/constant/transport_properties_config.py +225 -0
  12. pycphy/foamCaseDeveloper/config/constant/turbulence_config.py +617 -0
  13. pycphy/foamCaseDeveloper/config/csv_boundary_reader.py +219 -0
  14. pycphy/foamCaseDeveloper/config/system/__init__.py +31 -0
  15. pycphy/foamCaseDeveloper/config/system/block_mesh_config.py +184 -0
  16. pycphy/foamCaseDeveloper/config/{control_config.py → system/control_config.py} +113 -1
  17. pycphy/foamCaseDeveloper/config/system/decompose_par_config.py +525 -0
  18. pycphy/foamCaseDeveloper/config/system/fv_options_config.py +575 -0
  19. pycphy/foamCaseDeveloper/config/system/fv_schemes_config.py +363 -0
  20. pycphy/foamCaseDeveloper/config/system/set_fields_config.py +640 -0
  21. pycphy/foamCaseDeveloper/config/system/snappy_hex_mesh_config.py +241 -0
  22. pycphy/foamCaseDeveloper/config/zero/U_config.py +135 -0
  23. pycphy/foamCaseDeveloper/config/zero/__init__.py +22 -0
  24. pycphy/foamCaseDeveloper/config/zero/f_config.py +140 -0
  25. pycphy/foamCaseDeveloper/config/zero/lambda_config.py +157 -0
  26. pycphy/foamCaseDeveloper/config/zero/p_config.py +97 -0
  27. pycphy/foamCaseDeveloper/core/__init__.py +30 -18
  28. pycphy/foamCaseDeveloper/core/block_mesh_developer.py +1 -1
  29. pycphy/foamCaseDeveloper/core/cad_block_mesh_developer.py +463 -0
  30. pycphy/foamCaseDeveloper/core/case_builder.py +1217 -0
  31. pycphy/foamCaseDeveloper/core/foam_case_manager.py +370 -111
  32. pycphy/foamCaseDeveloper/develop_case.py +640 -0
  33. pycphy/foamCaseDeveloper/main.py +260 -260
  34. pycphy/foamCaseDeveloper/utils/myAutoCAD.py +418 -0
  35. pycphy/foamCaseDeveloper/writers/__init__.py +37 -4
  36. pycphy/foamCaseDeveloper/writers/constant/__init__.py +25 -0
  37. pycphy/foamCaseDeveloper/writers/constant/dynamic_mesh_dict_writer.py +75 -0
  38. pycphy/foamCaseDeveloper/writers/constant/gravity_field_writer.py +88 -0
  39. pycphy/foamCaseDeveloper/writers/constant/hfdibdem_dict_writer.py +81 -0
  40. pycphy/foamCaseDeveloper/writers/constant/transport_properties_writer.py +202 -0
  41. pycphy/foamCaseDeveloper/writers/{turbulence_properties_writer.py → constant/turbulence_properties_writer.py} +49 -1
  42. pycphy/foamCaseDeveloper/writers/system/__init__.py +31 -0
  43. pycphy/foamCaseDeveloper/writers/{block_mesh_writer.py → system/block_mesh_writer.py} +1 -1
  44. pycphy/foamCaseDeveloper/writers/{control_dict_writer.py → system/control_dict_writer.py} +37 -1
  45. pycphy/foamCaseDeveloper/writers/system/decompose_par_writer.py +228 -0
  46. pycphy/foamCaseDeveloper/writers/system/fv_options_writer.py +188 -0
  47. pycphy/foamCaseDeveloper/writers/system/fv_schemes_writer.py +155 -0
  48. pycphy/foamCaseDeveloper/writers/system/set_fields_writer.py +191 -0
  49. pycphy/foamCaseDeveloper/writers/system/snappy_hex_mesh_writer.py +123 -0
  50. pycphy/foamCaseDeveloper/writers/zero/__init__.py +24 -0
  51. pycphy/foamCaseDeveloper/writers/zero/f_field_writer.py +89 -0
  52. pycphy/foamCaseDeveloper/writers/zero/lambda_field_writer.py +84 -0
  53. pycphy/foamCaseDeveloper/writers/zero/p_field_writer.py +89 -0
  54. pycphy/foamCaseDeveloper/writers/zero/u_field_writer.py +96 -0
  55. pycphy/foamCaseDeveloper/writers/zero/zero_field_factory.py +388 -0
  56. {pycphy-0.1.0.dist-info → pycphy-0.2.0.dist-info}/METADATA +154 -6
  57. pycphy-0.2.0.dist-info/RECORD +63 -0
  58. pycphy-0.2.0.dist-info/entry_points.txt +3 -0
  59. pycphy/foamCaseDeveloper/config/block_mesh_config.py +0 -90
  60. pycphy/foamCaseDeveloper/config/turbulence_config.py +0 -187
  61. pycphy/foamCaseDeveloper/core/control_dict_writer.py +0 -55
  62. pycphy/foamCaseDeveloper/core/turbulence_properties_writer.py +0 -68
  63. pycphy-0.1.0.dist-info/RECORD +0 -24
  64. pycphy-0.1.0.dist-info/entry_points.txt +0 -2
  65. {pycphy-0.1.0.dist-info → pycphy-0.2.0.dist-info}/WHEEL +0 -0
  66. {pycphy-0.1.0.dist-info → pycphy-0.2.0.dist-info}/licenses/LICENSE +0 -0
  67. {pycphy-0.1.0.dist-info → pycphy-0.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,640 @@
1
+ # set_fields_config.py
2
+
3
+ """
4
+ Set Fields Configuration for OpenFOAM cases.
5
+
6
+ This module provides configuration options for the setFields utility to initialize
7
+ field values in specific regions of the domain including cell sets, cell zones,
8
+ and geometric regions.
9
+ """
10
+
11
+ # =============================================================================
12
+ # *** User Input for setFieldsDict ***
13
+ # =============================================================================
14
+
15
+ # --- Master Control ---
16
+ # Set to True to write 'system/setFieldsDict'.
17
+ WRITE_SET_FIELDS_DICT = True
18
+
19
+ # =============================================================================
20
+ # *** Default Field Values ***
21
+ # =============================================================================
22
+ # Default values for fields that will be set in all cells unless overridden
23
+
24
+ DEFAULT_FIELD_VALUES = {
25
+ # List of default field values
26
+ "fields": [
27
+ # Example: Set default volume fraction for multiphase flow
28
+ # {
29
+ # "type": "volScalarFieldValue",
30
+ # "field": "alpha.water",
31
+ # "value": 0.0, # Default to air (0 = air, 1 = water)
32
+ # },
33
+
34
+ # Example: Set default velocity field
35
+ # {
36
+ # "type": "volVectorFieldValue",
37
+ # "field": "U",
38
+ # "value": (0, 0, 0), # Default to zero velocity
39
+ # },
40
+
41
+ # Example: Set default pressure field
42
+ # {
43
+ # "type": "volScalarFieldValue",
44
+ # "field": "p",
45
+ # "value": 0.0, # Default to zero pressure
46
+ # },
47
+
48
+ # Example: Set default temperature field
49
+ # {
50
+ # "type": "volScalarFieldValue",
51
+ # "field": "T",
52
+ # "value": 293.15, # Default to 20°C
53
+ # },
54
+
55
+ # Example: Set default turbulent kinetic energy
56
+ # {
57
+ # "type": "volScalarFieldValue",
58
+ # "field": "k",
59
+ # "value": 0.01, # Default turbulent kinetic energy
60
+ # },
61
+
62
+ # Example: Set default turbulent dissipation rate
63
+ # {
64
+ # "type": "volScalarFieldValue",
65
+ # "field": "epsilon",
66
+ # "value": 0.01, # Default turbulent dissipation rate
67
+ # },
68
+
69
+ # Example: Set default species mass fraction
70
+ # {
71
+ # "type": "volScalarFieldValue",
72
+ # "field": "Y_CO2",
73
+ # "value": 0.0, # Default CO2 mass fraction
74
+ # },
75
+ ]
76
+ }
77
+
78
+ # =============================================================================
79
+ # *** Region Definitions ***
80
+ # =============================================================================
81
+ # Define regions where field values will be set
82
+
83
+ REGIONS = {
84
+ # List of regions with specific field values
85
+ "regions": [
86
+ # Example: Set water in a specific region
87
+ # {
88
+ # "name": "waterRegion",
89
+ # "type": "cellToCell",
90
+ # "set": "waterCells",
91
+ # "fieldValues": [
92
+ # {
93
+ # "type": "volScalarFieldValue",
94
+ # "field": "alpha.water",
95
+ # "value": 1.0, # Set to water
96
+ # },
97
+ # {
98
+ # "type": "volVectorFieldValue",
99
+ # "field": "U",
100
+ # "value": (0, 0, 0), # Set to zero velocity
101
+ # },
102
+ # ],
103
+ # },
104
+
105
+ # Example: Set initial velocity in inlet region
106
+ # {
107
+ # "name": "inletRegion",
108
+ # "type": "cellToCell",
109
+ # "set": "inletCells",
110
+ # "fieldValues": [
111
+ # {
112
+ # "type": "volVectorFieldValue",
113
+ # "field": "U",
114
+ # "value": (1, 0, 0), # Set inlet velocity
115
+ # },
116
+ # ],
117
+ # },
118
+
119
+ # Example: Set initial temperature in heated region
120
+ # {
121
+ # "name": "heatedRegion",
122
+ # "type": "cellToCell",
123
+ # "set": "heatedCells",
124
+ # "fieldValues": [
125
+ # {
126
+ # "type": "volScalarFieldValue",
127
+ # "field": "T",
128
+ # "value": 373.15, # Set to 100°C
129
+ # },
130
+ # ],
131
+ # },
132
+
133
+ # Example: Set initial turbulence in wake region
134
+ # {
135
+ # "name": "wakeRegion",
136
+ # "type": "cellToCell",
137
+ # "set": "wakeCells",
138
+ # "fieldValues": [
139
+ # {
140
+ # "type": "volScalarFieldValue",
141
+ # "field": "k",
142
+ # "value": 0.1, # Set turbulent kinetic energy
143
+ # },
144
+ # {
145
+ # "type": "volScalarFieldValue",
146
+ # "field": "epsilon",
147
+ # "value": 0.1, # Set turbulent dissipation rate
148
+ # },
149
+ # ],
150
+ # },
151
+
152
+ # Example: Set initial species concentration
153
+ # {
154
+ # "name": "pollutantRegion",
155
+ # "type": "cellToCell",
156
+ # "set": "pollutantCells",
157
+ # "fieldValues": [
158
+ # {
159
+ # "type": "volScalarFieldValue",
160
+ # "field": "Y_CO2",
161
+ # "value": 0.1, # Set CO2 mass fraction
162
+ # },
163
+ # ],
164
+ # },
165
+
166
+ # Example: Set initial pressure
167
+ # {
168
+ # "name": "highPressureRegion",
169
+ # "type": "cellToCell",
170
+ # "set": "highPressureCells",
171
+ # "fieldValues": [
172
+ # {
173
+ # "type": "volScalarFieldValue",
174
+ # "field": "p",
175
+ # "value": 1000.0, # Set high pressure
176
+ # },
177
+ # ],
178
+ # },
179
+ ]
180
+ }
181
+
182
+ # =============================================================================
183
+ # *** Field Value Types ***
184
+ # =============================================================================
185
+ # Available field value types for reference
186
+
187
+ FIELD_VALUE_TYPES = {
188
+ "volScalarFieldValue": {
189
+ "description": "Set scalar field values (pressure, temperature, etc.)",
190
+ "example": {
191
+ "type": "volScalarFieldValue",
192
+ "field": "p",
193
+ "value": 1000.0,
194
+ }
195
+ },
196
+
197
+ "volVectorFieldValue": {
198
+ "description": "Set vector field values (velocity, etc.)",
199
+ "example": {
200
+ "type": "volVectorFieldValue",
201
+ "field": "U",
202
+ "value": (1, 0, 0),
203
+ }
204
+ },
205
+
206
+ "volTensorFieldValue": {
207
+ "description": "Set tensor field values (stress, etc.)",
208
+ "example": {
209
+ "type": "volTensorFieldValue",
210
+ "field": "tau",
211
+ "value": ((1, 0, 0), (0, 1, 0), (0, 0, 1)),
212
+ }
213
+ },
214
+
215
+ "volSymmTensorFieldValue": {
216
+ "description": "Set symmetric tensor field values",
217
+ "example": {
218
+ "type": "volSymmTensorFieldValue",
219
+ "field": "R",
220
+ "value": ((1, 0, 0), (0, 1, 0), (0, 0, 1)),
221
+ }
222
+ },
223
+
224
+ "volSphericalTensorFieldValue": {
225
+ "description": "Set spherical tensor field values",
226
+ "example": {
227
+ "type": "volSphericalTensorFieldValue",
228
+ "field": "I",
229
+ "value": 1.0,
230
+ }
231
+ },
232
+ }
233
+
234
+ # =============================================================================
235
+ # *** Region Types ***
236
+ # =============================================================================
237
+ # Available region types for reference
238
+
239
+ REGION_TYPES = {
240
+ "cellToCell": {
241
+ "description": "Set field values in specific cells",
242
+ "required_fields": ["set", "fieldValues"],
243
+ "example": {
244
+ "name": "waterRegion",
245
+ "type": "cellToCell",
246
+ "set": "waterCells",
247
+ "fieldValues": [
248
+ {
249
+ "type": "volScalarFieldValue",
250
+ "field": "alpha.water",
251
+ "value": 1.0,
252
+ },
253
+ ],
254
+ }
255
+ },
256
+
257
+ "cellToFace": {
258
+ "description": "Set field values on specific faces",
259
+ "required_fields": ["set", "fieldValues"],
260
+ "example": {
261
+ "name": "boundaryRegion",
262
+ "type": "cellToFace",
263
+ "set": "boundaryFaces",
264
+ "fieldValues": [
265
+ {
266
+ "type": "volScalarFieldValue",
267
+ "field": "p",
268
+ "value": 0.0,
269
+ },
270
+ ],
271
+ }
272
+ },
273
+
274
+ "cellToPoint": {
275
+ "description": "Set field values at specific points",
276
+ "required_fields": ["set", "fieldValues"],
277
+ "example": {
278
+ "name": "pointRegion",
279
+ "type": "cellToPoint",
280
+ "set": "pointSet",
281
+ "fieldValues": [
282
+ {
283
+ "type": "volScalarFieldValue",
284
+ "field": "T",
285
+ "value": 373.15,
286
+ },
287
+ ],
288
+ }
289
+ },
290
+ }
291
+
292
+ # =============================================================================
293
+ # *** Predefined Field Sets ***
294
+ # =============================================================================
295
+ # Common field initialization configurations for different simulation types
296
+
297
+ PREDEFINED_FIELD_SETS = {
298
+ "multiphase_vof": {
299
+ "description": "Multiphase Volume of Fluid (VOF) initialization",
300
+ "default_fields": [
301
+ {
302
+ "type": "volScalarFieldValue",
303
+ "field": "alpha.water",
304
+ "value": 0.0, # Default to air
305
+ },
306
+ {
307
+ "type": "volVectorFieldValue",
308
+ "field": "U",
309
+ "value": (0, 0, 0), # Default to zero velocity
310
+ },
311
+ {
312
+ "type": "volScalarFieldValue",
313
+ "field": "p",
314
+ "value": 0.0, # Default to zero pressure
315
+ },
316
+ ],
317
+ "regions": [
318
+ {
319
+ "name": "waterRegion",
320
+ "type": "cellToCell",
321
+ "set": "waterCells",
322
+ "fieldValues": [
323
+ {
324
+ "type": "volScalarFieldValue",
325
+ "field": "alpha.water",
326
+ "value": 1.0, # Set to water
327
+ },
328
+ ],
329
+ },
330
+ ],
331
+ },
332
+
333
+ "turbulent_flow": {
334
+ "description": "Turbulent flow initialization",
335
+ "default_fields": [
336
+ {
337
+ "type": "volVectorFieldValue",
338
+ "field": "U",
339
+ "value": (0, 0, 0), # Default to zero velocity
340
+ },
341
+ {
342
+ "type": "volScalarFieldValue",
343
+ "field": "p",
344
+ "value": 0.0, # Default to zero pressure
345
+ },
346
+ {
347
+ "type": "volScalarFieldValue",
348
+ "field": "k",
349
+ "value": 0.01, # Default turbulent kinetic energy
350
+ },
351
+ {
352
+ "type": "volScalarFieldValue",
353
+ "field": "epsilon",
354
+ "value": 0.01, # Default turbulent dissipation rate
355
+ },
356
+ ],
357
+ "regions": [
358
+ {
359
+ "name": "inletRegion",
360
+ "type": "cellToCell",
361
+ "set": "inletCells",
362
+ "fieldValues": [
363
+ {
364
+ "type": "volVectorFieldValue",
365
+ "field": "U",
366
+ "value": (1, 0, 0), # Set inlet velocity
367
+ },
368
+ {
369
+ "type": "volScalarFieldValue",
370
+ "field": "k",
371
+ "value": 0.1, # Set inlet turbulence
372
+ },
373
+ {
374
+ "type": "volScalarFieldValue",
375
+ "field": "epsilon",
376
+ "value": 0.1, # Set inlet dissipation
377
+ },
378
+ ],
379
+ },
380
+ ],
381
+ },
382
+
383
+ "heat_transfer": {
384
+ "description": "Heat transfer simulation initialization",
385
+ "default_fields": [
386
+ {
387
+ "type": "volVectorFieldValue",
388
+ "field": "U",
389
+ "value": (0, 0, 0), # Default to zero velocity
390
+ },
391
+ {
392
+ "type": "volScalarFieldValue",
393
+ "field": "p",
394
+ "value": 0.0, # Default to zero pressure
395
+ },
396
+ {
397
+ "type": "volScalarFieldValue",
398
+ "field": "T",
399
+ "value": 293.15, # Default to 20°C
400
+ },
401
+ ],
402
+ "regions": [
403
+ {
404
+ "name": "heatedRegion",
405
+ "type": "cellToCell",
406
+ "set": "heatedCells",
407
+ "fieldValues": [
408
+ {
409
+ "type": "volScalarFieldValue",
410
+ "field": "T",
411
+ "value": 373.15, # Set to 100°C
412
+ },
413
+ ],
414
+ },
415
+ {
416
+ "name": "cooledRegion",
417
+ "type": "cellToCell",
418
+ "set": "cooledCells",
419
+ "fieldValues": [
420
+ {
421
+ "type": "volScalarFieldValue",
422
+ "field": "T",
423
+ "value": 273.15, # Set to 0°C
424
+ },
425
+ ],
426
+ },
427
+ ],
428
+ },
429
+
430
+ "species_transport": {
431
+ "description": "Species transport simulation initialization",
432
+ "default_fields": [
433
+ {
434
+ "type": "volVectorFieldValue",
435
+ "field": "U",
436
+ "value": (0, 0, 0), # Default to zero velocity
437
+ },
438
+ {
439
+ "type": "volScalarFieldValue",
440
+ "field": "p",
441
+ "value": 0.0, # Default to zero pressure
442
+ },
443
+ {
444
+ "type": "volScalarFieldValue",
445
+ "field": "Y_CO2",
446
+ "value": 0.0, # Default CO2 mass fraction
447
+ },
448
+ {
449
+ "type": "volScalarFieldValue",
450
+ "field": "Y_O2",
451
+ "value": 0.23, # Default O2 mass fraction (air)
452
+ },
453
+ {
454
+ "type": "volScalarFieldValue",
455
+ "field": "Y_N2",
456
+ "value": 0.77, # Default N2 mass fraction (air)
457
+ },
458
+ ],
459
+ "regions": [
460
+ {
461
+ "name": "pollutantRegion",
462
+ "type": "cellToCell",
463
+ "set": "pollutantCells",
464
+ "fieldValues": [
465
+ {
466
+ "type": "volScalarFieldValue",
467
+ "field": "Y_CO2",
468
+ "value": 0.1, # Set CO2 mass fraction
469
+ },
470
+ ],
471
+ },
472
+ ],
473
+ },
474
+
475
+ "compressible_flow": {
476
+ "description": "Compressible flow simulation initialization",
477
+ "default_fields": [
478
+ {
479
+ "type": "volVectorFieldValue",
480
+ "field": "U",
481
+ "value": (0, 0, 0), # Default to zero velocity
482
+ },
483
+ {
484
+ "type": "volScalarFieldValue",
485
+ "field": "p",
486
+ "value": 101325.0, # Default to atmospheric pressure
487
+ },
488
+ {
489
+ "type": "volScalarFieldValue",
490
+ "field": "T",
491
+ "value": 293.15, # Default to 20°C
492
+ },
493
+ {
494
+ "type": "volScalarFieldValue",
495
+ "field": "rho",
496
+ "value": 1.225, # Default air density
497
+ },
498
+ ],
499
+ "regions": [
500
+ {
501
+ "name": "highPressureRegion",
502
+ "type": "cellToCell",
503
+ "set": "highPressureCells",
504
+ "fieldValues": [
505
+ {
506
+ "type": "volScalarFieldValue",
507
+ "field": "p",
508
+ "value": 200000.0, # Set high pressure
509
+ },
510
+ {
511
+ "type": "volScalarFieldValue",
512
+ "field": "T",
513
+ "value": 373.15, # Set high temperature
514
+ },
515
+ ],
516
+ },
517
+ ],
518
+ },
519
+
520
+ "free_surface": {
521
+ "description": "Free surface flow initialization",
522
+ "default_fields": [
523
+ {
524
+ "type": "volScalarFieldValue",
525
+ "field": "alpha.water",
526
+ "value": 0.0, # Default to air
527
+ },
528
+ {
529
+ "type": "volVectorFieldValue",
530
+ "field": "U",
531
+ "value": (0, 0, 0), # Default to zero velocity
532
+ },
533
+ {
534
+ "type": "volScalarFieldValue",
535
+ "field": "p",
536
+ "value": 0.0, # Default to zero pressure
537
+ },
538
+ ],
539
+ "regions": [
540
+ {
541
+ "name": "waterRegion",
542
+ "type": "cellToCell",
543
+ "set": "waterCells",
544
+ "fieldValues": [
545
+ {
546
+ "type": "volScalarFieldValue",
547
+ "field": "alpha.water",
548
+ "value": 1.0, # Set to water
549
+ },
550
+ ],
551
+ },
552
+ ],
553
+ },
554
+
555
+ "droplet_impact": {
556
+ "description": "Droplet impact simulation initialization",
557
+ "default_fields": [
558
+ {
559
+ "type": "volScalarFieldValue",
560
+ "field": "alpha.water",
561
+ "value": 0.0, # Default to air
562
+ },
563
+ {
564
+ "type": "volVectorFieldValue",
565
+ "field": "U",
566
+ "value": (0, 0, 0), # Default to zero velocity
567
+ },
568
+ {
569
+ "type": "volScalarFieldValue",
570
+ "field": "p",
571
+ "value": 0.0, # Default to zero pressure
572
+ },
573
+ ],
574
+ "regions": [
575
+ {
576
+ "name": "dropletRegion",
577
+ "type": "cellToCell",
578
+ "set": "dropletCells",
579
+ "fieldValues": [
580
+ {
581
+ "type": "volScalarFieldValue",
582
+ "field": "alpha.water",
583
+ "value": 1.0, # Set to water
584
+ },
585
+ {
586
+ "type": "volVectorFieldValue",
587
+ "field": "U",
588
+ "value": (0, 0, -5.0), # Set falling velocity
589
+ },
590
+ ],
591
+ },
592
+ ],
593
+ },
594
+
595
+ "dam_break": {
596
+ "description": "Dam break simulation initialization",
597
+ "default_fields": [
598
+ {
599
+ "type": "volScalarFieldValue",
600
+ "field": "alpha.water",
601
+ "value": 0.0, # Default to air
602
+ },
603
+ {
604
+ "type": "volVectorFieldValue",
605
+ "field": "U",
606
+ "value": (0, 0, 0), # Default to zero velocity
607
+ },
608
+ {
609
+ "type": "volScalarFieldValue",
610
+ "field": "p",
611
+ "value": 0.0, # Default to zero pressure
612
+ },
613
+ ],
614
+ "regions": [
615
+ {
616
+ "name": "waterRegion",
617
+ "type": "cellToCell",
618
+ "set": "waterCells",
619
+ "fieldValues": [
620
+ {
621
+ "type": "volScalarFieldValue",
622
+ "field": "alpha.water",
623
+ "value": 1.0, # Set to water
624
+ },
625
+ ],
626
+ },
627
+ ],
628
+ },
629
+ }
630
+
631
+ # =============================================================================
632
+ # *** Configuration Selection ***
633
+ # =============================================================================
634
+ # Select which predefined field set to use (overrides manual settings above)
635
+
636
+ USE_PREDEFINED_FIELD_SET = None # Set to field set name from PREDEFINED_FIELD_SETS or None for manual config
637
+
638
+ # Example usage:
639
+ # USE_PREDEFINED_FIELD_SET = "multiphase_vof" # Will use VOF field initialization
640
+ # USE_PREDEFINED_FIELD_SET = "turbulent_flow" # Will use turbulent flow initialization