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