xref: /libCEED/examples/fluids/README.md (revision 525f58efad3fdbd516b1ca0b43ee04d6060753fc)
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.
4ccaff030SJeremy L Thompson
56d9fcd4bSJeremy L ThompsonHONEE, a more fully featured fluid dynamics solver, can be found on [GitLab](https://gitlab.com/phypid/honee).
66d9fcd4bSJeremy L Thompson
777841947SLeila GhaffariThe Navier-Stokes problem solves the compressible Navier-Stokes equations in three dimensions using an explicit time integration.
877841947SLeila GhaffariThe state variables are mass density, momentum density, and energy density.
9ccaff030SJeremy L Thompson
1077841947SLeila GhaffariThe main Navier-Stokes solver for libCEED is defined in [`navierstokes.c`](navierstokes.c) with different problem definitions according to the application of interest.
11ccaff030SJeremy L Thompson
123b219b86SJames Wright## Build instructions
133b219b86SJames Wright
14bc7bbd5dSLeila GhaffariBuild by using:
15ccaff030SJeremy L Thompson
16ccaff030SJeremy L Thompson`make`
17ccaff030SJeremy L Thompson
18bc7bbd5dSLeila Ghaffariand run with:
19ccaff030SJeremy L Thompson
20bc7bbd5dSLeila Ghaffari```
21bc7bbd5dSLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree]
22bc7bbd5dSLeila Ghaffari```
23ccaff030SJeremy L Thompson
24bc7bbd5dSLeila Ghaffari## Runtime options
25ccaff030SJeremy L Thompson
26*525f58efSJeremy L Thompson<!-- fluids-inclusion -->
27ccaff030SJeremy L Thompson
28bc7bbd5dSLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options.
29bc7bbd5dSLeila GhaffariThe following options are common among all problem types:
30ccaff030SJeremy L Thompson
31bc7bbd5dSLeila Ghaffari:::{list-table} Common Runtime Options
32bc7bbd5dSLeila Ghaffari:header-rows: 1
33ccaff030SJeremy L Thompson
34bc7bbd5dSLeila Ghaffari* - Option
35bc7bbd5dSLeila Ghaffari  - Description
36bc7bbd5dSLeila Ghaffari  - Default value
37ccaff030SJeremy L Thompson
38bc7bbd5dSLeila Ghaffari* - `-ceed`
39bc7bbd5dSLeila Ghaffari  - CEED resource specifier
40bc7bbd5dSLeila Ghaffari  - `/cpu/self/opt/blocked`
41ccaff030SJeremy L Thompson
423866774cSJames Wright* - `-test_type`
433866774cSJames Wright  - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified
443866774cSJames Wright  - `none`
45ccaff030SJeremy L Thompson
46bc7bbd5dSLeila Ghaffari* - `-compare_final_state_atol`
47bc7bbd5dSLeila Ghaffari  - Test absolute tolerance
48bc7bbd5dSLeila Ghaffari  - `1E-11`
49ccaff030SJeremy L Thompson
50bc7bbd5dSLeila Ghaffari* - `-compare_final_state_filename`
51bc7bbd5dSLeila Ghaffari  - Test filename
52bc7bbd5dSLeila Ghaffari  -
53ccaff030SJeremy L Thompson
54bc7bbd5dSLeila Ghaffari* - `-problem`
559e529eadSJames Wright  - Problem to solve (`advection`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`)
56bc7bbd5dSLeila Ghaffari  - `density_current`
57ccaff030SJeremy L Thompson
58bc7bbd5dSLeila Ghaffari* - `-implicit`
599e576805SJames Wright  - Use implicit time integrator formulation
60bc7bbd5dSLeila Ghaffari  -
61ccaff030SJeremy L Thompson
62bc7bbd5dSLeila Ghaffari* - `-degree`
63bc7bbd5dSLeila Ghaffari  - Polynomial degree of tensor product basis (must be >= 1)
64bc7bbd5dSLeila Ghaffari  - `1`
65ccaff030SJeremy L Thompson
662288fb52SJeremy L Thompson* - `-q_extra`
67bc7bbd5dSLeila Ghaffari  - Number of extra quadrature points
68fc14f3f6SLeila Ghaffari  - `0`
69ccaff030SJeremy L Thompson
7037cbb16aSJed Brown* - `-ts_monitor_solution`
7137cbb16aSJed Brown  - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
7237cbb16aSJed Brown  -
73ccaff030SJeremy L Thompson
7437cbb16aSJed Brown* - `-ts_monitor_solution_interval`
7537cbb16aSJed Brown  - Number of time steps between visualization output frames.
7637cbb16aSJed Brown  - `1`
7737cbb16aSJed Brown
7837cbb16aSJed Brown* - `-viewer_cgns_batch_size`
7937cbb16aSJed Brown  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
8037cbb16aSJed Brown  - `20`
8137cbb16aSJed Brown
8237cbb16aSJed Brown* - `-checkpoint_interval`
8337cbb16aSJed Brown  - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only
84bc7bbd5dSLeila Ghaffari  - `10`
85ccaff030SJeremy L Thompson
8637cbb16aSJed Brown* - `-checkpoint_vtk`
8737cbb16aSJed Brown  - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead.
8837cbb16aSJed Brown  - `false`
8937cbb16aSJed Brown
9037cbb16aSJed Brown* - `-viz_refine`
9137cbb16aSJed Brown  - Use regular refinement for VTK visualization
9237cbb16aSJed Brown  - `0`
9337cbb16aSJed Brown
94bc7bbd5dSLeila Ghaffari* - `-output_dir`
9537cbb16aSJed Brown  - Output directory for binary checkpoints and VTK files (if enabled).
96bc7bbd5dSLeila Ghaffari  - `.`
97ccaff030SJeremy L Thompson
9869293791SJames Wright* - `-output_add_stepnum2bin`
9969293791SJames Wright  - Whether to add step numbers to output binary files
10069293791SJames Wright  - `false`
10169293791SJames Wright
10269293791SJames Wright* - `-continue`
10369293791SJames Wright  - Continue from previous solution (input is step number of previous solution)
10469293791SJames Wright  - `0`
10569293791SJames Wright
10669293791SJames Wright* - `-continue_filename`
10769293791SJames Wright  - Path to solution binary file from which to continue from
10869293791SJames Wright  - `[output_dir]/ns-solution.bin`
10969293791SJames Wright
11069293791SJames Wright* - `-continue_time_filename`
1114de8550aSJed Brown  - Path to time stamp binary file (only for legacy checkpoints)
11269293791SJames Wright  - `[output_dir]/ns-time.bin`
11369293791SJames Wright
1144534a52eSLeila Ghaffari* - `-bc_wall`
1154534a52eSLeila Ghaffari  - Use wall boundary conditions on this list of faces
1164534a52eSLeila Ghaffari  -
1174534a52eSLeila Ghaffari
1184534a52eSLeila Ghaffari* - `-wall_comps`
1194534a52eSLeila Ghaffari  - An array of constrained component numbers for wall BCs
1204534a52eSLeila Ghaffari  -
1214534a52eSLeila Ghaffari
1229f844368SJames Wright* - `-bc_slip`
1239f844368SJames Wright  - Use weak slip boundary condition on this list of faces
1249f844368SJames Wright  -
1259f844368SJames Wright
1267c5bba50SJames Wright* - `-bc_symmetry_x`
1277c5bba50SJames Wright  - Use symmetry boundary conditions, for the x component, on this list of faces
1284534a52eSLeila Ghaffari  -
1294534a52eSLeila Ghaffari
1307c5bba50SJames Wright* - `-bc_symmetry_y`
1317c5bba50SJames Wright  - Use symmetry boundary conditions, for the y component, on this list of faces
1324534a52eSLeila Ghaffari  -
1334534a52eSLeila Ghaffari
1347c5bba50SJames Wright* - `-bc_symmetry_z`
1357c5bba50SJames Wright  - Use symmetry boundary conditions, for the z component, on this list of faces
1364534a52eSLeila Ghaffari  -
1374534a52eSLeila Ghaffari
1384534a52eSLeila Ghaffari* - `-bc_inflow`
1394534a52eSLeila Ghaffari  - Use inflow boundary conditions on this list of faces
1404534a52eSLeila Ghaffari  -
1414534a52eSLeila Ghaffari
1424534a52eSLeila Ghaffari* - `-bc_outflow`
1434534a52eSLeila Ghaffari  - Use outflow boundary conditions on this list of faces
1444534a52eSLeila Ghaffari  -
14589d0f5c0SLeila Ghaffari
1467ec884f8SJames Wright* - `-bc_freestream`
1477ec884f8SJames Wright  - Use freestream boundary conditions on this list of faces
1487ec884f8SJames Wright  -
1497ec884f8SJames Wright
150b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval`
151ee3de563SJames Wright  - Number of timesteps between statistics collection
152ee3de563SJames Wright  - `1`
153ee3de563SJames Wright
154b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer`
155b7d66439SJames 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.
1568ed52730SJames Wright  -
1578ed52730SJames Wright
158b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval`
159ee3de563SJames Wright  - Number of timesteps between statistics file writing (`-1` means only at end of run)
160ee3de563SJames Wright  - `-1`
161ee3de563SJames Wright
162b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size`
1638ed52730SJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
1648ed52730SJames Wright  - `20`
1658ed52730SJames Wright
166ca69d878SAdeleke O. Bankole* - `-ts_monitor_wall_force`
167ca69d878SAdeleke O. Bankole  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
168ca69d878SAdeleke O. Bankole  -
169ca69d878SAdeleke O. Bankole
1702526956eSJames Wright* - `-mesh_transform`
1712526956eSJames Wright  - Transform the mesh, usually for an initial box mesh.
1722526956eSJames Wright  - `none`
1732526956eSJames Wright
174bc7bbd5dSLeila Ghaffari* - `-snes_view`
175bc7bbd5dSLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
176bc7bbd5dSLeila Ghaffari  -
17789d0f5c0SLeila Ghaffari
178bc7bbd5dSLeila Ghaffari* - `-log_view`
179bc7bbd5dSLeila Ghaffari  - View PETSc performance log
180bc7bbd5dSLeila Ghaffari  -
181ccaff030SJeremy L Thompson
182bc7bbd5dSLeila Ghaffari* - `-help`
183bc7bbd5dSLeila Ghaffari  - View comprehensive information about run-time options
184bc7bbd5dSLeila Ghaffari  -
185bc7bbd5dSLeila Ghaffari:::
186ccaff030SJeremy L Thompson
1877c5bba50SJames 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:
1884534a52eSLeila Ghaffari
18988626eedSJames Wright:::{list-table} 2D Face ID Labels
19088626eedSJames Wright:header-rows: 1
19188626eedSJames Wright* - PETSc Face Name
19288626eedSJames Wright  - Cartesian direction
19388626eedSJames Wright  - Face ID
19488626eedSJames Wright
19588626eedSJames Wright* - faceMarkerBottom
19688626eedSJames Wright  - -z
19788626eedSJames Wright  - 1
19888626eedSJames Wright
19988626eedSJames Wright* - faceMarkerRight
20088626eedSJames Wright  - +x
20188626eedSJames Wright  - 2
20288626eedSJames Wright
20388626eedSJames Wright* - faceMarkerTop
20488626eedSJames Wright  - +z
20588626eedSJames Wright  - 3
20688626eedSJames Wright
20788626eedSJames Wright* - faceMarkerLeft
20888626eedSJames Wright  - -x
20988626eedSJames Wright  - 4
21088626eedSJames Wright:::
21188626eedSJames Wright
212b5e826a6SLeila Ghaffari:::{list-table} 3D Face ID Labels
21388626eedSJames Wright:header-rows: 1
21488626eedSJames Wright* - PETSc Face Name
21588626eedSJames Wright  - Cartesian direction
21688626eedSJames Wright  - Face ID
21788626eedSJames Wright
21888626eedSJames Wright* - faceMarkerBottom
21988626eedSJames Wright  - -z
22088626eedSJames Wright  - 1
22188626eedSJames Wright
22288626eedSJames Wright* - faceMarkerTop
22388626eedSJames Wright  - +z
22488626eedSJames Wright  - 2
22588626eedSJames Wright
22688626eedSJames Wright* - faceMarkerFront
22788626eedSJames Wright  - -y
22888626eedSJames Wright  - 3
22988626eedSJames Wright
23088626eedSJames Wright* - faceMarkerBack
23188626eedSJames Wright  - +y
23288626eedSJames Wright  - 4
23388626eedSJames Wright
23488626eedSJames Wright* - faceMarkerRight
23588626eedSJames Wright  - +x
23688626eedSJames Wright  - 5
23788626eedSJames Wright
23888626eedSJames Wright* - faceMarkerLeft
23988626eedSJames Wright  - -x
24088626eedSJames Wright  - 6
24188626eedSJames Wright:::
2424534a52eSLeila Ghaffari
2438a94a473SJed Brown### Boundary conditions
2448a94a473SJed Brown
2453b219b86SJames WrightBoundary conditions for compressible viscous flows are notoriously tricky.
2463b219b86SJames WrightHere we offer some recommendations.
2478a94a473SJed Brown
2488a94a473SJed Brown#### Inflow
2498a94a473SJed Brown
2508a94a473SJed 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).
2518a94a473SJed BrownIt is stable and the least reflective boundary condition for acoustics.
2528a94a473SJed Brown
2538a94a473SJed BrownIf near a viscous wall, you may want a specified inflow profile.
2548a94a473SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
2558a94a473SJed 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.
2568a94a473SJed BrownThe strong approach gives sharper resolution of velocity structures.
2578a94a473SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
2588a94a473SJed Brown
259f3f66076SJames Wright#### Outflow
2608a94a473SJed Brown
2618a94a473SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
2628a94a473SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
2638a94a473SJed 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.
2648a94a473SJed Brown
2658a94a473SJed 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.
2668a94a473SJed Brown
2678a94a473SJed 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).
2688a94a473SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
2698a94a473SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
2708a94a473SJed Brown
271f3f66076SJames Wright#### Periodicity
2728a94a473SJed Brown
2738a94a473SJed BrownPETSc provides two ways to specify periodicity:
2748a94a473SJed Brown
2758a94a473SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
2768a94a473SJed Brown
2778a94a473SJed Brown```yaml
2788a94a473SJed Browndm_plex:
2798a94a473SJed Brown  shape: box
2808a94a473SJed Brown  box_faces: 10,12,4
2818a94a473SJed Brown  box_bd: none,none,periodic
2828a94a473SJed Brown```
2838a94a473SJed Brown
284ca69d878SAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
285ca69d878SAdeleke 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.
286ca69d878SAdeleke O. Bankole
287ca69d878SAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
288ca69d878SAdeleke O. Bankole
289ca69d878SAdeleke O. Bankole```yaml
290ca69d878SAdeleke O. Bankoledm_plex:
291ca69d878SAdeleke O. Bankole  shape: zbox
292ca69d878SAdeleke O. Bankole  box_faces: 10,12,4
293ca69d878SAdeleke O. Bankole  box_bd: none,none,periodic
294ca69d878SAdeleke O. Bankole```
295ca69d878SAdeleke O. Bankole
296ca69d878SAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use.
297ca69d878SAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity.
298ca69d878SAdeleke 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.
2998a94a473SJed Brown
300019b7682STimothy Aiken### Advection
301019b7682STimothy Aiken
30217be3a41SJeremy 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$.
3039e529eadSJames WrightThe advection problems can be run in both 2D and 3D, based on the DM defined for the problem.
30494a05c6fSJames WrightThe following additional command-line options are available:
305019b7682STimothy Aiken
30694a05c6fSJames Wright:::{list-table} Advection Runtime Options
307bc7bbd5dSLeila Ghaffari:header-rows: 1
308e43605a5SLeila Ghaffari
309bc7bbd5dSLeila Ghaffari* - Option
310bc7bbd5dSLeila Ghaffari  - Description
311bc7bbd5dSLeila Ghaffari  - Default value
312bc7bbd5dSLeila Ghaffari  - Unit
313e43605a5SLeila Ghaffari
314bc7bbd5dSLeila Ghaffari* - `-rc`
315bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
316bc7bbd5dSLeila Ghaffari  - `1000`
317bc7bbd5dSLeila Ghaffari  - `m`
318e43605a5SLeila Ghaffari
319bc7bbd5dSLeila Ghaffari* - `-units_meter`
320bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
321bc7bbd5dSLeila Ghaffari  - `1E-2`
322bc7bbd5dSLeila Ghaffari  -
323e43605a5SLeila Ghaffari
324bc7bbd5dSLeila Ghaffari* - `-units_second`
325bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
326bc7bbd5dSLeila Ghaffari  - `1E-2`
327bc7bbd5dSLeila Ghaffari  -
328e43605a5SLeila Ghaffari
329bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
330bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
331bc7bbd5dSLeila Ghaffari  - `1E-6`
332bc7bbd5dSLeila Ghaffari  -
333e43605a5SLeila Ghaffari
334bc7bbd5dSLeila Ghaffari* - `-strong_form`
335bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
336bc7bbd5dSLeila Ghaffari  - `0`
337bc7bbd5dSLeila Ghaffari  -
338e43605a5SLeila Ghaffari
339bc7bbd5dSLeila Ghaffari* - `-stab`
340bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
341bc7bbd5dSLeila Ghaffari  - `none`
342bc7bbd5dSLeila Ghaffari  -
343e43605a5SLeila Ghaffari
34444e8f77dSJames Wright* - `-stab_tau`
34544e8f77dSJames Wright  - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`)
34644e8f77dSJames Wright  - `ctau`
34744e8f77dSJames Wright  -
34844e8f77dSJames Wright
34944e8f77dSJames Wright* - `-Ctau_t`
35044e8f77dSJames Wright  - Scaling factor on the temporal portion of the $\tau$ formulation
35144e8f77dSJames Wright  - 0.
35244e8f77dSJames Wright  -
35344e8f77dSJames Wright
35444e8f77dSJames Wright* - `-Ctau_a`
35544e8f77dSJames Wright  - Scaling factor on the advection portion of the $\tau$ formulation
35644e8f77dSJames Wright  - $P^2$
35744e8f77dSJames Wright  -
35844e8f77dSJames Wright
359bc7bbd5dSLeila Ghaffari* - `-CtauS`
360bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
361bc7bbd5dSLeila Ghaffari  - `0`
362bc7bbd5dSLeila Ghaffari  -
363e43605a5SLeila Ghaffari
364bc7bbd5dSLeila Ghaffari* - `-wind_type`
365bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
366bc7bbd5dSLeila Ghaffari  - `rotation`
367bc7bbd5dSLeila Ghaffari  -
368e43605a5SLeila Ghaffari
369bc7bbd5dSLeila Ghaffari* - `-wind_translation`
370bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
371bc7bbd5dSLeila Ghaffari  - `1,0,0`
372bc7bbd5dSLeila Ghaffari  -
373e43605a5SLeila Ghaffari
374d1d77723SJames Wright* - `-diffusion_coeff`
375d1d77723SJames Wright  - Diffusion coefficient
376d1d77723SJames Wright  - `0`
377d1d77723SJames Wright  -
378d1d77723SJames Wright
379bc7bbd5dSLeila Ghaffari* - `-E_wind`
380bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
381bc7bbd5dSLeila Ghaffari  - `1E6`
382bc7bbd5dSLeila Ghaffari  - `J`
383e43605a5SLeila Ghaffari
3847b77ddfdSJames Wright* - `-advection_ic_type`
3857b77ddfdSJames Wright  - Initial condition type, from `sphere`, `cylinder`, `cosine_hill`, and `skew`
386f3f66076SJames Wright  - `sphere`
387bc7bbd5dSLeila Ghaffari  -
388e43605a5SLeila Ghaffari
389bc7bbd5dSLeila Ghaffari* - `-bubble_continuity`
3909e529eadSJames Wright  - Different shapes for `sphere` and `cylinder` initial conditions, from `smooth`, `back_sharp`, `thick`, or `cosine`
391bc7bbd5dSLeila Ghaffari  - `smooth`
392bc7bbd5dSLeila Ghaffari  -
393bc7bbd5dSLeila Ghaffari:::
394ccaff030SJeremy L Thompson
39594a05c6fSJames WrightFor 3D advection, an example of the `rotation` mode can be run with:
396ccaff030SJeremy L Thompson
397bc7bbd5dSLeila Ghaffari```
3984534a52eSLeila 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
399bc7bbd5dSLeila Ghaffari```
400ccaff030SJeremy L Thompson
401bc7bbd5dSLeila Ghaffariand the `translation` mode with:
402ccaff030SJeremy L Thompson
403bc7bbd5dSLeila Ghaffari```
4044534a52eSLeila 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
405bc7bbd5dSLeila Ghaffari```
406ccaff030SJeremy L Thompson
40794a05c6fSJames WrightFor 2D advection, an example of the `rotation` mode can be run with:
40894a05c6fSJames Wright
40994a05c6fSJames Wright```
4109e529eadSJames 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
41194a05c6fSJames Wright```
41294a05c6fSJames Wright
41394a05c6fSJames Wrightand the `translation` mode with:
41494a05c6fSJames Wright
41594a05c6fSJames Wright```
4169e529eadSJames 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
41794a05c6fSJames Wright```
41894a05c6fSJames WrightNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
41994a05c6fSJames Wright
420019b7682STimothy Aiken### Inviscid Ideal Gas
421019b7682STimothy Aiken
422019b7682STimothy Aiken#### Isentropic Euler vortex
423019b7682STimothy Aiken
424bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
425ccaff030SJeremy L Thompson
426bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
427bc7bbd5dSLeila Ghaffari:header-rows: 1
428ccaff030SJeremy L Thompson
429bc7bbd5dSLeila Ghaffari* - Option
430bc7bbd5dSLeila Ghaffari  - Description
431bc7bbd5dSLeila Ghaffari  - Default value
432bc7bbd5dSLeila Ghaffari  - Unit
433ccaff030SJeremy L Thompson
434bc7bbd5dSLeila Ghaffari* - `-center`
435bc7bbd5dSLeila Ghaffari  - Location of vortex center
436bc7bbd5dSLeila Ghaffari  - `(lx,ly,lz)/2`
437bc7bbd5dSLeila Ghaffari  - `(m,m,m)`
438ccaff030SJeremy L Thompson
439bc7bbd5dSLeila Ghaffari* - `-units_meter`
440bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
441bc7bbd5dSLeila Ghaffari  - `1E-2`
442bc7bbd5dSLeila Ghaffari  -
443ccaff030SJeremy L Thompson
444bc7bbd5dSLeila Ghaffari* - `-units_second`
445bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
446bc7bbd5dSLeila Ghaffari  - `1E-2`
447bc7bbd5dSLeila Ghaffari  -
448ccaff030SJeremy L Thompson
449bc7bbd5dSLeila Ghaffari* - `-mean_velocity`
450bc7bbd5dSLeila Ghaffari  - Background velocity vector
451bc7bbd5dSLeila Ghaffari  - `(1,1,0)`
452bc7bbd5dSLeila Ghaffari  -
453ccaff030SJeremy L Thompson
454bc7bbd5dSLeila Ghaffari* - `-vortex_strength`
455bc7bbd5dSLeila Ghaffari  - Strength of vortex < 10
456bc7bbd5dSLeila Ghaffari  - `5`
457bc7bbd5dSLeila Ghaffari  -
458932417b3SJed Brown
459932417b3SJed Brown* - `-c_tau`
460932417b3SJed Brown  - Stabilization constant
461504dc8e0SLeila Ghaffari  - `0.5`
462932417b3SJed Brown  -
463bc7bbd5dSLeila Ghaffari:::
464ccaff030SJeremy L Thompson
465bc7bbd5dSLeila GhaffariThis problem can be run with:
466ccaff030SJeremy L Thompson
467bc7bbd5dSLeila Ghaffari```
4687c5bba50SJames 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.
469bc7bbd5dSLeila Ghaffari```
470ccaff030SJeremy L Thompson
471019b7682STimothy Aiken#### Sod shock tube
472019b7682STimothy Aiken
473019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
474019b7682STimothy Aiken
475019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options
476019b7682STimothy Aiken:header-rows: 1
477019b7682STimothy Aiken
478019b7682STimothy Aiken* - Option
479019b7682STimothy Aiken  - Description
480019b7682STimothy Aiken  - Default value
481019b7682STimothy Aiken  - Unit
482019b7682STimothy Aiken
483019b7682STimothy Aiken* - `-units_meter`
484019b7682STimothy Aiken  - 1 meter in scaled length units
485019b7682STimothy Aiken  - `1E-2`
486019b7682STimothy Aiken  -
487019b7682STimothy Aiken
488019b7682STimothy Aiken* - `-units_second`
489019b7682STimothy Aiken  - 1 second in scaled time units
490019b7682STimothy Aiken  - `1E-2`
491019b7682STimothy Aiken  -
492019b7682STimothy Aiken
493019b7682STimothy Aiken* - `-yzb`
494019b7682STimothy Aiken  - Use YZB discontinuity capturing
495019b7682STimothy Aiken  - `none`
496019b7682STimothy Aiken  -
497019b7682STimothy Aiken
498019b7682STimothy Aiken* - `-stab`
499019b7682STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
500019b7682STimothy Aiken  - `none`
501019b7682STimothy Aiken  -
502019b7682STimothy Aiken:::
503019b7682STimothy Aiken
504019b7682STimothy AikenThis problem can be run with:
505019b7682STimothy Aiken
506019b7682STimothy Aiken```
5077c5bba50SJames 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
508019b7682STimothy Aiken```
509019b7682STimothy Aiken
510019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas
511019b7682STimothy Aiken
51288626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
513ccaff030SJeremy L Thompson
51488626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
515bc7bbd5dSLeila Ghaffari:header-rows: 1
516ccaff030SJeremy L Thompson
517bc7bbd5dSLeila Ghaffari* - Option
518bc7bbd5dSLeila Ghaffari  - Description
519bc7bbd5dSLeila Ghaffari  - Default value
520bc7bbd5dSLeila Ghaffari  - Unit
521ccaff030SJeremy L Thompson
522bc7bbd5dSLeila Ghaffari* - `-units_meter`
523bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
52488626eedSJames Wright  - `1`
525bc7bbd5dSLeila Ghaffari  -
526ccaff030SJeremy L Thompson
527bc7bbd5dSLeila Ghaffari* - `-units_second`
528bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
52988626eedSJames Wright  - `1`
530bc7bbd5dSLeila Ghaffari  -
531ccaff030SJeremy L Thompson
532bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
533bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
53488626eedSJames Wright  - `1`
535bc7bbd5dSLeila Ghaffari  -
536ccaff030SJeremy L Thompson
537bc7bbd5dSLeila Ghaffari* - `-units_Kelvin`
538bc7bbd5dSLeila Ghaffari  - 1 Kelvin in scaled temperature units
539bc7bbd5dSLeila Ghaffari  - `1`
540bc7bbd5dSLeila Ghaffari  -
541ccaff030SJeremy L Thompson
542bc7bbd5dSLeila Ghaffari* - `-stab`
543bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
544bc7bbd5dSLeila Ghaffari  - `none`
545bc7bbd5dSLeila Ghaffari  -
546ccaff030SJeremy L Thompson
547932417b3SJed Brown* - `-c_tau`
54888626eedSJames Wright  - Stabilization constant, $c_\tau$
549504dc8e0SLeila Ghaffari  - `0.5`
550932417b3SJed Brown  -
551932417b3SJed Brown
55288626eedSJames Wright* - `-Ctau_t`
55388626eedSJames Wright  - Stabilization time constant, $C_t$
55488626eedSJames Wright  - `1.0`
55588626eedSJames Wright  -
556ccaff030SJeremy L Thompson
55788626eedSJames Wright* - `-Ctau_v`
55888626eedSJames Wright  - Stabilization viscous constant, $C_v$
55994c01735SLeila Ghaffari  - `36, 60, 128 for degree = 1, 2, 3`
56088626eedSJames Wright  -
561ccaff030SJeremy L Thompson
56288626eedSJames Wright* - `-Ctau_C`
56388626eedSJames Wright  - Stabilization continuity constant, $C_c$
56488626eedSJames Wright  - `1.0`
56588626eedSJames Wright  -
566ccaff030SJeremy L Thompson
56788626eedSJames Wright* - `-Ctau_M`
56888626eedSJames Wright  - Stabilization momentum constant, $C_m$
56988626eedSJames Wright  - `1.0`
57088626eedSJames Wright  -
57188626eedSJames Wright
57288626eedSJames Wright* - `-Ctau_E`
57388626eedSJames Wright  - Stabilization energy constant, $C_E$
57488626eedSJames Wright  - `1.0`
57588626eedSJames Wright  -
576ccaff030SJeremy L Thompson
577bc7bbd5dSLeila Ghaffari* - `-cv`
578bc7bbd5dSLeila Ghaffari  - Heat capacity at constant volume
579bc7bbd5dSLeila Ghaffari  - `717`
580bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
581ccaff030SJeremy L Thompson
582bc7bbd5dSLeila Ghaffari* - `-cp`
583bc7bbd5dSLeila Ghaffari  - Heat capacity at constant pressure
584bc7bbd5dSLeila Ghaffari  - `1004`
585bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
586ccaff030SJeremy L Thompson
587a2726bdbSJames Wright* - `-gravity`
588a2726bdbSJames Wright  - Gravitational acceleration vector
589a2726bdbSJames Wright  - `0,0,0`
590bc7bbd5dSLeila Ghaffari  - `m/s^2`
591ccaff030SJeremy L Thompson
592bc7bbd5dSLeila Ghaffari* - `-lambda`
593bc7bbd5dSLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
594bc7bbd5dSLeila Ghaffari  - `-2/3`
595bc7bbd5dSLeila Ghaffari  -
596ccaff030SJeremy L Thompson
597bc7bbd5dSLeila Ghaffari* - `-mu`
598bc7bbd5dSLeila Ghaffari  - Shear dynamic viscosity coefficient
599a2726bdbSJames Wright  - `1.8e-5`
600bc7bbd5dSLeila Ghaffari  -  `Pa s`
60177841947SLeila Ghaffari
602bc7bbd5dSLeila Ghaffari* - `-k`
603bc7bbd5dSLeila Ghaffari  - Thermal conductivity
604bc7bbd5dSLeila Ghaffari  - `0.02638`
605bc7bbd5dSLeila Ghaffari  - `W/(m K)`
606a1df05f8SJed Brown
607a1df05f8SJed Brown* - `-newtonian_unit_tests`
608a1df05f8SJed Brown  - Developer option to test properties
609a1df05f8SJed Brown  - `false`
610a1df05f8SJed Brown  - boolean
611de2fdd78SJames Wright
6125c0afad3SJames Wright* - `-state_var`
613a2d72b6fSJames 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})$
6145c0afad3SJames Wright  - `conservative`
6155c0afad3SJames Wright  - string
616530ad8c4SKenneth E. Jansen
617530ad8c4SKenneth E. Jansen* - `-idl_decay_time`
618530ad8c4SKenneth E. Jansen  - Characteristic timescale of the pressure deviance decay. The timestep is good starting point
619530ad8c4SKenneth E. Jansen  - `-1` (disabled)
620530ad8c4SKenneth E. Jansen  - `s`
621530ad8c4SKenneth E. Jansen
622530ad8c4SKenneth E. Jansen* - `-idl_start`
623530ad8c4SKenneth E. Jansen  - Start of IDL in the x direction
624530ad8c4SKenneth E. Jansen  - `0`
625530ad8c4SKenneth E. Jansen  - `m`
626530ad8c4SKenneth E. Jansen
627530ad8c4SKenneth E. Jansen* - `-idl_length`
628530ad8c4SKenneth E. Jansen  - Length of IDL in the positive x direction
629530ad8c4SKenneth E. Jansen  - `0`
630530ad8c4SKenneth E. Jansen  - `m`
631530ad8c4SKenneth E. Jansen
6322249ac91SJames Wright* - `-idl_pressure`
6332249ac91SJames Wright  - Pressure used for IDL reference pressure
6342249ac91SJames Wright  -  `-reference_pressure`
6352249ac91SJames Wright  - `Pa`
6362249ac91SJames Wright
6373f89fbfdSJames Wright* - `-diff_filter_monitor`
6383f89fbfdSJames Wright  - Enable differential filter TSMonitor
6393f89fbfdSJames Wright  - `false`
6403f89fbfdSJames Wright  - boolean
6413f89fbfdSJames Wright
6423f89fbfdSJames Wright* - `-diff_filter_grid_based_width`
6433f89fbfdSJames Wright  - Use filter width based on the grid size
6443f89fbfdSJames Wright  - `false`
6453f89fbfdSJames Wright  - boolean
6463f89fbfdSJames Wright
6473f89fbfdSJames Wright* - `-diff_filter_width_scaling`
6483f89fbfdSJames Wright  - Anisotropic scaling for filter width in wall-aligned coordinates (snz)
6493f89fbfdSJames Wright  - `1,1,1`
6503f89fbfdSJames Wright  - `m`
6513f89fbfdSJames Wright
6523f89fbfdSJames Wright* - `-diff_filter_kernel_scaling`
6533f89fbfdSJames Wright  - Scaling to make differential kernel size equivalent to other filter kernels
6543f89fbfdSJames Wright  - `0.1`
6553f89fbfdSJames Wright  - `m^2`
6563f89fbfdSJames Wright
6573f89fbfdSJames Wright* - `-diff_filter_wall_damping_function`
6583f89fbfdSJames Wright  - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`)
6593f89fbfdSJames Wright  - `none`
6603f89fbfdSJames Wright  - string
6613f89fbfdSJames Wright
6623f89fbfdSJames Wright* - `-diff_filter_wall_damping_constant`
6639d9c52bbSJed Brown  - Constant for the wall-damping function. $A^+$ for `van_driest` damping function.
6643f89fbfdSJames Wright  - 25
6653f89fbfdSJames Wright  -
6663f89fbfdSJames Wright
6673f89fbfdSJames Wright* - `-diff_filter_friction_length`
6683f89fbfdSJames Wright  - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions
6693f89fbfdSJames Wright  - 0
6703f89fbfdSJames Wright  - `m`
671bc7bbd5dSLeila Ghaffari:::
67277841947SLeila Ghaffari
673530ad8c4SKenneth E. Jansen#### Gaussian Wave
6747ec884f8SJames Wright
675530ad8c4SKenneth E. JansenThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
6767ec884f8SJames Wright
677530ad8c4SKenneth E. Jansen:::{list-table} Gaussian Wave Runtime Options
6787ec884f8SJames Wright:header-rows: 1
6797ec884f8SJames Wright
6807ec884f8SJames Wright* - Option
6817ec884f8SJames Wright  - Description
6827ec884f8SJames Wright  - Default value
6837ec884f8SJames Wright  - Unit
6847ec884f8SJames Wright
685f1e435c9SJed Brown* - `-freestream_riemann`
686f1e435c9SJed Brown  - Riemann solver for boundaries (HLL or HLLC)
687f1e435c9SJed Brown  - `hllc`
688f1e435c9SJed Brown  -
689f1e435c9SJed Brown
690f1e435c9SJed Brown* - `-freestream_velocity`
6917ec884f8SJames Wright  - Freestream velocity vector
6927ec884f8SJames Wright  - `0,0,0`
6937ec884f8SJames Wright  - `m/s`
6947ec884f8SJames Wright
695f1e435c9SJed Brown* - `-freestream_temperature`
6967ec884f8SJames Wright  - Freestream temperature
6977ec884f8SJames Wright  - `288`
6987ec884f8SJames Wright  - `K`
6997ec884f8SJames Wright
700f1e435c9SJed Brown* - `-freestream_pressure`
70189e3cb53SJames Wright  - Freestream pressure
7027ec884f8SJames Wright  - `1.01e5`
7037ec884f8SJames Wright  - `Pa`
7047ec884f8SJames Wright
7057ec884f8SJames Wright* - `-epicenter`
7067ec884f8SJames Wright  - Coordinates of center of perturbation
7077ec884f8SJames Wright  - `0,0,0`
7087ec884f8SJames Wright  - `m`
7097ec884f8SJames Wright
7107ec884f8SJames Wright* - `-amplitude`
7117ec884f8SJames Wright  - Amplitude of the perturbation
7127ec884f8SJames Wright  - `0.1`
7137ec884f8SJames Wright  -
7147ec884f8SJames Wright
7157ec884f8SJames Wright* - `-width`
7167ec884f8SJames Wright  - Width parameter of the perturbation
7177ec884f8SJames Wright  - `0.002`
7187ec884f8SJames Wright  - `m`
7197ec884f8SJames Wright
7207ec884f8SJames Wright:::
7217ec884f8SJames Wright
722530ad8c4SKenneth E. JansenThis problem can be run with the `gaussianwave.yaml` file via:
7237ec884f8SJames Wright
7247ec884f8SJames Wright```
725530ad8c4SKenneth E. Jansen./navierstokes -options_file gaussianwave.yaml
7267ec884f8SJames Wright```
7277ec884f8SJames Wright
728530ad8c4SKenneth E. Jansen```{literalinclude} ../../../../../examples/fluids/gaussianwave.yaml
7297ec884f8SJames Wright:language: yaml
7307ec884f8SJames Wright```
731a1df05f8SJed Brown
732d310b3d3SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder
733d310b3d3SAdeleke O. Bankole
734d310b3d3SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
735d310b3d3SAdeleke O. Bankole
736d310b3d3SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options
737d310b3d3SAdeleke O. Bankole:header-rows: 1
738d310b3d3SAdeleke O. Bankole
739d310b3d3SAdeleke O. Bankole* - Option
740d310b3d3SAdeleke O. Bankole  - Description
741d310b3d3SAdeleke O. Bankole  - Default value
742d310b3d3SAdeleke O. Bankole  - Unit
743d310b3d3SAdeleke O. Bankole
744d310b3d3SAdeleke O. Bankole* - `-freestream_velocity`
745d310b3d3SAdeleke O. Bankole  - Freestream velocity vector
746d310b3d3SAdeleke O. Bankole  - `0,0,0`
747d310b3d3SAdeleke O. Bankole  - `m/s`
748d310b3d3SAdeleke O. Bankole
749d310b3d3SAdeleke O. Bankole* - `-freestream_temperature`
750d310b3d3SAdeleke O. Bankole  - Freestream temperature
751d310b3d3SAdeleke O. Bankole  - `288`
752d310b3d3SAdeleke O. Bankole  - `K`
753d310b3d3SAdeleke O. Bankole
754d310b3d3SAdeleke O. Bankole* - `-freestream_pressure`
755d310b3d3SAdeleke O. Bankole  - Freestream pressure
756d310b3d3SAdeleke O. Bankole  - `1.01e5`
757d310b3d3SAdeleke O. Bankole  - `Pa`
758d310b3d3SAdeleke O. Bankole
759d310b3d3SAdeleke O. Bankole:::
760d310b3d3SAdeleke O. Bankole
761d310b3d3SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
762d310b3d3SAdeleke O. BankoleTo run this problem, first generate a mesh:
763d310b3d3SAdeleke O. Bankole
764d310b3d3SAdeleke O. Bankole```console
765d310b3d3SAdeleke O. Bankole$ make -C examples/fluids/meshes
766d310b3d3SAdeleke O. Bankole```
767d310b3d3SAdeleke O. Bankole
768d310b3d3SAdeleke O. BankoleThen run by building the executable and running:
769d310b3d3SAdeleke O. Bankole
770d310b3d3SAdeleke O. Bankole```console
771d310b3d3SAdeleke O. Bankole$ make build/fluids-navierstokes
772ca69d878SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_
773d310b3d3SAdeleke O. Bankole```
774d310b3d3SAdeleke O. Bankole
775ca69d878SAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
776ca69d878SAdeleke 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.
777ca69d878SAdeleke O. Bankole
778ca69d878SAdeleke O. Bankole```console
779d6734f85SAdeleke O. Bankole$ python examples/fluids/postprocess/vortexshedding.py
780ca69d878SAdeleke O. Bankole```
781d310b3d3SAdeleke O. Bankole
782d310b3d3SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml
783d310b3d3SAdeleke O. Bankole:language: yaml
784d310b3d3SAdeleke O. Bankole```
785d310b3d3SAdeleke O. Bankole
786019b7682STimothy Aiken#### Density current
787019b7682STimothy Aiken
788061ff11eSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
78988626eedSJames Wright
79088626eedSJames Wright:::{list-table} Density Current Runtime Options
79188626eedSJames Wright:header-rows: 1
79288626eedSJames Wright
79388626eedSJames Wright* - Option
79488626eedSJames Wright  - Description
79588626eedSJames Wright  - Default value
79688626eedSJames Wright  - Unit
79788626eedSJames Wright
79888626eedSJames Wright* - `-center`
79988626eedSJames Wright  - Location of bubble center
80088626eedSJames Wright  - `(lx,ly,lz)/2`
80188626eedSJames Wright  - `(m,m,m)`
80288626eedSJames Wright
80388626eedSJames Wright* - `-dc_axis`
80488626eedSJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
80588626eedSJames Wright  - `(0,0,0)`
80688626eedSJames Wright  -
80788626eedSJames Wright
80888626eedSJames Wright* - `-rc`
80988626eedSJames Wright  - Characteristic radius of thermal bubble
81088626eedSJames Wright  - `1000`
81188626eedSJames Wright  - `m`
81288626eedSJames Wright
81388626eedSJames Wright* - `-theta0`
81488626eedSJames Wright  - Reference potential temperature
81588626eedSJames Wright  - `300`
81688626eedSJames Wright  - `K`
81788626eedSJames Wright
81888626eedSJames Wright* - `-thetaC`
81988626eedSJames Wright  - Perturbation of potential temperature
82088626eedSJames Wright  - `-15`
82188626eedSJames Wright  - `K`
82288626eedSJames Wright
82388626eedSJames Wright* - `-P0`
82488626eedSJames Wright  - Atmospheric pressure
82588626eedSJames Wright  - `1E5`
82688626eedSJames Wright  - `Pa`
82788626eedSJames Wright
82888626eedSJames Wright* - `-N`
82988626eedSJames Wright  - Brunt-Vaisala frequency
83088626eedSJames Wright  - `0.01`
83188626eedSJames Wright  - `1/s`
83288626eedSJames Wright:::
83388626eedSJames Wright
834bc7bbd5dSLeila GhaffariThis problem can be run with:
835ccaff030SJeremy L Thompson
836bc7bbd5dSLeila Ghaffari```
8377c5bba50SJames 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
83888626eedSJames Wright```
83988626eedSJames Wright
840019b7682STimothy Aiken#### Channel flow
841019b7682STimothy Aiken
842061ff11eSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
84388626eedSJames Wright
84488626eedSJames Wright:::{list-table} Channel Runtime Options
84588626eedSJames Wright:header-rows: 1
84688626eedSJames Wright
84788626eedSJames Wright* - Option
84888626eedSJames Wright  - Description
84988626eedSJames Wright  - Default value
85088626eedSJames Wright  - Unit
85188626eedSJames Wright
85288626eedSJames Wright* - `-umax`
85388626eedSJames Wright  - Maximum/centerline velocity of the flow
85488626eedSJames Wright  - `10`
85588626eedSJames Wright  - `m/s`
85688626eedSJames Wright
85788626eedSJames Wright* - `-theta0`
85888626eedSJames Wright  - Reference potential temperature
85988626eedSJames Wright  - `300`
86088626eedSJames Wright  - `K`
86188626eedSJames Wright
86288626eedSJames Wright* - `-P0`
86388626eedSJames Wright  - Atmospheric pressure
86488626eedSJames Wright  - `1E5`
86588626eedSJames Wright  - `Pa`
866a1df05f8SJed Brown
867a1df05f8SJed Brown* - `-body_force_scale`
868a1df05f8SJed Brown  - Multiplier for body force (`-1` for flow reversal)
869a1df05f8SJed Brown  - 1
870a1df05f8SJed Brown  -
87188626eedSJames Wright:::
87288626eedSJames Wright
87388626eedSJames WrightThis problem can be run with the `channel.yaml` file via:
87488626eedSJames Wright
87588626eedSJames Wright```
87688626eedSJames Wright./navierstokes -options_file channel.yaml
87788626eedSJames Wright```
87888626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
87988626eedSJames Wright:language: yaml
88088626eedSJames Wright```
88188626eedSJames Wright
8828a94a473SJed Brown(example-blasius)=
8838a94a473SJed Brown
884019b7682STimothy Aiken#### Blasius boundary layer
885019b7682STimothy Aiken
886061ff11eSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
88788626eedSJames Wright
88888626eedSJames Wright:::{list-table} Blasius Runtime Options
88988626eedSJames Wright:header-rows: 1
89088626eedSJames Wright
89188626eedSJames Wright* - Option
89288626eedSJames Wright  - Description
89388626eedSJames Wright  - Default value
89488626eedSJames Wright  - Unit
89588626eedSJames Wright
896fb455ff0SLeila Ghaffari* - `-velocity_infinity`
89788626eedSJames Wright  - Freestream velocity
89888626eedSJames Wright  - `40`
89988626eedSJames Wright  - `m/s`
90088626eedSJames Wright
901fb455ff0SLeila Ghaffari* - `-temperature_infinity`
902fb455ff0SLeila Ghaffari  - Freestream temperature
90388626eedSJames Wright  - `288`
90488626eedSJames Wright  - `K`
90588626eedSJames Wright
906ff9b3c0eSJames Wright* - `-pressure_infinity`
907ff9b3c0eSJames Wright  - Atmospheric pressure, also sets IDL reference pressure
908ff9b3c0eSJames Wright  - `1.01E5`
909ff9b3c0eSJames Wright  - `Pa`
910ff9b3c0eSJames Wright
911fb455ff0SLeila Ghaffari* - `-temperature_wall`
912fb455ff0SLeila Ghaffari  - Wall temperature
91307d14e58SLeila Ghaffari  - `288`
914fb455ff0SLeila Ghaffari  - `K`
915fb455ff0SLeila Ghaffari
916fb455ff0SLeila Ghaffari* - `-delta0`
917fb455ff0SLeila Ghaffari  - Boundary layer height at the inflow
918fb455ff0SLeila Ghaffari  - `4.2e-3`
919fb455ff0SLeila Ghaffari  - `m`
920fb455ff0SLeila Ghaffari
9219309e21cSJames Wright* - `-platemesh_modify_mesh`
9229309e21cSJames Wright  - Whether to modify the mesh using the given options below.
9239309e21cSJames Wright  - `false`
9249309e21cSJames Wright  -
9259309e21cSJames Wright
92691eaef80SJames Wright* - `-platemesh_refine_height`
92791eaef80SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
92888626eedSJames Wright  - `5.9E-4`
92988626eedSJames Wright  - `m`
93088626eedSJames Wright
93191eaef80SJames Wright* - `-platemesh_Ndelta`
93291eaef80SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
93388626eedSJames Wright  - `45`
93488626eedSJames Wright  -
93588626eedSJames Wright
93691eaef80SJames Wright* - `-platemesh_growth`
93788626eedSJames Wright  - Growth rate of the elements in the refinement region
93888626eedSJames Wright  - `1.08`
93988626eedSJames Wright  -
94088626eedSJames Wright
94191eaef80SJames Wright* - `-platemesh_top_angle`
94288626eedSJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
94388626eedSJames Wright  - `5`
94488626eedSJames Wright  - `degrees`
945ba6664aeSJames Wright
94691eaef80SJames Wright* - `-platemesh_y_node_locs_path`
94791eaef80SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
94891eaef80SJames Wright  - `""`
94991eaef80SJames Wright  -
950fb455ff0SLeila Ghaffari
9519309e21cSJames Wright* - `-stg_use`
9529309e21cSJames Wright  - Whether to use STG for the inflow conditions
9539309e21cSJames Wright  - `false`
9549309e21cSJames Wright  -
9559309e21cSJames Wright
95607d14e58SLeila Ghaffari* - `-n_chebyshev`
957fb455ff0SLeila Ghaffari  - Number of Chebyshev terms
958fb455ff0SLeila Ghaffari  - `20`
959fb455ff0SLeila Ghaffari  -
960fb455ff0SLeila Ghaffari
96107d14e58SLeila Ghaffari* - `-chebyshev_`
96207d14e58SLeila Ghaffari  - Prefix for Chebyshev snes solve
96307d14e58SLeila Ghaffari  -
96407d14e58SLeila Ghaffari  -
96507d14e58SLeila Ghaffari
96688626eedSJames Wright:::
96788626eedSJames Wright
96888626eedSJames WrightThis problem can be run with the `blasius.yaml` file via:
96988626eedSJames Wright
97088626eedSJames Wright```
97188626eedSJames Wright./navierstokes -options_file blasius.yaml
97288626eedSJames Wright```
97388626eedSJames Wright
97488626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
97588626eedSJames Wright:language: yaml
976bc7bbd5dSLeila Ghaffari```
977ba6664aeSJames Wright
978ba6664aeSJames Wright#### STG Inflow for Flat Plate
979ba6664aeSJames Wright
98017be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
981ba6664aeSJames Wright
982ba6664aeSJames Wright:::{list-table} Blasius Runtime Options
983ba6664aeSJames Wright:header-rows: 1
984ba6664aeSJames Wright
985ba6664aeSJames Wright* - Option
986ba6664aeSJames Wright  - Description
987ba6664aeSJames Wright  - Default value
988ba6664aeSJames Wright  - Unit
989ba6664aeSJames Wright
990ba6664aeSJames Wright* - `-stg_inflow_path`
991ba6664aeSJames Wright  - Path to the STGInflow file
992ba6664aeSJames Wright  - `./STGInflow.dat`
993ba6664aeSJames Wright  -
994ba6664aeSJames Wright
995ba6664aeSJames Wright* - `-stg_rand_path`
996ba6664aeSJames Wright  - Path to the STGRand file
997ba6664aeSJames Wright  - `./STGRand.dat`
998ba6664aeSJames Wright  -
999ba6664aeSJames Wright
1000ba6664aeSJames Wright* - `-stg_alpha`
1001ba6664aeSJames Wright  - Growth rate of the wavemodes
1002ba6664aeSJames Wright  - `1.01`
1003ba6664aeSJames Wright  -
1004ba6664aeSJames Wright
1005ba6664aeSJames Wright* - `-stg_u0`
1006ba6664aeSJames Wright  - Convective velocity, $U_0$
1007ba6664aeSJames Wright  - `0.0`
1008ba6664aeSJames Wright  - `m/s`
1009ba6664aeSJames Wright
1010ba6664aeSJames Wright* - `-stg_mean_only`
1011ba6664aeSJames Wright  - Only impose the mean velocity (no fluctutations)
1012ba6664aeSJames Wright  - `false`
1013ba6664aeSJames Wright  -
1014ba6664aeSJames Wright
101530af3636SJames Wright* - `-stg_strong`
101630af3636SJames Wright  - Strongly enforce the STG inflow boundary condition
101730af3636SJames Wright  - `false`
101830af3636SJames Wright  -
101930af3636SJames Wright
102089060322SJames Wright* - `-stg_fluctuating_IC`
102189060322SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
102289060322SJames Wright  - `false`
102389060322SJames Wright  -
102489060322SJames Wright
1025831dbe9eSJames Wright* - `-stg_dx`
1026831dbe9eSJames Wright  - Set the element size in the x direction. Default is calculated for box meshes, assuming equispaced elements.
1027831dbe9eSJames Wright  -
1028831dbe9eSJames Wright  - `m`
1029831dbe9eSJames Wright
1030831dbe9eSJames Wright* - `-stg_h_scale_factor`
1031831dbe9eSJames Wright  - Scale element size for cutoff frequency calculation
1032831dbe9eSJames Wright  - $1/p$
1033831dbe9eSJames Wright  -
1034831dbe9eSJames Wright
1035ba6664aeSJames Wright:::
1036ba6664aeSJames Wright
1037ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via:
1038ba6664aeSJames Wright
1039ba6664aeSJames Wright```
1040ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true
1041ba6664aeSJames Wright```
1042ba6664aeSJames Wright
104317be3a41SJeremy L ThompsonNote the added `-stg_use true` flag
104417be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
1045