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