xref: /honee/doc/runtime_options.md (revision 87fd7f33e5ff541d346273b55e9eb051d4de0b43)
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_turbulence_spanstats_collect_interval`
35965d9f74SJames Wright  - Number of timesteps between statistics collection
36965d9f74SJames Wright  - `1`
37965d9f74SJames Wright
38965d9f74SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer`
39965d9f74SJames 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.
40965d9f74SJames Wright  -
41965d9f74SJames Wright
42965d9f74SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval`
43965d9f74SJames Wright  - Number of timesteps between statistics file writing (`-1` means only at end of run)
44965d9f74SJames Wright  - `-1`
45965d9f74SJames Wright
46965d9f74SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size`
47965d9f74SJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
48965d9f74SJames Wright  - `20`
49965d9f74SJames Wright
50965d9f74SJames Wright* - `-ts_monitor_wall_force`
51965d9f74SJames Wright  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
52965d9f74SJames Wright  -
53965d9f74SJames Wright
5425125139SJames Wright* - `-ts_monitor_total_kinetic_energy`
5525125139SJames 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.
5625125139SJames Wright  -
5725125139SJames Wright
5825125139SJames Wright* - `-ts_monitor_total_kinetic_energy_interval`
5925125139SJames Wright  - Number of timesteps between calculating and printing the total kinetic energy
6025125139SJames Wright  - `1`
6125125139SJames Wright
62*87fd7f33SJames Wright* - `-ts_monitor_cfl`
63*87fd7f33SJames Wright  - Viewer for the min/max CFL in the domain e.g., `ascii:cfl.csv:ascii_csv` to write a CSV file.
64*87fd7f33SJames Wright  -
65*87fd7f33SJames Wright
66*87fd7f33SJames Wright* - `-ts_monitor_cfl_interval`
67*87fd7f33SJames Wright  - Number of timesteps between calculating and printing the min/max CFL
68*87fd7f33SJames Wright  - `1`
69*87fd7f33SJames Wright
708b774af8SJames Wright* - `-honee_check_step_interval`
718b774af8SJames Wright  - Number of time steps between checking the solution for Nans. Negative interval indicates it will not run.
728b774af8SJames Wright  - `-1`
738b774af8SJames Wright
74354560d1SJames Wright* - `-honee_max_wall_time_duration`
75354560d1SJames 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`
76354560d1SJames Wright  - `'0'`
77354560d1SJames Wright
78354560d1SJames Wright* - `-honee_max_wall_time_buffer`
79354560d1SJames Wright  - Approximate time required to exit simulation cleanly (write checkpoints, etc.)
80354560d1SJames Wright  - `'00:01'`
81354560d1SJames Wright
82354560d1SJames Wright* - `-honee_max_wall_time_interval`
83354560d1SJames Wright  - Number of time steps between checking whether simulation should stop based on `-honee_max_wall_time_duration`
84354560d1SJames Wright  - `1`
85354560d1SJames Wright
86965d9f74SJames Wright* - `-mesh_transform`
87965d9f74SJames Wright  - Transform the mesh, usually for an initial box mesh.
88965d9f74SJames Wright  - `none`
89965d9f74SJames Wright
90965d9f74SJames Wright* - `-snes_view`
91965d9f74SJames Wright  - View PETSc `SNES` nonlinear solver configuration
92965d9f74SJames Wright  -
93965d9f74SJames Wright
94965d9f74SJames Wright* - `-log_view`
95965d9f74SJames Wright  - View PETSc performance log
96965d9f74SJames Wright  -
97965d9f74SJames Wright
98965d9f74SJames Wright* - `-help`
99965d9f74SJames Wright  - View comprehensive information about run-time options
100965d9f74SJames Wright  -
101ce03971bSJames Wright
102ce03971bSJames Wright* - `-test_type`
103ce03971bSJames Wright  - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified
104ce03971bSJames Wright  - `none`
105ce03971bSJames Wright
106ce03971bSJames Wright* - `-compare_final_state_atol`
107ce03971bSJames Wright  - Test absolute tolerance
108ce03971bSJames Wright  - `1E-11`
109ce03971bSJames Wright
110ce03971bSJames Wright* - `-compare_final_state_filename`
111ce03971bSJames Wright  - Test filename
112ce03971bSJames Wright  -
113ce03971bSJames Wright
114965d9f74SJames Wright:::
115965d9f74SJames Wright
11678a26750SJames Wright### File I/O Options
11778a26750SJames Wright
11878a26750SJames Wright:::{list-table} File I/O Runtime Options
11978a26750SJames Wright:header-rows: 1
12078a26750SJames Wright
12178a26750SJames Wright* - Option
12278a26750SJames Wright  - Description
12378a26750SJames Wright  - Default value
12478a26750SJames Wright
12578a26750SJames Wright* - `-dm_plex_filename`
12678a26750SJames Wright  - Filename of mesh file to load in
12778a26750SJames Wright  -
12878a26750SJames Wright
12978a26750SJames Wright* - `-ts_monitor_solution`
13078a26750SJames Wright  - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
13178a26750SJames Wright  -
13278a26750SJames Wright
13378a26750SJames Wright* - `-ts_monitor_solution_interval`
13478a26750SJames Wright  - Number of time steps between visualization output frames.
13578a26750SJames Wright  - `1`
13678a26750SJames Wright
13778a26750SJames Wright* - `-viewer_cgns_batch_size`
13878a26750SJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
13978a26750SJames Wright  - `20`
14078a26750SJames Wright
14178a26750SJames Wright* - `-checkpoint_interval`
14278a26750SJames Wright  - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only
14378a26750SJames Wright  - `10`
14478a26750SJames Wright
14578a26750SJames Wright* - `-checkpoint_vtk`
14678a26750SJames Wright  - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead.
14778a26750SJames Wright  - `false`
14878a26750SJames Wright
14978a26750SJames Wright* - `-viz_refine`
15078a26750SJames Wright  - Use regular refinement for VTK visualization
15178a26750SJames Wright  - `0`
15278a26750SJames Wright
15378a26750SJames Wright* - `-output_dir`
15478a26750SJames Wright  - Output directory for binary checkpoints and VTK files (if enabled).
15578a26750SJames Wright  - `.`
15678a26750SJames Wright
15778a26750SJames Wright* - `-output_add_stepnum2bin`
15878a26750SJames Wright  - Whether to add step numbers to output binary files
15978a26750SJames Wright  - `false`
16078a26750SJames Wright
16178a26750SJames Wright* - `-continue_filename`
16278a26750SJames Wright  - Path to file from which to continue from. Either binary file or CGNS
16378a26750SJames Wright  -
16478a26750SJames Wright
16578a26750SJames Wright:::
16678a26750SJames Wright
16778a26750SJames WrightNote that to use `-continue_filename` with CGNS files, the same file must be used with `-dm_plex_filename` and `-dm_plex_cgns_parallel`.
16878a26750SJames Wright
16978a26750SJames Wright## Boundary conditions
17078a26750SJames Wright
17178a26750SJames Wright:::{list-table} Boundary Condition Options
17278a26750SJames Wright:header-rows: 1
17378a26750SJames Wright
17478a26750SJames Wright* - Option
17578a26750SJames Wright  - Description
17678a26750SJames Wright
17778a26750SJames Wright* - `-bc_wall`
17878a26750SJames Wright  - Use wall boundary conditions on this list of faces
17978a26750SJames Wright
18078a26750SJames Wright* - `-wall_comps`
18178a26750SJames Wright  - An array of constrained component numbers for wall BCs
18278a26750SJames Wright
18378a26750SJames Wright* - `-bc_slip`
18478a26750SJames Wright  - Use weak slip boundary condition on this list of faces
18578a26750SJames Wright
18678a26750SJames Wright* - `-bc_symmetry_x`
18778a26750SJames Wright  - Use symmetry boundary conditions, for the x component, on this list of faces
18878a26750SJames Wright
18978a26750SJames Wright* - `-bc_symmetry_y`
19078a26750SJames Wright  - Use symmetry boundary conditions, for the y component, on this list of faces
19178a26750SJames Wright
19278a26750SJames Wright* - `-bc_symmetry_z`
19378a26750SJames Wright  - Use symmetry boundary conditions, for the z component, on this list of faces
19478a26750SJames Wright
19578a26750SJames Wright* - `-bc_inflow`
19678a26750SJames Wright  - Use inflow boundary conditions on this list of faces
19778a26750SJames Wright
19878a26750SJames Wright* - `-bc_outflow`
19978a26750SJames Wright  - Use outflow boundary conditions on this list of faces
20078a26750SJames Wright
20178a26750SJames Wright* - `-bc_freestream`
20278a26750SJames Wright  - Use freestream boundary conditions on this list of faces
20378a26750SJames Wright
20478a26750SJames Wright:::
20578a26750SJames Wright
206965d9f74SJames 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:
207965d9f74SJames Wright
208965d9f74SJames Wright:::{list-table} 2D Face ID Labels
209965d9f74SJames Wright:header-rows: 1
210965d9f74SJames Wright* - PETSc Face Name
211965d9f74SJames Wright  - Cartesian direction
212965d9f74SJames Wright  - Face ID
213965d9f74SJames Wright
214965d9f74SJames Wright* - faceMarkerBottom
215965d9f74SJames Wright  - -z
216965d9f74SJames Wright  - 1
217965d9f74SJames Wright
218965d9f74SJames Wright* - faceMarkerRight
219965d9f74SJames Wright  - +x
220965d9f74SJames Wright  - 2
221965d9f74SJames Wright
222965d9f74SJames Wright* - faceMarkerTop
223965d9f74SJames Wright  - +z
224965d9f74SJames Wright  - 3
225965d9f74SJames Wright
226965d9f74SJames Wright* - faceMarkerLeft
227965d9f74SJames Wright  - -x
228965d9f74SJames Wright  - 4
229965d9f74SJames Wright:::
230965d9f74SJames Wright
231965d9f74SJames Wright:::{list-table} 3D Face ID Labels
232965d9f74SJames Wright:header-rows: 1
233965d9f74SJames Wright* - PETSc Face Name
234965d9f74SJames Wright  - Cartesian direction
235965d9f74SJames Wright  - Face ID
236965d9f74SJames Wright
237965d9f74SJames Wright* - faceMarkerBottom
238965d9f74SJames Wright  - -z
239965d9f74SJames Wright  - 1
240965d9f74SJames Wright
241965d9f74SJames Wright* - faceMarkerTop
242965d9f74SJames Wright  - +z
243965d9f74SJames Wright  - 2
244965d9f74SJames Wright
245965d9f74SJames Wright* - faceMarkerFront
246965d9f74SJames Wright  - -y
247965d9f74SJames Wright  - 3
248965d9f74SJames Wright
249965d9f74SJames Wright* - faceMarkerBack
250965d9f74SJames Wright  - +y
251965d9f74SJames Wright  - 4
252965d9f74SJames Wright
253965d9f74SJames Wright* - faceMarkerRight
254965d9f74SJames Wright  - +x
255965d9f74SJames Wright  - 5
256965d9f74SJames Wright
257965d9f74SJames Wright* - faceMarkerLeft
258965d9f74SJames Wright  - -x
259965d9f74SJames Wright  - 6
26078a26750SJames Wright
261965d9f74SJames Wright:::
262965d9f74SJames Wright
263965d9f74SJames Wright
264965d9f74SJames WrightBoundary conditions for compressible viscous flows are notoriously tricky.
265965d9f74SJames WrightHere we offer some recommendations.
266965d9f74SJames Wright
267965d9f74SJames Wright### Inflow
268965d9f74SJames Wright
269965d9f74SJames 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).
270965d9f74SJames WrightIt is stable and the least reflective boundary condition for acoustics.
271965d9f74SJames Wright
272965d9f74SJames WrightIf near a viscous wall, you may want a specified inflow profile.
273965d9f74SJames WrightUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
274965d9f74SJames 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.
275965d9f74SJames WrightThe strong approach gives sharper resolution of velocity structures.
276965d9f74SJames WrightWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
277965d9f74SJames Wright
278965d9f74SJames Wright### Outflow
279965d9f74SJames Wright
280965d9f74SJames WrightIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
281965d9f74SJames WrightIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
282965d9f74SJames 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.
283965d9f74SJames Wright
284965d9f74SJames 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.
285965d9f74SJames Wright
286965d9f74SJames 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).
287965d9f74SJames WrightIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
288965d9f74SJames WrightThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
289965d9f74SJames Wright
290965d9f74SJames Wright### Periodicity
291965d9f74SJames Wright
292965d9f74SJames WrightPETSc provides two ways to specify periodicity:
293965d9f74SJames Wright
294965d9f74SJames Wright1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
295965d9f74SJames Wright
296965d9f74SJames Wright```yaml
297965d9f74SJames Wrightdm_plex:
298965d9f74SJames Wright  shape: box
299965d9f74SJames Wright  box_faces: 10,12,4
300965d9f74SJames Wright  box_bd: none,none,periodic
301965d9f74SJames Wright```
302965d9f74SJames Wright
303965d9f74SJames WrightThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
304965d9f74SJames 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.
305965d9f74SJames Wright
306965d9f74SJames Wright2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
307965d9f74SJames Wright
308965d9f74SJames Wright```yaml
309965d9f74SJames Wrightdm_plex:
310965d9f74SJames Wright  shape: zbox
311965d9f74SJames Wright  box_faces: 10,12,4
312965d9f74SJames Wright  box_bd: none,none,periodic
313965d9f74SJames Wright```
314965d9f74SJames Wright
315965d9f74SJames WrightIsoperiodicity enables standard boundary integrals, and is recommended for general use.
316965d9f74SJames WrightAt the time of this writing, it only supports one direction of periodicity.
317965d9f74SJames 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.
318965d9f74SJames Wright
319da02a6e7SJames Wright## Advection-Diffusion
320965d9f74SJames Wright
321da02a6e7SJames 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$.
322965d9f74SJames WrightThe advection problems can be run in both 2D and 3D, based on the DM defined for the problem.
323965d9f74SJames WrightThe following additional command-line options are available:
324965d9f74SJames Wright
325965d9f74SJames Wright:::{list-table} Advection Runtime Options
326965d9f74SJames Wright:header-rows: 1
327965d9f74SJames Wright
328965d9f74SJames Wright* - Option
329965d9f74SJames Wright  - Description
330965d9f74SJames Wright  - Default value
331965d9f74SJames Wright  - Unit
332965d9f74SJames Wright
333965d9f74SJames Wright* - `-units_meter`
334965d9f74SJames Wright  - 1 meter in scaled length units
335965d9f74SJames Wright  - `1E-2`
336965d9f74SJames Wright  -
337965d9f74SJames Wright
338965d9f74SJames Wright* - `-units_second`
339965d9f74SJames Wright  - 1 second in scaled time units
340965d9f74SJames Wright  - `1E-2`
341965d9f74SJames Wright  -
342965d9f74SJames Wright
343965d9f74SJames Wright* - `-units_kilogram`
344965d9f74SJames Wright  - 1 kilogram in scaled mass units
345965d9f74SJames Wright  - `1E-6`
346965d9f74SJames Wright  -
347965d9f74SJames Wright
348965d9f74SJames Wright* - `-strong_form`
349965d9f74SJames Wright  - Strong (1) or weak/integrated by parts (0) residual
350965d9f74SJames Wright  - `0`
351965d9f74SJames Wright  -
352965d9f74SJames Wright
353965d9f74SJames Wright* - `-stab`
354965d9f74SJames Wright  - Stabilization method (`none`, `su`, or `supg`)
355965d9f74SJames Wright  - `none`
356965d9f74SJames Wright  -
357965d9f74SJames Wright
358965d9f74SJames Wright* - `-stab_tau`
359965d9f74SJames Wright  - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`)
360965d9f74SJames Wright  - `ctau`
361965d9f74SJames Wright  -
362965d9f74SJames Wright
363965d9f74SJames Wright* - `-Ctau_t`
364965d9f74SJames Wright  - Scaling factor on the temporal portion of the $\tau$ formulation
365965d9f74SJames Wright  - 0.
366965d9f74SJames Wright  -
367965d9f74SJames Wright
368965d9f74SJames Wright* - `-Ctau_a`
369965d9f74SJames Wright  - Scaling factor on the advection portion of the $\tau$ formulation
370965d9f74SJames Wright  - $P^2$
371965d9f74SJames Wright  -
372965d9f74SJames Wright
373fbabb365SJames Wright* - `-Ctau_d`
374fbabb365SJames Wright  - Scaling factor on the diffusion portion of the $\tau$ formulation
375fbabb365SJames Wright  - $P^4$
376fbabb365SJames Wright  -
377fbabb365SJames Wright
378965d9f74SJames Wright* - `-CtauS`
379965d9f74SJames Wright  - Scale coefficient for stabilization tau (nondimensional)
380965d9f74SJames Wright  - `0`
381965d9f74SJames Wright  -
382965d9f74SJames Wright
383965d9f74SJames Wright* - `-wind_type`
3843d1afcc1SJames Wright  - Wind type in Advection (`rotation`, `translation`, `boundary_layer`)
385965d9f74SJames Wright  - `rotation`
386965d9f74SJames Wright  -
387965d9f74SJames Wright
388965d9f74SJames Wright* - `-wind_translation`
389965d9f74SJames Wright  - Constant wind vector when `-wind_type translation`
390965d9f74SJames Wright  - `1,0,0`
391965d9f74SJames Wright  -
392965d9f74SJames Wright
393965d9f74SJames Wright* - `-diffusion_coeff`
394965d9f74SJames Wright  - Diffusion coefficient
395965d9f74SJames Wright  - `0`
396965d9f74SJames Wright  -
397965d9f74SJames Wright
398965d9f74SJames Wright* - `-E_wind`
399965d9f74SJames Wright  - Total energy of inflow wind when `-wind_type translation`
400965d9f74SJames Wright  - `1E6`
401965d9f74SJames Wright  - `J`
402965d9f74SJames Wright
403965d9f74SJames Wright* - `-advection_ic_type`
4043d1afcc1SJames Wright  - Initial condition type, (`sphere`, `cylinder`, `cosine_hill`, `skew`, `wave`, `boundary_layer`)
405965d9f74SJames Wright  - `sphere`
406965d9f74SJames Wright  -
407965d9f74SJames Wright
40880e9ac5bSJames Wright* - `-advection_ic_bubble_rc`
40980e9ac5bSJames Wright  - For `sphere` or `cylinder` IC, characteristic radius of thermal bubble
41080e9ac5bSJames Wright  - `1000`
41180e9ac5bSJames Wright  - `m`
41280e9ac5bSJames Wright
41380e9ac5bSJames Wright* - `-advection_ic_bubble_continuity`
41480e9ac5bSJames Wright  - For `sphere` or `cylinder` IC, different shapes of bubble, (`smooth`, `back_sharp`, `thick`, `cosine`)
415965d9f74SJames Wright  - `smooth`
416965d9f74SJames Wright  -
417da02a6e7SJames Wright
41880e9ac5bSJames Wright* - `-advection_ic_wave_type`
41980e9ac5bSJames Wright  - For `wave` IC, the wave form used for `-advection_ic_type wave` (`sine`, `square`)
420da02a6e7SJames Wright  - `sine`
421da02a6e7SJames Wright  -
422da02a6e7SJames Wright
42380e9ac5bSJames Wright* - `-advection_ic_wave_frequency`
42480e9ac5bSJames Wright  - For `wave` IC, frequency of the wave
425da02a6e7SJames Wright  - $2\pi$
426da02a6e7SJames Wright  - `1/s`
427da02a6e7SJames Wright
42880e9ac5bSJames Wright* - `-advection_ic_wave_phase`
42980e9ac5bSJames Wright  - For `wave` IC, phase angle of the wave
430da02a6e7SJames Wright  - $2\pi$
431da02a6e7SJames Wright  -
432b4fd18dfSJames Wright
43380e9ac5bSJames Wright* - `-advection_ic_bl_height_factor`
434b4fd18dfSJames Wright  - For `boundary_layer` IC, sets the height of the linear boundary layer initial condition in proportion to the domain height
435b4fd18dfSJames Wright  - $1$
436b4fd18dfSJames Wright  -
437965d9f74SJames Wright:::
438965d9f74SJames Wright
439965d9f74SJames WrightFor 3D advection, an example of the `rotation` mode can be run with:
440965d9f74SJames Wright
441965d9f74SJames Wright```
442965d9f74SJames 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
443965d9f74SJames Wright```
444965d9f74SJames Wright
445965d9f74SJames Wrightand the `translation` mode with:
446965d9f74SJames Wright
447965d9f74SJames Wright```
448965d9f74SJames 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
449965d9f74SJames Wright```
450965d9f74SJames Wright
451965d9f74SJames WrightFor 2D advection, an example of the `rotation` mode can be run with:
452965d9f74SJames Wright
453965d9f74SJames Wright```
454965d9f74SJames 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
455965d9f74SJames Wright```
456965d9f74SJames Wright
457965d9f74SJames Wrightand the `translation` mode with:
458965d9f74SJames Wright
459965d9f74SJames Wright```
460965d9f74SJames 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
461965d9f74SJames Wright```
462965d9f74SJames WrightNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
463965d9f74SJames Wright
464965d9f74SJames Wright## Inviscid Ideal Gas
465965d9f74SJames Wright
466965d9f74SJames Wright### Isentropic Euler vortex
467965d9f74SJames Wright
468965d9f74SJames WrightFor the Isentropic Vortex problem, the following additional command-line options are available:
469965d9f74SJames Wright
470965d9f74SJames Wright:::{list-table} Isentropic Vortex Runtime Options
471965d9f74SJames Wright:header-rows: 1
472965d9f74SJames Wright
473965d9f74SJames Wright* - Option
474965d9f74SJames Wright  - Description
475965d9f74SJames Wright  - Default value
476965d9f74SJames Wright  - Unit
477965d9f74SJames Wright
478965d9f74SJames Wright* - `-center`
479965d9f74SJames Wright  - Location of vortex center
480965d9f74SJames Wright  - `(lx,ly,lz)/2`
481965d9f74SJames Wright  - `(m,m,m)`
482965d9f74SJames Wright
483965d9f74SJames Wright* - `-units_meter`
484965d9f74SJames Wright  - 1 meter in scaled length units
485965d9f74SJames Wright  - `1E-2`
486965d9f74SJames Wright  -
487965d9f74SJames Wright
488965d9f74SJames Wright* - `-units_second`
489965d9f74SJames Wright  - 1 second in scaled time units
490965d9f74SJames Wright  - `1E-2`
491965d9f74SJames Wright  -
492965d9f74SJames Wright
493965d9f74SJames Wright* - `-mean_velocity`
494965d9f74SJames Wright  - Background velocity vector
495965d9f74SJames Wright  - `(1,1,0)`
496965d9f74SJames Wright  -
497965d9f74SJames Wright
498965d9f74SJames Wright* - `-vortex_strength`
499965d9f74SJames Wright  - Strength of vortex < 10
500965d9f74SJames Wright  - `5`
501965d9f74SJames Wright  -
502965d9f74SJames Wright
503965d9f74SJames Wright* - `-c_tau`
504965d9f74SJames Wright  - Stabilization constant
505965d9f74SJames Wright  - `0.5`
506965d9f74SJames Wright  -
507965d9f74SJames Wright:::
508965d9f74SJames Wright
509965d9f74SJames WrightThis problem can be run with:
510965d9f74SJames Wright
511965d9f74SJames Wright```
512965d9f74SJames 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.
513965d9f74SJames Wright```
514965d9f74SJames Wright
515965d9f74SJames Wright### Sod shock tube
516965d9f74SJames Wright
517965d9f74SJames WrightFor the Shock Tube problem, the following additional command-line options are available:
518965d9f74SJames Wright
519965d9f74SJames Wright:::{list-table} Shock Tube Runtime Options
520965d9f74SJames Wright:header-rows: 1
521965d9f74SJames Wright
522965d9f74SJames Wright* - Option
523965d9f74SJames Wright  - Description
524965d9f74SJames Wright  - Default value
525965d9f74SJames Wright  - Unit
526965d9f74SJames Wright
527965d9f74SJames Wright* - `-units_meter`
528965d9f74SJames Wright  - 1 meter in scaled length units
529965d9f74SJames Wright  - `1E-2`
530965d9f74SJames Wright  -
531965d9f74SJames Wright
532965d9f74SJames Wright* - `-units_second`
533965d9f74SJames Wright  - 1 second in scaled time units
534965d9f74SJames Wright  - `1E-2`
535965d9f74SJames Wright  -
536965d9f74SJames Wright
537965d9f74SJames Wright* - `-yzb`
538965d9f74SJames Wright  - Use YZB discontinuity capturing
539965d9f74SJames Wright  - `none`
540965d9f74SJames Wright  -
541965d9f74SJames Wright
542965d9f74SJames Wright* - `-stab`
543965d9f74SJames Wright  - Stabilization method (`none`, `su`, or `supg`)
544965d9f74SJames Wright  - `none`
545965d9f74SJames Wright  -
546965d9f74SJames Wright:::
547965d9f74SJames Wright
548965d9f74SJames WrightThis problem can be run with:
549965d9f74SJames Wright
550965d9f74SJames Wright```
551965d9f74SJames 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
552965d9f74SJames Wright```
553965d9f74SJames Wright
554965d9f74SJames Wright## Newtonian viscosity, Ideal Gas
555965d9f74SJames Wright
556965d9f74SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
557965d9f74SJames Wright
558965d9f74SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
559965d9f74SJames Wright:header-rows: 1
560965d9f74SJames Wright
561965d9f74SJames Wright* - Option
562965d9f74SJames Wright  - Description
563965d9f74SJames Wright  - Default value
564965d9f74SJames Wright  - Unit
565965d9f74SJames Wright
566965d9f74SJames Wright* - `-units_meter`
567965d9f74SJames Wright  - 1 meter in scaled length units
568965d9f74SJames Wright  - `1`
569965d9f74SJames Wright  -
570965d9f74SJames Wright
571965d9f74SJames Wright* - `-units_second`
572965d9f74SJames Wright  - 1 second in scaled time units
573965d9f74SJames Wright  - `1`
574965d9f74SJames Wright  -
575965d9f74SJames Wright
576965d9f74SJames Wright* - `-units_kilogram`
577965d9f74SJames Wright  - 1 kilogram in scaled mass units
578965d9f74SJames Wright  - `1`
579965d9f74SJames Wright  -
580965d9f74SJames Wright
581965d9f74SJames Wright* - `-units_Kelvin`
582965d9f74SJames Wright  - 1 Kelvin in scaled temperature units
583965d9f74SJames Wright  - `1`
584965d9f74SJames Wright  -
585965d9f74SJames Wright
586965d9f74SJames Wright* - `-stab`
587965d9f74SJames Wright  - Stabilization method (`none`, `su`, or `supg`)
588965d9f74SJames Wright  - `none`
589965d9f74SJames Wright  -
590965d9f74SJames Wright
591965d9f74SJames Wright* - `-c_tau`
592965d9f74SJames Wright  - Stabilization constant, $c_\tau$
593965d9f74SJames Wright  - `0.5`
594965d9f74SJames Wright  -
595965d9f74SJames Wright
596965d9f74SJames Wright* - `-Ctau_t`
597965d9f74SJames Wright  - Stabilization time constant, $C_t$
598965d9f74SJames Wright  - `1.0`
599965d9f74SJames Wright  -
600965d9f74SJames Wright
601965d9f74SJames Wright* - `-Ctau_v`
602965d9f74SJames Wright  - Stabilization viscous constant, $C_v$
603965d9f74SJames Wright  - `36, 60, 128 for degree = 1, 2, 3`
604965d9f74SJames Wright  -
605965d9f74SJames Wright
606965d9f74SJames Wright* - `-Ctau_C`
607965d9f74SJames Wright  - Stabilization continuity constant, $C_c$
608965d9f74SJames Wright  - `1.0`
609965d9f74SJames Wright  -
610965d9f74SJames Wright
611965d9f74SJames Wright* - `-Ctau_M`
612965d9f74SJames Wright  - Stabilization momentum constant, $C_m$
613965d9f74SJames Wright  - `1.0`
614965d9f74SJames Wright  -
615965d9f74SJames Wright
616965d9f74SJames Wright* - `-Ctau_E`
617965d9f74SJames Wright  - Stabilization energy constant, $C_E$
618965d9f74SJames Wright  - `1.0`
619965d9f74SJames Wright  -
620965d9f74SJames Wright
621cbdfeaf4SJames Wright* - `-div_diff_flux_projection_method`
622cbdfeaf4SJames Wright  - Method used to calculate divergence of diffusive flux projection (`none`, `direct`, or `indirect`)
623cbdfeaf4SJames Wright  - `none`
624cbdfeaf4SJames Wright  -
625cbdfeaf4SJames Wright
626cbdfeaf4SJames Wright* - `-div_diff_flux_projection_ksp*`
627cbdfeaf4SJames Wright  - Control the KSP object for the projection of the divergence of diffusive flux
628cbdfeaf4SJames Wright  - N/A
629cbdfeaf4SJames Wright  -
630cbdfeaf4SJames Wright
631965d9f74SJames Wright* - `-cv`
632965d9f74SJames Wright  - Heat capacity at constant volume
633965d9f74SJames Wright  - `717`
634965d9f74SJames Wright  - `J/(kg K)`
635965d9f74SJames Wright
636965d9f74SJames Wright* - `-cp`
637965d9f74SJames Wright  - Heat capacity at constant pressure
638965d9f74SJames Wright  - `1004`
639965d9f74SJames Wright  - `J/(kg K)`
640965d9f74SJames Wright
641965d9f74SJames Wright* - `-gravity`
642965d9f74SJames Wright  - Gravitational acceleration vector
643965d9f74SJames Wright  - `0,0,0`
644965d9f74SJames Wright  - `m/s^2`
645965d9f74SJames Wright
646965d9f74SJames Wright* - `-lambda`
647965d9f74SJames Wright  - Stokes hypothesis second viscosity coefficient
648965d9f74SJames Wright  - `-2/3`
649965d9f74SJames Wright  -
650965d9f74SJames Wright
651965d9f74SJames Wright* - `-mu`
652965d9f74SJames Wright  - Shear dynamic viscosity coefficient
653965d9f74SJames Wright  - `1.8e-5`
654965d9f74SJames Wright  -  `Pa s`
655965d9f74SJames Wright
656965d9f74SJames Wright* - `-k`
657965d9f74SJames Wright  - Thermal conductivity
658965d9f74SJames Wright  - `0.02638`
659965d9f74SJames Wright  - `W/(m K)`
660965d9f74SJames Wright
661965d9f74SJames Wright* - `-newtonian_unit_tests`
662965d9f74SJames Wright  - Developer option to test properties
663965d9f74SJames Wright  - `false`
664965d9f74SJames Wright  - boolean
665965d9f74SJames Wright
666965d9f74SJames Wright* - `-state_var`
667965d9f74SJames 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})$
668965d9f74SJames Wright  - `conservative`
669965d9f74SJames Wright  - string
670965d9f74SJames Wright
671965d9f74SJames Wright* - `-idl_decay_time`
672965d9f74SJames Wright  - Characteristic timescale of the pressure deviance decay. The timestep is good starting point
673965d9f74SJames Wright  - `-1` (disabled)
674965d9f74SJames Wright  - `s`
675965d9f74SJames Wright
676965d9f74SJames Wright* - `-idl_start`
677965d9f74SJames Wright  - Start of IDL in the x direction
678965d9f74SJames Wright  - `0`
679965d9f74SJames Wright  - `m`
680965d9f74SJames Wright
681965d9f74SJames Wright* - `-idl_length`
682965d9f74SJames Wright  - Length of IDL in the positive x direction
683965d9f74SJames Wright  - `0`
684965d9f74SJames Wright  - `m`
685965d9f74SJames Wright
686965d9f74SJames Wright* - `-idl_pressure`
687965d9f74SJames Wright  - Pressure used for IDL reference pressure
688965d9f74SJames Wright  -  `-reference_pressure`
689965d9f74SJames Wright  - `Pa`
690965d9f74SJames Wright
691965d9f74SJames Wright* - `-sgs_model_type`
692965d9f74SJames Wright  - Type of subgrid stress model to use. Currently only `data_driven` is available
693965d9f74SJames Wright  - `none`
694965d9f74SJames Wright  - string
695965d9f74SJames Wright
696965d9f74SJames Wright* - `-sgs_model_dd_leakyrelu_alpha`
697965d9f74SJames Wright  - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU
698965d9f74SJames Wright  - 0
699965d9f74SJames Wright  -
700965d9f74SJames Wright
701965d9f74SJames Wright* - `-sgs_model_dd_parameter_dir`
702965d9f74SJames Wright  - Path to directory with data-driven model parameters (weights, biases, etc.)
703965d9f74SJames Wright  - `./dd_sgs_parameters`
704965d9f74SJames Wright  - string
705965d9f74SJames Wright
706965d9f74SJames Wright* - `-sgs_model_dd_model_implementation`
707965d9f74SJames Wright  - Which computational implementation to use for SGS DD model (`fused`, `sequential_ceed`, `sequential_torch`)
708965d9f74SJames Wright  - `fused`
709965d9f74SJames Wright  - string
710965d9f74SJames Wright
711965d9f74SJames Wright* - `-sgs_model_dd_torch_model_path`
712965d9f74SJames Wright  - Path to the PyTorch `*.pt` file containing the DD inference model
713965d9f74SJames Wright  -
714965d9f74SJames Wright  - string
715965d9f74SJames Wright
716965d9f74SJames Wright* - `-sgs_model_dd_torch_model_device`
717965d9f74SJames Wright  - What hardware to perform the model inference on (`cpu`, `cuda`, `hip`, `xpu`)
718965d9f74SJames Wright  - Default matches the libCEED backend
719965d9f74SJames Wright  - string
720965d9f74SJames Wright
721965d9f74SJames Wright* - `-diff_filter_monitor`
722965d9f74SJames Wright  - Enable differential filter TSMonitor
723965d9f74SJames Wright  - `false`
724965d9f74SJames Wright  - boolean
725965d9f74SJames Wright
726965d9f74SJames Wright* - `-diff_filter_grid_based_width`
727965d9f74SJames Wright  - Use filter width based on the grid size
728965d9f74SJames Wright  - `false`
729965d9f74SJames Wright  - boolean
730965d9f74SJames Wright
731965d9f74SJames Wright* - `-diff_filter_width_scaling`
732965d9f74SJames Wright  - Anisotropic scaling for filter width in wall-aligned coordinates (snz)
733965d9f74SJames Wright  - `1,1,1`
734965d9f74SJames Wright  - `m`
735965d9f74SJames Wright
736965d9f74SJames Wright* - `-diff_filter_kernel_scaling`
737965d9f74SJames Wright  - Scaling to make differential kernel size equivalent to other filter kernels
738965d9f74SJames Wright  - `0.1`
739965d9f74SJames Wright  - `m^2`
740965d9f74SJames Wright
741965d9f74SJames Wright* - `-diff_filter_wall_damping_function`
742965d9f74SJames Wright  - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`)
743965d9f74SJames Wright  - `none`
744965d9f74SJames Wright  - string
745965d9f74SJames Wright
746965d9f74SJames Wright* - `-diff_filter_wall_damping_constant`
747965d9f74SJames Wright  - Constant for the wall-damping function. $A^+$ for `van_driest` damping function.
748965d9f74SJames Wright  - 25
749965d9f74SJames Wright  -
750965d9f74SJames Wright
751965d9f74SJames Wright* - `-diff_filter_friction_length`
752965d9f74SJames Wright  - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions
753965d9f74SJames Wright  - 0
754965d9f74SJames Wright  - `m`
755965d9f74SJames Wright
756965d9f74SJames Wright* - `-sgs_train_enable`
757965d9f74SJames Wright  - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis.
758965d9f74SJames Wright  - `false`
759965d9f74SJames Wright  - boolean
760965d9f74SJames Wright
761965d9f74SJames Wright* - `-sgs_train_write_data_interval`
762965d9f74SJames Wright  - Number of timesteps between writing training data into SmartRedis database
763965d9f74SJames Wright  - `1`
764965d9f74SJames Wright  -
765965d9f74SJames Wright
766965d9f74SJames Wright* - `-sgs_train_overwrite_data`
767965d9f74SJames Wright  - Whether new training data should overwrite old data on database
768965d9f74SJames Wright  - `true`
769965d9f74SJames Wright  - boolean
770965d9f74SJames Wright
771965d9f74SJames Wright* - `-sgs_train_filter_widths`
772965d9f74SJames Wright  - List of scalar values for different filter widths to calculate for training data
773965d9f74SJames Wright  -
774965d9f74SJames Wright  - `m`
775965d9f74SJames Wright
776965d9f74SJames Wright* - `-smartsim_collocated_num_ranks`
777965d9f74SJames Wright  - Number of MPI ranks associated with each collocated database (i.e. ranks per node)
778965d9f74SJames Wright  - `1`
779965d9f74SJames Wright  -
780965d9f74SJames Wright:::
781965d9f74SJames Wright
782965d9f74SJames Wright### Gaussian Wave
783965d9f74SJames Wright
784965d9f74SJames WrightThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
785965d9f74SJames Wright
786965d9f74SJames Wright:::{list-table} Gaussian Wave Runtime Options
787965d9f74SJames Wright:header-rows: 1
788965d9f74SJames Wright
789965d9f74SJames Wright* - Option
790965d9f74SJames Wright  - Description
791965d9f74SJames Wright  - Default value
792965d9f74SJames Wright  - Unit
793965d9f74SJames Wright
794965d9f74SJames Wright* - `-freestream_riemann`
795965d9f74SJames Wright  - Riemann solver for boundaries (HLL or HLLC)
796965d9f74SJames Wright  - `hllc`
797965d9f74SJames Wright  -
798965d9f74SJames Wright
799965d9f74SJames Wright* - `-freestream_velocity`
800965d9f74SJames Wright  - Freestream velocity vector
801965d9f74SJames Wright  - `0,0,0`
802965d9f74SJames Wright  - `m/s`
803965d9f74SJames Wright
804965d9f74SJames Wright* - `-freestream_temperature`
805965d9f74SJames Wright  - Freestream temperature
806965d9f74SJames Wright  - `288`
807965d9f74SJames Wright  - `K`
808965d9f74SJames Wright
809965d9f74SJames Wright* - `-freestream_pressure`
810965d9f74SJames Wright  - Freestream pressure
811965d9f74SJames Wright  - `1.01e5`
812965d9f74SJames Wright  - `Pa`
813965d9f74SJames Wright
814965d9f74SJames Wright* - `-epicenter`
815965d9f74SJames Wright  - Coordinates of center of perturbation
816965d9f74SJames Wright  - `0,0,0`
817965d9f74SJames Wright  - `m`
818965d9f74SJames Wright
819965d9f74SJames Wright* - `-amplitude`
820965d9f74SJames Wright  - Amplitude of the perturbation
821965d9f74SJames Wright  - `0.1`
822965d9f74SJames Wright  -
823965d9f74SJames Wright
824965d9f74SJames Wright* - `-width`
825965d9f74SJames Wright  - Width parameter of the perturbation
826965d9f74SJames Wright  - `0.002`
827965d9f74SJames Wright  - `m`
828965d9f74SJames Wright
829965d9f74SJames Wright:::
830965d9f74SJames Wright
831fc37ad8cSJames WrightThis problem can be run with the `examples/gaussianwave.yaml` file via:
832965d9f74SJames Wright
833965d9f74SJames Wright```
834fc37ad8cSJames Wright./build/navierstokes -options_file examples/gaussianwave.yaml
835965d9f74SJames Wright```
836965d9f74SJames Wright
837fc37ad8cSJames Wright```{literalinclude} ../examples/gaussianwave.yaml
838965d9f74SJames Wright:language: yaml
839965d9f74SJames Wright```
840965d9f74SJames Wright
841965d9f74SJames Wright### Vortex Shedding - Flow past Cylinder
842965d9f74SJames Wright
843965d9f74SJames WrightThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
844965d9f74SJames Wright
845965d9f74SJames Wright:::{list-table} Vortex Shedding Runtime Options
846965d9f74SJames Wright:header-rows: 1
847965d9f74SJames Wright
848965d9f74SJames Wright* - Option
849965d9f74SJames Wright  - Description
850965d9f74SJames Wright  - Default value
851965d9f74SJames Wright  - Unit
852965d9f74SJames Wright
853965d9f74SJames Wright* - `-freestream_velocity`
854965d9f74SJames Wright  - Freestream velocity vector
855965d9f74SJames Wright  - `0,0,0`
856965d9f74SJames Wright  - `m/s`
857965d9f74SJames Wright
858965d9f74SJames Wright* - `-freestream_temperature`
859965d9f74SJames Wright  - Freestream temperature
860965d9f74SJames Wright  - `288`
861965d9f74SJames Wright  - `K`
862965d9f74SJames Wright
863965d9f74SJames Wright* - `-freestream_pressure`
864965d9f74SJames Wright  - Freestream pressure
865965d9f74SJames Wright  - `1.01e5`
866965d9f74SJames Wright  - `Pa`
867965d9f74SJames Wright
868965d9f74SJames Wright:::
869965d9f74SJames Wright
870965d9f74SJames WrightThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
871965d9f74SJames WrightTo run this problem, first generate a mesh:
872965d9f74SJames Wright
873965d9f74SJames Wright```console
874fc37ad8cSJames Wright$ make -C examples/meshes
875965d9f74SJames Wright```
876965d9f74SJames Wright
877965d9f74SJames WrightThen run by building the executable and running:
878965d9f74SJames Wright
879965d9f74SJames Wright```console
880fc37ad8cSJames Wright$ make -j
881fc37ad8cSJames Wright$ mpiexec -n 6 build/navierstokes -options_file examples/vortexshedding.yaml -{ts,snes}_monitor_
882965d9f74SJames Wright```
883965d9f74SJames Wright
884965d9f74SJames WrightThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
885fc37ad8cSJames 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.
886965d9f74SJames Wright
887965d9f74SJames Wright```console
888965d9f74SJames Wright$ python postprocess/vortexshedding.py
889965d9f74SJames Wright```
890965d9f74SJames Wright
891fc37ad8cSJames Wright```{literalinclude} ../examples/vortexshedding.yaml
892965d9f74SJames Wright:language: yaml
893965d9f74SJames Wright```
894965d9f74SJames Wright
895965d9f74SJames Wright### Density current
896965d9f74SJames Wright
897965d9f74SJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
898965d9f74SJames Wright
899965d9f74SJames Wright:::{list-table} Density Current Runtime Options
900965d9f74SJames Wright:header-rows: 1
901965d9f74SJames Wright
902965d9f74SJames Wright* - Option
903965d9f74SJames Wright  - Description
904965d9f74SJames Wright  - Default value
905965d9f74SJames Wright  - Unit
906965d9f74SJames Wright
907965d9f74SJames Wright* - `-center`
908965d9f74SJames Wright  - Location of bubble center
909965d9f74SJames Wright  - `(lx,ly,lz)/2`
910965d9f74SJames Wright  - `(m,m,m)`
911965d9f74SJames Wright
912965d9f74SJames Wright* - `-dc_axis`
913965d9f74SJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
914965d9f74SJames Wright  - `(0,0,0)`
915965d9f74SJames Wright  -
916965d9f74SJames Wright
917965d9f74SJames Wright* - `-rc`
918965d9f74SJames Wright  - Characteristic radius of thermal bubble
919965d9f74SJames Wright  - `1000`
920965d9f74SJames Wright  - `m`
921965d9f74SJames Wright
922965d9f74SJames Wright* - `-theta0`
923965d9f74SJames Wright  - Reference potential temperature
924965d9f74SJames Wright  - `300`
925965d9f74SJames Wright  - `K`
926965d9f74SJames Wright
927965d9f74SJames Wright* - `-thetaC`
928965d9f74SJames Wright  - Perturbation of potential temperature
929965d9f74SJames Wright  - `-15`
930965d9f74SJames Wright  - `K`
931965d9f74SJames Wright
932965d9f74SJames Wright* - `-P0`
933965d9f74SJames Wright  - Atmospheric pressure
934965d9f74SJames Wright  - `1E5`
935965d9f74SJames Wright  - `Pa`
936965d9f74SJames Wright
937965d9f74SJames Wright* - `-N`
938965d9f74SJames Wright  - Brunt-Vaisala frequency
939965d9f74SJames Wright  - `0.01`
940965d9f74SJames Wright  - `1/s`
941965d9f74SJames Wright:::
942965d9f74SJames Wright
943965d9f74SJames WrightThis problem can be run with:
944965d9f74SJames Wright
945965d9f74SJames Wright```
946965d9f74SJames 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
947965d9f74SJames Wright```
948965d9f74SJames Wright
949965d9f74SJames Wright### Channel flow
950965d9f74SJames Wright
951965d9f74SJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
952965d9f74SJames Wright
953965d9f74SJames Wright:::{list-table} Channel Runtime Options
954965d9f74SJames Wright:header-rows: 1
955965d9f74SJames Wright
956965d9f74SJames Wright* - Option
957965d9f74SJames Wright  - Description
958965d9f74SJames Wright  - Default value
959965d9f74SJames Wright  - Unit
960965d9f74SJames Wright
961965d9f74SJames Wright* - `-umax`
962965d9f74SJames Wright  - Maximum/centerline velocity of the flow
963965d9f74SJames Wright  - `10`
964965d9f74SJames Wright  - `m/s`
965965d9f74SJames Wright
966965d9f74SJames Wright* - `-theta0`
967965d9f74SJames Wright  - Reference potential temperature
968965d9f74SJames Wright  - `300`
969965d9f74SJames Wright  - `K`
970965d9f74SJames Wright
971965d9f74SJames Wright* - `-P0`
972965d9f74SJames Wright  - Atmospheric pressure
973965d9f74SJames Wright  - `1E5`
974965d9f74SJames Wright  - `Pa`
975965d9f74SJames Wright
976965d9f74SJames Wright* - `-body_force_scale`
977965d9f74SJames Wright  - Multiplier for body force (`-1` for flow reversal)
978965d9f74SJames Wright  - 1
979965d9f74SJames Wright  -
980965d9f74SJames Wright:::
981965d9f74SJames Wright
982fc37ad8cSJames WrightThis problem can be run with the `examples/channel.yaml` file via:
983965d9f74SJames Wright
984965d9f74SJames Wright```
985fc37ad8cSJames Wright./build/navierstokes -options_file examples/channel.yaml
986965d9f74SJames Wright```
987fc37ad8cSJames Wright```{literalinclude} ../examples/channel.yaml
988965d9f74SJames Wright:language: yaml
989965d9f74SJames Wright```
990965d9f74SJames Wright
991965d9f74SJames Wright(example-blasius)=
992965d9f74SJames Wright
993965d9f74SJames Wright### Blasius boundary layer
994965d9f74SJames Wright
995965d9f74SJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
996965d9f74SJames Wright
997965d9f74SJames Wright:::{list-table} Blasius Runtime Options
998965d9f74SJames Wright:header-rows: 1
999965d9f74SJames Wright
1000965d9f74SJames Wright* - Option
1001965d9f74SJames Wright  - Description
1002965d9f74SJames Wright  - Default value
1003965d9f74SJames Wright  - Unit
1004965d9f74SJames Wright
1005965d9f74SJames Wright* - `-velocity_infinity`
1006965d9f74SJames Wright  - Freestream velocity
1007965d9f74SJames Wright  - `40`
1008965d9f74SJames Wright  - `m/s`
1009965d9f74SJames Wright
1010965d9f74SJames Wright* - `-temperature_infinity`
1011965d9f74SJames Wright  - Freestream temperature
1012965d9f74SJames Wright  - `288`
1013965d9f74SJames Wright  - `K`
1014965d9f74SJames Wright
1015965d9f74SJames Wright* - `-pressure_infinity`
1016965d9f74SJames Wright  - Atmospheric pressure, also sets IDL reference pressure
1017965d9f74SJames Wright  - `1.01E5`
1018965d9f74SJames Wright  - `Pa`
1019965d9f74SJames Wright
1020965d9f74SJames Wright* - `-temperature_wall`
1021965d9f74SJames Wright  - Wall temperature
1022965d9f74SJames Wright  - `288`
1023965d9f74SJames Wright  - `K`
1024965d9f74SJames Wright
1025965d9f74SJames Wright* - `-delta0`
1026965d9f74SJames Wright  - Boundary layer height at the inflow
1027965d9f74SJames Wright  - `4.2e-3`
1028965d9f74SJames Wright  - `m`
1029965d9f74SJames Wright
1030965d9f74SJames Wright* - `-platemesh_modify_mesh`
1031965d9f74SJames Wright  - Whether to modify the mesh using the given options below.
1032965d9f74SJames Wright  - `false`
1033965d9f74SJames Wright  -
1034965d9f74SJames Wright
1035965d9f74SJames Wright* - `-platemesh_refine_height`
1036965d9f74SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
1037965d9f74SJames Wright  - `5.9E-4`
1038965d9f74SJames Wright  - `m`
1039965d9f74SJames Wright
1040965d9f74SJames Wright* - `-platemesh_Ndelta`
1041965d9f74SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
1042965d9f74SJames Wright  - `45`
1043965d9f74SJames Wright  -
1044965d9f74SJames Wright
1045965d9f74SJames Wright* - `-platemesh_growth`
1046965d9f74SJames Wright  - Growth rate of the elements in the refinement region
1047965d9f74SJames Wright  - `1.08`
1048965d9f74SJames Wright  -
1049965d9f74SJames Wright
1050965d9f74SJames Wright* - `-platemesh_top_angle`
1051965d9f74SJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
1052965d9f74SJames Wright  - `5`
1053965d9f74SJames Wright  - `degrees`
1054965d9f74SJames Wright
1055965d9f74SJames Wright* - `-platemesh_y_node_locs_path`
1056965d9f74SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
1057965d9f74SJames Wright  - `""`
1058965d9f74SJames Wright  -
1059965d9f74SJames Wright
1060965d9f74SJames Wright* - `-stg_use`
1061965d9f74SJames Wright  - Whether to use STG for the inflow conditions
1062965d9f74SJames Wright  - `false`
1063965d9f74SJames Wright  -
1064965d9f74SJames Wright
1065965d9f74SJames Wright* - `-n_chebyshev`
1066965d9f74SJames Wright  - Number of Chebyshev terms
1067965d9f74SJames Wright  - `20`
1068965d9f74SJames Wright  -
1069965d9f74SJames Wright
1070965d9f74SJames Wright* - `-chebyshev_`
1071965d9f74SJames Wright  - Prefix for Chebyshev snes solve
1072965d9f74SJames Wright  -
1073965d9f74SJames Wright  -
1074965d9f74SJames Wright
1075965d9f74SJames Wright:::
1076965d9f74SJames Wright
1077fc37ad8cSJames WrightThis problem can be run with the `examples/blasius.yaml` file via:
1078965d9f74SJames Wright
1079965d9f74SJames Wright```
1080fc37ad8cSJames Wright./build/navierstokes -options_file examples/blasius.yaml
1081965d9f74SJames Wright```
1082965d9f74SJames Wright
1083fc37ad8cSJames Wright```{literalinclude} ../examples/blasius.yaml
1084965d9f74SJames Wright:language: yaml
1085965d9f74SJames Wright```
1086965d9f74SJames Wright
1087965d9f74SJames Wright### STG Inflow for Flat Plate
1088965d9f74SJames Wright
1089965d9f74SJames WrightUsing the STG Inflow for the blasius problem adds the following command-line options:
1090965d9f74SJames Wright
1091965d9f74SJames Wright:::{list-table} Blasius Runtime Options
1092965d9f74SJames Wright:header-rows: 1
1093965d9f74SJames Wright
1094965d9f74SJames Wright* - Option
1095965d9f74SJames Wright  - Description
1096965d9f74SJames Wright  - Default value
1097965d9f74SJames Wright  - Unit
1098965d9f74SJames Wright
1099965d9f74SJames Wright* - `-stg_inflow_path`
1100965d9f74SJames Wright  - Path to the STGInflow file
1101965d9f74SJames Wright  - `./STGInflow.dat`
1102965d9f74SJames Wright  -
1103965d9f74SJames Wright
1104965d9f74SJames Wright* - `-stg_rand_path`
1105965d9f74SJames Wright  - Path to the STGRand file
1106965d9f74SJames Wright  - `./STGRand.dat`
1107965d9f74SJames Wright  -
1108965d9f74SJames Wright
1109965d9f74SJames Wright* - `-stg_alpha`
1110965d9f74SJames Wright  - Growth rate of the wavemodes
1111965d9f74SJames Wright  - `1.01`
1112965d9f74SJames Wright  -
1113965d9f74SJames Wright
1114965d9f74SJames Wright* - `-stg_u0`
1115965d9f74SJames Wright  - Convective velocity, $U_0$
1116965d9f74SJames Wright  - `0.0`
1117965d9f74SJames Wright  - `m/s`
1118965d9f74SJames Wright
1119965d9f74SJames Wright* - `-stg_mean_only`
1120965d9f74SJames Wright  - Only impose the mean velocity (no fluctutations)
1121965d9f74SJames Wright  - `false`
1122965d9f74SJames Wright  -
1123965d9f74SJames Wright
1124965d9f74SJames Wright* - `-stg_strong`
1125965d9f74SJames Wright  - Strongly enforce the STG inflow boundary condition
1126965d9f74SJames Wright  - `false`
1127965d9f74SJames Wright  -
1128965d9f74SJames Wright
1129965d9f74SJames Wright* - `-stg_fluctuating_IC`
1130965d9f74SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
1131965d9f74SJames Wright  - `false`
1132965d9f74SJames Wright  -
1133965d9f74SJames Wright
1134965d9f74SJames Wright* - `-stg_dx`
1135965d9f74SJames Wright  - Set the element size in the x direction. Default is calculated for box meshes, assuming equispaced elements.
1136965d9f74SJames Wright  -
1137965d9f74SJames Wright  - `m`
1138965d9f74SJames Wright
1139965d9f74SJames Wright* - `-stg_h_scale_factor`
1140965d9f74SJames Wright  - Scale element size for cutoff frequency calculation
1141965d9f74SJames Wright  - $1/p$
1142965d9f74SJames Wright  -
1143965d9f74SJames Wright
1144965d9f74SJames Wright:::
1145965d9f74SJames Wright
1146fc37ad8cSJames WrightThis problem can be run with the `examples/blasius.yaml` file via:
1147965d9f74SJames Wright
1148965d9f74SJames Wright```
1149fc37ad8cSJames Wright./build/navierstokes -options_file examples/blasius.yaml -stg_use true
1150965d9f74SJames Wright```
1151965d9f74SJames Wright
1152965d9f74SJames WrightNote the added `-stg_use true` flag
1153fc37ad8cSJames WrightThis overrides the `stg: use: false` setting in the `examples/blasius.yaml` file, enabling the use of the STG inflow.
1154