xref: /honee/doc/runtime_options.md (revision ef55efad0931f009b7a300d50a7d78c8415454aa)
1# Runtime options
2
3## Common Options
4The Navier-Stokes HONEE app is controlled via command-line options.
5The following options are common among all problem types:
6
7:::{list-table} Common Runtime Options
8:header-rows: 1
9
10* - Option
11  - Description
12  - Default value
13
14* - `-ceed`
15  - CEED resource specifier
16  - `/cpu/self/opt/blocked`
17
18* - `-problem`
19  - Problem to solve (`advection`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`)
20  - `density_current`
21
22* - `-implicit`
23  - Use implicit time integrator formulation
24  -
25
26* - `-degree`
27  - Polynomial degree of tensor product basis (must be >= 1)
28  - `1`
29
30* - `-q_extra`
31  - Number of extra quadrature points
32  - `0`
33
34* - `-ts_monitor_turbulence_spanstats_collect_interval`
35  - Number of timesteps between statistics collection
36  - `1`
37
38* - `-ts_monitor_turbulence_spanstats_viewer`
39  - Sets the PetscViewer for the statistics file writing, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`). Also turns the statistics collection on.
40  -
41
42* - `-ts_monitor_turbulence_spanstats_viewer_interval`
43  - Number of timesteps between statistics file writing (`-1` means only at end of run)
44  - `-1`
45
46* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size`
47  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
48  - `20`
49
50* - `-ts_monitor_wall_force`
51  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
52  -
53
54* - `-ts_monitor_total_kinetic_energy`
55  - Viewer for the total kinetic energy in the domain and other terms, e.g., `ascii:total_ke.csv:ascii_csv` to write a CSV file.
56  -
57
58* - `-ts_monitor_total_kinetic_energy_interval`
59  - Number of timesteps between calculating and printing the total kinetic energy
60  - `1`
61
62* - `-ts_monitor_cfl`
63  - Viewer for the min/max CFL in the domain e.g., `ascii:cfl.csv:ascii_csv` to write a CSV file.
64  -
65
66* - `-ts_monitor_cfl_interval`
67  - Number of timesteps between calculating and printing the min/max CFL
68  - `1`
69
70* - `-honee_check_step_interval`
71  - Number of time steps between checking the solution for Nans. Negative interval indicates it will not run.
72  - `-1`
73
74* - `-honee_max_wall_time_duration`
75  - Wall clock duration of simulation before it should be stopped. Acceptable formats are `hh`, `hh:mm`, and `hh:mm:ss`. Simulation is stopped at `start_time + duration - buffer`
76  - `'0'`
77
78* - `-honee_max_wall_time_buffer`
79  - Approximate time required to exit simulation cleanly (write checkpoints, etc.)
80  - `'00:01'`
81
82* - `-honee_max_wall_time_interval`
83  - Number of time steps between checking whether simulation should stop based on `-honee_max_wall_time_duration`
84  - `1`
85
86* - `-mesh_transform`
87  - Transform the mesh, usually for an initial box mesh.
88  - `none`
89
90* - `-snes_view`
91  - View PETSc `SNES` nonlinear solver configuration
92  -
93
94* - `-log_view`
95  - View PETSc performance log
96  -
97
98* - `-help`
99  - View comprehensive information about run-time options
100  -
101
102* - `-test_type`
103  - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified
104  - `none`
105
106* - `-compare_final_state_atol`
107  - Test absolute tolerance
108  - `1E-11`
109
110* - `-compare_final_state_filename`
111  - Test filename
112  -
113
114* - `-ksp_post_solve_residual`
115  - Print KSP residual summary information after each
116  -
117
118* - `-mass_ksp_view_pre_ts_solve`
119  - View mass KSP once before `TSSolve()` is called
120  -
121
122:::
123
124### File I/O Options
125
126:::{list-table} File I/O Runtime Options
127:header-rows: 1
128
129* - Option
130  - Description
131  - Default value
132
133* - `-dm_plex_filename`
134  - Filename of mesh file to load in
135  -
136
137* - `-ts_monitor_solution`
138  - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
139  -
140
141* - `-ts_monitor_solution_interval`
142  - Number of time steps between visualization output frames.
143  - `1`
144
145* - `-viewer_cgns_batch_size`
146  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
147  - `20`
148
149* - `-checkpoint_interval`
150  - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only
151  - `0`
152
153* - `-checkpoint_vtk`
154  - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead.
155  - `false`
156
157* - `-viz_refine`
158  - Use regular refinement for VTK visualization
159  - `0`
160
161* - `-output_dir`
162  - Output directory for binary checkpoints and VTK files (if enabled).
163  - `.`
164
165* - `-output_add_stepnum2bin`
166  - Whether to add step numbers to output binary files
167  - `false`
168
169* - `-continue_filename`
170  - Path to file from which to continue from. Either binary file or CGNS
171  -
172
173* - `-ts_eval_times`
174  - Sets intermediate time points to evaluate the solution at. See [PETSc documentation](https://petsc.org/main/manualpages/TS/TSSetEvaluationTimes/) for more details.
175  -
176
177* - `-ts_eval_solutions_view`
178  - PETSc output format for `-ts_eval_times` solutions to be written to
179  -
180
181:::
182
183Note that to use `-continue_filename` with CGNS files, the same file must be used with `-dm_plex_filename` and `-dm_plex_cgns_parallel`.
184
185## Boundary conditions
186
187:::{list-table} Boundary Condition Options
188:header-rows: 1
189
190* - Option
191  - Description
192
193* - `-bc_wall`
194  - Use wall boundary conditions on this list of faces
195
196* - `-wall_comps`
197  - An array of constrained component numbers for wall BCs
198
199* - `-bc_slip`
200  - Use weak slip boundary condition on this list of faces
201
202* - `-bc_symmetry_x`
203  - Use symmetry boundary conditions, for the x component, on this list of faces
204
205* - `-bc_symmetry_y`
206  - Use symmetry boundary conditions, for the y component, on this list of faces
207
208* - `-bc_symmetry_z`
209  - Use symmetry boundary conditions, for the z component, on this list of faces
210
211* - `-bc_inflow`
212  - Use inflow boundary conditions on this list of faces
213
214* - `-bc_outflow`
215  - Use outflow boundary conditions on this list of faces
216
217* - `-bc_freestream`
218  - Use freestream boundary conditions on this list of faces
219
220:::
221
222For the case of a square/cubic mesh, the list of face indices to be used with `-bc_wall`, `bc_inflow`, `bc_outflow`, `bc_freestream`  and/or `-bc_symmetry_x`, `-bc_symmetry_y`, and `-bc_symmetry_z` are:
223
224:::{list-table} 2D Face ID Labels
225:header-rows: 1
226* - PETSc Face Name
227  - Cartesian direction
228  - Face ID
229
230* - faceMarkerBottom
231  - -z
232  - 1
233
234* - faceMarkerRight
235  - +x
236  - 2
237
238* - faceMarkerTop
239  - +z
240  - 3
241
242* - faceMarkerLeft
243  - -x
244  - 4
245:::
246
247:::{list-table} 3D Face ID Labels
248:header-rows: 1
249* - PETSc Face Name
250  - Cartesian direction
251  - Face ID
252
253* - faceMarkerBottom
254  - -z
255  - 1
256
257* - faceMarkerTop
258  - +z
259  - 2
260
261* - faceMarkerFront
262  - -y
263  - 3
264
265* - faceMarkerBack
266  - +y
267  - 4
268
269* - faceMarkerRight
270  - +x
271  - 5
272
273* - faceMarkerLeft
274  - -x
275  - 6
276
277:::
278
279
280Boundary conditions for compressible viscous flows are notoriously tricky.
281Here we offer some recommendations.
282
283### Inflow
284
285If in a region where the flow velocity is known (e.g., away from viscous walls), use `bc_freestream`, which solves a Riemann problem and can handle inflow and outflow (simultaneously and dynamically).
286It is stable and the least reflective boundary condition for acoustics.
287
288If near a viscous wall, you may want a specified inflow profile.
289Use `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
290These conditions may be either weak or strong, with the latter specifying velocity and temperature as essential boundary conditions and evaluating a boundary integral for the mass flux.
291The strong approach gives sharper resolution of velocity structures.
292We have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
293
294### Outflow
295
296If you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
297If thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
298The default Riemann solver, HLLC, is sufficient in this regard while the simpler HLL converts thermal structures exiting the domain into grid-scale reflecting acoustics.
299
300If acoustic reflections are not a concern and/or the flow is impacted by walls or interior structures that you wish to resolve to near the boundary, choose `bc_outflow`. This condition (with default `outflow_type: riemann`) is stable for both inflow and outflow, so can be used in areas that have recirculation and lateral boundaries in which the flow fluctuates.
301
302The simpler `bc_outflow` variant, `outflow_type: pressure`, requires that the flow be a strict outflow (or the problem becomes ill-posed and the solver will diverge).
303In our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
304The `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
305
306### Periodicity
307
308PETSc provides two ways to specify periodicity:
309
3101. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
311
312```yaml
313dm_plex:
314  shape: box
315  box_faces: 10,12,4
316  box_bd: none,none,periodic
317```
318
319The coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
320This choice of coordinates prevents evaluating boundary integrals that cross the periodicity, such as for the outflow Riemann problem in the presence of spanwise periodicity.
321
3222. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
323
324```yaml
325dm_plex:
326  shape: zbox
327  box_faces: 10,12,4
328  box_bd: none,none,periodic
329```
330
331Isoperiodicity enables standard boundary integrals, and is recommended for general use.
332At the time of this writing, it only supports one direction of periodicity.
333The `zbox` method uses [Z-ordering](https://en.wikipedia.org/wiki/Z-order_curve) to construct the mesh in parallel and provide an adequate initial partition, which makes it higher performance and avoids needing a partitioning package.
334
335## Advection-Diffusion
336
337There is a reduced mode for pure advection, which holds density $\rho$ and momentum density $\rho \bm u$ constant while advecting "total energy density" $E$.
338The advection problems can be run in both 2D and 3D, based on the DM defined for the problem.
339The following additional command-line options are available:
340
341:::{list-table} Advection Runtime Options
342:header-rows: 1
343
344* - Option
345  - Description
346  - Default value
347  - Unit
348
349* - `-units_meter`
350  - 1 meter in scaled length units
351  - `1E-2`
352  -
353
354* - `-units_second`
355  - 1 second in scaled time units
356  - `1E-2`
357  -
358
359* - `-units_kilogram`
360  - 1 kilogram in scaled mass units
361  - `1E-6`
362  -
363
364* - `-strong_form`
365  - Strong (1) or weak/integrated by parts (0) residual
366  - `0`
367  -
368
369* - `-stab`
370  - Stabilization method (`none`, `su`, or `supg`)
371  - `none`
372  -
373
374* - `-stab_tau`
375  - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`)
376  - `ctau`
377  -
378
379* - `-Ctau_t`
380  - Scaling factor on the temporal portion of the $\tau$ formulation
381  - 0.
382  -
383
384* - `-Ctau_a`
385  - Scaling factor on the advection portion of the $\tau$ formulation
386  - $P^2$
387  -
388
389* - `-Ctau_d`
390  - Scaling factor on the diffusion portion of the $\tau$ formulation
391  - $P^4$
392  -
393
394* - `-CtauS`
395  - Scale coefficient for stabilization tau (nondimensional)
396  - `0`
397  -
398
399* - `-wind_type`
400  - Wind type in Advection (`rotation`, `translation`, `boundary_layer`)
401  - `rotation`
402  -
403
404* - `-wind_translation`
405  - Constant wind vector when `-wind_type translation`
406  - `1,0,0`
407  -
408
409* - `-diffusion_coeff`
410  - Diffusion coefficient
411  - `0`
412  -
413
414* - `-E_wind`
415  - Total energy of inflow wind when `-wind_type translation`
416  - `1E6`
417  - `J`
418
419* - `-advection_ic_type`
420  - Initial condition type, (`sphere`, `cylinder`, `cosine_hill`, `skew`, `wave`, `boundary_layer`)
421  - `sphere`
422  -
423
424* - `-advection_ic_bubble_rc`
425  - For `sphere` or `cylinder` IC, characteristic radius of thermal bubble
426  - `1000`
427  - `m`
428
429* - `-advection_ic_bubble_continuity`
430  - For `sphere` or `cylinder` IC, different shapes of bubble, (`smooth`, `back_sharp`, `thick`, `cosine`)
431  - `smooth`
432  -
433
434* - `-advection_ic_wave_type`
435  - For `wave` IC, the wave form used for `-advection_ic_type wave` (`sine`, `square`)
436  - `sine`
437  -
438
439* - `-advection_ic_wave_frequency`
440  - For `wave` IC, frequency of the wave
441  - $2\pi$
442  - `1/s`
443
444* - `-advection_ic_wave_phase`
445  - For `wave` IC, phase angle of the wave
446  - $2\pi$
447  -
448
449* - `-advection_ic_bl_height_factor`
450  - For `boundary_layer` IC, sets the height of the linear boundary layer initial condition in proportion to the domain height
451  - $1$
452  -
453:::
454
455For 3D advection, an example of the `rotation` mode can be run with:
456
457```
458./navierstokes -problem advection -dm_plex_box_faces 10,10,10 -dm_plex_dim 3 -dm_plex_box_lower 0,0,0 -dm_plex_box_upper 8000,8000,8000 -bc_wall 1,2,3,4,5,6 -wall_comps 4 -wind_type rotation -implicit -stab su
459```
460
461and the `translation` mode with:
462
463```
464./navierstokes -problem advection -dm_plex_box_faces 10,10,10 -dm_plex_dim 3 -dm_plex_box_lower 0,0,0 -dm_plex_box_upper 8000,8000,8000 -wind_type translation -wind_translation .5,-1,0 -bc_inflow 1,2,3,4,5,6
465```
466
467For 2D advection, an example of the `rotation` mode can be run with:
468
469```
470./navierstokes -problem advection -dm_plex_box_faces 20,20 -dm_plex_box_lower 0,0 -dm_plex_box_upper 1000,1000 -bc_wall 1,2,3,4 -wall_comps 4 -wind_type rotation -implicit -stab supg
471```
472
473and the `translation` mode with:
474
475```
476./navierstokes -problem advection -dm_plex_box_faces 20,20 -dm_plex_box_lower 0,0 -dm_plex_box_upper 1000,1000 -units_meter 1e-4 -wind_type translation -wind_translation 1,-.5 -bc_inflow 1,2,3,4
477```
478Note the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
479
480## Inviscid Ideal Gas
481
482### Isentropic Euler vortex
483
484For the Isentropic Vortex problem, the following additional command-line options are available:
485
486:::{list-table} Isentropic Vortex Runtime Options
487:header-rows: 1
488
489* - Option
490  - Description
491  - Default value
492  - Unit
493
494* - `-center`
495  - Location of vortex center
496  - `(lx,ly,lz)/2`
497  - `(m,m,m)`
498
499* - `-units_meter`
500  - 1 meter in scaled length units
501  - `1E-2`
502  -
503
504* - `-units_second`
505  - 1 second in scaled time units
506  - `1E-2`
507  -
508
509* - `-mean_velocity`
510  - Background velocity vector
511  - `(1,1,0)`
512  -
513
514* - `-vortex_strength`
515  - Strength of vortex < 10
516  - `5`
517  -
518
519* - `-c_tau`
520  - Stabilization constant
521  - `0.5`
522  -
523:::
524
525This problem can be run with:
526
527```
528./navierstokes -problem euler_vortex -dm_plex_box_faces 20,20,1 -dm_plex_box_lower 0,0,0 -dm_plex_box_upper 1000,1000,50 -dm_plex_dim 3 -bc_inflow 4,6 -bc_outflow 3,5 -bc_symmetry_z 1,2 -mean_velocity .5,-.8,0.
529```
530
531### Sod shock tube
532
533For the Shock Tube problem, the following additional command-line options are available:
534
535:::{list-table} Shock Tube Runtime Options
536:header-rows: 1
537
538* - Option
539  - Description
540  - Default value
541  - Unit
542
543* - `-units_meter`
544  - 1 meter in scaled length units
545  - `1E-2`
546  -
547
548* - `-units_second`
549  - 1 second in scaled time units
550  - `1E-2`
551  -
552
553* - `-yzb`
554  - Use YZB discontinuity capturing
555  - `none`
556  -
557
558* - `-stab`
559  - Stabilization method (`none`, `su`, or `supg`)
560  - `none`
561  -
562:::
563
564This problem can be run with:
565
566```
567./navierstokes -problem shocktube -yzb -stab su -bc_symmetry_z 3,4 -bc_symmetry_y 1,2 -bc_wall 5,6 -dm_plex_dim 3 -dm_plex_box_lower 0,0,0 -dm_plex_box_upper 1000,100,100 -dm_plex_box_faces 200,1,1 -units_second 0.1
568```
569
570## Newtonian viscosity, Ideal Gas
571
572For the Density Current, Channel, and Blasius problems, the following common command-line options are available:
573
574:::{list-table} Newtonian Ideal Gas problems Runtime Options
575:header-rows: 1
576
577* - Option
578  - Description
579  - Default value
580  - Unit
581
582* - `-units_meter`
583  - 1 meter in scaled length units
584  - `1`
585  -
586
587* - `-units_second`
588  - 1 second in scaled time units
589  - `1`
590  -
591
592* - `-units_kilogram`
593  - 1 kilogram in scaled mass units
594  - `1`
595  -
596
597* - `-units_Kelvin`
598  - 1 Kelvin in scaled temperature units
599  - `1`
600  -
601
602* - `-stab`
603  - Stabilization method (`none`, `su`, or `supg`)
604  - `none`
605  -
606
607* - `-c_tau`
608  - Stabilization constant, $c_\tau$
609  - `0.5`
610  -
611
612* - `-Ctau_t`
613  - Stabilization time constant, $C_t$
614  - `1.0`
615  -
616
617* - `-Ctau_v`
618  - Stabilization viscous constant, $C_v$
619  - `36, 60, 128 for degree = 1, 2, 3`
620  -
621
622* - `-Ctau_C`
623  - Stabilization continuity constant, $C_c$
624  - `1.0`
625  -
626
627* - `-Ctau_M`
628  - Stabilization momentum constant, $C_m$
629  - `1.0`
630  -
631
632* - `-Ctau_E`
633  - Stabilization energy constant, $C_E$
634  - `1.0`
635  -
636
637* - `-div_diff_flux_projection_method`
638  - Method used to calculate divergence of diffusive flux projection (`none`, `direct`, or `indirect`)
639  - `none`
640  -
641
642* - `-div_diff_flux_projection_ksp*`
643  - Control the KSP object for the projection of the divergence of diffusive flux
644  - N/A
645  -
646
647* - `-cv`
648  - Heat capacity at constant volume
649  - `717`
650  - `J/(kg K)`
651
652* - `-cp`
653  - Heat capacity at constant pressure
654  - `1004`
655  - `J/(kg K)`
656
657* - `-gravity`
658  - Gravitational acceleration vector
659  - `0,0,0`
660  - `m/s^2`
661
662* - `-lambda`
663  - Stokes hypothesis second viscosity coefficient
664  - `-2/3`
665  -
666
667* - `-mu`
668  - Shear dynamic viscosity coefficient
669  - `1.8e-5`
670  -  `Pa s`
671
672* - `-k`
673  - Thermal conductivity
674  - `0.02638`
675  - `W/(m K)`
676
677* - `-newtonian_unit_tests`
678  - Developer option to test properties
679  - `false`
680  - boolean
681
682* - `-state_var`
683  - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$), `primitive` ($P, \bm{u}, T$), or `entropy` ($\frac{\gamma - s}{\gamma - 1} - \frac{\rho}{P} (e - c_v T),\ \frac{\rho}{P} \bm{u},\ -\frac{\rho}{P}$) where  $s = \ln(P\rho^{-\gamma})$
684  - `conservative`
685  - string
686
687* - `-idl_decay_time`
688  - Characteristic timescale of the pressure deviance decay. The timestep is good starting point
689  - `-1` (disabled)
690  - `s`
691
692* - `-idl_start`
693  - Start of IDL in the x direction
694  - `0`
695  - `m`
696
697* - `-idl_length`
698  - Length of IDL in the positive x direction
699  - `0`
700  - `m`
701
702* - `-idl_pressure`
703  - Pressure used for IDL reference pressure
704  -  `-reference_pressure`
705  - `Pa`
706
707* - `-sgs_model_type`
708  - Type of subgrid stress model to use. Currently only `data_driven` is available
709  - `none`
710  - string
711
712* - `-sgs_model_dd_leakyrelu_alpha`
713  - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU
714  - 0
715  -
716
717* - `-sgs_model_dd_parameter_dir`
718  - Path to directory with data-driven model parameters (weights, biases, etc.)
719  - `./dd_sgs_parameters`
720  - string
721
722* - `-sgs_model_dd_model_implementation`
723  - Which computational implementation to use for SGS DD model (`fused`, `sequential_ceed`, `sequential_torch`)
724  - `fused`
725  - string
726
727* - `-sgs_model_dd_torch_model_path`
728  - Path to the PyTorch `*.pt` file containing the DD inference model
729  -
730  - string
731
732* - `-sgs_model_dd_torch_model_device`
733  - What hardware to perform the model inference on (`cpu`, `cuda`, `hip`, `xpu`)
734  - Default matches the libCEED backend
735  - string
736
737* - `-diff_filter_monitor`
738  - Enable differential filter TSMonitor
739  - `false`
740  - boolean
741
742* - `-diff_filter_grid_based_width`
743  - Use filter width based on the grid size
744  - `false`
745  - boolean
746
747* - `-diff_filter_width_scaling`
748  - Anisotropic scaling for filter width in wall-aligned coordinates (snz)
749  - `1,1,1`
750  - `m`
751
752* - `-diff_filter_kernel_scaling`
753  - Scaling to make differential kernel size equivalent to other filter kernels
754  - `0.1`
755  - `m^2`
756
757* - `-diff_filter_wall_damping_function`
758  - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`)
759  - `none`
760  - string
761
762* - `-diff_filter_wall_damping_constant`
763  - Constant for the wall-damping function. $A^+$ for `van_driest` damping function.
764  - 25
765  -
766
767* - `-diff_filter_friction_length`
768  - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions
769  - 0
770  - `m`
771
772* - `-sgs_train_enable`
773  - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis.
774  - `false`
775  - boolean
776
777* - `-sgs_train_write_data_interval`
778  - Number of timesteps between writing training data into SmartRedis database
779  - `1`
780  -
781
782* - `-sgs_train_overwrite_data`
783  - Whether new training data should overwrite old data on database
784  - `true`
785  - boolean
786
787* - `-sgs_train_filter_widths`
788  - List of scalar values for different filter widths to calculate for training data
789  -
790  - `m`
791
792* - `-smartsim_collocated_num_ranks`
793  - Number of MPI ranks associated with each collocated database (i.e. ranks per node)
794  - `1`
795  -
796:::
797
798### Gaussian Wave
799
800The Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
801
802:::{list-table} Gaussian Wave Runtime Options
803:header-rows: 1
804
805* - Option
806  - Description
807  - Default value
808  - Unit
809
810* - `-freestream_riemann`
811  - Riemann solver for boundaries (HLL or HLLC)
812  - `hllc`
813  -
814
815* - `-freestream_velocity`
816  - Freestream velocity vector
817  - `0,0,0`
818  - `m/s`
819
820* - `-freestream_temperature`
821  - Freestream temperature
822  - `288`
823  - `K`
824
825* - `-freestream_pressure`
826  - Freestream pressure
827  - `1.01e5`
828  - `Pa`
829
830* - `-epicenter`
831  - Coordinates of center of perturbation
832  - `0,0,0`
833  - `m`
834
835* - `-amplitude`
836  - Amplitude of the perturbation
837  - `0.1`
838  -
839
840* - `-width`
841  - Width parameter of the perturbation
842  - `0.002`
843  - `m`
844
845:::
846
847This problem can be run with the `examples/gaussianwave.yaml` file via:
848
849```
850./build/navierstokes -options_file examples/gaussianwave.yaml
851```
852
853```{literalinclude} ../examples/gaussianwave.yaml
854:language: yaml
855```
856
857### Vortex Shedding - Flow past Cylinder
858
859The vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
860
861:::{list-table} Vortex Shedding Runtime Options
862:header-rows: 1
863
864* - Option
865  - Description
866  - Default value
867  - Unit
868
869* - `-freestream_velocity`
870  - Freestream velocity vector
871  - `0,0,0`
872  - `m/s`
873
874* - `-freestream_temperature`
875  - Freestream temperature
876  - `288`
877  - `K`
878
879* - `-freestream_pressure`
880  - Freestream pressure
881  - `1.01e5`
882  - `Pa`
883
884:::
885
886The initial condition is taken from `-reference_temperature` and `-reference_pressure`.
887To run this problem, first generate a mesh:
888
889```console
890$ make -C examples/meshes
891```
892
893Then run by building the executable and running:
894
895```console
896$ make -j
897$ mpiexec -n 6 build/navierstokes -options_file examples/vortexshedding.yaml -{ts,snes}_monitor_
898```
899
900The vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
901The above run writes a file named `force.csv` (see `ts_monitor_wall_force` in `examples/vortexshedding.yaml`), which can be postprocessed by running to create a figure showing lift and drag coefficients over time.
902
903```console
904$ python postprocess/vortexshedding.py
905```
906
907```{literalinclude} ../examples/vortexshedding.yaml
908:language: yaml
909```
910
911### Density current
912
913The Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
914
915:::{list-table} Density Current Runtime Options
916:header-rows: 1
917
918* - Option
919  - Description
920  - Default value
921  - Unit
922
923* - `-center`
924  - Location of bubble center
925  - `(lx,ly,lz)/2`
926  - `(m,m,m)`
927
928* - `-dc_axis`
929  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
930  - `(0,0,0)`
931  -
932
933* - `-rc`
934  - Characteristic radius of thermal bubble
935  - `1000`
936  - `m`
937
938* - `-theta0`
939  - Reference potential temperature
940  - `300`
941  - `K`
942
943* - `-thetaC`
944  - Perturbation of potential temperature
945  - `-15`
946  - `K`
947
948* - `-P0`
949  - Atmospheric pressure
950  - `1E5`
951  - `Pa`
952
953* - `-N`
954  - Brunt-Vaisala frequency
955  - `0.01`
956  - `1/s`
957:::
958
959This problem can be run with:
960
961```
962./navierstokes -problem density_current -dm_plex_box_faces 16,1,8 -degree 1 -dm_plex_box_lower 0,0,0 -dm_plex_box_upper 2000,125,1000 -dm_plex_dim 3 -rc 400. -bc_wall 1,2,5,6 -wall_comps 1,2,3 -bc_symmetry_y 3,4 -mu 75
963```
964
965### Channel flow
966
967The Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
968
969:::{list-table} Channel Runtime Options
970:header-rows: 1
971
972* - Option
973  - Description
974  - Default value
975  - Unit
976
977* - `-umax`
978  - Maximum/centerline velocity of the flow
979  - `10`
980  - `m/s`
981
982* - `-theta0`
983  - Reference potential temperature
984  - `300`
985  - `K`
986
987* - `-P0`
988  - Atmospheric pressure
989  - `1E5`
990  - `Pa`
991
992* - `-body_force_scale`
993  - Multiplier for body force (`-1` for flow reversal)
994  - 1
995  -
996:::
997
998This problem can be run with the `examples/channel.yaml` file via:
999
1000```
1001./build/navierstokes -options_file examples/channel.yaml
1002```
1003```{literalinclude} ../examples/channel.yaml
1004:language: yaml
1005```
1006
1007(example-blasius)=
1008
1009### Blasius boundary layer
1010
1011The Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
1012
1013:::{list-table} Blasius Runtime Options
1014:header-rows: 1
1015
1016* - Option
1017  - Description
1018  - Default value
1019  - Unit
1020
1021* - `-velocity_infinity`
1022  - Freestream velocity
1023  - `40`
1024  - `m/s`
1025
1026* - `-temperature_infinity`
1027  - Freestream temperature
1028  - `288`
1029  - `K`
1030
1031* - `-pressure_infinity`
1032  - Atmospheric pressure, also sets IDL reference pressure
1033  - `1.01E5`
1034  - `Pa`
1035
1036* - `-temperature_wall`
1037  - Wall temperature
1038  - `288`
1039  - `K`
1040
1041* - `-delta0`
1042  - Boundary layer height at the inflow
1043  - `4.2e-3`
1044  - `m`
1045
1046* - `-platemesh_modify_mesh`
1047  - Whether to modify the mesh using the given options below.
1048  - `false`
1049  -
1050
1051* - `-platemesh_refine_height`
1052  - Height at which `-platemesh_Ndelta` number of elements should refined into
1053  - `5.9E-4`
1054  - `m`
1055
1056* - `-platemesh_Ndelta`
1057  - Number of elements to keep below `-platemesh_refine_height`
1058  - `45`
1059  -
1060
1061* - `-platemesh_growth`
1062  - Growth rate of the elements in the refinement region
1063  - `1.08`
1064  -
1065
1066* - `-platemesh_top_angle`
1067  - Downward angle of the top face of the domain. This face serves as an outlet.
1068  - `5`
1069  - `degrees`
1070
1071* - `-platemesh_y_node_locs_path`
1072  - Path to file with y node locations. If empty, will use mesh warping instead.
1073  - `""`
1074  -
1075
1076* - `-stg_use`
1077  - Whether to use STG for the inflow conditions
1078  - `false`
1079  -
1080
1081* - `-n_chebyshev`
1082  - Number of Chebyshev terms
1083  - `20`
1084  -
1085
1086* - `-chebyshev_`
1087  - Prefix for Chebyshev snes solve
1088  -
1089  -
1090
1091:::
1092
1093This problem can be run with the `examples/blasius.yaml` file via:
1094
1095```
1096./build/navierstokes -options_file examples/blasius.yaml
1097```
1098
1099```{literalinclude} ../examples/blasius.yaml
1100:language: yaml
1101```
1102
1103### STG Inflow for Flat Plate
1104
1105Using the STG Inflow for the blasius problem adds the following command-line options:
1106
1107:::{list-table} Blasius Runtime Options
1108:header-rows: 1
1109
1110* - Option
1111  - Description
1112  - Default value
1113  - Unit
1114
1115* - `-stg_inflow_path`
1116  - Path to the STGInflow file
1117  - `./STGInflow.dat`
1118  -
1119
1120* - `-stg_rand_path`
1121  - Path to the STGRand file
1122  - `./STGRand.dat`
1123  -
1124
1125* - `-stg_alpha`
1126  - Growth rate of the wavemodes
1127  - `1.01`
1128  -
1129
1130* - `-stg_u0`
1131  - Convective velocity, $U_0$
1132  - `0.0`
1133  - `m/s`
1134
1135* - `-stg_mean_only`
1136  - Only impose the mean velocity (no fluctutations)
1137  - `false`
1138  -
1139
1140* - `-stg_strong`
1141  - Strongly enforce the STG inflow boundary condition
1142  - `false`
1143  -
1144
1145* - `-stg_fluctuating_IC`
1146  - "Extrude" the fluctuations through the domain as an initial condition
1147  - `false`
1148  -
1149
1150* - `-stg_dx`
1151  - Set the element size in the x direction. Default is calculated for box meshes, assuming equispaced elements.
1152  -
1153  - `m`
1154
1155* - `-stg_h_scale_factor`
1156  - Scale element size for cutoff frequency calculation
1157  - $1/p$
1158  -
1159
1160:::
1161
1162This problem can be run with the `examples/blasius.yaml` file via:
1163
1164```
1165./build/navierstokes -options_file examples/blasius.yaml -stg_use true
1166```
1167
1168Note the added `-stg_use true` flag
1169This overrides the `stg: use: false` setting in the `examples/blasius.yaml` file, enabling the use of the STG inflow.
1170