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