-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcase.html
More file actions
1797 lines (1795 loc) · 228 KB
/
Copy pathcase.html
File metadata and controls
1797 lines (1795 loc) · 228 KB
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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!-- HTML header for doxygen 1.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SY496B9L99"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-SY496B9L99');
</script>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.16.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MFC: Case Files</title>
<meta name="description" content="Case Files — MFC documentation. Open-source exascale multiphase flow solver." />
<meta name="keywords" content="exascale, fluid dynamics, cfd, computational fluid dynamics, compressible, hpc, bryngelson, colonius, subgrid, multiphase, frontier, summit, el capitan, aurora, amd gpu, gpu, nvidia"/>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
// This file is set as MATHJAX_CODEFILE in the Doxyfile. It configures how
// MathJax renders expressions in Markdown so that it is consistent with GitHub.
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX", "output/HTML-CSS"],
tex2jax: {
inlineMath: [ ['$', '$'], ["\\(","\\)"] ],
displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
processEscapes: true,
ignoreClass: "line" // Ignore code blocks: https://web.archive.org/web/20120430100225/http://www.mathjax.org/docs/1.1/options/tex2jax.html
},
"HTML-CSS": {
fonts: ["TeX"]
}
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="icon.ico" type="image/x-icon" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="icon.ico"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MFC
</div>
<div id="projectbrief">Exascale flow solver</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- Cross-navigation injected into sidebar via script below -->
<script>
document.addEventListener('DOMContentLoaded', function() {
var nav = document.createElement('div');
nav.id = 'mfc-nav';
var items = [
['../documentation/index.html', 'documentation', 'User Guide'],
['../api/index.html', 'api', 'API Documentation']
];
var path = window.location.pathname;
var apiPaths = ['/api/', '/pre_process/', '/simulation/', '/post_process/'];
for (var i = 0; i < items.length; i++) {
var a = document.createElement('a');
a.href = items[i][0];
a.textContent = items[i][2];
if (items[i][1] === 'api') {
for (var j = 0; j < apiPaths.length; j++) {
if (path.indexOf(apiPaths[j]) !== -1) { a.className = 'active'; break; }
}
} else {
if (path.indexOf('/' + items[i][1] + '/') !== -1) a.className = 'active';
}
nav.appendChild(a);
}
var sideNav = document.getElementById('side-nav');
if (sideNav) sideNav.insertBefore(nav, sideNav.firstChild);
});
</script>
<!-- end header part -->
<!-- Generated by Doxygen 1.16.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search',true);
$(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(function(){initNavTree('case.html','',''); });
</script>
<div id="container">
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div><div class="header">
<div class="headertitle"><div class="title">Case Files </div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h1 class="doxsection"><a class="anchor" id="autotoc_md15"></a>
Case Files</h1>
<p>Example Python case files, also referred to as <em>input files</em>, can be found in the <a href="https://github.com/MFlowCode/MFC/tree/master/examples">examples/</a> directory. They print a Python dictionary containing input parameters for MFC. Their contents, and a guide to filling them out, are documented in the user manual. A commented, tutorial script can also be found in <a href="https://github.com/MFlowCode/MFC/blob/master/examples/3D_sphbubcollapse/case.py">examples/3d_sphbubcollapse/</a>.</p>
<h2 class="doxsection"><a class="anchor" id="autotoc_md16"></a>
Basic Skeleton</h2>
<p>The skeleton for an input file may look like the following:</p>
<div class="fragment"><div class="line"><span class="comment">#!/usr/bin/env python3</span></div>
<div class="line"> </div>
<div class="line"><span class="keyword">import</span> json</div>
<div class="line"> </div>
<div class="line"><span class="comment"># Configuring case dictionary</span></div>
<div class="line">print(json.dumps({</div>
<div class="line"> <span class="comment"># Insert case parameters here</span></div>
<div class="line"> ...</div>
<div class="line">}))</div>
</div><!-- fragment --><p>Thus, you can run your case file with Python to view the computed case dictionary that will be processed by MFC when you run:</p>
<div class="fragment"><div class="line">python3 my_case_file.py</div>
</div><!-- fragment --><p>This is particularly useful when computations are done in Python to generate the case.</p>
<h2 class="doxsection"><a class="anchor" id="autotoc_md17"></a>
(Optional) Accepting command line arguments</h2>
<p>Input files can accept command line arguments, forwarded by <span class="tt">mfc.sh run</span>. Consider this example from the <span class="tt">scaling</span> case:</p>
<div class="fragment"><div class="line"><span class="keyword">import</span> json, argparse</div>
<div class="line"> </div>
<div class="line">parser = argparse.ArgumentParser(</div>
<div class="line"> prog=<span class="stringliteral">"scaling"</span>,</div>
<div class="line"> description=<span class="stringliteral">"Weak- and strong-scaling benchmark case."</span>,</div>
<div class="line"> formatter_class=argparse.ArgumentDefaultsHelpFormatter)</div>
<div class="line"> </div>
<div class="line">parser.add_argument(<span class="stringliteral">"--mfc"</span>, type=json.loads, default=<span class="stringliteral">'{}'</span>, metavar=<span class="stringliteral">"DICT"</span>,</div>
<div class="line"> help=<span class="stringliteral">"MFC's toolchain's internal state."</span>)</div>
<div class="line">parser.add_argument(<span class="stringliteral">"-s"</span>, <span class="stringliteral">"--scaling"</span>, type=str, metavar=<span class="stringliteral">"SCALING"</span>, choices=[<span class="stringliteral">"weak"</span>, <span class="stringliteral">"strong"</span>],</div>
<div class="line"> help=<span class="stringliteral">"Whether weak- or strong-scaling is being exercised."</span>)</div>
<div class="line"> </div>
<div class="line"><span class="comment"># Your parsed arguments are here</span></div>
<div class="line">args = parser.parse_args()</div>
</div><!-- fragment --><p>The <span class="tt">--mfc</span> argument is a JSON string representing <span class="tt">mfc.sh run</span>'s internal state, passed in when MFC runs your input file. It contains all the runtime information you might want from the build/run system. You can add as many additional arguments and options as you may need.</p>
<p>To run such a case, use the following format:</p>
<div class="fragment"><div class="line">./mfc.sh run <path/to/case.py> <mfc.sh run arguments> -- <case arguments></div>
</div><!-- fragment --><p>For example, to run the <span class="tt">scaling</span> case in "weak-scaling" mode:</p>
<div class="fragment"><div class="line">./mfc.sh run examples/scaling/benchmark.py -t pre_process -j 8 -- --scaling weak</div>
</div><!-- fragment --><h2 class="doxsection"><a class="anchor" id="autotoc_md18"></a>
Parameters</h2>
<h2 class="doxsection"><a class="anchor" id="autotoc_md19"></a>
Feature Compatibility</h2>
<p>Before diving into parameter details, check the <b><a class="el" href="case_constraints.html" title="Case Creator Guide">Feature Compatibility Guide</a></b> to understand:</p><ul>
<li>Which features work together (MHD, bubbles, phase change, etc.)</li>
<li>Common configuration patterns with copy-paste examples</li>
<li>Requirements for each model equation and Riemann solver</li>
</ul>
<p><b>Parameter Lookup:</b></p><ul>
<li>CLI search: <span class="tt">./mfc.sh params <query></span> - Search ~3,300 parameters from the command line</li>
<li>Full reference: <b><a class="el" href="parameters.html" title="Case Parameters">Case Parameters</a></b> - Complete parameter documentation</li>
</ul>
<p>There are multiple sets of parameters that must be specified in the python input file:</p><ol type="1">
<li><a class="el" href="#sec-runtime" title="1. Runtime">Runtime Parameters</a></li>
<li><a class="el" href="#sec-computational-domain" title="2. Computational Domain">Computational Domain Parameters</a></li>
<li><a class="el" href="#sec-patches" title="3. Patches">Patch Parameters</a></li>
<li><a class="el" href="#sec-immersed-boundary-patches" title="4. Immersed Boundary Patches">Immersed Boundary Patches</a></li>
<li><a class="el" href="#sec-fluid-materials" title="5. Fluid Material's">Fluid Material's Parameters</a></li>
<li><a class="el" href="#sec-simulation-algorithm" title="6. Simulation Algorithm">Simulation Algorithm Parameters</a></li>
<li><a class="el" href="#sec-formatted-output" title="7. Formatted Output">Formatted Database and Structure Parameters</a></li>
<li><a class="el" href="#sec-acoustic-source" title="8. Acoustic Source">(Optional) Acoustic Source Parameters</a></li>
<li><a class="el" href="#sec-bubble-models" title="9. Sub-grid Bubble Models">(Optional) Ensemble-Averaged Bubble Model Parameters</a></li>
<li><a class="el" href="#sec-velocity-field-setup" title="10. Velocity Field Setup">(Optional) Velocity Field Setup Parameters</a></li>
<li><a class="el" href="#sec-phase-change" title="11. Phase Change Model">(Optional) Phase Change Parameters</a></li>
<li><a class="el" href="#sec-artificial-mach-number" title="12. Artificial Mach Number">(Optional) Artificial Mach Number Parameters</a></li>
</ol>
<p>Items 8, 9, 10, 11 and 12 are optional sets of parameters that activate the acoustic source model, ensemble-averaged bubble model, initial velocity field setup, phase change, artificial Mach number respectively. Definition of the parameters is described in the following subsections.</p>
<p>Enumerated parameters accept named values as well as integer codes: <span class="tt">"riemann_solver": "hllc"</span> is equivalent to <span class="tt">"riemann_solver": 2</span>. Defined names appear in each parameter's table entry (e.g. <span class="tt">1</span> (<span class="tt">hll</span>), <span class="tt">2</span> (<span class="tt">hllc</span>)). Existing case files can be rewritten to named syntax with <span class="tt">./mfc.sh validate case.py --migrate</span>.</p>
<h3 class="doxsection"><a class="anchor" id="sec-runtime"></a>
1. Runtime</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">run_time_info</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Output run-time information </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">rdma_mpi</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">(GPUs) Enable RDMA for MPI communication. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">case_dir</span> </td><td class="markdownTableBodyCenter">String </td><td class="markdownTableBodyLeft">Case directory path </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">old_grid</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Use grid from previous simulation </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">old_ic</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Use initial conditions from previous simulation </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">t_step_old</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Time step to restart from </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">n_start_old</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Starting index from previous simulation </td></tr>
</table>
<ul>
<li><span class="tt">run_time_info</span> generates a text file that includes run-time information including the CFL number(s) at each time-step.</li>
<li><span class="tt">rdma_mpi</span> optimizes data transfers between GPUs using Remote Direct Memory Access (RDMA). The underlying MPI implementation and communication infrastructure must support this feature, detecting GPU pointers and performing RDMA accordingly.</li>
</ul>
<h3 class="doxsection"><a class="anchor" id="sec-computational-domain"></a>
2. Computational Domain</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">x[y,z]_domain%beg[end]</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Beginning [ending] of the $x$[y,z]-direction domain </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">stretch_x[y,z]</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Stretching of the mesh in the $x$[y,z]-direction </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">a_x[y,z]</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Rate at which the grid is stretched in the $x$[y,z]-direction </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">x[y,z]_a</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Beginning of the stretching in the negative $x$[y,z]-direction </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">x[y,z]_b</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Beginning of the stretching in the positive $x$[y,z]-direction </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">loops_x[y,z]</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of times to recursively apply grid stretching </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">cyl_coord</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Cylindrical coordinates (2D: Axisymmetric, 3D: Cylindrical) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">m</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of grid cells in the $x$-coordinate direction </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">n</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of grid cells in the $y$-coordinate direction </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">p</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of grid cells in the $z$-coordinate direction </td></tr>
</table>
<p>The parameters define the boundaries of the spatial and temporal domains, and their discretization that are used in simulation.</p>
<ul>
<li><p class="startli"><span class="tt">[x,y,z]_domain%[beg,end]</span> define the spatial domain in $x$, $y$, and $z$ Cartesian coordinates:</p>
<p class="formulaDsp">
\[ x \in \left[ x\_domain\%beg, \; x\_domain\%end \right], \quad y \in \left[ y\_domain\%beg, \; y\_domain\%end \right], \quad z \in \left[ z\_domain\%beg, \; z\_domain\%end \right] \]
</p>
</li>
<li>$m$, $n$, and $p$ define the number of finite volume cells that uniformly discretize the domain along the $x$, $y$, and $z$ axes, respectively. Note that the actual number of cells in each coordinate axis is given as $[m,n,p]+1$. For example, $m=n=p=499$ discretizes the domain into $500^3$ cells. When the simulation is 2D/axi-symmetric or 1D, it requires that $p=0$ or $p=n=0$, respectively.</li>
<li><span class="tt">stretch_[x,y,z]</span> activates grid stretching in the $[x,y,z]$ directions. The grid is gradually stretched such that the domain boundaries are pushed away from the origin along a specified axis.</li>
<li><p class="startli"><span class="tt">a_[x,y,z]</span>, <span class="tt">[x,y,z]_a</span>, and <span class="tt">[x,y,z]_b</span> are parameters that define the grid stretching function. When grid stretching along the $x$ axis is considered, the stretching function is given as:</p>
<p class="formulaDsp">
\[ x_{cb,stretch} = x_{cb} + \frac{x_{cb}}{a_x} \Bigg[ \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_{cb}-x_a)}{L} \right) \right] + \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_{cb}-x_b)}{L} \right) \right] -2 \mathrm{log}\left[\mathrm{cosh} \left( \frac{a_x(x_b-x_a)}{2L} \right) \right] \Bigg] \]
</p>
</li>
</ul>
<p>where <span class="tt">x_cb</span> and <span class="tt">x_[cb,stretch]</span> are the coordinates of a cell boundary at the original and stretched domains, respectively. <span class="tt">L</span> is the domain length along the <span class="tt">x</span> axis: <span class="tt">L</span>=<span class="tt">x_domain%end</span>-<span class="tt">x_domain%beg</span>. Crudely speaking, <span class="tt">x_a</span> and <span class="tt">x_b</span> define the coordinates at which the grid begins to get stretched in the negative and positive directions along the $x$ axis, respectively. $a_x$ defines the smoothness of the stretching. Stretching along the $y$ and $z$ axes follows the same logistics. Optimal choice of the parameters for grid stretching is case-dependent and left to the user. <span class="tt">loops_x[y,z]</span> defines the number of times the grid stretching function is applied and has a default value of one.</p>
<ul>
<li><span class="tt">cyl_coord</span> activates cylindrical coordinates. The domain is defined in $x$-$y$-$z$ cylindrical coordinates, instead of Cartesian coordinates. Domain discretization is accordingly conducted along the axes of cylindrical coordinates. When $p=0$, the domain is defined on $x$-$y$ axi-symmetric coordinates. In both Coordinates, mesh stretching can be defined along the $x$- and $y$-axes. MPI topology is automatically optimized to maximize the parallel efficiency for given choice of coordinate systems.</li>
</ul>
<h3 class="doxsection"><a class="anchor" id="sec-patches"></a>
3. Patches</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadCenter">Analytical Definition </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">num_patches</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Number of initial condition geometric patches. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">num_fluids</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Number of fluids/components present in the flow. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">geometry</span> * </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Geometry configuration of the patch. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">alter_patch(i)</span> * </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Alter the $i$-th patch. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">x[y,z]_centroid</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Centroid of the applied geometry in the $[x,y,z]$-direction. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">length_x[y,z]</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Length, if applicable, in the $[x,y,z]$-direction. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">radius</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Radius, if applicable, of the applied geometry. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">smoothen</span> * </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Smoothen the applied patch. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">smooth_patch_id</span> * </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">A patch with which the applied patch is smoothened. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">smooth_coeff</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Smoothen coefficient. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">alpha(i)</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Supported </td><td class="markdownTableBodyLeft">Volume fraction of fluid $i$. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">alpha_rho(i)</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Supported </td><td class="markdownTableBodyLeft">Partial density of fluid $i$. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">pres</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Supported </td><td class="markdownTableBodyLeft">Pressure. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">vel(i)</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Supported </td><td class="markdownTableBodyLeft">Velocity in direction $i$. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">tau_e(i)</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Supported </td><td class="markdownTableBodyLeft">Elastic stresses. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">hcid</span> * </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyCenter">N/A </td><td class="markdownTableBodyLeft">Hard coded patch id </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">cf_val</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyCenter">Supported </td><td class="markdownTableBodyLeft">Surface tension color function value </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">model_id</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyCenter">Not Supported </td><td class="markdownTableBodyLeft">Index into the <span class="tt">stl_models</span> array (geometry 21) </td></tr>
</table>
<p>*: These parameters should be prepended with <span class="tt">patch_icpp(j)%</span> where $j$ is the patch index.</p>
<p>The Table lists the patch parameters. The parameters define the geometries and physical parameters of fluid components (patch) in the domain at initial condition. Note that the domain must be fully filled with patches. The code outputs error messages when an empty region is left in the domain.</p>
<ul>
<li><span class="tt">tau_e(i)</span> is the <span class="tt">i</span>-th component of the elastic stress tensor, ordered as <span class="tt">tau_xx</span>, <span class="tt">tau_xy</span>, <span class="tt">tau_yy</span>, <span class="tt">tau_xz</span>, <span class="tt">tau_yz</span>, and <span class="tt">tau_zz</span>. 1D simulation requires <span class="tt">tau(1)</span>, 2D <span class="tt">tau(1:3)</span>, and 3D <span class="tt">tau(1:6)</span>.</li>
</ul>
<h4 class="doxsection"><a class="anchor" id="autotoc_md20"></a>
Analytical Definition of Primitive Variables</h4>
<p>Some parameters, as described above, can be defined by analytical functions in the input file. For example, one can define the following patch:</p>
<div class="fragment"><div class="line">'patch_icpp(2)%geometry' : 1,</div>
<div class="line">'patch_icpp(2)%x_centroid' : 0.25,</div>
<div class="line">'patch_icpp(2)%length_x' : 9.5,</div>
<div class="line">'patch_icpp(2)%vel(1)' : 0.,</div>
<div class="line">'patch_icpp(2)%pres' : 1.,</div>
<div class="line">'patch_icpp(2)%alpha_rho(1)': '1 + 0.1*sin(20*x*pi)',</div>
<div class="line">'patch_icpp(2)%alpha(1)' : 1.,</div>
</div><!-- fragment --><p>where <span class="tt">alpha_rho</span> is defined with the <span class="tt">1 + 0.1*sin(20*x*pi)</span> function.</p>
<p>Expressions use <b>Python syntax</b> and are parsed at case load time. Syntax errors and unknown variable or function names are immediate, named errors — they are reported before any Fortran is compiled, with a message identifying the offending expression and listing the available names.</p>
<p>The following variables are available in IC patch expressions:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Shorthand </th><th class="markdownTableHeadNone">Expands To </th><th class="markdownTableHeadNone">Shorthand </th><th class="markdownTableHeadNone">Expands To </th><th class="markdownTableHeadNone">Shorthand </th><th class="markdownTableHeadNone">Expands To </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><span class="tt">x</span> </td><td class="markdownTableBodyNone"><span class="tt">x_cc(i)</span> </td><td class="markdownTableBodyNone"><span class="tt">lx</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">length_x</span> </td><td class="markdownTableBodyNone"><span class="tt">xc</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">x_centroid</span> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><span class="tt">y</span> </td><td class="markdownTableBodyNone"><span class="tt">y_cc(j)</span> </td><td class="markdownTableBodyNone"><span class="tt">ly</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">length_y</span> </td><td class="markdownTableBodyNone"><span class="tt">yc</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">y_centroid</span> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><span class="tt">z</span> </td><td class="markdownTableBodyNone"><span class="tt">z_cc(k)</span> </td><td class="markdownTableBodyNone"><span class="tt">lz</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">length_z</span> </td><td class="markdownTableBodyNone"><span class="tt">zc</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">z_centroid</span> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><span class="tt">eps</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">epsilon</span> </td><td class="markdownTableBodyNone"><span class="tt">beta</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">beta</span> </td><td class="markdownTableBodyNone"><span class="tt">radii</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">radii</span> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><span class="tt">tau_e</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">tau_e</span> </td><td class="markdownTableBodyNone"><span class="tt">r</span> </td><td class="markdownTableBodyNone">The patch's <span class="tt">radius</span> </td><td class="markdownTableBodyNone"><span class="tt">pi</span> </td><td class="markdownTableBodyNone">\(\pi\) (Fortran constant from <span class="tt">m_constants</span>) </td></tr>
</table>
<p>where $(i,j,k)$ are the grid-indices of the current cell in each coordinate direction.</p>
<p>The allowed functions are the standard Fortran intrinsics: <span class="tt">sin</span>, <span class="tt">cos</span>, <span class="tt">tan</span>, <span class="tt">asin</span>, <span class="tt">acos</span>, <span class="tt">atan</span>, <span class="tt">atan2</span>, <span class="tt">sinh</span>, <span class="tt">cosh</span>, <span class="tt">tanh</span>, <span class="tt">exp</span>, <span class="tt">log</span>, <span class="tt">log10</span>, <span class="tt">sqrt</span>, <span class="tt">abs</span>, <span class="tt">min</span>, <span class="tt">max</span>, <span class="tt">mod</span>, <span class="tt">sign</span>.</p>
<p><b>Euler's number:</b> bare <span class="tt">e</span> is <b>not</b> a variable. Write <span class="tt">exp(1.0)</span> or a numeric literal instead (e.g. <span class="tt">2.718281828</span>).</p>
<p>In the example above, the following code is generated:</p>
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (patch_id == 2) <span class="keywordflow">then</span></div>
<div class="line"> q_prim_vf(eqn_idx%cont%beg)%sf(i, 0, 0) = 1 + 0.1 * sin(20 * x_cc(i) * pi)</div>
<div class="line"><span class="keyword">end </span>if</div>
</div><!-- fragment --><h4 class="doxsection"><a class="anchor" id="autotoc_md21"></a>
Hard Coded Patches</h4>
<p>Some patch configurations are not adequately handled with the above analytic variable definitions. In this case, a hard coded patch can be used. Hard coded patches can be added by adding additional hard coded patch identifiers to <span class="tt">src/common/include/1[2,3]dHardcodedIC.fpp</span>. When using a hard coded patch, the <span class="tt">patch_icpp(patch_id)%hcid</span> must be set to the hard-coded patch id. For example, to add a 2D Hardcoded patch with an id of 200, one would add the following to <span class="tt">src/common/include/2dHardcodedIC.fpp</span></p>
<div class="fragment"><div class="line"><span class="comment">case(200)</span></div>
<div class="line"> ! primitive variables assignment</div>
</div><!-- fragment --><p>and use <span class="tt">patch_icpp(i)%hcid = 200</span> in the input file. Additional variables can be declared in <span class="tt">Hardcoded1[2,3]DVariables</span> and used in <span class="tt">hardcoded1[2,3]D</span>. As a convention, any hard coded patches that are part of the MFC master branch should be identified as 1[2,3]xx where the first digit indicates the number of dimensions.</p>
<p>The code provides three pre-built patches for dimensional extrusion of initial conditions:</p>
<ul>
<li><span class="tt">case(170)</span>: Load 1D profile from data files</li>
<li><span class="tt">case(270)</span>: Extrude 1D data to 2D domain</li>
<li><span class="tt">case(370)</span>: Extrude 2D data to 3D domain</li>
<li><span class="tt">case(273)</span>: Extrude 1D data to 2D domain, with the mom%beg data column carrying the extruded-axis (mom%end) velocity profile instead of its own (zeroed) component. Used by <span class="tt">examples/2D_reacting_mixing_layer</span> to give a temporally-evolving mixing layer a nonzero streamwise velocity profile along the extruded axis, which <span class="tt">case(270)</span> cannot represent since it always zeros that component.</li>
<li><span class="tt">case(274)</span>: Load a full 2D <span class="tt">(x, y)</span> field with no extrusion – one data file per variable, <span class="tt">(m_glb+1)*(n_glb+1)</span> lines each in x-major order, covering all primitive variables directly (unlike <span class="tt">case(270)</span>/<span class="tt">case(273)</span>, no component is zeroed or repurposed). Used by <span class="tt">examples/2D_spatial_reacting_mixing_layer</span> for a spatially-evolving mixing layer, where the cross-stream profile must vary with the streamwise coordinate too (via the <span class="tt">bf_spatial_support</span> body force) so no single extrusion axis applies. The file's line count, origin, and (uniform) cell spacing must match the run grid; a mismatched file is rejected with a fatal error, so regenerate the IC whenever the grid changes.</li>
</ul>
<p>Setup: Only requires specifying <span class="tt">files_dir</span> and filename pattern via <span class="tt">file_extension</span>. The files are located, for example, at <span class="tt">examples/1D_flamelet/IC</span>, and their format is <span class="tt">prim.XX.YY.file_extension.dat</span>. Implementation: All variables and file handling are managed in the <span class="tt">case.py</span> file of the simulation. Usage: Ideal for initializing simulations from lower-dimensional solutions, enabling users to add perturbations or modifications to the base extruded fields for flow instability studies.</p>
<p>The following parameters support hardcoded initial conditions that read interface data from files:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">interface_file</span> </td><td class="markdownTableBodyCenter">String </td><td class="markdownTableBodyLeft">Path to interface geometry data file </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">normFac</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Interface normalization factor </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">normMag</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Interface normal magnitude </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">g0_ic</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Gravitational acceleration for the interfacial IC pressure field </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">p0_ic</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Reference pressure at the interface </td></tr>
</table>
<p>These parameters are only read by the file-based hardcoded-IC patches (<span class="tt">hcid = 304</span> and <span class="tt">305</span> in <span class="tt">src/common/include/3dHardcodedIC.fpp</span>); they are ignored otherwise.</p>
<ul>
<li><span class="tt">interface_file</span> gives the path to a text file that supplies the interface-position field \(h(i,j)\) used to place the material interface. The run aborts if the file is not found.</li>
<li><span class="tt">normMag</span> and <span class="tt">normFac</span> rescale and offset the raw interface data, \(h \leftarrow \texttt{normMag}\,h + \texttt{normFac}\). Each is applied only when set (defaults leave the data unchanged).</li>
<li><span class="tt">p0_ic</span> and <span class="tt">g0_ic</span> set the initial (hydrostatic) pressure field about the interface, \(p = p_{0} + \rho\, g_{0}\,\big(h - x\big)\), where \(x\) is the coordinate normal to the interface.</li>
</ul>
<h4 class="doxsection"><a class="anchor" id="autotoc_md22"></a>
Parameter Descriptions</h4>
<ul>
<li><span class="tt">num_patches</span> defines the total number of patches defined in the domain. The number has to be a positive integer.</li>
<li><span class="tt">num_fluids</span> defines the total number of fluids defined in each of the patches. The number has to be a positive integer.</li>
<li><span class="tt">patch_icpp(j)%geometry</span> defines the type of geometry of $j$-th patch by using an integer from 1 to 21. Definition of the patch type for each integer is listed in table <a class="el" href="#patch-types" title="Patch types">Patch Types</a>.</li>
<li><span class="tt">[x,y,z]_centroid</span>, <span class="tt">length_[x,y,z]</span>, and/or <span class="tt">radius</span> are used to uniquely define the geometry of the patch with given type. Requisite combinations of the parameters for each type are listed in table <a class="el" href="#patch-types" title="Patch types">Patch types</a>.</li>
<li><span class="tt">patch_icpp(j)%alter_patch(i)</span> activates alternation of <span class="tt">patch(i)</span> with <span class="tt">patch(j)</span>. For instance, in a 2D simulation, when a cylindrical <span class="tt">patch(2)</span> is immersed in a rectangular <span class="tt">patch(1)</span>:<ul>
<li><span class="tt">patch_icpp(1)%geometry = 3</span></li>
<li><span class="tt">patch_icpp(2)%geometry = 2</span></li>
<li><span class="tt">patch_icpp(2)%alter_patch(1) = 'T'</span></li>
</ul>
</li>
<li><span class="tt">smoothen</span> activates smoothening of the boundary of the patch that alters the existing patch. When smoothening occurs, fluids of the two patches are mixed in the region of the boundary. For instance, in the aforementioned case of the cylindrical patch immersed in the rectangular patch, smoothening occurs when <span class="tt">patch_icpp(2)%smoothen = 'T'</span>. <span class="tt">smooth_coeff</span> controls the thickness of the region of smoothening (sharpness of the mixture region). The default value of <span class="tt">smooth_coeff</span> is unity. The region of smoothening is thickened with decreasing the value. Optimal choice of the value of <span class="tt">smooth_coeff</span> is case-dependent and left to the user.</li>
<li><span class="tt">patch_icpp(j)%alpha(i)</span>, <span class="tt">patch_icpp(j)%alpha_rho(i)</span>, <span class="tt">patch_icpp(j)%pres</span>, and <span class="tt">patch_icpp(j)%vel(i)</span> define for $j$-th patch the void fraction of <span class="tt">fluid(i)</span>, partial density of <span class="tt">fluid(i)</span>, the pressure, and the velocity in the $i$-th coordinate direction. These physical parameters must be consistent with fluid material's parameters defined in the next subsection.</li>
<li><span class="tt">model_id</span> selects the STL/OBJ model for a geometry-21 patch by indexing into the <span class="tt">stl_models</span> array. The model file, scaling, and translation, and the inside/outside threshold, are configured on that <span class="tt">stl_models</span> entry (see the <span class="tt">stl_models</span> section below); a cell is marked inside the model using a winding-number test.</li>
</ul>
<h4 class="doxsection"><a class="anchor" id="autotoc_md23"></a>
Elliptic Smoothing</h4>
<p>Initial conditions in which not all patches support the <span class="tt">patch_icpp(j)%smoothen</span> parameter can still be smoothed by applying iterations of the heat equation to the initial condition. This is enabled by adding <span class="tt">'elliptic_smoothing': "T",</span> and <span class="tt">'elliptic_smoothing_iters': N,</span> to the case dictionary, where <span class="tt">N</span> is the number of smoothing iterations to apply.</p>
<h3 class="doxsection"><a class="anchor" id="sec-immersed-boundary-patches"></a>
4. Immersed Boundary Patches</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">num_ibs</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of immersed boundary patches </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">num_stl_models</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of STL/OBJ model entries in the <span class="tt">stl_models</span> array </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">num_particle_clouds</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of particle bed specifications to generate immersed boundary patches from </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">ib_neighborhood_radius</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Parameter that controls the neighborhood size for IB detection. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">many_ib_patch_parallelism</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Parallelize over IB patches instead of grid cells (better for many small patches). </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">geometry</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Geometry configuration of the patch. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">x[y,z]_centroid</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Centroid of the applied geometry in the [x,y,z]-direction. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">length_x[y,z]</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Length, if applicable, in the [x,y,z]-direction. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">radius</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Radius, if applicable, of the applied geometry. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">airfoil_id</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Index into <span class="tt">ib_airfoil</span> array for NACA airfoil geometry patches. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">model_id</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Index into <span class="tt">stl_models</span> array for STL/OBJ geometry patches. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">slip</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Apply a slip boundary </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">moving_ibm</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Sets the method used for IB movement. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">vel(i)</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Initial velocity of the moving IB in the i-th direction. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">angular_vel(i)</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Initial angular velocity of the moving IB in the i-th direction. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">coefficient_of_restitution</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">A number 0 to 1 describing how elastic IB collisions are </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">collision_model</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Integer to select the collision model being used for IB collisions. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">collision_time</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Amount of simulation time used to resolve collisions </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">ib_coefficient_of_friction</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Coefficient of friction used in IB collisions </td></tr>
</table>
<p>These parameters should be prepended with <span class="tt">patch_ib(j)%</span> where $j$ is the patch index.</p>
<p>STL/OBJ model geometry parameters are set on the <span class="tt">stl_models</span> array (indexed by <span class="tt">model_id</span>):</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadLeft">Parameter </th><th class="markdownTableHeadLeft">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><span class="tt">model_filepath</span> </td><td class="markdownTableBodyLeft">String </td><td class="markdownTableBodyLeft">Path to an STL or OBJ file (not all OBJs are supported). </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><span class="tt">model_scale(i)</span> </td><td class="markdownTableBodyLeft">Real </td><td class="markdownTableBodyLeft">Model's scaling factor for component $i$. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyLeft"><span class="tt">model_translate(i)</span> </td><td class="markdownTableBodyLeft">Real </td><td class="markdownTableBodyLeft">Model's $i$-th component of translation. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyLeft"><span class="tt">model_threshold</span> </td><td class="markdownTableBodyLeft">Real </td><td class="markdownTableBodyLeft">Winding number threshold above which a cell is marked as inside the model. </td></tr>
</table>
<p>These parameters should be prepended with <span class="tt">stl_models(k)%</span> where $k$ is the model index.</p>
<h4 class="doxsection"><a class="anchor" id="autotoc_md24"></a>
Parameter Descriptions</h4>
<ul>
<li><span class="tt">geometry</span> defines the type of geometry of an immersed boundary patch with an integer number. Definitions for currently implemented immersed boundary patch types are listed in table <a class="el" href="#immersed-boundary-patch-types" title="Immersed Boundary Patch Types">Immersed Boundary Patch Type</a>.</li>
<li><span class="tt">x[y,z]_centroid</span> is the centroid location of the patch in the x[y,z]-direction</li>
<li><span class="tt">length_x[y,z]</span> is the length of the patch in the x[y,z]-direction.</li>
<li><span class="tt">radius</span> is the radius to be used for circular patches.</li>
<li><span class="tt">c</span>, <span class="tt">t</span>, <span class="tt">p</span>, and <span class="tt">m</span> specify the parameters for a NACA airfoil (set on the referenced <span class="tt">ib_airfoil</span> entry). <span class="tt">m</span> is the maximum camber, <span class="tt">p</span> is the location of maximum camber, <span class="tt">c</span> is the chord length, and <span class="tt">t</span> is the thickness. Additional details on this specification can be found in <a href="https://en.wikipedia.org/wiki/NACA_airfoil">NACA airfoil</a>.</li>
<li><span class="tt">slip</span> applies a slip boundary to the surface of the patch if true and a no-slip boundary condition to the surface if false.</li>
<li>For STL/OBJ geometry (geometry 5 or 12), set <span class="tt">model_id</span> to index into the <span class="tt">stl_models</span> array and specify <span class="tt">model_filepath</span>, <span class="tt">model_scale</span>, <span class="tt">model_translate</span>, and <span class="tt">model_threshold</span> on that entry.</li>
<li><span class="tt">moving_ibm</span> sets the method by which movement will be applied to the immersed boundary. Using 0 will result in no movement. Using 1 will result 1-way coupling where the boundary moves at a constant rate and applied forces to the fluid based upon its own motion. In 1-way coupling, the fluid does not apply forces back onto the IB. Using 2 will result in 2-way coupling, where the boundary pushes on the fluid and the fluid pushes back on the boundary via pressure and viscous forces. If external forces are applied, the boundary will also experience those forces.</li>
<li><span class="tt">vel(i)</span> is the initial linear velocity of the IB in the x, y, z direction for i=1, 2, 3. When <span class="tt">moving_ibm</span> equals 2, this velocity is just the starting speed of the object, which will then accelerate due to external forces. If <span class="tt">moving_ibm</span> equals 1, then this is constant if it is a number, or can be described analytically with an expression.</li>
<li><p class="startli"><span class="tt">angular_vel(i)</span> is the initial angular velocity of the IB about the x, y, z axes for i=1, 2, 3 in radians per second. When <span class="tt">moving_ibm</span> equals 2, this rotation rate is just the starting rate of the object, which will then change due to external torques. If <span class="tt">moving_ibm</span> equals 1, then this is constant if it is a number, or can be described analytically with an expression.</p>
<p class="startli">Moving-IB analytic expressions use the same Python syntax and error-reporting as IC patch expressions (see the "Analytical Definition of Primitive Variables" section above). Available variables: <span class="tt">x</span> (<span class="tt">x_cc(i)</span>), <span class="tt">y</span> (<span class="tt">y_cc(j)</span>), <span class="tt">z</span> (<span class="tt">z_cc(k)</span>), <span class="tt">t</span> (current simulation time), and <span class="tt">r</span> (the IB patch radius). The same intrinsic functions and <span class="tt">pi</span> constant apply; bare <span class="tt">e</span> is not available.</p>
</li>
<li><span class="tt">coefficient_of_restitution</span> is a number from 0 (exclusive) to 1 (inclusive) describing how elastic IB collisions are. 0 is for perfectly inelastic collisions while 1 is for perfectly elastic collisions.</li>
<li><span class="tt">collision_model</span> is an integer to select the collision model being used for IB collisions. Using 0 disables collisions and collision checking. 1 enables the soft-sphere collision model, where all IBs must be circles or sphere and those IBs can collide with each other as well as walls.</li>
<li><span class="tt">collision_time</span> is approximately the amount of simulation time used to resolve collisions. This is handled by modifying the spring constant used to apply collision forces.</li>
<li><span class="tt">ib_coefficient_of_friction</span> is the coefficient of friction used in IB collisions.</li>
<li><span class="tt">ib_neighborhood_radius</span> controls the size of the neighborhood size. A value of $r$ indicates that any given rank is aware of IBs up to $r$ ranks away. This value defaults to 0, which leaves the radius unset so that it is selected automatically. This parameter is required to strong-scale a case when IBs eventually grow to be larger than one full processor domain wide.</li>
</ul>
<h4 class="doxsection"><a class="anchor" id="autotoc_md25"></a>
Particle Clouds</h4>
<p>A particle cloud is a compact specification of a bed of identical circular (2D) or spherical (3D) immersed boundaries; each cloud is expanded into individual <span class="tt">patch_ib</span> particles at startup. Set <span class="tt">num_particle_clouds</span> to the number of beds and prepend the parameters below with <span class="tt">particle_cloud(j)%</span> where $j$ is the cloud index.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">x[y,z]_centroid</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Centre of the cloud region in the [x,y,z]-direction. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">length_x[y,z]</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Extent of the cloud region in the [x,y,z]-direction for <span class="tt">cloud_geometry = 1</span>; ignored by <span class="tt">cloud_geometry = 2</span>. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">num_particles</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of particles to place in the region. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">radius</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Radius of every particle in the cloud. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">mass</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Mass of every particle in the cloud. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">min_spacing</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Minimum surface-to-surface gap between particles (centres are <span class="tt">2*radius + min_spacing</span> apart). </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">cloud_geometry</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Shape of the cloud region. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">shell_inner_radius</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Inner radius for hemisphere-shell clouds (<span class="tt">cloud_geometry = 2</span>). </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">shell_outer_radius</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Outer radius for hemisphere-shell clouds (<span class="tt">cloud_geometry = 2</span>). </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">moving_ibm</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Motion flag applied to every particle (see <span class="tt">patch_ib(j)%moving_ibm</span>). </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">seed</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Random seed for reproducible placement (used by <span class="tt">packing_method = 1</span>). </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">packing_method</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Algorithm used to place the particles. </td></tr>
</table>
<ul>
<li><span class="tt">cloud_geometry</span> selects the cloud region:<ul>
<li><span class="tt">1</span> (box) uses <span class="tt">x[y,z]_centroid</span> and <span class="tt">length_x[y,z]</span> to define the region.</li>
<li><span class="tt">2</span> uses <span class="tt">x[y,z]_centroid</span>, <span class="tt">shell_inner_radius</span>, and <span class="tt">shell_outer_radius</span> to define a half-annulus in 2D and a hemisphere shell in 3D. Particle centres are sampled between <span class="tt">shell_inner_radius + radius</span> and <span class="tt">shell_outer_radius - radius</span>, and the flat plane is kept clear by one particle radius. The flat face is fixed at <span class="tt">y_centroid</span> in 2D and <span class="tt">z_centroid</span> in 3D; the filled region opens toward positive <span class="tt">y</span> in 2D and positive <span class="tt">z</span> in 3D. The full shell extent (<span class="tt">x[y,z]_centroid +/- shell_outer_radius</span> on the open side, and one particle radius of clearance on the flat-face side) must lie inside the computational domain; a hemisphere shell also requires at least two dimensions (<span class="tt">n > 0</span>).</li>
</ul>
</li>
<li><span class="tt">packing_method</span> selects how the <span class="tt">num_particles</span> are positioned within the cloud region:<ul>
<li><span class="tt">1</span> (rejection sampling) draws random positions and rejects any that violate <span class="tt">min_spacing</span>, producing a disordered bed. <span class="tt">seed</span> makes the placement reproducible.</li>
<li><span class="tt">2</span> (lattice) places the particles on the optimally dense lattice for the geometry — a triangular lattice in 2D and a face-centered cubic lattice in 3D. The lattice spacing is derived from the particle density (<span class="tt">num_particles</span> over the region area/volume); if that spacing is below the required <span class="tt">2*radius + min_spacing</span>, the region is too dense and the run aborts.</li>
<li>Hemisphere-shell clouds currently support rejection sampling only; <span class="tt">cloud_geometry = 2</span> with <span class="tt">packing_method = 2</span> is rejected during input validation.</li>
</ul>
</li>
</ul>
<h3 class="doxsection"><a class="anchor" id="sec-fluid-materials"></a>
5. Fluid Material's</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">gamma</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Stiffened-gas parameter \(\Gamma\) of fluid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">pi_inf</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Stiffened-gas parameter \(\Pi_\infty\) of fluid. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">Re(1)</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Shear viscosity of fluid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">Re(2)</span> * </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Volume viscosity of fluid. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">cv</span> ** </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Sffened-gas parameter $c_v$ of fluid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">qv</span> ** </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Stiffened-gas parameter $q$ of fluid. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">qvp</span> ** </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Stiffened-gas parameter $q'$ of fluid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">sigma</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Surface tension coefficient </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">G</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Shear modulus of solid. </td></tr>
</table>
<p>Fluid material's parameters. All parameters except for sigma should be prepended with <span class="tt">fluid_pp(i)</span> where $i$ is the fluid index.</p>
<p>*: Parameters that work only with <span class="tt">model_eqns = 2</span>.</p>
<p>**: Parameters that work only with <span class="tt">model_eqns = 3</span>.</p>
<p>The table lists the fluid material's parameters. The parameters define material's property of compressible fluids that are used in simulation.</p>
<ul>
<li><span class="tt">fluid_pp(i)%gamma</span> and <span class="tt">fluid_pp(i)%pi_inf</span> define \(\Gamma\) and \(\Pi\) as parameters of $i$-th fluid that are used in stiffened gas equation of state.</li>
<li><span class="tt">fluid_pp(i)%Re(1)</span> and <span class="tt">fluid_pp(i)%Re(2)</span> define the shear and volume viscosities of $i$-th fluid, respectively.</li>
</ul>
<p>When these parameters are undefined, fluids are treated as inviscid. Details of implementation of viscosity in MFC can be found in Coralic <a class="el" href="citelist.html#CITEREF_coralic15">[14]</a>.</p>
<ul>
<li><span class="tt">fluid_pp(i)%cv</span>, <span class="tt">fluid_pp(i)%qv</span>, and <span class="tt">fluid_pp(i)%qvp</span> define $c_v$, $q$, and $q'$ as parameters of $i$-th fluid that are used in stiffened gas equation of state.</li>
<li><span class="tt">fluid_pp(i)%G</span> is required for <span class="tt">hypoelasticity</span>.</li>
</ul>
<blockquote class="doxtable">
<p><b>Stored-form parameters:</b> The values <span class="tt">gamma</span>, <span class="tt">pi_inf</span>, and <span class="tt">Re(1)</span>/<span class="tt">Re(2)</span> are <b>not</b> the raw physical quantities. MFC expects transformed stored forms:</p><ul>
<li><span class="tt">gamma</span> = \(1/(\gamma-1)\), not \(\gamma\) itself</li>
<li><span class="tt">pi_inf</span> = \(\gamma\,\pi_\infty / (\gamma - 1)\), not \(\pi_\infty\) itself</li>
<li><span class="tt">Re(1)</span> = \(1/\mu\) (inverse viscosity), not \(\mu\) itself</li>
</ul>
<p>Setting <span class="tt">gamma = 1.4</span> for air is a common mistake; the correct value is <span class="tt">1.0 / (1.4 - 1.0) = 2.5</span>. See <a class="el" href="equations.html#sec-stored-forms" title="Stored Parameter Conventions">Stored Parameter Conventions</a> and <a class="el" href="equations.html#sec-material-values" title="Common Material Values">Common Material Values</a> in the Equations reference for the full table. </p>
</blockquote>
<h3 class="doxsection"><a class="anchor" id="sec-simulation-algorithm"></a>
6. Simulation Algorithm</h3>
<p>See <a class="el" href="equations.html" title="Equations">Equations</a> for the mathematical models these parameters control.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">bc_[x,y,z]%beg[end]</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Beginning [ending] boundary condition in the $[x,y,z]$-direction (negative integer, see table <a class="el" href="#boundary-conditions" title="Boundary conditions">Boundary Conditions</a>) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">bc_[x,y,z]%vb[1,2,3]</span>‡ </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Velocity in the (x,1), (y, 2), (z,3) direction applied to <span class="tt">bc_[x,y,z]%beg</span> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">bc_[x,y,z]%ve[1,2,3]</span>‡ </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Velocity in the (x,1), (y, 2), (z,3) direction applied to <span class="tt">bc_[x,y,z]%end</span> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">model_eqns</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Multicomponent model: [1] \(\Gamma/\Pi_\infty\); [2] 5-equation; [3] 6-equation </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">alt_soundspeed</span> * </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Alternate sound speed and \(K \nabla \cdot u\) for 5-equation model </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">adv_n</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Solving directly for the number density (in the method of classes) and compute void fraction from the number density </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">mpp_lim</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Mixture physical parameters limits </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">mixture_err</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Mixture properties correction </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">time_stepper</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Runge–Kutta order [1-3] </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">adap_dt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Strang splitting scheme with adaptive time stepping </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">recon_type</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Reconstruction Type: [1] WENO; [2] MUSCL </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">adap_dt_tol</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Tolerance for adaptive time stepping in Strang splitting scheme </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">adap_dt_max_iters</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Max iteration for adaptive time stepping in Strang splitting scheme </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">weno_order</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">WENO order [1,3,5] </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">weno_eps</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">WENO perturbation (avoid division by zero) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">mapped_weno</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">WENO-M (WENO with mapping of nonlinear weights) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">wenoz</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">WENO-Z </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">wenoz_q</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">WENO-Z power parameter q (only for WENO7) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">teno</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">TENO (Targeted ENO) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">teno_CT</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">TENO threshold for smoothness detection </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">null_weights</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Null WENO weights at boundaries </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">mp_weno</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Monotonicity preserving WENO </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">muscl_order</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">MUSCL order [1,2] </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">muscl_lim</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">MUSCL Slope Limiter: [1] minmod; [2] monotonized central; [3] Van Albada; [4] Van Leer; [5] SUPERBEE </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">muscl_eps</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">MUSCL limiter slope-product threshold (default: hard-coded thresholds; set to 0 for textbook behavior) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">int_comp</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Interface Compression [0] Off [1] THINC [2] MTHINC (default 0) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">flux_lim</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Flux limiter for post-process: [1] minmod; [2] MUSCL; [3] OSPRE; [4] SUPERBEE </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">ic_eps</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Interface compression threshold (default: 1e-4) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">ic_beta</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Interface compression sharpness parameter (default: 1.6) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">riemann_solver</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Riemann solver algorithm: [1] HLL*; [2] HLLC; [3] Exact*; [4] HLLD (MHD or hypoelasticity) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">hll_u_interface</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">HLL Method 2 (u-interface) for volume fraction advection (default F) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">low_Mach</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Low Mach number correction for HLLC Riemann solver: [0] None; [1] Pressure (Chen et al. <a class="el" href="citelist.html#CITEREF_chen22">[11]</a>); [2] Velocity (Thornber et al. <a class="el" href="citelist.html#CITEREF_thornber08">[54]</a>) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">avg_state</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Averaged state evaluation method: [1] Roe average*; [2] Arithmetic mean </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">wave_speeds</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Wave-speed estimation: [1] Direct (Batten et al. <a class="el" href="citelist.html#CITEREF_batten97">[5]</a>); [2] Pressure-velocity* (Toro <a class="el" href="citelist.html#CITEREF_toro09">[56]</a>) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">weno_Re_flux</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Compute velocity gradient using scalar divergence theorem </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">weno_avg</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Arithmetic mean of left and right, WENO-reconstructed, cell-boundary values </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">dt</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Time step size </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">t_step_start</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Simulation starting time step </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">t_step_stop</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Simulation stopping time step </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">t_step_save</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Frequency to output data </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">t_step_print</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Frequency to print the current step number to standard output (default 1) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">cfl_adap_dt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">CFL based adaptive time-stepping </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">cfl_const_dt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">CFL based non-adaptive time-stepping </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">cfl_dt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Enable CFL-based time stepping </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">cfl_target</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Specified CFL value </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">n_start</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Save file from which to start simulation </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">t_save</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Time duration between data output </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">t_stop</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Simulation stop time </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">surface_tension</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Activate surface tension </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">viscous</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Activate viscosity </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">hypoelasticity</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Activate hypoelasticity* </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">riemann_hypo_ADC</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Enable hypo anti-diffusion correction for HLLC/HLLD (default F) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">ADC_kappa</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">ADC sensor scaling parameter (default 1.0) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">hypo_hll_interface_rhs</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">HLL uses interface-consistent hypo RHS (default F) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">igr</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Enable solution via information geometric regularization (IGR) Cao and Schafer <a class="el" href="citelist.html#CITEREF_cao24">[9]</a> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">igr_order</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Order of reconstruction for IGR [3,5] </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">alf_factor</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Alpha factor for IGR entropic pressure (default 10) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">igr_pres_lim</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Limit IGR pressure to avoid negative values (default F) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">igr_iter_solver</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Solution method for IGR elliptic solve [1] Jacobi [2] Gauss-Seidel </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">num_igr_iters</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of iterations for for the IGR elliptic solve (default 2) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">num_igr_warm_start_iters</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of iterations for the IGR elliptic solve at the first time step (default 50) </td></tr>
</table>
<ul>
<li>* Options that work only with <span class="tt">model_eqns = 2</span>.</li>
<li>† Options that work only with <span class="tt">cyl_coord = 'F'</span>.</li>
<li>‡ Options that work only with <span class="tt">bc_[x,y,z]%[beg,end] = -15</span> and/or <span class="tt">bc_[x,y,z]%[beg,end] = -16</span>.</li>
</ul>
<p>The table lists simulation algorithm parameters. The parameters are used to specify options in algorithms that are used to integrate the governing equations of the multi-component flow based on the initial condition. Models and assumptions that are used to formulate and discretize the governing equations are described in Wilfong et al. <a class="el" href="citelist.html#CITEREF_wilfong26">[59]</a> and Bryngelson et al. <a class="el" href="citelist.html#CITEREF_bryngelson21">[8]</a>. Details of the simulation algorithms and implementation of the WENO scheme can be found in Coralic <a class="el" href="citelist.html#CITEREF_coralic15">[14]</a>.</p>
<ul>
<li><span class="tt">bc_[x,y,z]%[beg,end]</span> specifies the boundary conditions at the beginning and the end of domain boundaries in each coordinate direction by a negative integer from -1 through -16. See table <a class="el" href="#boundary-conditions" title="Boundary conditions">Boundary Conditions</a> for details. Boundary condition patches can be used with non-characteristic boundary conditions. Their use is detailed in <a class="el" href="#boundary-condition-patches" title="Boundary Condition Patches">Boundary Condition Patches</a>.</li>
<li><span class="tt">bc_[x,y,z]%vb[1,2,3]</span> specifies the velocity in the (x,1), (y,2), (z,3) direction applied to <span class="tt">bc_[x,y,z]%beg</span> when using <span class="tt">bc_[x,y,z]%beg = -16</span>. Tangential velocities require viscosity, <span class="tt">weno_avg = T</span>, and <span class="tt">bc_[x,y,z]%beg = -16</span> to work properly. Normal velocities require <span class="tt">bc_[x,y,z]%end = -15</span> or <span class="tt">bc_[x,y,z]%end = -16</span> to work properly.</li>
<li><span class="tt">bc_[x,y,z]%ve[1,2,3]</span> specifies the velocity in the (x,1), (y,2), (z,3) direction applied to <span class="tt">bc_[x,y,z]%beg</span> when using <span class="tt">bc_[x,y,z]%end = -16</span>. Tangential velocities require viscosity, <span class="tt">weno_avg = T</span>, and <span class="tt">bc_[x,y,z]%end = 16</span> to work properly. Normal velocities require <span class="tt">bc_[x,y,z]%end = -15</span> or <span class="tt">bc_[x,y,z]%end = -16</span> to work properly.</li>
<li><span class="tt">model_eqns</span> specifies the choice of the multi-component model that is used to formulate the dynamics of the flow using integers from 1 through 3. <span class="tt">model_eqns = 1</span>, <span class="tt">2</span>, and <span class="tt">3</span> correspond to \(\Gamma\)- \(\Pi_\infty\) model (Johnsen <a class="el" href="citelist.html#CITEREF_johnsen08">[24]</a>), 5-equation model (Allaire et al. <a class="el" href="citelist.html#CITEREF_allaire02">[1]</a>), and 6-equation model (Saurel et al. <a class="el" href="citelist.html#CITEREF_saurel09">[45]</a>), respectively. The difference of the two models is assessed by (Schmidmayer et al. <a class="el" href="citelist.html#CITEREF_schmidmayer20">[47]</a>). Note that some code parameters are only compatible with 5-equation model.</li>
<li><span class="tt">alt_soundspeed</span> activates the source term in the advection equations for the volume fractions, \(K\nabla\cdot \underline{u}\), that regularizes the speed of sound in the mixture region when the 5-equation model is used. Requires exactly two fluid components ( \(K\) is a two-fluid closure). The effect and use of the source term are assessed by Schmidmayer et al. <a class="el" href="citelist.html#CITEREF_schmidmayer20">[47]</a>.</li>
<li><span class="tt">adv_n</span> activates the direct computation of number density by the Riemann solver instead of computing number density from the void fraction in the method of classes.</li>
<li><span class="tt">mpp_lim</span> activates correction of solutions to avoid a negative void fraction of each component in each grid cell, such that \(\alpha_i>\varepsilon\) is satisfied at each time step.</li>
<li><span class="tt">mixture_err</span> activates correction of solutions to avoid imaginary speed of sound at each grid cell.</li>
<li><span class="tt">time_stepper</span> specifies the order of the Runge-Kutta (RK) time integration scheme that is used for temporal integration in simulation, from the 1st to 5th order by corresponding integer. Note that <span class="tt">time_stepper = 3</span> specifies the total variation diminishing (TVD), third order RK scheme (Gottlieb and Shu <a class="el" href="citelist.html#CITEREF_gottlieb98">[18]</a>).</li>
<li><span class="tt">adap_dt</span> activates the Strang operator splitting scheme which splits flux and source terms in time marching, and an adaptive time stepping strategy is implemented for the source term. It requires <span class="tt">bubbles_euler = 'T'</span>, <span class="tt">polytropic = 'T'</span>, <span class="tt">adv_n = 'T'</span> and <span class="tt">time_stepper = 3</span>. Additionally, it can be used with <span class="tt">bubbles_lagrange = 'T'</span> and <span class="tt">time_stepper = 3</span>. <span class="tt">adap_dt_tol</span> and <span class="tt">adap_dt_max_iters</span> are 1e-4 and 100, respectively, by default.</li>
<li><span class="tt">weno_order</span> specifies the order of WENO scheme that is used for spatial reconstruction of variables by an integer of 1, 3, 5, and 7, that correspond to the 1st, 3rd, 5th, and 7th order, respectively.</li>
<li><span class="tt">weno_eps</span> specifies the lower bound of the WENO nonlinear weights. It is recommended to set <span class="tt">weno_eps</span> to $10^{-6}$ for WENO-JS, and to $10^{-40}$ for other WENO variants.</li>
<li><span class="tt">mapped_weno</span> activates the WENO-M scheme in place of the default WENO-JS scheme (Henrick et al. <a class="el" href="citelist.html#CITEREF_henrick05">[22]</a>). WENO-M a variant of the WENO scheme that remaps the nonlinear WENO-JS weights by assigning larger weights to non-smooth stencils, reducing dissipation compared to the default WENO-JS scheme, at the expense of higher computational cost. Only one of <span class="tt">mapped_weno</span>, <span class="tt">wenoz</span>, and <span class="tt">teno</span> can be activated.</li>
<li><span class="tt">wenoz</span> activates the WENO-Z scheme in place of the default WENO-JS scheme (Borges et al. <a class="el" href="citelist.html#CITEREF_borges08">[6]</a>). WENO-Z is a variant of the WENO scheme that further reduces the dissipation compared to the WENO-M scheme. It has similar computational cost to the WENO-JS scheme.</li>
<li><span class="tt">wenoz_q</span> specifies the power parameter <span class="tt">q</span> used in the WENO-Z scheme. It controls how aggressively the smoothness coefficients scale the weights. A higher value of <span class="tt">wenoz_q</span> increases the sensitivity to smoothness, improving stability but worsening numerical dissipation. For WENO3 and WENO5, <span class="tt">q=1</span> is fixed, so <span class="tt">wenoz_q</span> must not be set. For WENO7, <span class="tt">wenoz_q</span> can be set to 2, 3, or 4.</li>
<li><span class="tt">teno</span> activates the TENO scheme in place of the default WENO-JS scheme (Fu et al. <a class="el" href="citelist.html#CITEREF_fu16">[16]</a>). TENO is a variant of the ENO scheme that is the least dissipative, but could be less robust for extreme cases. It uses a threshold to identify smooth and non-smooth stencils, and applies optimal weights to the smooth stencils. Only available for <span class="tt">weno_order = 5</span> and <span class="tt">7</span>. Requires <span class="tt">teno_CT</span> to be set. Does not support grid stretching.</li>
<li><span class="tt">teno_CT</span> specifies the threshold for the TENO scheme. This dimensionless constant, also known as $C_T$, sets a threshold to identify smooth and non-smooth stencils. Larger values make the scheme more robust but also more dissipative. A recommended value for teno_CT is <span class="tt">1e-6</span>. When adjusting this parameter, it is recommended to try values like <span class="tt">1e-5</span> or <span class="tt">1e-7</span> for TENO5. A smaller value can be used for TENO7.</li>
<li><span class="tt">null_weights</span> activates nullification of the nonlinear WENO weights at the buffer regions outside the domain boundaries when the Riemann extrapolation boundary condition is specified (<span class="tt">bc_[x,y,z]%beg[end]} = -4</span>).</li>
<li><span class="tt">mp_weno</span> activates monotonicity preservation in the WENO reconstruction (MPWENO) such that the values of reconstructed variables do not reside outside the range spanned by WENO stencil (Balsara and Shu <a class="el" href="citelist.html#CITEREF_balsara00">[4]</a>; Suresh and Huynh <a class="el" href="citelist.html#CITEREF_suresh97">[50]</a>).</li>
<li><span class="tt">muscl_order</span> specifies the order of the MUSCL scheme that is used for spatial reconstruction of variables by an integer of 1, or 2, that corresponds to the 1st, and 2nd order respectively. When using <span class="tt">muscl_order = 2</span>, <span class="tt">muscl_lim</span> must be defined.</li>
<li><span class="tt">muscl_lim</span> specifies the slope limiter that is used in 2nd order MUSCL Reconstruction by an integer from 1 through 5. <span class="tt">muscl_lim = 1</span>, <span class="tt">2</span>, <span class="tt">3</span>, <span class="tt">4</span>, and <span class="tt">5</span> correspond to minmod, monotonized central, Van Albada, Van Leer, and SUPERBEE, respectively.</li>
<li><span class="tt">muscl_eps</span> controls the slope-product activation threshold for all MUSCL limiters. When not set (default), the threshold is 1e-9 for minmod/MC, and 1e-6 for others. Setting <span class="tt">muscl_eps = 0</span> gives textbook limiter behavior where limiters activate whenever both slopes have the same sign.</li>
<li><span class="tt">int_comp</span> activates interface compression using [1] THINC or [2] MTHINC (default off) used in variable reconstruction, with control parameters (<span class="tt">ic_eps</span>, and <span class="tt">ic_beta</span>).</li>
<li><span class="tt">riemann_solver</span> specifies the choice of the Riemann solver that is used in simulation by an integer from 1 through 4. <span class="tt">riemann_solver = 1</span>, <span class="tt">2</span>, and <span class="tt">3</span> correspond to HLL, HLLC, and Exact Riemann solver, respectively (Toro <a class="el" href="citelist.html#CITEREF_toro09">[56]</a>). <span class="tt">riemann_solver = 4</span> is the HLLD solver for MHD or hypoelasticity simulations. For MHD it resolves 5 of the full seven-wave structure of the MHD equations (Miyoshi and Kusano <a class="el" href="citelist.html#CITEREF_miyoshi05">[37]</a>).</li>
<li><span class="tt">hll_u_interface</span>: Selects between two HLL discretizations of volume fraction advection (<span class="tt">riemann_solver = 1</span>):<ul>
<li><b>Default</b> (<span class="tt">'F'</span>): \(\partial_t \alpha_k + u\,\partial_x \alpha_k = 0\)</li>
<li><b>u-interface</b> (<span class="tt">'T'</span>, consistent with HLLC): \(\partial_t \alpha_k + \partial_x(\alpha_k\, u) = \alpha_k\,\partial_x u\)</li>
</ul>
</li>
<li><span class="tt">low_Mach</span> specifies the choice of the low Mach number correction scheme for the HLLC Riemann solver. <span class="tt">low_Mach = 0</span> is default value and does not apply any correction scheme. <span class="tt">low_Mach = 1</span> and <span class="tt">2</span> apply the anti-dissipation pressure correction method (Chen et al. <a class="el" href="citelist.html#CITEREF_chen22">[11]</a>) and the improved velocity reconstruction method (Thornber et al. <a class="el" href="citelist.html#CITEREF_thornber08">[54]</a>). This feature requires <span class="tt">model_eqns = 2</span> or <span class="tt">3</span>. <span class="tt">low_Mach = 1</span> works for <span class="tt">riemann_solver = 1</span> and <span class="tt">2</span>, but <span class="tt">low_Mach = 2</span> only works for <span class="tt">riemann_solver = 2</span>.</li>
<li><span class="tt">avg_state</span> specifies the choice of the method to compute averaged variables at the cell-boundaries from the left and the right states in the Riemann solver by an integer of 1 or 2. <span class="tt">avg_state = 1</span> and <span class="tt">2</span> correspond to Roe- and arithmetic averages, respectively.</li>
<li><span class="tt">wave_speeds</span> specifies the choice of the method to compute the left, right, and middle wave speeds in the Riemann solver by an integer of 1 and 2. <span class="tt">wave_speeds = 1</span> and <span class="tt">2</span> correspond to the direct method (Batten et al. <a class="el" href="citelist.html#CITEREF_batten97">[5]</a>), and indirect method that approximates the pressures and velocity (Toro <a class="el" href="citelist.html#CITEREF_toro09">[56]</a>), respectively.</li>
<li><span class="tt">weno_Re_flux</span> activates the scalar divergence theorem in computing the velocity gradients using WENO-reconstructed cell boundary values. If this option is false, velocity gradient is computed using finite difference scheme of order 2 which is independent of the WENO order.</li>
<li><span class="tt">weno_avg</span> it activates the arithmetic average of the left and right, WENO-reconstructed, cell-boundary values. This option requires <span class="tt">weno_Re_flux</span> to be true because cell boundary values are only utilized when employing the scalar divergence method in the computation of velocity gradients.</li>
<li><span class="tt">surface_tension</span> activates surface tension when set to <span class="tt">'T'</span>. Requires <span class="tt">sigma</span> to be set and <span class="tt">num_fluids</span>. The color function in each patch should be assigned such that <span class="tt">patch_icpp(i)%cf_val = 1</span> in patches where <span class="tt">patch_icpp(i)%alpha = 1 - eps</span> and <span class="tt">patch_icpp(i)%cf_val = 0</span> in patches where <span class="tt">patch_icpp(i)%alpha = eps</span>.</li>
<li><span class="tt">viscous</span> activates viscosity when set to <span class="tt">'T'</span>. Requires <span class="tt">Re(1)</span> and <span class="tt">Re(2)</span> to be set.</li>
<li><span class="tt">hypoelasticity</span> activates elastic stress calculations for fluid-solid interactions. Requires <span class="tt">G</span> to be set in <span class="tt">fluid_pp</span>, and <span class="tt">fd_order</span> to be set (1, 2, or 4). Compatible with HLL (<span class="tt">riemann_solver = 1</span>), HLLC (<span class="tt">riemann_solver = 2</span>), and HLLD (<span class="tt">riemann_solver = 4</span>). The Riemann solver choice determines how the elastic stress source term \(\mathbf{S}^e\) is discretized:<ul>
<li><b>HLL</b>: finite-difference velocity gradient (default), or interface-consistent velocity gradient when <span class="tt">hypo_hll_interface_rhs = 'T'</span> (matches HLLC).</li>
<li><b>HLLC</b>: interface-consistent velocity gradient from the Riemann solution.</li>
<li><b>HLLD</b>: dual-pass approach resolving the elastic wave structure. Requires 2D+ and exactly 2 fluid components.</li>
<li>With hypoelastic HLLD, use characteristic boundary conditions (<span class="tt">bc_{x,y,z}%beg/end</span> between -5 and -12) only where the domain boundary remains in a fluid region throughout the simulation. Keep material interfaces and solids out of the nearby cells used by the boundary calculation. A material present only at the numerical volume-fraction floor is allowed, even if it has nonzero <span class="tt">G</span>. These boundaries treat acoustic waves only. <span class="tt">alt_soundspeed</span> is supported.</li>
</ul>
</li>
<li><span class="tt">riemann_hypo_ADC</span>: Enables anti-diffusion correction (ADC) for hypoelastic HLLC or HLLD. Blends the HLLC/HLLD flux locally toward the more diffusive HLL flux where a jump sensor (total normal stress, tangential velocity, and tangential stress) detects a strong contact or material interface, improving robustness and reducing interfacial overshoots. This trades contact and shear resolution for robustness where the sensor activates. <span class="tt">ADC_kappa</span> (default 1.0) scales the reference jump the sensor is normalized by; smaller values blend more toward HLL (more diffusive and robust). Off by default and recommended off: in MFC's tested hypoelastic cases, including strong shock-interface interactions, HLLD is stable and accurate without ADC. The option is a robustness fallback intended for regimes with intense shocks and intense shear at material interfaces.</li>
</ul>
<h4 class="doxsection"><a class="anchor" id="boundary-condition-patches"></a>
Boundary Condition Patches</h4>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">num_bc_patches</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of boundary condition patches </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">dir</span>* </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Direction of the boundary patch. [1]: x; [2]: y; [3]: z </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">loc</span>* </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Location of the patch in the domain </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">type</span>* </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">The geometry of the patch. [1]: Line [2]: Circle [3]: Rectangle </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">x[y,z]_centroid</span>* </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Centroid of the boundary patch in the x[y,z]-direction </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">length_x[y,z]</span>* </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Length of the boundary patch in the x[y,z]-direction </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">radius</span>* </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Radius of the boundary patch </td></tr>
</table>
<p>*: These parameters should be prepended with <span class="tt">patch_bc(j)%</span> where $j$ is the patch index.</p>
<p>Boundary condition patches can be used with the following boundary condition types:</p><ul>
<li><span class="tt">-2</span> reflective</li>
<li><span class="tt">-3</span> ghost cell extrapolation</li>
<li><span class="tt">-15</span> slip wall</li>
<li><span class="tt">-16</span> no-slip wall</li>
<li><span class="tt">-17</span> Dirichlet</li>
</ul>
<p>Line segments along each domain edge are supported for 2D simulations. Squares and circles on each face are supported for 3D simulations.</p>
<h4 class="doxsection"><a class="anchor" id="autotoc_md26"></a>
Constant Time-Stepping</h4>
<ul>
<li><span class="tt">dt</span> specifies the constant time step size used in the simulation. The value of <span class="tt">dt</span> needs to be sufficiently small to satisfy the Courant-Friedrichs-Lewy (CFL) condition.</li>
<li><span class="tt">t_step_start</span> and <span class="tt">t_step_stop</span> define the time steps at which the simulation starts and ends.</li>
</ul>
<p><span class="tt">t_step_save</span> is the time step interval for data output during simulation. To newly start the simulation, set <span class="tt">t_step_start = 0</span>. To restart the simulation from $k$-th time step, set <span class="tt">t_step_start = k</span>; see <a class="el" href="running.html" title="Running">Restarting Cases</a>. When <span class="tt">t_step_start > 0</span>, <span class="tt">./mfc.sh run</span> skips <span class="tt">pre_process</span> by default, since it would otherwise overwrite the restart data being resumed from. Pass <span class="tt">-t pre_process</span> explicitly (as in the restart workflow) if regenerating it is intended.</p>
<h5 class="doxsection"><a class="anchor" id="autotoc_md27"></a>
Adaptive Time-Stepping</h5>
<ul>
<li><span class="tt">cfl_adap_dt</span> enables adaptive time stepping with a constant CFL when true</li>
<li><span class="tt">cfl_const_dt</span> enables constant <span class="tt">dt</span> time-stepping where <span class="tt">dt</span> results in a specified CFL for the initial condition</li>
<li><span class="tt">cfl_target</span> specifies the target CFL value</li>
<li><span class="tt">n_start</span> specifies the save file to start at</li>
<li><span class="tt">t_save</span> specifies the time interval between data output during the simulation</li>
<li><span class="tt">t_stop</span> specifies at what time the simulation should stop</li>
</ul>
<p>To newly start the simulation, set <span class="tt">n_start = 0</span>. To restart the simulation from $k$-th time step, see <a class="el" href="running.html" title="Running">Restarting Cases</a>.</p>
<h3 class="doxsection"><a class="anchor" id="sec-formatted-output"></a>
7. Formatted Output</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">format</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Output format. [1]: Silo-HDF5; [2] Binary </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">precision</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">[1] Single; [2] Double </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">parallel_io</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Parallel I/O </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">file_per_process</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Whether or not to write one IO file per process </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">cons_vars_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write conservative variables </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">prim_vars_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write primitive variables </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">alpha_rho_wrt(i)</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the partial density of the fluid $i$ to the database | </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">rho_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the mixture density to the database </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">mom_wrt(i)</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the $i$-direction momentum to the database </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">vel_wrt(i)</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the $i$-direction velocity to the database </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">E_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the total energy to the database </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">pres_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the pressure to the database </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">alpha_wrt(i)</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the volume fraction of fluid $i$ to the database </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">gamma_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the specific heat ratio function to the database </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">heat_ratio_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the specific heat ratio to the database </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">ib_state_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Parameter to handle writing IB state on saves and outputting the state as a point mesh to SILO files. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">pi_inf_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the liquid stiffness function to the database </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">pres_inf_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the liquid stiffness to the formatted database </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">c_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the sound speed to the database </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">T_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add each fluid's temperature to the database (needs <span class="tt">cv</span> > 0) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">omega_wrt(i)</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the $i$-direction vorticity to the database </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">schlieren_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the numerical schlieren to the database </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">qm_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the Q-criterion to the database </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">liutex_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the Liutex to the database </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">cf_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write color function field </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">chem_wrt_T</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write temperature field for chemistry output </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">fft_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Enable FFT output </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">sim_data</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write interface and energy data files (post_process) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">down_sample</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Enable output downsampling </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">fd_order</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Order of finite differences for computing the vorticity and the numerical Schlieren function [1,2,4] </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">schlieren_alpha(i)</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Intensity of the numerical Schlieren computed via <span class="tt">alpha(i)</span> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">probe_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write the flow chosen probes data files for each time step </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">num_probes</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of probes </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">probe(i)%[x,y,z]</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Coordinates of probe $i$ </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">output_partial_domain</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Output part of the domain </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">[x,y,z]_output%beg</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Beginning of the output domain in the [x,y,z]-direction </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">[x,y,z]_output%end</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">End of the output domain in the [x,y,z]-direction </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_txt_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write Lagrangian bubble data to <span class="tt">.dat</span> files </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_header</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write header to Lagrangian bubble <span class="tt">.dat</span> files </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_db_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Write Lagrangian bubble data to silo/hdf5 database files </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_id_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the global bubble idea to the database file </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_pos_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble position to the database file </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_pos_prev_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the previous bubble position to the database file </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_vel_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble translational velocity to the database file </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_rad_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble radius to the database file </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_rvel_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble radial velocity to the database file </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_r0_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble initial radius to the database file </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_rmax_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble maximum radius to the database file </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_rmin_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble minimum radius to the database file </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_dphidt_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble subgrid velocity potential to the database file </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_pres_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble pressure to the database file </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_mv_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble vapor mass to the database file </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_mg_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble gas mass to the database file </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">lag_betaT_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble heat flux model coefficient to the database file </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">lag_betaC_wrt</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Add the bubble mass flux model coefficient to the database file </td></tr>
</table>
<p>The table lists formatted database output parameters. The parameters define variables that are outputted from simulation and file types and formats of data as well as options for post-processing.</p>
<ul>
<li><span class="tt">format</span> specifies the choice of the file format of data file outputted by MFC by an integer of 1 and 2. <span class="tt">format = 1</span> and <span class="tt">2</span> correspond to Silo-HDF5 format and binary format, respectively. Both formats are supported by <span class="tt">./mfc.sh viz</span> (see <a class="el" href="visualization.html" title="Flow visualization">Flow Visualization</a>). Silo-HDF5 requires the h5py Python package; binary has no extra dependencies.</li>
<li><span class="tt">precision</span> specifies the choice of the floating-point format of the data file outputted by MFC by an integer of 1 and 2. <span class="tt">precision = 1</span> and <span class="tt">2</span> correspond to single-precision and double-precision formats, respectively.</li>
<li><span class="tt">parallel_io</span> activates parallel input/output (I/O) of data files. It is highly recommended to activate this option in a parallel environment. With parallel I/O, MFC inputs and outputs a single file throughout pre-process, simulation, and post-process, regardless of the number of processors used. Parallel I/O enables the use of different numbers of processors in each process (e.g., simulation data generated using 1000 processors can be post-processed using a single processor).</li>
<li><span class="tt">file_per_process</span> deactivates shared file MPI-IO and activates file per process MPI-IO. The default behavior is to use a shared file. File per process is useful when running on >10K ranks. If <span class="tt">file_per_process</span> is true, then pre_process, simulation, and post_process must be run with the same number of ranks.</li>
<li><span class="tt">cons_vars_wrt</span> and <span class="tt">prim_vars_wrt</span> activate the output of conservative and primitive state variables into the database.</li>
<li><span class="tt">[variable's name]_wrt</span> activates the output of each specified variable into the database.</li>
<li><span class="tt">schlieren_alpha(i)</span> specifies the intensity of the numerical Schlieren of $i$-th component. It must be specified for every fluid when <span class="tt">schlieren_wrt</span> is enabled.</li>
<li><span class="tt">fd_order</span> specifies the order of the finite difference scheme used to compute the vorticity from the velocity field and the numerical schlieren from the density field using an integer of 1, 2, and 4. <span class="tt">fd_order = 1</span>, <span class="tt">2</span>, and <span class="tt">4</span> correspond to the first, second, and fourth-order finite difference schemes.</li>
<li><span class="tt">probe_wrt</span> activates the output of state variables at coordinates specified by <span class="tt">probe(i)%[x;y,z]</span>.</li>
<li><span class="tt">ib_state_wrt</span> is used to trigger post-processing of the IB state to be written out as a point mesh in the SILO files. When no IBs are moving, it also triggers force and torque calculation so that those values may be written to the output state files.</li>
<li><span class="tt">output_partial_domain</span> activates the output of part of the domain specified by <span class="tt">[x,y,z]_output%beg</span> and <span class="tt">[x,y,z]_output%end</span>. This is useful for large domains where only a portion of the domain is of interest. It is not supported when <span class="tt">precision = 1</span> and <span class="tt">format = 1</span>. It also cannot be enabled with <span class="tt">flux_wrt</span>, <span class="tt">heat_ratio_wrt</span>, <span class="tt">pres_inf_wrt</span>, <span class="tt">c_wrt</span>, <span class="tt">omega_wrt</span>, <span class="tt">ib</span>, <span class="tt">schlieren_wrt</span>, <span class="tt">qm_wrt</span>, or 'liutex_wrt'.</li>
</ul>
<h3 class="doxsection"><a class="anchor" id="sec-acoustic-source"></a>
8. Acoustic Source</h3>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadRight">Parameter </th><th class="markdownTableHeadCenter">Type </th><th class="markdownTableHeadLeft">Description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic_source</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Acoustic source module activation </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">num_source</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Number of acoustic sources </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%support</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Geometry of spatial support for the acoustic source </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%dipole</span> </td><td class="markdownTableBodyCenter">Logical </td><td class="markdownTableBodyLeft">Dipole source activation (optional; default = false -> monopole) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%loc(j)</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">$j$-th coordinate of the point that defines the acoustic source location </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%pulse</span> </td><td class="markdownTableBodyCenter">Integer </td><td class="markdownTableBodyLeft">Acoustic wave form: [1] Sine [2] Gaussian [3] Square [4] Broadband </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%npulse</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Number of pulse cycles </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%mag</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Pulse magnitude </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%frequency</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Sine/Square - Frequency of the acoustic wave (exclusive) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%wavelength</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Sine/Square - Wavelength of the acoustic wave (exclusive) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%gauss_sigma_time</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Gaussian - Gaussian pulse time width in terms of sigma (exclusive) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%gauss_sigma_dist</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Gaussian - Gaussian pulse spatial width in terms of sigma (exclusive) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%delay</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Time delay of the acoustic wave (optional for <span class="tt">%pulse = 1</span> or <span class="tt">3</span>; default = 0) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%dir</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Planer - Direction of acoustic propagation </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%length</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">2D/3D Planer - Spatial pulse length </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%height</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">3D Planer - Spatial pulse height </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyRight"><span class="tt">acoustic(i)%foc_length</span> </td><td class="markdownTableBodyCenter">Real </td><td class="markdownTableBodyLeft">Transducer - Focal length of the transducer </td></tr>