xref: /honee/doc/runtime_options.md (revision 354560d100c3151a85e6abf4f71c41dd4f95bc3d)
1965d9f74SJames Wright# Runtime options
2965d9f74SJames Wright
3965d9f74SJames Wright## Common Options
4ce03971bSJames WrightThe Navier-Stokes HONEE app is controlled via command-line options.
5965d9f74SJames WrightThe following options are common among all problem types:
6965d9f74SJames Wright
7965d9f74SJames Wright:::{list-table} Common Runtime Options
8965d9f74SJames Wright:header-rows: 1
9965d9f74SJames Wright
10965d9f74SJames Wright* - Option
11965d9f74SJames Wright  - Description
12965d9f74SJames Wright  - Default value
13965d9f74SJames Wright
14965d9f74SJames Wright* - `-ceed`
15965d9f74SJames Wright  - CEED resource specifier
16965d9f74SJames Wright  - `/cpu/self/opt/blocked`
17965d9f74SJames Wright
18965d9f74SJames Wright* - `-problem`
19965d9f74SJames Wright  - Problem to solve (`advection`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`)
20965d9f74SJames Wright  - `density_current`
21965d9f74SJames Wright
22965d9f74SJames Wright* - `-implicit`
23965d9f74SJames Wright  - Use implicit time integrator formulation
24965d9f74SJames Wright  -
25965d9f74SJames Wright
26965d9f74SJames Wright* - `-degree`
27965d9f74SJames Wright  - Polynomial degree of tensor product basis (must be >= 1)
28965d9f74SJames Wright  - `1`
29965d9f74SJames Wright
30965d9f74SJames Wright* - `-q_extra`
31965d9f74SJames Wright  - Number of extra quadrature points
32965d9f74SJames Wright  - `0`
33965d9f74SJames Wright
34965d9f74SJames Wright* - `-ts_monitor_solution`
35965d9f74SJames Wright  - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
36965d9f74SJames Wright  -
37965d9f74SJames Wright
38965d9f74SJames Wright* - `-ts_monitor_solution_interval`
39965d9f74SJames Wright  - Number of time steps between visualization output frames.
40965d9f74SJames Wright  - `1`
41965d9f74SJames Wright
42965d9f74SJames Wright* - `-viewer_cgns_batch_size`
43965d9f74SJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
44965d9f74SJames Wright  - `20`
45965d9f74SJames Wright
46965d9f74SJames Wright* - `-checkpoint_interval`
47965d9f74SJames Wright  - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only
48965d9f74SJames Wright  - `10`
49965d9f74SJames Wright
50965d9f74SJames Wright* - `-checkpoint_vtk`
51965d9f74SJames Wright  - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead.
52965d9f74SJames Wright  - `false`
53965d9f74SJames Wright
54965d9f74SJames Wright* - `-viz_refine`
55965d9f74SJames Wright  - Use regular refinement for VTK visualization
56965d9f74SJames Wright  - `0`
57965d9f74SJames Wright
58965d9f74SJames Wright* - `-output_dir`
59965d9f74SJames Wright  - Output directory for binary checkpoints and VTK files (if enabled).
60965d9f74SJames Wright  - `.`
61965d9f74SJames Wright
62965d9f74SJames Wright* - `-output_add_stepnum2bin`
63965d9f74SJames Wright  - Whether to add step numbers to output binary files
64965d9f74SJames Wright  - `false`
65965d9f74SJames Wright
66965d9f74SJames Wright* - `-continue_filename`
672136baaaSJames Wright  - Path to file from which to continue from
682136baaaSJames Wright  -
69965d9f74SJames Wright
70965d9f74SJames Wright* - `-bc_wall`
71965d9f74SJames Wright  - Use wall boundary conditions on this list of faces
72965d9f74SJames Wright  -
73965d9f74SJames Wright
74965d9f74SJames Wright* - `-wall_comps`
75965d9f74SJames Wright  - An array of constrained component numbers for wall BCs
76965d9f74SJames Wright  -
77965d9f74SJames Wright
78965d9f74SJames Wright* - `-bc_slip`
79965d9f74SJames Wright  - Use weak slip boundary condition on this list of faces
80965d9f74SJames Wright  -
81965d9f74SJames Wright
82965d9f74SJames Wright* - `-bc_symmetry_x`
83965d9f74SJames Wright  - Use symmetry boundary conditions, for the x component, on this list of faces
84965d9f74SJames Wright  -
85965d9f74SJames Wright
86965d9f74SJames Wright* - `-bc_symmetry_y`
87965d9f74SJames Wright  - Use symmetry boundary conditions, for the y component, on this list of faces
88965d9f74SJames Wright  -
89965d9f74SJames Wright
90965d9f74SJames Wright* - `-bc_symmetry_z`
91965d9f74SJames Wright  - Use symmetry boundary conditions, for the z component, on this list of faces
92965d9f74SJames Wright  -
93965d9f74SJames Wright
94965d9f74SJames Wright* - `-bc_inflow`
95965d9f74SJames Wright  - Use inflow boundary conditions on this list of faces
96965d9f74SJames Wright  -
97965d9f74SJames Wright
98965d9f74SJames Wright* - `-bc_outflow`
99965d9f74SJames Wright  - Use outflow boundary conditions on this list of faces
100965d9f74SJames Wright  -
101965d9f74SJames Wright
102965d9f74SJames Wright* - `-bc_freestream`
103965d9f74SJames Wright  - Use freestream boundary conditions on this list of faces
104965d9f74SJames Wright  -
105965d9f74SJames Wright
106965d9f74SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval`
107965d9f74SJames Wright  - Number of timesteps between statistics collection
108965d9f74SJames Wright  - `1`
109965d9f74SJames Wright
110965d9f74SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer`
111965d9f74SJames Wright  - Sets the PetscViewer for the statistics file writing, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`). Also turns the statistics collection on.
112965d9f74SJames Wright  -
113965d9f74SJames Wright
114965d9f74SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval`
115965d9f74SJames Wright  - Number of timesteps between statistics file writing (`-1` means only at end of run)
116965d9f74SJames Wright  - `-1`
117965d9f74SJames Wright
118965d9f74SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size`
119965d9f74SJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
120965d9f74SJames Wright  - `20`
121965d9f74SJames Wright
122965d9f74SJames Wright* - `-ts_monitor_wall_force`
123965d9f74SJames Wright  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
124965d9f74SJames Wright  -
125965d9f74SJames Wright
12625125139SJames Wright* - `-ts_monitor_total_kinetic_energy`
12725125139SJames Wright  - 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.
12825125139SJames Wright  -
12925125139SJames Wright
13025125139SJames Wright* - `-ts_monitor_total_kinetic_energy_interval`
13125125139SJames Wright  - Number of timesteps between calculating and printing the total kinetic energy
13225125139SJames Wright  - `1`
13325125139SJames Wright
1348b774af8SJames Wright* - `-honee_check_step_interval`
1358b774af8SJames Wright  - Number of time steps between checking the solution for Nans. Negative interval indicates it will not run.
1368b774af8SJames Wright  - `-1`
1378b774af8SJames Wright
138*354560d1SJames Wright* - `-honee_max_wall_time_duration`
139*354560d1SJames Wright  - 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`
140*354560d1SJames Wright  - `'0'`
141*354560d1SJames Wright
142*354560d1SJames Wright* - `-honee_max_wall_time_buffer`
143*354560d1SJames Wright  - Approximate time required to exit simulation cleanly (write checkpoints, etc.)
144*354560d1SJames Wright  - `'00:01'`
145*354560d1SJames Wright
146*354560d1SJames Wright* - `-honee_max_wall_time_interval`
147*354560d1SJames Wright  - Number of time steps between checking whether simulation should stop based on `-honee_max_wall_time_duration`
148*354560d1SJames Wright  - `1`
149*354560d1SJames Wright
150965d9f74SJames Wright* - `-mesh_transform`
151965d9f74SJames Wright  - Transform the mesh, usually for an initial box mesh.
152965d9f74SJames Wright  - `none`
153965d9f74SJames Wright
154965d9f74SJames Wright* - `-snes_view`
155965d9f74SJames Wright  - View PETSc `SNES` nonlinear solver configuration
156965d9f74SJames Wright  -
157965d9f74SJames Wright
158965d9f74SJames Wright* - `-log_view`
159965d9f74SJames Wright  - View PETSc performance log
160965d9f74SJames Wright  -
161965d9f74SJames Wright
162965d9f74SJames Wright* - `-help`
163965d9f74SJames Wright  - View comprehensive information about run-time options
164965d9f74SJames Wright  -
165ce03971bSJames Wright
166ce03971bSJames Wright* - `-test_type`
167ce03971bSJames Wright  - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified
168ce03971bSJames Wright  - `none`
169ce03971bSJames Wright
170ce03971bSJames Wright* - `-compare_final_state_atol`
171ce03971bSJames Wright  - Test absolute tolerance
172ce03971bSJames Wright  - `1E-11`
173ce03971bSJames Wright
174ce03971bSJames Wright* - `-compare_final_state_filename`
175ce03971bSJames Wright  - Test filename
176ce03971bSJames Wright  -
177ce03971bSJames Wright
178965d9f74SJames Wright:::
179965d9f74SJames Wright
180965d9f74SJames WrightFor 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:
181965d9f74SJames Wright
182965d9f74SJames Wright:::{list-table} 2D Face ID Labels
183965d9f74SJames Wright:header-rows: 1
184965d9f74SJames Wright* - PETSc Face Name
185965d9f74SJames Wright  - Cartesian direction
186965d9f74SJames Wright  - Face ID
187965d9f74SJames Wright
188965d9f74SJames Wright* - faceMarkerBottom
189965d9f74SJames Wright  - -z
190965d9f74SJames Wright  - 1
191965d9f74SJames Wright
192965d9f74SJames Wright* - faceMarkerRight
193965d9f74SJames Wright  - +x
194965d9f74SJames Wright  - 2
195965d9f74SJames Wright
196965d9f74SJames Wright* - faceMarkerTop
197965d9f74SJames Wright  - +z
198965d9f74SJames Wright  - 3
199965d9f74SJames Wright
200965d9f74SJames Wright* - faceMarkerLeft
201965d9f74SJames Wright  - -x
202965d9f74SJames Wright  - 4
203965d9f74SJames Wright:::
204965d9f74SJames Wright
205965d9f74SJames Wright:::{list-table} 3D Face ID Labels
206965d9f74SJames Wright:header-rows: 1
207965d9f74SJames Wright* - PETSc Face Name
208965d9f74SJames Wright  - Cartesian direction
209965d9f74SJames Wright  - Face ID
210965d9f74SJames Wright
211965d9f74SJames Wright* - faceMarkerBottom
212965d9f74SJames Wright  - -z
213965d9f74SJames Wright  - 1
214965d9f74SJames Wright
215965d9f74SJames Wright* - faceMarkerTop
216965d9f74SJames Wright  - +z
217965d9f74SJames Wright  - 2
218965d9f74SJames Wright
219965d9f74SJames Wright* - faceMarkerFront
220965d9f74SJames Wright  - -y
221965d9f74SJames Wright  - 3
222965d9f74SJames Wright
223965d9f74SJames Wright* - faceMarkerBack
224965d9f74SJames Wright  - +y
225965d9f74SJames Wright  - 4
226965d9f74SJames Wright
227965d9f74SJames Wright* - faceMarkerRight
228965d9f74SJames Wright  - +x
229965d9f74SJames Wright  - 5
230965d9f74SJames Wright
231965d9f74SJames Wright* - faceMarkerLeft
232965d9f74SJames Wright  - -x
233965d9f74SJames Wright  - 6
234965d9f74SJames Wright:::
235965d9f74SJames Wright
236965d9f74SJames Wright## Boundary conditions
237965d9f74SJames Wright
238965d9f74SJames WrightBoundary conditions for compressible viscous flows are notoriously tricky.
239965d9f74SJames WrightHere we offer some recommendations.
240965d9f74SJames Wright
241965d9f74SJames Wright### Inflow
242965d9f74SJames Wright
243965d9f74SJames WrightIf 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).
244965d9f74SJames WrightIt is stable and the least reflective boundary condition for acoustics.
245965d9f74SJames Wright
246965d9f74SJames WrightIf near a viscous wall, you may want a specified inflow profile.
247965d9f74SJames WrightUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
248965d9f74SJames WrightThese 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.
249965d9f74SJames WrightThe strong approach gives sharper resolution of velocity structures.
250965d9f74SJames WrightWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
251965d9f74SJames Wright
252965d9f74SJames Wright### Outflow
253965d9f74SJames Wright
254965d9f74SJames WrightIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
255965d9f74SJames WrightIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
256965d9f74SJames WrightThe default Riemann solver, HLLC, is sufficient in this regard while the simpler HLL converts thermal structures exiting the domain into grid-scale reflecting acoustics.
257965d9f74SJames Wright
258965d9f74SJames WrightIf 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.
259965d9f74SJames Wright
260965d9f74SJames WrightThe 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).
261965d9f74SJames WrightIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
262965d9f74SJames WrightThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
263965d9f74SJames Wright
264965d9f74SJames Wright### Periodicity
265965d9f74SJames Wright
266965d9f74SJames WrightPETSc provides two ways to specify periodicity:
267965d9f74SJames Wright
268965d9f74SJames Wright1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
269965d9f74SJames Wright
270965d9f74SJames Wright```yaml
271965d9f74SJames Wrightdm_plex:
272965d9f74SJames Wright  shape: box
273965d9f74SJames Wright  box_faces: 10,12,4
274965d9f74SJames Wright  box_bd: none,none,periodic
275965d9f74SJames Wright```
276965d9f74SJames Wright
277965d9f74SJames WrightThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
278965d9f74SJames WrightThis choice of coordinates prevents evaluating boundary integrals that cross the periodicity, such as for the outflow Riemann problem in the presence of spanwise periodicity.
279965d9f74SJames Wright
280965d9f74SJames Wright2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
281965d9f74SJames Wright
282965d9f74SJames Wright```yaml
283965d9f74SJames Wrightdm_plex:
284965d9f74SJames Wright  shape: zbox
285965d9f74SJames Wright  box_faces: 10,12,4
286965d9f74SJames Wright  box_bd: none,none,periodic
287965d9f74SJames Wright```
288965d9f74SJames Wright
289965d9f74SJames WrightIsoperiodicity enables standard boundary integrals, and is recommended for general use.
290965d9f74SJames WrightAt the time of this writing, it only supports one direction of periodicity.
291965d9f74SJames WrightThe `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.
292965d9f74SJames Wright
293da02a6e7SJames Wright## Advection-Diffusion
294965d9f74SJames Wright
295da02a6e7SJames WrightThere is a reduced mode for pure advection, which holds density $\rho$ and momentum density $\rho \bm u$ constant while advecting "total energy density" $E$.
296965d9f74SJames WrightThe advection problems can be run in both 2D and 3D, based on the DM defined for the problem.
297965d9f74SJames WrightThe following additional command-line options are available:
298965d9f74SJames Wright
299965d9f74SJames Wright:::{list-table} Advection Runtime Options
300965d9f74SJames Wright:header-rows: 1
301965d9f74SJames Wright
302965d9f74SJames Wright* - Option
303965d9f74SJames Wright  - Description
304965d9f74SJames Wright  - Default value
305965d9f74SJames Wright  - Unit
306965d9f74SJames Wright
307965d9f74SJames Wright* - `-units_meter`
308965d9f74SJames Wright  - 1 meter in scaled length units
309965d9f74SJames Wright  - `1E-2`
310965d9f74SJames Wright  -
311965d9f74SJames Wright
312965d9f74SJames Wright* - `-units_second`
313965d9f74SJames Wright  - 1 second in scaled time units
314965d9f74SJames Wright  - `1E-2`
315965d9f74SJames Wright  -
316965d9f74SJames Wright
317965d9f74SJames Wright* - `-units_kilogram`
318965d9f74SJames Wright  - 1 kilogram in scaled mass units
319965d9f74SJames Wright  - `1E-6`
320965d9f74SJames Wright  -
321965d9f74SJames Wright
322965d9f74SJames Wright* - `-strong_form`
323965d9f74SJames Wright  - Strong (1) or weak/integrated by parts (0) residual
324965d9f74SJames Wright  - `0`
325965d9f74SJames Wright  -
326965d9f74SJames Wright
327965d9f74SJames Wright* - `-stab`
328965d9f74SJames Wright  - Stabilization method (`none`, `su`, or `supg`)
329965d9f74SJames Wright  - `none`
330965d9f74SJames Wright  -
331965d9f74SJames Wright
332965d9f74SJames Wright* - `-stab_tau`
333965d9f74SJames Wright  - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`)
334965d9f74SJames Wright  - `ctau`
335965d9f74SJames Wright  -
336965d9f74SJames Wright
337965d9f74SJames Wright* - `-Ctau_t`
338965d9f74SJames Wright  - Scaling factor on the temporal portion of the $\tau$ formulation
339965d9f74SJames Wright  - 0.
340965d9f74SJames Wright  -
341965d9f74SJames Wright
342965d9f74SJames Wright* - `-Ctau_a`
343965d9f74SJames Wright  - Scaling factor on the advection portion of the $\tau$ formulation
344965d9f74SJames Wright  - $P^2$
345965d9f74SJames Wright  -
346965d9f74SJames Wright
347fbabb365SJames Wright* - `-Ctau_d`
348fbabb365SJames Wright  - Scaling factor on the diffusion portion of the $\tau$ formulation
349fbabb365SJames Wright  - $P^4$
350fbabb365SJames Wright  -
351fbabb365SJames Wright
352965d9f74SJames Wright* - `-CtauS`
353965d9f74SJames Wright  - Scale coefficient for stabilization tau (nondimensional)
354965d9f74SJames Wright  - `0`
355965d9f74SJames Wright  -
356965d9f74SJames Wright
357965d9f74SJames Wright* - `-wind_type`
3583d1afcc1SJames Wright  - Wind type in Advection (`rotation`, `translation`, `boundary_layer`)
359965d9f74SJames Wright  - `rotation`
360965d9f74SJames Wright  -
361965d9f74SJames Wright
362965d9f74SJames Wright* - `-wind_translation`
363965d9f74SJames Wright  - Constant wind vector when `-wind_type translation`
364965d9f74SJames Wright  - `1,0,0`
365965d9f74SJames Wright  -
366965d9f74SJames Wright
367965d9f74SJames Wright* - `-diffusion_coeff`
368965d9f74SJames Wright  - Diffusion coefficient
369965d9f74SJames Wright  - `0`
370965d9f74SJames Wright  -
371965d9f74SJames Wright
372965d9f74SJames Wright* - `-E_wind`
373965d9f74SJames Wright  - Total energy of inflow wind when `-wind_type translation`
374965d9f74SJames Wright  - `1E6`
375965d9f74SJames Wright  - `J`
376965d9f74SJames Wright
377965d9f74SJames Wright* - `-advection_ic_type`
3783d1afcc1SJames Wright  - Initial condition type, (`sphere`, `cylinder`, `cosine_hill`, `skew`, `wave`, `boundary_layer`)
379965d9f74SJames Wright  - `sphere`
380965d9f74SJames Wright  -
381965d9f74SJames Wright
38280e9ac5bSJames Wright* - `-advection_ic_bubble_rc`
38380e9ac5bSJames Wright  - For `sphere` or `cylinder` IC, characteristic radius of thermal bubble
38480e9ac5bSJames Wright  - `1000`
38580e9ac5bSJames Wright  - `m`
38680e9ac5bSJames Wright
38780e9ac5bSJames Wright* - `-advection_ic_bubble_continuity`
38880e9ac5bSJames Wright  - For `sphere` or `cylinder` IC, different shapes of bubble, (`smooth`, `back_sharp`, `thick`, `cosine`)
389965d9f74SJames Wright  - `smooth`
390965d9f74SJames Wright  -
391da02a6e7SJames Wright
39280e9ac5bSJames Wright* - `-advection_ic_wave_type`
39380e9ac5bSJames Wright  - For `wave` IC, the wave form used for `-advection_ic_type wave` (`sine`, `square`)
394da02a6e7SJames Wright  - `sine`
395da02a6e7SJames Wright  -
396da02a6e7SJames Wright
39780e9ac5bSJames Wright* - `-advection_ic_wave_frequency`
39880e9ac5bSJames Wright  - For `wave` IC, frequency of the wave
399da02a6e7SJames Wright  - $2\pi$
400da02a6e7SJames Wright  - `1/s`
401da02a6e7SJames Wright
40280e9ac5bSJames Wright* - `-advection_ic_wave_phase`
40380e9ac5bSJames Wright  - For `wave` IC, phase angle of the wave
404da02a6e7SJames Wright  - $2\pi$
405da02a6e7SJames Wright  -
406b4fd18dfSJames Wright
40780e9ac5bSJames Wright* - `-advection_ic_bl_height_factor`
408b4fd18dfSJames Wright  - For `boundary_layer` IC, sets the height of the linear boundary layer initial condition in proportion to the domain height
409b4fd18dfSJames Wright  - $1$
410b4fd18dfSJames Wright  -
411965d9f74SJames Wright:::
412965d9f74SJames Wright
413965d9f74SJames WrightFor 3D advection, an example of the `rotation` mode can be run with:
414965d9f74SJames Wright
415965d9f74SJames Wright```
416965d9f74SJames Wright./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
417965d9f74SJames Wright```
418965d9f74SJames Wright
419965d9f74SJames Wrightand the `translation` mode with:
420965d9f74SJames Wright
421965d9f74SJames Wright```
422965d9f74SJames Wright./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
423965d9f74SJames Wright```
424965d9f74SJames Wright
425965d9f74SJames WrightFor 2D advection, an example of the `rotation` mode can be run with:
426965d9f74SJames Wright
427965d9f74SJames Wright```
428965d9f74SJames Wright./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
429965d9f74SJames Wright```
430965d9f74SJames Wright
431965d9f74SJames Wrightand the `translation` mode with:
432965d9f74SJames Wright
433965d9f74SJames Wright```
434965d9f74SJames Wright./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
435965d9f74SJames Wright```
436965d9f74SJames WrightNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
437965d9f74SJames Wright
438965d9f74SJames Wright## Inviscid Ideal Gas
439965d9f74SJames Wright
440965d9f74SJames Wright### Isentropic Euler vortex
441965d9f74SJames Wright
442965d9f74SJames WrightFor the Isentropic Vortex problem, the following additional command-line options are available:
443965d9f74SJames Wright
444965d9f74SJames Wright:::{list-table} Isentropic Vortex Runtime Options
445965d9f74SJames Wright:header-rows: 1
446965d9f74SJames Wright
447965d9f74SJames Wright* - Option
448965d9f74SJames Wright  - Description
449965d9f74SJames Wright  - Default value
450965d9f74SJames Wright  - Unit
451965d9f74SJames Wright
452965d9f74SJames Wright* - `-center`
453965d9f74SJames Wright  - Location of vortex center
454965d9f74SJames Wright  - `(lx,ly,lz)/2`
455965d9f74SJames Wright  - `(m,m,m)`
456965d9f74SJames Wright
457965d9f74SJames Wright* - `-units_meter`
458965d9f74SJames Wright  - 1 meter in scaled length units
459965d9f74SJames Wright  - `1E-2`
460965d9f74SJames Wright  -
461965d9f74SJames Wright
462965d9f74SJames Wright* - `-units_second`
463965d9f74SJames Wright  - 1 second in scaled time units
464965d9f74SJames Wright  - `1E-2`
465965d9f74SJames Wright  -
466965d9f74SJames Wright
467965d9f74SJames Wright* - `-mean_velocity`
468965d9f74SJames Wright  - Background velocity vector
469965d9f74SJames Wright  - `(1,1,0)`
470965d9f74SJames Wright  -
471965d9f74SJames Wright
472965d9f74SJames Wright* - `-vortex_strength`
473965d9f74SJames Wright  - Strength of vortex < 10
474965d9f74SJames Wright  - `5`
475965d9f74SJames Wright  -
476965d9f74SJames Wright
477965d9f74SJames Wright* - `-c_tau`
478965d9f74SJames Wright  - Stabilization constant
479965d9f74SJames Wright  - `0.5`
480965d9f74SJames Wright  -
481965d9f74SJames Wright:::
482965d9f74SJames Wright
483965d9f74SJames WrightThis problem can be run with:
484965d9f74SJames Wright
485965d9f74SJames Wright```
486965d9f74SJames Wright./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.
487965d9f74SJames Wright```
488965d9f74SJames Wright
489965d9f74SJames Wright### Sod shock tube
490965d9f74SJames Wright
491965d9f74SJames WrightFor the Shock Tube problem, the following additional command-line options are available:
492965d9f74SJames Wright
493965d9f74SJames Wright:::{list-table} Shock Tube Runtime Options
494965d9f74SJames Wright:header-rows: 1
495965d9f74SJames Wright
496965d9f74SJames Wright* - Option
497965d9f74SJames Wright  - Description
498965d9f74SJames Wright  - Default value
499965d9f74SJames Wright  - Unit
500965d9f74SJames Wright
501965d9f74SJames Wright* - `-units_meter`
502965d9f74SJames Wright  - 1 meter in scaled length units
503965d9f74SJames Wright  - `1E-2`
504965d9f74SJames Wright  -
505965d9f74SJames Wright
506965d9f74SJames Wright* - `-units_second`
507965d9f74SJames Wright  - 1 second in scaled time units
508965d9f74SJames Wright  - `1E-2`
509965d9f74SJames Wright  -
510965d9f74SJames Wright
511965d9f74SJames Wright* - `-yzb`
512965d9f74SJames Wright  - Use YZB discontinuity capturing
513965d9f74SJames Wright  - `none`
514965d9f74SJames Wright  -
515965d9f74SJames Wright
516965d9f74SJames Wright* - `-stab`
517965d9f74SJames Wright  - Stabilization method (`none`, `su`, or `supg`)
518965d9f74SJames Wright  - `none`
519965d9f74SJames Wright  -
520965d9f74SJames Wright:::
521965d9f74SJames Wright
522965d9f74SJames WrightThis problem can be run with:
523965d9f74SJames Wright
524965d9f74SJames Wright```
525965d9f74SJames Wright./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
526965d9f74SJames Wright```
527965d9f74SJames Wright
528965d9f74SJames Wright## Newtonian viscosity, Ideal Gas
529965d9f74SJames Wright
530965d9f74SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
531965d9f74SJames Wright
532965d9f74SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
533965d9f74SJames Wright:header-rows: 1
534965d9f74SJames Wright
535965d9f74SJames Wright* - Option
536965d9f74SJames Wright  - Description
537965d9f74SJames Wright  - Default value
538965d9f74SJames Wright  - Unit
539965d9f74SJames Wright
540965d9f74SJames Wright* - `-units_meter`
541965d9f74SJames Wright  - 1 meter in scaled length units
542965d9f74SJames Wright  - `1`
543965d9f74SJames Wright  -
544965d9f74SJames Wright
545965d9f74SJames Wright* - `-units_second`
546965d9f74SJames Wright  - 1 second in scaled time units
547965d9f74SJames Wright  - `1`
548965d9f74SJames Wright  -
549965d9f74SJames Wright
550965d9f74SJames Wright* - `-units_kilogram`
551965d9f74SJames Wright  - 1 kilogram in scaled mass units
552965d9f74SJames Wright  - `1`
553965d9f74SJames Wright  -
554965d9f74SJames Wright
555965d9f74SJames Wright* - `-units_Kelvin`
556965d9f74SJames Wright  - 1 Kelvin in scaled temperature units
557965d9f74SJames Wright  - `1`
558965d9f74SJames Wright  -
559965d9f74SJames Wright
560965d9f74SJames Wright* - `-stab`
561965d9f74SJames Wright  - Stabilization method (`none`, `su`, or `supg`)
562965d9f74SJames Wright  - `none`
563965d9f74SJames Wright  -
564965d9f74SJames Wright
565965d9f74SJames Wright* - `-c_tau`
566965d9f74SJames Wright  - Stabilization constant, $c_\tau$
567965d9f74SJames Wright  - `0.5`
568965d9f74SJames Wright  -
569965d9f74SJames Wright
570965d9f74SJames Wright* - `-Ctau_t`
571965d9f74SJames Wright  - Stabilization time constant, $C_t$
572965d9f74SJames Wright  - `1.0`
573965d9f74SJames Wright  -
574965d9f74SJames Wright
575965d9f74SJames Wright* - `-Ctau_v`
576965d9f74SJames Wright  - Stabilization viscous constant, $C_v$
577965d9f74SJames Wright  - `36, 60, 128 for degree = 1, 2, 3`
578965d9f74SJames Wright  -
579965d9f74SJames Wright
580965d9f74SJames Wright* - `-Ctau_C`
581965d9f74SJames Wright  - Stabilization continuity constant, $C_c$
582965d9f74SJames Wright  - `1.0`
583965d9f74SJames Wright  -
584965d9f74SJames Wright
585965d9f74SJames Wright* - `-Ctau_M`
586965d9f74SJames Wright  - Stabilization momentum constant, $C_m$
587965d9f74SJames Wright  - `1.0`
588965d9f74SJames Wright  -
589965d9f74SJames Wright
590965d9f74SJames Wright* - `-Ctau_E`
591965d9f74SJames Wright  - Stabilization energy constant, $C_E$
592965d9f74SJames Wright  - `1.0`
593965d9f74SJames Wright  -
594965d9f74SJames Wright
595cbdfeaf4SJames Wright* - `-div_diff_flux_projection_method`
596cbdfeaf4SJames Wright  - Method used to calculate divergence of diffusive flux projection (`none`, `direct`, or `indirect`)
597cbdfeaf4SJames Wright  - `none`
598cbdfeaf4SJames Wright  -
599cbdfeaf4SJames Wright
600cbdfeaf4SJames Wright* - `-div_diff_flux_projection_ksp*`
601cbdfeaf4SJames Wright  - Control the KSP object for the projection of the divergence of diffusive flux
602cbdfeaf4SJames Wright  - N/A
603cbdfeaf4SJames Wright  -
604cbdfeaf4SJames Wright
605965d9f74SJames Wright* - `-cv`
606965d9f74SJames Wright  - Heat capacity at constant volume
607965d9f74SJames Wright  - `717`
608965d9f74SJames Wright  - `J/(kg K)`
609965d9f74SJames Wright
610965d9f74SJames Wright* - `-cp`
611965d9f74SJames Wright  - Heat capacity at constant pressure
612965d9f74SJames Wright  - `1004`
613965d9f74SJames Wright  - `J/(kg K)`
614965d9f74SJames Wright
615965d9f74SJames Wright* - `-gravity`
616965d9f74SJames Wright  - Gravitational acceleration vector
617965d9f74SJames Wright  - `0,0,0`
618965d9f74SJames Wright  - `m/s^2`
619965d9f74SJames Wright
620965d9f74SJames Wright* - `-lambda`
621965d9f74SJames Wright  - Stokes hypothesis second viscosity coefficient
622965d9f74SJames Wright  - `-2/3`
623965d9f74SJames Wright  -
624965d9f74SJames Wright
625965d9f74SJames Wright* - `-mu`
626965d9f74SJames Wright  - Shear dynamic viscosity coefficient
627965d9f74SJames Wright  - `1.8e-5`
628965d9f74SJames Wright  -  `Pa s`
629965d9f74SJames Wright
630965d9f74SJames Wright* - `-k`
631965d9f74SJames Wright  - Thermal conductivity
632965d9f74SJames Wright  - `0.02638`
633965d9f74SJames Wright  - `W/(m K)`
634965d9f74SJames Wright
635965d9f74SJames Wright* - `-newtonian_unit_tests`
636965d9f74SJames Wright  - Developer option to test properties
637965d9f74SJames Wright  - `false`
638965d9f74SJames Wright  - boolean
639965d9f74SJames Wright
640965d9f74SJames Wright* - `-state_var`
641965d9f74SJames Wright  - 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})$
642965d9f74SJames Wright  - `conservative`
643965d9f74SJames Wright  - string
644965d9f74SJames Wright
645965d9f74SJames Wright* - `-idl_decay_time`
646965d9f74SJames Wright  - Characteristic timescale of the pressure deviance decay. The timestep is good starting point
647965d9f74SJames Wright  - `-1` (disabled)
648965d9f74SJames Wright  - `s`
649965d9f74SJames Wright
650965d9f74SJames Wright* - `-idl_start`
651965d9f74SJames Wright  - Start of IDL in the x direction
652965d9f74SJames Wright  - `0`
653965d9f74SJames Wright  - `m`
654965d9f74SJames Wright
655965d9f74SJames Wright* - `-idl_length`
656965d9f74SJames Wright  - Length of IDL in the positive x direction
657965d9f74SJames Wright  - `0`
658965d9f74SJames Wright  - `m`
659965d9f74SJames Wright
660965d9f74SJames Wright* - `-idl_pressure`
661965d9f74SJames Wright  - Pressure used for IDL reference pressure
662965d9f74SJames Wright  -  `-reference_pressure`
663965d9f74SJames Wright  - `Pa`
664965d9f74SJames Wright
665965d9f74SJames Wright* - `-sgs_model_type`
666965d9f74SJames Wright  - Type of subgrid stress model to use. Currently only `data_driven` is available
667965d9f74SJames Wright  - `none`
668965d9f74SJames Wright  - string
669965d9f74SJames Wright
670965d9f74SJames Wright* - `-sgs_model_dd_leakyrelu_alpha`
671965d9f74SJames Wright  - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU
672965d9f74SJames Wright  - 0
673965d9f74SJames Wright  -
674965d9f74SJames Wright
675965d9f74SJames Wright* - `-sgs_model_dd_parameter_dir`
676965d9f74SJames Wright  - Path to directory with data-driven model parameters (weights, biases, etc.)
677965d9f74SJames Wright  - `./dd_sgs_parameters`
678965d9f74SJames Wright  - string
679965d9f74SJames Wright
680965d9f74SJames Wright* - `-sgs_model_dd_model_implementation`
681965d9f74SJames Wright  - Which computational implementation to use for SGS DD model (`fused`, `sequential_ceed`, `sequential_torch`)
682965d9f74SJames Wright  - `fused`
683965d9f74SJames Wright  - string
684965d9f74SJames Wright
685965d9f74SJames Wright* - `-sgs_model_dd_torch_model_path`
686965d9f74SJames Wright  - Path to the PyTorch `*.pt` file containing the DD inference model
687965d9f74SJames Wright  -
688965d9f74SJames Wright  - string
689965d9f74SJames Wright
690965d9f74SJames Wright* - `-sgs_model_dd_torch_model_device`
691965d9f74SJames Wright  - What hardware to perform the model inference on (`cpu`, `cuda`, `hip`, `xpu`)
692965d9f74SJames Wright  - Default matches the libCEED backend
693965d9f74SJames Wright  - string
694965d9f74SJames Wright
695965d9f74SJames Wright* - `-diff_filter_monitor`
696965d9f74SJames Wright  - Enable differential filter TSMonitor
697965d9f74SJames Wright  - `false`
698965d9f74SJames Wright  - boolean
699965d9f74SJames Wright
700965d9f74SJames Wright* - `-diff_filter_grid_based_width`
701965d9f74SJames Wright  - Use filter width based on the grid size
702965d9f74SJames Wright  - `false`
703965d9f74SJames Wright  - boolean
704965d9f74SJames Wright
705965d9f74SJames Wright* - `-diff_filter_width_scaling`
706965d9f74SJames Wright  - Anisotropic scaling for filter width in wall-aligned coordinates (snz)
707965d9f74SJames Wright  - `1,1,1`
708965d9f74SJames Wright  - `m`
709965d9f74SJames Wright
710965d9f74SJames Wright* - `-diff_filter_kernel_scaling`
711965d9f74SJames Wright  - Scaling to make differential kernel size equivalent to other filter kernels
712965d9f74SJames Wright  - `0.1`
713965d9f74SJames Wright  - `m^2`
714965d9f74SJames Wright
715965d9f74SJames Wright* - `-diff_filter_wall_damping_function`
716965d9f74SJames Wright  - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`)
717965d9f74SJames Wright  - `none`
718965d9f74SJames Wright  - string
719965d9f74SJames Wright
720965d9f74SJames Wright* - `-diff_filter_wall_damping_constant`
721965d9f74SJames Wright  - Constant for the wall-damping function. $A^+$ for `van_driest` damping function.
722965d9f74SJames Wright  - 25
723965d9f74SJames Wright  -
724965d9f74SJames Wright
725965d9f74SJames Wright* - `-diff_filter_friction_length`
726965d9f74SJames Wright  - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions
727965d9f74SJames Wright  - 0
728965d9f74SJames Wright  - `m`
729965d9f74SJames Wright
730965d9f74SJames Wright* - `-sgs_train_enable`
731965d9f74SJames Wright  - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis.
732965d9f74SJames Wright  - `false`
733965d9f74SJames Wright  - boolean
734965d9f74SJames Wright
735965d9f74SJames Wright* - `-sgs_train_write_data_interval`
736965d9f74SJames Wright  - Number of timesteps between writing training data into SmartRedis database
737965d9f74SJames Wright  - `1`
738965d9f74SJames Wright  -
739965d9f74SJames Wright
740965d9f74SJames Wright* - `-sgs_train_overwrite_data`
741965d9f74SJames Wright  - Whether new training data should overwrite old data on database
742965d9f74SJames Wright  - `true`
743965d9f74SJames Wright  - boolean
744965d9f74SJames Wright
745965d9f74SJames Wright* - `-sgs_train_filter_widths`
746965d9f74SJames Wright  - List of scalar values for different filter widths to calculate for training data
747965d9f74SJames Wright  -
748965d9f74SJames Wright  - `m`
749965d9f74SJames Wright
750965d9f74SJames Wright* - `-smartsim_collocated_num_ranks`
751965d9f74SJames Wright  - Number of MPI ranks associated with each collocated database (i.e. ranks per node)
752965d9f74SJames Wright  - `1`
753965d9f74SJames Wright  -
754965d9f74SJames Wright:::
755965d9f74SJames Wright
756965d9f74SJames Wright### Gaussian Wave
757965d9f74SJames Wright
758965d9f74SJames WrightThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
759965d9f74SJames Wright
760965d9f74SJames Wright:::{list-table} Gaussian Wave Runtime Options
761965d9f74SJames Wright:header-rows: 1
762965d9f74SJames Wright
763965d9f74SJames Wright* - Option
764965d9f74SJames Wright  - Description
765965d9f74SJames Wright  - Default value
766965d9f74SJames Wright  - Unit
767965d9f74SJames Wright
768965d9f74SJames Wright* - `-freestream_riemann`
769965d9f74SJames Wright  - Riemann solver for boundaries (HLL or HLLC)
770965d9f74SJames Wright  - `hllc`
771965d9f74SJames Wright  -
772965d9f74SJames Wright
773965d9f74SJames Wright* - `-freestream_velocity`
774965d9f74SJames Wright  - Freestream velocity vector
775965d9f74SJames Wright  - `0,0,0`
776965d9f74SJames Wright  - `m/s`
777965d9f74SJames Wright
778965d9f74SJames Wright* - `-freestream_temperature`
779965d9f74SJames Wright  - Freestream temperature
780965d9f74SJames Wright  - `288`
781965d9f74SJames Wright  - `K`
782965d9f74SJames Wright
783965d9f74SJames Wright* - `-freestream_pressure`
784965d9f74SJames Wright  - Freestream pressure
785965d9f74SJames Wright  - `1.01e5`
786965d9f74SJames Wright  - `Pa`
787965d9f74SJames Wright
788965d9f74SJames Wright* - `-epicenter`
789965d9f74SJames Wright  - Coordinates of center of perturbation
790965d9f74SJames Wright  - `0,0,0`
791965d9f74SJames Wright  - `m`
792965d9f74SJames Wright
793965d9f74SJames Wright* - `-amplitude`
794965d9f74SJames Wright  - Amplitude of the perturbation
795965d9f74SJames Wright  - `0.1`
796965d9f74SJames Wright  -
797965d9f74SJames Wright
798965d9f74SJames Wright* - `-width`
799965d9f74SJames Wright  - Width parameter of the perturbation
800965d9f74SJames Wright  - `0.002`
801965d9f74SJames Wright  - `m`
802965d9f74SJames Wright
803965d9f74SJames Wright:::
804965d9f74SJames Wright
805fc37ad8cSJames WrightThis problem can be run with the `examples/gaussianwave.yaml` file via:
806965d9f74SJames Wright
807965d9f74SJames Wright```
808fc37ad8cSJames Wright./build/navierstokes -options_file examples/gaussianwave.yaml
809965d9f74SJames Wright```
810965d9f74SJames Wright
811fc37ad8cSJames Wright```{literalinclude} ../examples/gaussianwave.yaml
812965d9f74SJames Wright:language: yaml
813965d9f74SJames Wright```
814965d9f74SJames Wright
815965d9f74SJames Wright### Vortex Shedding - Flow past Cylinder
816965d9f74SJames Wright
817965d9f74SJames WrightThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
818965d9f74SJames Wright
819965d9f74SJames Wright:::{list-table} Vortex Shedding Runtime Options
820965d9f74SJames Wright:header-rows: 1
821965d9f74SJames Wright
822965d9f74SJames Wright* - Option
823965d9f74SJames Wright  - Description
824965d9f74SJames Wright  - Default value
825965d9f74SJames Wright  - Unit
826965d9f74SJames Wright
827965d9f74SJames Wright* - `-freestream_velocity`
828965d9f74SJames Wright  - Freestream velocity vector
829965d9f74SJames Wright  - `0,0,0`
830965d9f74SJames Wright  - `m/s`
831965d9f74SJames Wright
832965d9f74SJames Wright* - `-freestream_temperature`
833965d9f74SJames Wright  - Freestream temperature
834965d9f74SJames Wright  - `288`
835965d9f74SJames Wright  - `K`
836965d9f74SJames Wright
837965d9f74SJames Wright* - `-freestream_pressure`
838965d9f74SJames Wright  - Freestream pressure
839965d9f74SJames Wright  - `1.01e5`
840965d9f74SJames Wright  - `Pa`
841965d9f74SJames Wright
842965d9f74SJames Wright:::
843965d9f74SJames Wright
844965d9f74SJames WrightThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
845965d9f74SJames WrightTo run this problem, first generate a mesh:
846965d9f74SJames Wright
847965d9f74SJames Wright```console
848fc37ad8cSJames Wright$ make -C examples/meshes
849965d9f74SJames Wright```
850965d9f74SJames Wright
851965d9f74SJames WrightThen run by building the executable and running:
852965d9f74SJames Wright
853965d9f74SJames Wright```console
854fc37ad8cSJames Wright$ make -j
855fc37ad8cSJames Wright$ mpiexec -n 6 build/navierstokes -options_file examples/vortexshedding.yaml -{ts,snes}_monitor_
856965d9f74SJames Wright```
857965d9f74SJames Wright
858965d9f74SJames WrightThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
859fc37ad8cSJames WrightThe 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.
860965d9f74SJames Wright
861965d9f74SJames Wright```console
862965d9f74SJames Wright$ python postprocess/vortexshedding.py
863965d9f74SJames Wright```
864965d9f74SJames Wright
865fc37ad8cSJames Wright```{literalinclude} ../examples/vortexshedding.yaml
866965d9f74SJames Wright:language: yaml
867965d9f74SJames Wright```
868965d9f74SJames Wright
869965d9f74SJames Wright### Density current
870965d9f74SJames Wright
871965d9f74SJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
872965d9f74SJames Wright
873965d9f74SJames Wright:::{list-table} Density Current Runtime Options
874965d9f74SJames Wright:header-rows: 1
875965d9f74SJames Wright
876965d9f74SJames Wright* - Option
877965d9f74SJames Wright  - Description
878965d9f74SJames Wright  - Default value
879965d9f74SJames Wright  - Unit
880965d9f74SJames Wright
881965d9f74SJames Wright* - `-center`
882965d9f74SJames Wright  - Location of bubble center
883965d9f74SJames Wright  - `(lx,ly,lz)/2`
884965d9f74SJames Wright  - `(m,m,m)`
885965d9f74SJames Wright
886965d9f74SJames Wright* - `-dc_axis`
887965d9f74SJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
888965d9f74SJames Wright  - `(0,0,0)`
889965d9f74SJames Wright  -
890965d9f74SJames Wright
891965d9f74SJames Wright* - `-rc`
892965d9f74SJames Wright  - Characteristic radius of thermal bubble
893965d9f74SJames Wright  - `1000`
894965d9f74SJames Wright  - `m`
895965d9f74SJames Wright
896965d9f74SJames Wright* - `-theta0`
897965d9f74SJames Wright  - Reference potential temperature
898965d9f74SJames Wright  - `300`
899965d9f74SJames Wright  - `K`
900965d9f74SJames Wright
901965d9f74SJames Wright* - `-thetaC`
902965d9f74SJames Wright  - Perturbation of potential temperature
903965d9f74SJames Wright  - `-15`
904965d9f74SJames Wright  - `K`
905965d9f74SJames Wright
906965d9f74SJames Wright* - `-P0`
907965d9f74SJames Wright  - Atmospheric pressure
908965d9f74SJames Wright  - `1E5`
909965d9f74SJames Wright  - `Pa`
910965d9f74SJames Wright
911965d9f74SJames Wright* - `-N`
912965d9f74SJames Wright  - Brunt-Vaisala frequency
913965d9f74SJames Wright  - `0.01`
914965d9f74SJames Wright  - `1/s`
915965d9f74SJames Wright:::
916965d9f74SJames Wright
917965d9f74SJames WrightThis problem can be run with:
918965d9f74SJames Wright
919965d9f74SJames Wright```
920965d9f74SJames Wright./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
921965d9f74SJames Wright```
922965d9f74SJames Wright
923965d9f74SJames Wright### Channel flow
924965d9f74SJames Wright
925965d9f74SJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
926965d9f74SJames Wright
927965d9f74SJames Wright:::{list-table} Channel Runtime Options
928965d9f74SJames Wright:header-rows: 1
929965d9f74SJames Wright
930965d9f74SJames Wright* - Option
931965d9f74SJames Wright  - Description
932965d9f74SJames Wright  - Default value
933965d9f74SJames Wright  - Unit
934965d9f74SJames Wright
935965d9f74SJames Wright* - `-umax`
936965d9f74SJames Wright  - Maximum/centerline velocity of the flow
937965d9f74SJames Wright  - `10`
938965d9f74SJames Wright  - `m/s`
939965d9f74SJames Wright
940965d9f74SJames Wright* - `-theta0`
941965d9f74SJames Wright  - Reference potential temperature
942965d9f74SJames Wright  - `300`
943965d9f74SJames Wright  - `K`
944965d9f74SJames Wright
945965d9f74SJames Wright* - `-P0`
946965d9f74SJames Wright  - Atmospheric pressure
947965d9f74SJames Wright  - `1E5`
948965d9f74SJames Wright  - `Pa`
949965d9f74SJames Wright
950965d9f74SJames Wright* - `-body_force_scale`
951965d9f74SJames Wright  - Multiplier for body force (`-1` for flow reversal)
952965d9f74SJames Wright  - 1
953965d9f74SJames Wright  -
954965d9f74SJames Wright:::
955965d9f74SJames Wright
956fc37ad8cSJames WrightThis problem can be run with the `examples/channel.yaml` file via:
957965d9f74SJames Wright
958965d9f74SJames Wright```
959fc37ad8cSJames Wright./build/navierstokes -options_file examples/channel.yaml
960965d9f74SJames Wright```
961fc37ad8cSJames Wright```{literalinclude} ../examples/channel.yaml
962965d9f74SJames Wright:language: yaml
963965d9f74SJames Wright```
964965d9f74SJames Wright
965965d9f74SJames Wright(example-blasius)=
966965d9f74SJames Wright
967965d9f74SJames Wright### Blasius boundary layer
968965d9f74SJames Wright
969965d9f74SJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
970965d9f74SJames Wright
971965d9f74SJames Wright:::{list-table} Blasius Runtime Options
972965d9f74SJames Wright:header-rows: 1
973965d9f74SJames Wright
974965d9f74SJames Wright* - Option
975965d9f74SJames Wright  - Description
976965d9f74SJames Wright  - Default value
977965d9f74SJames Wright  - Unit
978965d9f74SJames Wright
979965d9f74SJames Wright* - `-velocity_infinity`
980965d9f74SJames Wright  - Freestream velocity
981965d9f74SJames Wright  - `40`
982965d9f74SJames Wright  - `m/s`
983965d9f74SJames Wright
984965d9f74SJames Wright* - `-temperature_infinity`
985965d9f74SJames Wright  - Freestream temperature
986965d9f74SJames Wright  - `288`
987965d9f74SJames Wright  - `K`
988965d9f74SJames Wright
989965d9f74SJames Wright* - `-pressure_infinity`
990965d9f74SJames Wright  - Atmospheric pressure, also sets IDL reference pressure
991965d9f74SJames Wright  - `1.01E5`
992965d9f74SJames Wright  - `Pa`
993965d9f74SJames Wright
994965d9f74SJames Wright* - `-temperature_wall`
995965d9f74SJames Wright  - Wall temperature
996965d9f74SJames Wright  - `288`
997965d9f74SJames Wright  - `K`
998965d9f74SJames Wright
999965d9f74SJames Wright* - `-delta0`
1000965d9f74SJames Wright  - Boundary layer height at the inflow
1001965d9f74SJames Wright  - `4.2e-3`
1002965d9f74SJames Wright  - `m`
1003965d9f74SJames Wright
1004965d9f74SJames Wright* - `-platemesh_modify_mesh`
1005965d9f74SJames Wright  - Whether to modify the mesh using the given options below.
1006965d9f74SJames Wright  - `false`
1007965d9f74SJames Wright  -
1008965d9f74SJames Wright
1009965d9f74SJames Wright* - `-platemesh_refine_height`
1010965d9f74SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
1011965d9f74SJames Wright  - `5.9E-4`
1012965d9f74SJames Wright  - `m`
1013965d9f74SJames Wright
1014965d9f74SJames Wright* - `-platemesh_Ndelta`
1015965d9f74SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
1016965d9f74SJames Wright  - `45`
1017965d9f74SJames Wright  -
1018965d9f74SJames Wright
1019965d9f74SJames Wright* - `-platemesh_growth`
1020965d9f74SJames Wright  - Growth rate of the elements in the refinement region
1021965d9f74SJames Wright  - `1.08`
1022965d9f74SJames Wright  -
1023965d9f74SJames Wright
1024965d9f74SJames Wright* - `-platemesh_top_angle`
1025965d9f74SJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
1026965d9f74SJames Wright  - `5`
1027965d9f74SJames Wright  - `degrees`
1028965d9f74SJames Wright
1029965d9f74SJames Wright* - `-platemesh_y_node_locs_path`
1030965d9f74SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
1031965d9f74SJames Wright  - `""`
1032965d9f74SJames Wright  -
1033965d9f74SJames Wright
1034965d9f74SJames Wright* - `-stg_use`
1035965d9f74SJames Wright  - Whether to use STG for the inflow conditions
1036965d9f74SJames Wright  - `false`
1037965d9f74SJames Wright  -
1038965d9f74SJames Wright
1039965d9f74SJames Wright* - `-n_chebyshev`
1040965d9f74SJames Wright  - Number of Chebyshev terms
1041965d9f74SJames Wright  - `20`
1042965d9f74SJames Wright  -
1043965d9f74SJames Wright
1044965d9f74SJames Wright* - `-chebyshev_`
1045965d9f74SJames Wright  - Prefix for Chebyshev snes solve
1046965d9f74SJames Wright  -
1047965d9f74SJames Wright  -
1048965d9f74SJames Wright
1049965d9f74SJames Wright:::
1050965d9f74SJames Wright
1051fc37ad8cSJames WrightThis problem can be run with the `examples/blasius.yaml` file via:
1052965d9f74SJames Wright
1053965d9f74SJames Wright```
1054fc37ad8cSJames Wright./build/navierstokes -options_file examples/blasius.yaml
1055965d9f74SJames Wright```
1056965d9f74SJames Wright
1057fc37ad8cSJames Wright```{literalinclude} ../examples/blasius.yaml
1058965d9f74SJames Wright:language: yaml
1059965d9f74SJames Wright```
1060965d9f74SJames Wright
1061965d9f74SJames Wright### STG Inflow for Flat Plate
1062965d9f74SJames Wright
1063965d9f74SJames WrightUsing the STG Inflow for the blasius problem adds the following command-line options:
1064965d9f74SJames Wright
1065965d9f74SJames Wright:::{list-table} Blasius Runtime Options
1066965d9f74SJames Wright:header-rows: 1
1067965d9f74SJames Wright
1068965d9f74SJames Wright* - Option
1069965d9f74SJames Wright  - Description
1070965d9f74SJames Wright  - Default value
1071965d9f74SJames Wright  - Unit
1072965d9f74SJames Wright
1073965d9f74SJames Wright* - `-stg_inflow_path`
1074965d9f74SJames Wright  - Path to the STGInflow file
1075965d9f74SJames Wright  - `./STGInflow.dat`
1076965d9f74SJames Wright  -
1077965d9f74SJames Wright
1078965d9f74SJames Wright* - `-stg_rand_path`
1079965d9f74SJames Wright  - Path to the STGRand file
1080965d9f74SJames Wright  - `./STGRand.dat`
1081965d9f74SJames Wright  -
1082965d9f74SJames Wright
1083965d9f74SJames Wright* - `-stg_alpha`
1084965d9f74SJames Wright  - Growth rate of the wavemodes
1085965d9f74SJames Wright  - `1.01`
1086965d9f74SJames Wright  -
1087965d9f74SJames Wright
1088965d9f74SJames Wright* - `-stg_u0`
1089965d9f74SJames Wright  - Convective velocity, $U_0$
1090965d9f74SJames Wright  - `0.0`
1091965d9f74SJames Wright  - `m/s`
1092965d9f74SJames Wright
1093965d9f74SJames Wright* - `-stg_mean_only`
1094965d9f74SJames Wright  - Only impose the mean velocity (no fluctutations)
1095965d9f74SJames Wright  - `false`
1096965d9f74SJames Wright  -
1097965d9f74SJames Wright
1098965d9f74SJames Wright* - `-stg_strong`
1099965d9f74SJames Wright  - Strongly enforce the STG inflow boundary condition
1100965d9f74SJames Wright  - `false`
1101965d9f74SJames Wright  -
1102965d9f74SJames Wright
1103965d9f74SJames Wright* - `-stg_fluctuating_IC`
1104965d9f74SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
1105965d9f74SJames Wright  - `false`
1106965d9f74SJames Wright  -
1107965d9f74SJames Wright
1108965d9f74SJames Wright* - `-stg_dx`
1109965d9f74SJames Wright  - Set the element size in the x direction. Default is calculated for box meshes, assuming equispaced elements.
1110965d9f74SJames Wright  -
1111965d9f74SJames Wright  - `m`
1112965d9f74SJames Wright
1113965d9f74SJames Wright* - `-stg_h_scale_factor`
1114965d9f74SJames Wright  - Scale element size for cutoff frequency calculation
1115965d9f74SJames Wright  - $1/p$
1116965d9f74SJames Wright  -
1117965d9f74SJames Wright
1118965d9f74SJames Wright:::
1119965d9f74SJames Wright
1120fc37ad8cSJames WrightThis problem can be run with the `examples/blasius.yaml` file via:
1121965d9f74SJames Wright
1122965d9f74SJames Wright```
1123fc37ad8cSJames Wright./build/navierstokes -options_file examples/blasius.yaml -stg_use true
1124965d9f74SJames Wright```
1125965d9f74SJames Wright
1126965d9f74SJames WrightNote the added `-stg_use true` flag
1127fc37ad8cSJames WrightThis overrides the `stg: use: false` setting in the `examples/blasius.yaml` file, enabling the use of the STG inflow.
1128