xref: /libCEED/examples/fluids/README.md (revision f3f660769ca9a0cfa31805ac55ff8b444de66d6b)
1ccaff030SJeremy L Thompson## libCEED: Navier-Stokes Example
2ccaff030SJeremy L Thompson
3ccaff030SJeremy L ThompsonThis page provides a description of the Navier-Stokes example for the libCEED library, based on PETSc.
4b8962995SJeremy L ThompsonPETSc v3.17 or a development version of PETSc at commit 0e95d842 or later is required.
5ccaff030SJeremy L Thompson
677841947SLeila GhaffariThe Navier-Stokes problem solves the compressible Navier-Stokes equations in three dimensions using an explicit time integration.
777841947SLeila GhaffariThe state variables are mass density, momentum density, and energy density.
8ccaff030SJeremy L Thompson
977841947SLeila GhaffariThe main Navier-Stokes solver for libCEED is defined in [`navierstokes.c`](navierstokes.c) with different problem definitions according to the application of interest.
10ccaff030SJeremy L Thompson
11bc7bbd5dSLeila GhaffariBuild by using:
12ccaff030SJeremy L Thompson
13ccaff030SJeremy L Thompson`make`
14ccaff030SJeremy L Thompson
15bc7bbd5dSLeila Ghaffariand run with:
16ccaff030SJeremy L Thompson
17bc7bbd5dSLeila Ghaffari```
18bc7bbd5dSLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree]
19bc7bbd5dSLeila Ghaffari```
20ccaff030SJeremy L Thompson
21bc7bbd5dSLeila Ghaffari## Runtime options
22ccaff030SJeremy L Thompson
23bc7bbd5dSLeila Ghaffari% inclusion-fluids-marker
24ccaff030SJeremy L Thompson
25bc7bbd5dSLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options.
26bc7bbd5dSLeila GhaffariThe following options are common among all problem types:
27ccaff030SJeremy L Thompson
28bc7bbd5dSLeila Ghaffari:::{list-table} Common Runtime Options
29bc7bbd5dSLeila Ghaffari:header-rows: 1
30ccaff030SJeremy L Thompson
31bc7bbd5dSLeila Ghaffari* - Option
32bc7bbd5dSLeila Ghaffari  - Description
33bc7bbd5dSLeila Ghaffari  - Default value
34ccaff030SJeremy L Thompson
35bc7bbd5dSLeila Ghaffari* - `-ceed`
36bc7bbd5dSLeila Ghaffari  - CEED resource specifier
37bc7bbd5dSLeila Ghaffari  - `/cpu/self/opt/blocked`
38ccaff030SJeremy L Thompson
393866774cSJames Wright* - `-test_type`
403866774cSJames Wright  - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified
413866774cSJames Wright  - `none`
42ccaff030SJeremy L Thompson
43bc7bbd5dSLeila Ghaffari* - `-compare_final_state_atol`
44bc7bbd5dSLeila Ghaffari  - Test absolute tolerance
45bc7bbd5dSLeila Ghaffari  - `1E-11`
46ccaff030SJeremy L Thompson
47bc7bbd5dSLeila Ghaffari* - `-compare_final_state_filename`
48bc7bbd5dSLeila Ghaffari  - Test filename
49bc7bbd5dSLeila Ghaffari  -
50ccaff030SJeremy L Thompson
51bc7bbd5dSLeila Ghaffari* - `-problem`
52bc7bbd5dSLeila Ghaffari  - Problem to solve (`advection`, `advection2d`, `density_current`, or `euler_vortex`)
53bc7bbd5dSLeila Ghaffari  - `density_current`
54ccaff030SJeremy L Thompson
55bc7bbd5dSLeila Ghaffari* - `-implicit`
56bc7bbd5dSLeila Ghaffari  - Use implicit time integartor formulation
57bc7bbd5dSLeila Ghaffari  -
58ccaff030SJeremy L Thompson
59bc7bbd5dSLeila Ghaffari* - `-degree`
60bc7bbd5dSLeila Ghaffari  - Polynomial degree of tensor product basis (must be >= 1)
61bc7bbd5dSLeila Ghaffari  - `1`
62ccaff030SJeremy L Thompson
632288fb52SJeremy L Thompson* - `-q_extra`
64bc7bbd5dSLeila Ghaffari  - Number of extra quadrature points
65fc14f3f6SLeila Ghaffari  - `0`
66ccaff030SJeremy L Thompson
6737cbb16aSJed Brown* - `-ts_monitor_solution`
6837cbb16aSJed Brown  - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
6937cbb16aSJed Brown  -
70ccaff030SJeremy L Thompson
7137cbb16aSJed Brown* - `-ts_monitor_solution_interval`
7237cbb16aSJed Brown  - Number of time steps between visualization output frames.
7337cbb16aSJed Brown  - `1`
7437cbb16aSJed Brown
7537cbb16aSJed Brown* - `-viewer_cgns_batch_size`
7637cbb16aSJed Brown  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
7737cbb16aSJed Brown  - `20`
7837cbb16aSJed Brown
7937cbb16aSJed Brown* - `-checkpoint_interval`
8037cbb16aSJed Brown  - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only
81bc7bbd5dSLeila Ghaffari  - `10`
82ccaff030SJeremy L Thompson
8337cbb16aSJed Brown* - `-checkpoint_vtk`
8437cbb16aSJed Brown  - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead.
8537cbb16aSJed Brown  - `false`
8637cbb16aSJed Brown
8737cbb16aSJed Brown* - `-viz_refine`
8837cbb16aSJed Brown  - Use regular refinement for VTK visualization
8937cbb16aSJed Brown  - `0`
9037cbb16aSJed Brown
91bc7bbd5dSLeila Ghaffari* - `-output_dir`
9237cbb16aSJed Brown  - Output directory for binary checkpoints and VTK files (if enabled).
93bc7bbd5dSLeila Ghaffari  - `.`
94ccaff030SJeremy L Thompson
9569293791SJames Wright* - `-output_add_stepnum2bin`
9669293791SJames Wright  - Whether to add step numbers to output binary files
9769293791SJames Wright  - `false`
9869293791SJames Wright
9969293791SJames Wright* - `-continue`
10069293791SJames Wright  - Continue from previous solution (input is step number of previous solution)
10169293791SJames Wright  - `0`
10269293791SJames Wright
10369293791SJames Wright* - `-continue_filename`
10469293791SJames Wright  - Path to solution binary file from which to continue from
10569293791SJames Wright  - `[output_dir]/ns-solution.bin`
10669293791SJames Wright
10769293791SJames Wright* - `-continue_time_filename`
1084de8550aSJed Brown  - Path to time stamp binary file (only for legacy checkpoints)
10969293791SJames Wright  - `[output_dir]/ns-time.bin`
11069293791SJames Wright
1114534a52eSLeila Ghaffari* - `-bc_wall`
1124534a52eSLeila Ghaffari  - Use wall boundary conditions on this list of faces
1134534a52eSLeila Ghaffari  -
1144534a52eSLeila Ghaffari
1154534a52eSLeila Ghaffari* - `-wall_comps`
1164534a52eSLeila Ghaffari  - An array of constrained component numbers for wall BCs
1174534a52eSLeila Ghaffari  -
1184534a52eSLeila Ghaffari
1194534a52eSLeila Ghaffari* - `-bc_slip_x`
1204534a52eSLeila Ghaffari  - Use slip boundary conditions, for the x component, on this list of faces
1214534a52eSLeila Ghaffari  -
1224534a52eSLeila Ghaffari
1234534a52eSLeila Ghaffari* - `-bc_slip_y`
1244534a52eSLeila Ghaffari  - Use slip boundary conditions, for the y component, on this list of faces
1254534a52eSLeila Ghaffari  -
1264534a52eSLeila Ghaffari
1274534a52eSLeila Ghaffari* - `-bc_slip_z`
1284534a52eSLeila Ghaffari  - Use slip boundary conditions, for the z component, on this list of faces
1294534a52eSLeila Ghaffari  -
1304534a52eSLeila Ghaffari
1314534a52eSLeila Ghaffari* - `-bc_inflow`
1324534a52eSLeila Ghaffari  - Use inflow boundary conditions on this list of faces
1334534a52eSLeila Ghaffari  -
1344534a52eSLeila Ghaffari
1354534a52eSLeila Ghaffari* - `-bc_outflow`
1364534a52eSLeila Ghaffari  - Use outflow boundary conditions on this list of faces
1374534a52eSLeila Ghaffari  -
13889d0f5c0SLeila Ghaffari
1397ec884f8SJames Wright* - `-bc_freestream`
1407ec884f8SJames Wright  - Use freestream boundary conditions on this list of faces
1417ec884f8SJames Wright  -
1427ec884f8SJames Wright
143b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval`
144ee3de563SJames Wright  - Number of timesteps between statistics collection
145ee3de563SJames Wright  - `1`
146ee3de563SJames Wright
147b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer`
148b7d66439SJames 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.
1498ed52730SJames Wright  -
1508ed52730SJames Wright
151b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval`
152ee3de563SJames Wright  - Number of timesteps between statistics file writing (`-1` means only at end of run)
153ee3de563SJames Wright  - `-1`
154ee3de563SJames Wright
155b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size`
1568ed52730SJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
1578ed52730SJames Wright  - `20`
1588ed52730SJames Wright
159ca69d878SAdeleke O. Bankole* - `-ts_monitor_wall_force`
160ca69d878SAdeleke O. Bankole  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
161ca69d878SAdeleke O. Bankole  -
162ca69d878SAdeleke O. Bankole
163bc7bbd5dSLeila Ghaffari* - `-snes_view`
164bc7bbd5dSLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
165bc7bbd5dSLeila Ghaffari  -
16689d0f5c0SLeila Ghaffari
167bc7bbd5dSLeila Ghaffari* - `-log_view`
168bc7bbd5dSLeila Ghaffari  - View PETSc performance log
169bc7bbd5dSLeila Ghaffari  -
170ccaff030SJeremy L Thompson
171bc7bbd5dSLeila Ghaffari* - `-help`
172bc7bbd5dSLeila Ghaffari  - View comprehensive information about run-time options
173bc7bbd5dSLeila Ghaffari  -
174bc7bbd5dSLeila Ghaffari:::
175ccaff030SJeremy L Thompson
1767ec884f8SJames 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_slip_x`, `-bc_slip_y`, and `-bc_slip_z` are:
1774534a52eSLeila Ghaffari
17888626eedSJames Wright:::{list-table} 2D Face ID Labels
17988626eedSJames Wright:header-rows: 1
18088626eedSJames Wright* - PETSc Face Name
18188626eedSJames Wright  - Cartesian direction
18288626eedSJames Wright  - Face ID
18388626eedSJames Wright
18488626eedSJames Wright* - faceMarkerBottom
18588626eedSJames Wright  - -z
18688626eedSJames Wright  - 1
18788626eedSJames Wright
18888626eedSJames Wright* - faceMarkerRight
18988626eedSJames Wright  - +x
19088626eedSJames Wright  - 2
19188626eedSJames Wright
19288626eedSJames Wright* - faceMarkerTop
19388626eedSJames Wright  - +z
19488626eedSJames Wright  - 3
19588626eedSJames Wright
19688626eedSJames Wright* - faceMarkerLeft
19788626eedSJames Wright  - -x
19888626eedSJames Wright  - 4
19988626eedSJames Wright:::
20088626eedSJames Wright
20188626eedSJames Wright:::{list-table} 2D Face ID Labels
20288626eedSJames Wright:header-rows: 1
20388626eedSJames Wright* - PETSc Face Name
20488626eedSJames Wright  - Cartesian direction
20588626eedSJames Wright  - Face ID
20688626eedSJames Wright
20788626eedSJames Wright* - faceMarkerBottom
20888626eedSJames Wright  - -z
20988626eedSJames Wright  - 1
21088626eedSJames Wright
21188626eedSJames Wright* - faceMarkerTop
21288626eedSJames Wright  - +z
21388626eedSJames Wright  - 2
21488626eedSJames Wright
21588626eedSJames Wright* - faceMarkerFront
21688626eedSJames Wright  - -y
21788626eedSJames Wright  - 3
21888626eedSJames Wright
21988626eedSJames Wright* - faceMarkerBack
22088626eedSJames Wright  - +y
22188626eedSJames Wright  - 4
22288626eedSJames Wright
22388626eedSJames Wright* - faceMarkerRight
22488626eedSJames Wright  - +x
22588626eedSJames Wright  - 5
22688626eedSJames Wright
22788626eedSJames Wright* - faceMarkerLeft
22888626eedSJames Wright  - -x
22988626eedSJames Wright  - 6
23088626eedSJames Wright:::
2314534a52eSLeila Ghaffari
2328a94a473SJed Brown### Boundary conditions
2338a94a473SJed Brown
2348a94a473SJed BrownBoundary conditions for compressible viscous flows are notoriously tricky. Here we offer some recommendations
2358a94a473SJed Brown
2368a94a473SJed Brown#### Inflow
2378a94a473SJed Brown
2388a94a473SJed BrownIf 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).
2398a94a473SJed BrownIt is stable and the least reflective boundary condition for acoustics.
2408a94a473SJed Brown
2418a94a473SJed BrownIf near a viscous wall, you may want a specified inflow profile.
2428a94a473SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
2438a94a473SJed BrownThese 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.
2448a94a473SJed BrownThe strong approach gives sharper resolution of velocity structures.
2458a94a473SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
2468a94a473SJed Brown
247*f3f66076SJames Wright#### Outflow
2488a94a473SJed Brown
2498a94a473SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
2508a94a473SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
2518a94a473SJed BrownThe default Riemann solver, HLLC, is sufficient in this regard while the simpler HLL converts thermal structures exiting the domain into grid-scale reflecting acoustics.
2528a94a473SJed Brown
2538a94a473SJed BrownIf 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.
2548a94a473SJed Brown
2558a94a473SJed BrownThe 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).
2568a94a473SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
2578a94a473SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
2588a94a473SJed Brown
259*f3f66076SJames Wright#### Periodicity
2608a94a473SJed Brown
2618a94a473SJed BrownPETSc provides two ways to specify periodicity:
2628a94a473SJed Brown
2638a94a473SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
2648a94a473SJed Brown
2658a94a473SJed Brown```yaml
2668a94a473SJed Browndm_plex:
2678a94a473SJed Brown  shape: box
2688a94a473SJed Brown  box_faces: 10,12,4
2698a94a473SJed Brown  box_bd: none,none,periodic
2708a94a473SJed Brown```
2718a94a473SJed Brown
272ca69d878SAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
273ca69d878SAdeleke O. BankoleThis choice of coordinates prevents evaluating boundary integrals that cross the periodicity, such as for the outflow Riemann problem in the presence of spanwise periodicity.
274ca69d878SAdeleke O. Bankole
275ca69d878SAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
276ca69d878SAdeleke O. Bankole
277ca69d878SAdeleke O. Bankole```yaml
278ca69d878SAdeleke O. Bankoledm_plex:
279ca69d878SAdeleke O. Bankole  shape: zbox
280ca69d878SAdeleke O. Bankole  box_faces: 10,12,4
281ca69d878SAdeleke O. Bankole  box_bd: none,none,periodic
282ca69d878SAdeleke O. Bankole```
283ca69d878SAdeleke O. Bankole
284ca69d878SAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use.
285ca69d878SAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity.
286ca69d878SAdeleke O. BankoleThe `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.
2878a94a473SJed Brown
288019b7682STimothy Aiken### Advection
289019b7682STimothy Aiken
29017be3a41SJeremy L ThompsonFor testing purposes, there is a reduced mode for pure advection, which holds density $\rho$ and momentum density $\rho \bm u$ constant while advecting "total energy density" $E$.
29117be3a41SJeremy L ThompsonThese are available in 2D and 3D.
292019b7682STimothy Aiken
293019b7682STimothy Aiken#### 2D advection
294019b7682STimothy Aiken
295bc7bbd5dSLeila GhaffariFor the 2D advection problem, the following additional command-line options are available:
296ccaff030SJeremy L Thompson
297bc7bbd5dSLeila Ghaffari:::{list-table} Advection2D Runtime Options
298bc7bbd5dSLeila Ghaffari:header-rows: 1
29989d0f5c0SLeila Ghaffari
300bc7bbd5dSLeila Ghaffari* - Option
301bc7bbd5dSLeila Ghaffari  - Description
302bc7bbd5dSLeila Ghaffari  - Default value
303bc7bbd5dSLeila Ghaffari  - Unit
30489d0f5c0SLeila Ghaffari
305bc7bbd5dSLeila Ghaffari* - `-rc`
306bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
307bc7bbd5dSLeila Ghaffari  - `1000`
308bc7bbd5dSLeila Ghaffari  - `m`
30989d0f5c0SLeila Ghaffari
310bc7bbd5dSLeila Ghaffari* - `-units_meter`
311bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
312bc7bbd5dSLeila Ghaffari  - `1E-2`
313bc7bbd5dSLeila Ghaffari  -
31489d0f5c0SLeila Ghaffari
315bc7bbd5dSLeila Ghaffari* - `-units_second`
316bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
317bc7bbd5dSLeila Ghaffari  - `1E-2`
318bc7bbd5dSLeila Ghaffari  -
31989d0f5c0SLeila Ghaffari
320bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
321bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
322bc7bbd5dSLeila Ghaffari  - `1E-6`
323bc7bbd5dSLeila Ghaffari  -
32477841947SLeila Ghaffari
325bc7bbd5dSLeila Ghaffari* - `-strong_form`
326bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
327bc7bbd5dSLeila Ghaffari  - `0`
328bc7bbd5dSLeila Ghaffari  -
32977841947SLeila Ghaffari
330bc7bbd5dSLeila Ghaffari* - `-stab`
331bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
332bc7bbd5dSLeila Ghaffari  - `none`
333bc7bbd5dSLeila Ghaffari  -
33477841947SLeila Ghaffari
335bc7bbd5dSLeila Ghaffari* - `-CtauS`
336bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
337bc7bbd5dSLeila Ghaffari  - `0`
338bc7bbd5dSLeila Ghaffari  -
33977841947SLeila Ghaffari
340bc7bbd5dSLeila Ghaffari* - `-wind_type`
341bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
342bc7bbd5dSLeila Ghaffari  - `rotation`
343bc7bbd5dSLeila Ghaffari  -
34477841947SLeila Ghaffari
345bc7bbd5dSLeila Ghaffari* - `-wind_translation`
346bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
347bc7bbd5dSLeila Ghaffari  - `1,0,0`
348bc7bbd5dSLeila Ghaffari  -
34989d0f5c0SLeila Ghaffari
350bc7bbd5dSLeila Ghaffari* - `-E_wind`
351bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
352bc7bbd5dSLeila Ghaffari  - `1E6`
353bc7bbd5dSLeila Ghaffari  - `J`
354bc7bbd5dSLeila Ghaffari:::
355e43605a5SLeila Ghaffari
356bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with:
357e43605a5SLeila Ghaffari
358bc7bbd5dSLeila Ghaffari```
3594534a52eSLeila Ghaffari./navierstokes -problem advection2d -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
360bc7bbd5dSLeila Ghaffari```
361e43605a5SLeila Ghaffari
362bc7bbd5dSLeila Ghaffariand the `translation` mode with:
363e43605a5SLeila Ghaffari
364bc7bbd5dSLeila Ghaffari```
3654534a52eSLeila Ghaffari./navierstokes -problem advection2d -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
366bc7bbd5dSLeila Ghaffari```
3674534a52eSLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
368e43605a5SLeila Ghaffari
369019b7682STimothy Aiken#### 3D advection
370019b7682STimothy Aiken
371bc7bbd5dSLeila GhaffariFor the 3D advection problem, the following additional command-line options are available:
372e43605a5SLeila Ghaffari
373bc7bbd5dSLeila Ghaffari:::{list-table} Advection3D Runtime Options
374bc7bbd5dSLeila Ghaffari:header-rows: 1
375e43605a5SLeila Ghaffari
376bc7bbd5dSLeila Ghaffari* - Option
377bc7bbd5dSLeila Ghaffari  - Description
378bc7bbd5dSLeila Ghaffari  - Default value
379bc7bbd5dSLeila Ghaffari  - Unit
380e43605a5SLeila Ghaffari
381bc7bbd5dSLeila Ghaffari* - `-rc`
382bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
383bc7bbd5dSLeila Ghaffari  - `1000`
384bc7bbd5dSLeila Ghaffari  - `m`
385e43605a5SLeila Ghaffari
386bc7bbd5dSLeila Ghaffari* - `-units_meter`
387bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
388bc7bbd5dSLeila Ghaffari  - `1E-2`
389bc7bbd5dSLeila Ghaffari  -
390e43605a5SLeila Ghaffari
391bc7bbd5dSLeila Ghaffari* - `-units_second`
392bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
393bc7bbd5dSLeila Ghaffari  - `1E-2`
394bc7bbd5dSLeila Ghaffari  -
395e43605a5SLeila Ghaffari
396bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
397bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
398bc7bbd5dSLeila Ghaffari  - `1E-6`
399bc7bbd5dSLeila Ghaffari  -
400e43605a5SLeila Ghaffari
401bc7bbd5dSLeila Ghaffari* - `-strong_form`
402bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
403bc7bbd5dSLeila Ghaffari  - `0`
404bc7bbd5dSLeila Ghaffari  -
405e43605a5SLeila Ghaffari
406bc7bbd5dSLeila Ghaffari* - `-stab`
407bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
408bc7bbd5dSLeila Ghaffari  - `none`
409bc7bbd5dSLeila Ghaffari  -
410e43605a5SLeila Ghaffari
411bc7bbd5dSLeila Ghaffari* - `-CtauS`
412bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
413bc7bbd5dSLeila Ghaffari  - `0`
414bc7bbd5dSLeila Ghaffari  -
415e43605a5SLeila Ghaffari
416bc7bbd5dSLeila Ghaffari* - `-wind_type`
417bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
418bc7bbd5dSLeila Ghaffari  - `rotation`
419bc7bbd5dSLeila Ghaffari  -
420e43605a5SLeila Ghaffari
421bc7bbd5dSLeila Ghaffari* - `-wind_translation`
422bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
423bc7bbd5dSLeila Ghaffari  - `1,0,0`
424bc7bbd5dSLeila Ghaffari  -
425e43605a5SLeila Ghaffari
426bc7bbd5dSLeila Ghaffari* - `-E_wind`
427bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
428bc7bbd5dSLeila Ghaffari  - `1E6`
429bc7bbd5dSLeila Ghaffari  - `J`
430e43605a5SLeila Ghaffari
431bc7bbd5dSLeila Ghaffari* - `-bubble_type`
432bc7bbd5dSLeila Ghaffari  - `sphere` (3D) or `cylinder` (2D)
433*f3f66076SJames Wright  - `sphere`
434bc7bbd5dSLeila Ghaffari  -
435e43605a5SLeila Ghaffari
436bc7bbd5dSLeila Ghaffari* - `-bubble_continuity`
437bc7bbd5dSLeila Ghaffari  - `smooth`, `back_sharp`, or `thick`
438bc7bbd5dSLeila Ghaffari  - `smooth`
439bc7bbd5dSLeila Ghaffari  -
440bc7bbd5dSLeila Ghaffari:::
441ccaff030SJeremy L Thompson
442bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with:
443ccaff030SJeremy L Thompson
444bc7bbd5dSLeila Ghaffari```
4454534a52eSLeila Ghaffari./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
446bc7bbd5dSLeila Ghaffari```
447ccaff030SJeremy L Thompson
448bc7bbd5dSLeila Ghaffariand the `translation` mode with:
449ccaff030SJeremy L Thompson
450bc7bbd5dSLeila Ghaffari```
4514534a52eSLeila Ghaffari./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
452bc7bbd5dSLeila Ghaffari```
453ccaff030SJeremy L Thompson
454019b7682STimothy Aiken### Inviscid Ideal Gas
455019b7682STimothy Aiken
456019b7682STimothy Aiken#### Isentropic Euler vortex
457019b7682STimothy Aiken
458bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
459ccaff030SJeremy L Thompson
460bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
461bc7bbd5dSLeila Ghaffari:header-rows: 1
462ccaff030SJeremy L Thompson
463bc7bbd5dSLeila Ghaffari* - Option
464bc7bbd5dSLeila Ghaffari  - Description
465bc7bbd5dSLeila Ghaffari  - Default value
466bc7bbd5dSLeila Ghaffari  - Unit
467ccaff030SJeremy L Thompson
468bc7bbd5dSLeila Ghaffari* - `-center`
469bc7bbd5dSLeila Ghaffari  - Location of vortex center
470bc7bbd5dSLeila Ghaffari  - `(lx,ly,lz)/2`
471bc7bbd5dSLeila Ghaffari  - `(m,m,m)`
472ccaff030SJeremy L Thompson
473bc7bbd5dSLeila Ghaffari* - `-units_meter`
474bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
475bc7bbd5dSLeila Ghaffari  - `1E-2`
476bc7bbd5dSLeila Ghaffari  -
477ccaff030SJeremy L Thompson
478bc7bbd5dSLeila Ghaffari* - `-units_second`
479bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
480bc7bbd5dSLeila Ghaffari  - `1E-2`
481bc7bbd5dSLeila Ghaffari  -
482ccaff030SJeremy L Thompson
483bc7bbd5dSLeila Ghaffari* - `-mean_velocity`
484bc7bbd5dSLeila Ghaffari  - Background velocity vector
485bc7bbd5dSLeila Ghaffari  - `(1,1,0)`
486bc7bbd5dSLeila Ghaffari  -
487ccaff030SJeremy L Thompson
488bc7bbd5dSLeila Ghaffari* - `-vortex_strength`
489bc7bbd5dSLeila Ghaffari  - Strength of vortex < 10
490bc7bbd5dSLeila Ghaffari  - `5`
491bc7bbd5dSLeila Ghaffari  -
492932417b3SJed Brown
493932417b3SJed Brown* - `-c_tau`
494932417b3SJed Brown  - Stabilization constant
495504dc8e0SLeila Ghaffari  - `0.5`
496932417b3SJed Brown  -
497bc7bbd5dSLeila Ghaffari:::
498ccaff030SJeremy L Thompson
499bc7bbd5dSLeila GhaffariThis problem can be run with:
500ccaff030SJeremy L Thompson
501bc7bbd5dSLeila Ghaffari```
5024534a52eSLeila Ghaffari./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_slip_z 1,2 -mean_velocity .5,-.8,0.
503bc7bbd5dSLeila Ghaffari```
504ccaff030SJeremy L Thompson
505019b7682STimothy Aiken#### Sod shock tube
506019b7682STimothy Aiken
507019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
508019b7682STimothy Aiken
509019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options
510019b7682STimothy Aiken:header-rows: 1
511019b7682STimothy Aiken
512019b7682STimothy Aiken* - Option
513019b7682STimothy Aiken  - Description
514019b7682STimothy Aiken  - Default value
515019b7682STimothy Aiken  - Unit
516019b7682STimothy Aiken
517019b7682STimothy Aiken* - `-units_meter`
518019b7682STimothy Aiken  - 1 meter in scaled length units
519019b7682STimothy Aiken  - `1E-2`
520019b7682STimothy Aiken  -
521019b7682STimothy Aiken
522019b7682STimothy Aiken* - `-units_second`
523019b7682STimothy Aiken  - 1 second in scaled time units
524019b7682STimothy Aiken  - `1E-2`
525019b7682STimothy Aiken  -
526019b7682STimothy Aiken
527019b7682STimothy Aiken* - `-yzb`
528019b7682STimothy Aiken  - Use YZB discontinuity capturing
529019b7682STimothy Aiken  - `none`
530019b7682STimothy Aiken  -
531019b7682STimothy Aiken
532019b7682STimothy Aiken* - `-stab`
533019b7682STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
534019b7682STimothy Aiken  - `none`
535019b7682STimothy Aiken  -
536019b7682STimothy Aiken:::
537019b7682STimothy Aiken
538019b7682STimothy AikenThis problem can be run with:
539019b7682STimothy Aiken
540019b7682STimothy Aiken```
541019b7682STimothy Aiken./navierstokes -problem shocktube -yzb -stab su -bc_slip_z 3,4 -bc_slip_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
542019b7682STimothy Aiken```
543019b7682STimothy Aiken
544019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas
545019b7682STimothy Aiken
54688626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
547ccaff030SJeremy L Thompson
54888626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
549bc7bbd5dSLeila Ghaffari:header-rows: 1
550ccaff030SJeremy L Thompson
551bc7bbd5dSLeila Ghaffari* - Option
552bc7bbd5dSLeila Ghaffari  - Description
553bc7bbd5dSLeila Ghaffari  - Default value
554bc7bbd5dSLeila Ghaffari  - Unit
555ccaff030SJeremy L Thompson
556bc7bbd5dSLeila Ghaffari* - `-units_meter`
557bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
55888626eedSJames Wright  - `1`
559bc7bbd5dSLeila Ghaffari  -
560ccaff030SJeremy L Thompson
561bc7bbd5dSLeila Ghaffari* - `-units_second`
562bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
56388626eedSJames Wright  - `1`
564bc7bbd5dSLeila Ghaffari  -
565ccaff030SJeremy L Thompson
566bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
567bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
56888626eedSJames Wright  - `1`
569bc7bbd5dSLeila Ghaffari  -
570ccaff030SJeremy L Thompson
571bc7bbd5dSLeila Ghaffari* - `-units_Kelvin`
572bc7bbd5dSLeila Ghaffari  - 1 Kelvin in scaled temperature units
573bc7bbd5dSLeila Ghaffari  - `1`
574bc7bbd5dSLeila Ghaffari  -
575ccaff030SJeremy L Thompson
576bc7bbd5dSLeila Ghaffari* - `-stab`
577bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
578bc7bbd5dSLeila Ghaffari  - `none`
579bc7bbd5dSLeila Ghaffari  -
580ccaff030SJeremy L Thompson
581932417b3SJed Brown* - `-c_tau`
58288626eedSJames Wright  - Stabilization constant, $c_\tau$
583504dc8e0SLeila Ghaffari  - `0.5`
584932417b3SJed Brown  -
585932417b3SJed Brown
58688626eedSJames Wright* - `-Ctau_t`
58788626eedSJames Wright  - Stabilization time constant, $C_t$
58888626eedSJames Wright  - `1.0`
58988626eedSJames Wright  -
590ccaff030SJeremy L Thompson
59188626eedSJames Wright* - `-Ctau_v`
59288626eedSJames Wright  - Stabilization viscous constant, $C_v$
59394c01735SLeila Ghaffari  - `36, 60, 128 for degree = 1, 2, 3`
59488626eedSJames Wright  -
595ccaff030SJeremy L Thompson
59688626eedSJames Wright* - `-Ctau_C`
59788626eedSJames Wright  - Stabilization continuity constant, $C_c$
59888626eedSJames Wright  - `1.0`
59988626eedSJames Wright  -
600ccaff030SJeremy L Thompson
60188626eedSJames Wright* - `-Ctau_M`
60288626eedSJames Wright  - Stabilization momentum constant, $C_m$
60388626eedSJames Wright  - `1.0`
60488626eedSJames Wright  -
60588626eedSJames Wright
60688626eedSJames Wright* - `-Ctau_E`
60788626eedSJames Wright  - Stabilization energy constant, $C_E$
60888626eedSJames Wright  - `1.0`
60988626eedSJames Wright  -
610ccaff030SJeremy L Thompson
611bc7bbd5dSLeila Ghaffari* - `-cv`
612bc7bbd5dSLeila Ghaffari  - Heat capacity at constant volume
613bc7bbd5dSLeila Ghaffari  - `717`
614bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
615ccaff030SJeremy L Thompson
616bc7bbd5dSLeila Ghaffari* - `-cp`
617bc7bbd5dSLeila Ghaffari  - Heat capacity at constant pressure
618bc7bbd5dSLeila Ghaffari  - `1004`
619bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
620ccaff030SJeremy L Thompson
621bc7bbd5dSLeila Ghaffari* - `-g`
622bc7bbd5dSLeila Ghaffari  - Gravitational acceleration
623bc7bbd5dSLeila Ghaffari  - `9.81`
624bc7bbd5dSLeila Ghaffari  - `m/s^2`
625ccaff030SJeremy L Thompson
626bc7bbd5dSLeila Ghaffari* - `-lambda`
627bc7bbd5dSLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
628bc7bbd5dSLeila Ghaffari  - `-2/3`
629bc7bbd5dSLeila Ghaffari  -
630ccaff030SJeremy L Thompson
631bc7bbd5dSLeila Ghaffari* - `-mu`
632bc7bbd5dSLeila Ghaffari  - Shear dynamic viscosity coefficient
633bc7bbd5dSLeila Ghaffari  - `75`
634bc7bbd5dSLeila Ghaffari  -  `Pa s`
63577841947SLeila Ghaffari
636bc7bbd5dSLeila Ghaffari* - `-k`
637bc7bbd5dSLeila Ghaffari  - Thermal conductivity
638bc7bbd5dSLeila Ghaffari  - `0.02638`
639bc7bbd5dSLeila Ghaffari  - `W/(m K)`
640a1df05f8SJed Brown
641a1df05f8SJed Brown* - `-newtonian_unit_tests`
642a1df05f8SJed Brown  - Developer option to test properties
643a1df05f8SJed Brown  - `false`
644a1df05f8SJed Brown  - boolean
645de2fdd78SJames Wright
6465c0afad3SJames Wright* - `-state_var`
6475c0afad3SJames Wright  - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$)
6485c0afad3SJames Wright  - `conservative`
6495c0afad3SJames Wright  - string
650bc7bbd5dSLeila Ghaffari:::
65177841947SLeila Ghaffari
6527ec884f8SJames Wright#### Newtonian Wave
6537ec884f8SJames Wright
654061ff11eSJames WrightThe newtonian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
6557ec884f8SJames Wright
65689e3cb53SJames Wright:::{list-table} Newtonian Wave Runtime Options
6577ec884f8SJames Wright:header-rows: 1
6587ec884f8SJames Wright
6597ec884f8SJames Wright* - Option
6607ec884f8SJames Wright  - Description
6617ec884f8SJames Wright  - Default value
6627ec884f8SJames Wright  - Unit
6637ec884f8SJames Wright
664f1e435c9SJed Brown* - `-freestream_riemann`
665f1e435c9SJed Brown  - Riemann solver for boundaries (HLL or HLLC)
666f1e435c9SJed Brown  - `hllc`
667f1e435c9SJed Brown  -
668f1e435c9SJed Brown
669f1e435c9SJed Brown* - `-freestream_velocity`
6707ec884f8SJames Wright  - Freestream velocity vector
6717ec884f8SJames Wright  - `0,0,0`
6727ec884f8SJames Wright  - `m/s`
6737ec884f8SJames Wright
674f1e435c9SJed Brown* - `-freestream_temperature`
6757ec884f8SJames Wright  - Freestream temperature
6767ec884f8SJames Wright  - `288`
6777ec884f8SJames Wright  - `K`
6787ec884f8SJames Wright
679f1e435c9SJed Brown* - `-freestream_pressure`
68089e3cb53SJames Wright  - Freestream pressure
6817ec884f8SJames Wright  - `1.01e5`
6827ec884f8SJames Wright  - `Pa`
6837ec884f8SJames Wright
6847ec884f8SJames Wright* - `-epicenter`
6857ec884f8SJames Wright  - Coordinates of center of perturbation
6867ec884f8SJames Wright  - `0,0,0`
6877ec884f8SJames Wright  - `m`
6887ec884f8SJames Wright
6897ec884f8SJames Wright* - `-amplitude`
6907ec884f8SJames Wright  - Amplitude of the perturbation
6917ec884f8SJames Wright  - `0.1`
6927ec884f8SJames Wright  -
6937ec884f8SJames Wright
6947ec884f8SJames Wright* - `-width`
6957ec884f8SJames Wright  - Width parameter of the perturbation
6967ec884f8SJames Wright  - `0.002`
6977ec884f8SJames Wright  - `m`
6987ec884f8SJames Wright
6997ec884f8SJames Wright:::
7007ec884f8SJames Wright
7017ec884f8SJames WrightThis problem can be run with the `newtonianwave.yaml` file via:
7027ec884f8SJames Wright
7037ec884f8SJames Wright```
7047ec884f8SJames Wright./navierstokes -options_file newtonianwave.yaml
7057ec884f8SJames Wright```
7067ec884f8SJames Wright
7077ec884f8SJames Wright```{literalinclude} ../../../../../examples/fluids/newtonianwave.yaml
7087ec884f8SJames Wright:language: yaml
7097ec884f8SJames Wright```
710a1df05f8SJed Brown
711d310b3d3SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder
712d310b3d3SAdeleke O. Bankole
713d310b3d3SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
714d310b3d3SAdeleke O. Bankole
715d310b3d3SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options
716d310b3d3SAdeleke O. Bankole:header-rows: 1
717d310b3d3SAdeleke O. Bankole
718d310b3d3SAdeleke O. Bankole* - Option
719d310b3d3SAdeleke O. Bankole  - Description
720d310b3d3SAdeleke O. Bankole  - Default value
721d310b3d3SAdeleke O. Bankole  - Unit
722d310b3d3SAdeleke O. Bankole
723d310b3d3SAdeleke O. Bankole* - `-freestream_velocity`
724d310b3d3SAdeleke O. Bankole  - Freestream velocity vector
725d310b3d3SAdeleke O. Bankole  - `0,0,0`
726d310b3d3SAdeleke O. Bankole  - `m/s`
727d310b3d3SAdeleke O. Bankole
728d310b3d3SAdeleke O. Bankole* - `-freestream_temperature`
729d310b3d3SAdeleke O. Bankole  - Freestream temperature
730d310b3d3SAdeleke O. Bankole  - `288`
731d310b3d3SAdeleke O. Bankole  - `K`
732d310b3d3SAdeleke O. Bankole
733d310b3d3SAdeleke O. Bankole* - `-freestream_pressure`
734d310b3d3SAdeleke O. Bankole  - Freestream pressure
735d310b3d3SAdeleke O. Bankole  - `1.01e5`
736d310b3d3SAdeleke O. Bankole  - `Pa`
737d310b3d3SAdeleke O. Bankole
738d310b3d3SAdeleke O. Bankole:::
739d310b3d3SAdeleke O. Bankole
740d310b3d3SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
741d310b3d3SAdeleke O. BankoleTo run this problem, first generate a mesh:
742d310b3d3SAdeleke O. Bankole
743d310b3d3SAdeleke O. Bankole```console
744d310b3d3SAdeleke O. Bankole$ make -C examples/fluids/meshes
745d310b3d3SAdeleke O. Bankole```
746d310b3d3SAdeleke O. Bankole
747d310b3d3SAdeleke O. BankoleThen run by building the executable and running:
748d310b3d3SAdeleke O. Bankole
749d310b3d3SAdeleke O. Bankole```console
750d310b3d3SAdeleke O. Bankole$ make build/fluids-navierstokes
751ca69d878SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_
752d310b3d3SAdeleke O. Bankole```
753d310b3d3SAdeleke O. Bankole
754ca69d878SAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
755ca69d878SAdeleke O. BankoleThe above run writes a file named `force.csv` (see `ts_monitor_wall_force` in `vortexshedding.yaml`), which can be postprocessed by running to create a figure showing lift and drag coefficients over time.
756ca69d878SAdeleke O. Bankole
757ca69d878SAdeleke O. Bankole```console
758ca69d878SAdeleke O. Bankole$ python examples/fluids/postprocess/force.csv
759ca69d878SAdeleke O. Bankole```
760d310b3d3SAdeleke O. Bankole
761d310b3d3SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml
762d310b3d3SAdeleke O. Bankole:language: yaml
763d310b3d3SAdeleke O. Bankole```
764d310b3d3SAdeleke O. Bankole
765019b7682STimothy Aiken#### Density current
766019b7682STimothy Aiken
767061ff11eSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
76888626eedSJames Wright
76988626eedSJames Wright:::{list-table} Density Current Runtime Options
77088626eedSJames Wright:header-rows: 1
77188626eedSJames Wright
77288626eedSJames Wright* - Option
77388626eedSJames Wright  - Description
77488626eedSJames Wright  - Default value
77588626eedSJames Wright  - Unit
77688626eedSJames Wright
77788626eedSJames Wright* - `-center`
77888626eedSJames Wright  - Location of bubble center
77988626eedSJames Wright  - `(lx,ly,lz)/2`
78088626eedSJames Wright  - `(m,m,m)`
78188626eedSJames Wright
78288626eedSJames Wright* - `-dc_axis`
78388626eedSJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
78488626eedSJames Wright  - `(0,0,0)`
78588626eedSJames Wright  -
78688626eedSJames Wright
78788626eedSJames Wright* - `-rc`
78888626eedSJames Wright  - Characteristic radius of thermal bubble
78988626eedSJames Wright  - `1000`
79088626eedSJames Wright  - `m`
79188626eedSJames Wright
79288626eedSJames Wright* - `-theta0`
79388626eedSJames Wright  - Reference potential temperature
79488626eedSJames Wright  - `300`
79588626eedSJames Wright  - `K`
79688626eedSJames Wright
79788626eedSJames Wright* - `-thetaC`
79888626eedSJames Wright  - Perturbation of potential temperature
79988626eedSJames Wright  - `-15`
80088626eedSJames Wright  - `K`
80188626eedSJames Wright
80288626eedSJames Wright* - `-P0`
80388626eedSJames Wright  - Atmospheric pressure
80488626eedSJames Wright  - `1E5`
80588626eedSJames Wright  - `Pa`
80688626eedSJames Wright
80788626eedSJames Wright* - `-N`
80888626eedSJames Wright  - Brunt-Vaisala frequency
80988626eedSJames Wright  - `0.01`
81088626eedSJames Wright  - `1/s`
81188626eedSJames Wright:::
81288626eedSJames Wright
813bc7bbd5dSLeila GhaffariThis problem can be run with:
814ccaff030SJeremy L Thompson
815bc7bbd5dSLeila Ghaffari```
81688626eedSJames 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_slip_y 3,4 -mu 75
81788626eedSJames Wright```
81888626eedSJames Wright
819019b7682STimothy Aiken#### Channel flow
820019b7682STimothy Aiken
821061ff11eSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
82288626eedSJames Wright
82388626eedSJames Wright:::{list-table} Channel Runtime Options
82488626eedSJames Wright:header-rows: 1
82588626eedSJames Wright
82688626eedSJames Wright* - Option
82788626eedSJames Wright  - Description
82888626eedSJames Wright  - Default value
82988626eedSJames Wright  - Unit
83088626eedSJames Wright
83188626eedSJames Wright* - `-umax`
83288626eedSJames Wright  - Maximum/centerline velocity of the flow
83388626eedSJames Wright  - `10`
83488626eedSJames Wright  - `m/s`
83588626eedSJames Wright
83688626eedSJames Wright* - `-theta0`
83788626eedSJames Wright  - Reference potential temperature
83888626eedSJames Wright  - `300`
83988626eedSJames Wright  - `K`
84088626eedSJames Wright
84188626eedSJames Wright* - `-P0`
84288626eedSJames Wright  - Atmospheric pressure
84388626eedSJames Wright  - `1E5`
84488626eedSJames Wright  - `Pa`
845a1df05f8SJed Brown
846a1df05f8SJed Brown* - `-body_force_scale`
847a1df05f8SJed Brown  - Multiplier for body force (`-1` for flow reversal)
848a1df05f8SJed Brown  - 1
849a1df05f8SJed Brown  -
85088626eedSJames Wright:::
85188626eedSJames Wright
85288626eedSJames WrightThis problem can be run with the `channel.yaml` file via:
85388626eedSJames Wright
85488626eedSJames Wright```
85588626eedSJames Wright./navierstokes -options_file channel.yaml
85688626eedSJames Wright```
85788626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
85888626eedSJames Wright:language: yaml
85988626eedSJames Wright```
86088626eedSJames Wright
8618a94a473SJed Brown(example-blasius)=
8628a94a473SJed Brown
863019b7682STimothy Aiken#### Blasius boundary layer
864019b7682STimothy Aiken
865061ff11eSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
86688626eedSJames Wright
86788626eedSJames Wright:::{list-table} Blasius Runtime Options
86888626eedSJames Wright:header-rows: 1
86988626eedSJames Wright
87088626eedSJames Wright* - Option
87188626eedSJames Wright  - Description
87288626eedSJames Wright  - Default value
87388626eedSJames Wright  - Unit
87488626eedSJames Wright
875fb455ff0SLeila Ghaffari* - `-velocity_infinity`
87688626eedSJames Wright  - Freestream velocity
87788626eedSJames Wright  - `40`
87888626eedSJames Wright  - `m/s`
87988626eedSJames Wright
880fb455ff0SLeila Ghaffari* - `-temperature_infinity`
881fb455ff0SLeila Ghaffari  - Freestream temperature
88288626eedSJames Wright  - `288`
88388626eedSJames Wright  - `K`
88488626eedSJames Wright
885fb455ff0SLeila Ghaffari* - `-temperature_wall`
886fb455ff0SLeila Ghaffari  - Wall temperature
88707d14e58SLeila Ghaffari  - `288`
888fb455ff0SLeila Ghaffari  - `K`
889fb455ff0SLeila Ghaffari
890fb455ff0SLeila Ghaffari* - `-delta0`
891fb455ff0SLeila Ghaffari  - Boundary layer height at the inflow
892fb455ff0SLeila Ghaffari  - `4.2e-3`
893fb455ff0SLeila Ghaffari  - `m`
894fb455ff0SLeila Ghaffari
89588626eedSJames Wright* - `-P0`
89688626eedSJames Wright  - Atmospheric pressure
89788626eedSJames Wright  - `1.01E5`
89888626eedSJames Wright  - `Pa`
89988626eedSJames Wright
90091eaef80SJames Wright* - `-platemesh_refine_height`
90191eaef80SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
90288626eedSJames Wright  - `5.9E-4`
90388626eedSJames Wright  - `m`
90488626eedSJames Wright
90591eaef80SJames Wright* - `-platemesh_Ndelta`
90691eaef80SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
90788626eedSJames Wright  - `45`
90888626eedSJames Wright  -
90988626eedSJames Wright
91091eaef80SJames Wright* - `-platemesh_growth`
91188626eedSJames Wright  - Growth rate of the elements in the refinement region
91288626eedSJames Wright  - `1.08`
91388626eedSJames Wright  -
91488626eedSJames Wright
91591eaef80SJames Wright* - `-platemesh_top_angle`
91688626eedSJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
91788626eedSJames Wright  - `5`
91888626eedSJames Wright  - `degrees`
919ba6664aeSJames Wright
920ba6664aeSJames Wright* - `-stg_use`
921ba6664aeSJames Wright  - Whether to use stg for the inflow conditions
922ba6664aeSJames Wright  - `false`
923ba6664aeSJames Wright  -
92491eaef80SJames Wright
92591eaef80SJames Wright* - `-platemesh_y_node_locs_path`
92691eaef80SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
92791eaef80SJames Wright  - `""`
92891eaef80SJames Wright  -
929fb455ff0SLeila Ghaffari
93007d14e58SLeila Ghaffari* - `-n_chebyshev`
931fb455ff0SLeila Ghaffari  - Number of Chebyshev terms
932fb455ff0SLeila Ghaffari  - `20`
933fb455ff0SLeila Ghaffari  -
934fb455ff0SLeila Ghaffari
93507d14e58SLeila Ghaffari* - `-chebyshev_`
93607d14e58SLeila Ghaffari  - Prefix for Chebyshev snes solve
93707d14e58SLeila Ghaffari  -
93807d14e58SLeila Ghaffari  -
93907d14e58SLeila Ghaffari
94088626eedSJames Wright:::
94188626eedSJames Wright
94288626eedSJames WrightThis problem can be run with the `blasius.yaml` file via:
94388626eedSJames Wright
94488626eedSJames Wright```
94588626eedSJames Wright./navierstokes -options_file blasius.yaml
94688626eedSJames Wright```
94788626eedSJames Wright
94888626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
94988626eedSJames Wright:language: yaml
950bc7bbd5dSLeila Ghaffari```
951ba6664aeSJames Wright
952ba6664aeSJames Wright#### STG Inflow for Flat Plate
953ba6664aeSJames Wright
95417be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
955ba6664aeSJames Wright
956ba6664aeSJames Wright:::{list-table} Blasius Runtime Options
957ba6664aeSJames Wright:header-rows: 1
958ba6664aeSJames Wright
959ba6664aeSJames Wright* - Option
960ba6664aeSJames Wright  - Description
961ba6664aeSJames Wright  - Default value
962ba6664aeSJames Wright  - Unit
963ba6664aeSJames Wright
964ba6664aeSJames Wright* - `-stg_inflow_path`
965ba6664aeSJames Wright  - Path to the STGInflow file
966ba6664aeSJames Wright  - `./STGInflow.dat`
967ba6664aeSJames Wright  -
968ba6664aeSJames Wright
969ba6664aeSJames Wright* - `-stg_rand_path`
970ba6664aeSJames Wright  - Path to the STGRand file
971ba6664aeSJames Wright  - `./STGRand.dat`
972ba6664aeSJames Wright  -
973ba6664aeSJames Wright
974ba6664aeSJames Wright* - `-stg_alpha`
975ba6664aeSJames Wright  - Growth rate of the wavemodes
976ba6664aeSJames Wright  - `1.01`
977ba6664aeSJames Wright  -
978ba6664aeSJames Wright
979ba6664aeSJames Wright* - `-stg_u0`
980ba6664aeSJames Wright  - Convective velocity, $U_0$
981ba6664aeSJames Wright  - `0.0`
982ba6664aeSJames Wright  - `m/s`
983ba6664aeSJames Wright
984ba6664aeSJames Wright* - `-stg_mean_only`
985ba6664aeSJames Wright  - Only impose the mean velocity (no fluctutations)
986ba6664aeSJames Wright  - `false`
987ba6664aeSJames Wright  -
988ba6664aeSJames Wright
98930af3636SJames Wright* - `-stg_strong`
99030af3636SJames Wright  - Strongly enforce the STG inflow boundary condition
99130af3636SJames Wright  - `false`
99230af3636SJames Wright  -
99330af3636SJames Wright
99489060322SJames Wright* - `-stg_fluctuating_IC`
99589060322SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
99689060322SJames Wright  - `false`
99789060322SJames Wright  -
99889060322SJames Wright
999ba6664aeSJames Wright:::
1000ba6664aeSJames Wright
1001ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via:
1002ba6664aeSJames Wright
1003ba6664aeSJames Wright```
1004ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true
1005ba6664aeSJames Wright```
1006ba6664aeSJames Wright
100717be3a41SJeremy L ThompsonNote the added `-stg_use true` flag
100817be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
1009