xref: /libCEED/examples/fluids/README.md (revision 8ed527305783a8e6c48f5ac92760da88017905af)
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
39bc7bbd5dSLeila Ghaffari* - `-test`
40bc7bbd5dSLeila Ghaffari  - Run in test mode
41bc7bbd5dSLeila Ghaffari  - `false`
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
143ee3de563SJames Wright* - `-stats_enable`
144ee3de563SJames Wright  - Enable collection of spanwise flow statistics
145ee3de563SJames Wright  - `false`
146ee3de563SJames Wright
147ee3de563SJames Wright* - `-stats_test`
148ee3de563SJames Wright  - Use manufactured solution for statistics collection (used for testing)
149ee3de563SJames Wright  - `false`
150ee3de563SJames Wright
151ee3de563SJames Wright* - `-stats_collect_interval`
152ee3de563SJames Wright  - Number of timesteps between statistics collection
153ee3de563SJames Wright  - `1`
154ee3de563SJames Wright
155*8ed52730SJames Wright* - `-stats_viewer`
156*8ed52730SJames Wright  - Sets the PetscViewer for the statistics file writing, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
157*8ed52730SJames Wright  -
158*8ed52730SJames Wright
159*8ed52730SJames Wright* - `-stats_viewer_interval`
160ee3de563SJames Wright  - Number of timesteps between statistics file writing (`-1` means only at end of run)
161ee3de563SJames Wright  - `-1`
162ee3de563SJames Wright
163*8ed52730SJames Wright* - `-stats_viewer_cgns_batch_size`
164*8ed52730SJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
165*8ed52730SJames Wright  - `20`
166*8ed52730SJames Wright
167bc7bbd5dSLeila Ghaffari* - `-snes_view`
168bc7bbd5dSLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
169bc7bbd5dSLeila Ghaffari  -
17089d0f5c0SLeila Ghaffari
171bc7bbd5dSLeila Ghaffari* - `-log_view`
172bc7bbd5dSLeila Ghaffari  - View PETSc performance log
173bc7bbd5dSLeila Ghaffari  -
174ccaff030SJeremy L Thompson
175bc7bbd5dSLeila Ghaffari* - `-help`
176bc7bbd5dSLeila Ghaffari  - View comprehensive information about run-time options
177bc7bbd5dSLeila Ghaffari  -
178bc7bbd5dSLeila Ghaffari:::
179ccaff030SJeremy L Thompson
1807ec884f8SJames 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:
1814534a52eSLeila Ghaffari
18288626eedSJames Wright:::{list-table} 2D Face ID Labels
18388626eedSJames Wright:header-rows: 1
18488626eedSJames Wright* - PETSc Face Name
18588626eedSJames Wright  - Cartesian direction
18688626eedSJames Wright  - Face ID
18788626eedSJames Wright
18888626eedSJames Wright* - faceMarkerBottom
18988626eedSJames Wright  - -z
19088626eedSJames Wright  - 1
19188626eedSJames Wright
19288626eedSJames Wright* - faceMarkerRight
19388626eedSJames Wright  - +x
19488626eedSJames Wright  - 2
19588626eedSJames Wright
19688626eedSJames Wright* - faceMarkerTop
19788626eedSJames Wright  - +z
19888626eedSJames Wright  - 3
19988626eedSJames Wright
20088626eedSJames Wright* - faceMarkerLeft
20188626eedSJames Wright  - -x
20288626eedSJames Wright  - 4
20388626eedSJames Wright:::
20488626eedSJames Wright
20588626eedSJames Wright:::{list-table} 2D Face ID Labels
20688626eedSJames Wright:header-rows: 1
20788626eedSJames Wright* - PETSc Face Name
20888626eedSJames Wright  - Cartesian direction
20988626eedSJames Wright  - Face ID
21088626eedSJames Wright
21188626eedSJames Wright* - faceMarkerBottom
21288626eedSJames Wright  - -z
21388626eedSJames Wright  - 1
21488626eedSJames Wright
21588626eedSJames Wright* - faceMarkerTop
21688626eedSJames Wright  - +z
21788626eedSJames Wright  - 2
21888626eedSJames Wright
21988626eedSJames Wright* - faceMarkerFront
22088626eedSJames Wright  - -y
22188626eedSJames Wright  - 3
22288626eedSJames Wright
22388626eedSJames Wright* - faceMarkerBack
22488626eedSJames Wright  - +y
22588626eedSJames Wright  - 4
22688626eedSJames Wright
22788626eedSJames Wright* - faceMarkerRight
22888626eedSJames Wright  - +x
22988626eedSJames Wright  - 5
23088626eedSJames Wright
23188626eedSJames Wright* - faceMarkerLeft
23288626eedSJames Wright  - -x
23388626eedSJames Wright  - 6
23488626eedSJames Wright:::
2354534a52eSLeila Ghaffari
2368a94a473SJed Brown### Boundary conditions
2378a94a473SJed Brown
2388a94a473SJed BrownBoundary conditions for compressible viscous flows are notoriously tricky. Here we offer some recommendations
2398a94a473SJed Brown
2408a94a473SJed Brown#### Inflow
2418a94a473SJed Brown
2428a94a473SJed 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).
2438a94a473SJed BrownIt is stable and the least reflective boundary condition for acoustics.
2448a94a473SJed Brown
2458a94a473SJed BrownIf near a viscous wall, you may want a specified inflow profile.
2468a94a473SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
2478a94a473SJed 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.
2488a94a473SJed BrownThe strong approach gives sharper resolution of velocity structures.
2498a94a473SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
2508a94a473SJed Brown
2518a94a473SJed Brown### Outflow
2528a94a473SJed Brown
2538a94a473SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
2548a94a473SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
2558a94a473SJed 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.
2568a94a473SJed Brown
2578a94a473SJed 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.
2588a94a473SJed Brown
2598a94a473SJed 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).
2608a94a473SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
2618a94a473SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
2628a94a473SJed Brown
2638a94a473SJed Brown### Periodicity
2648a94a473SJed Brown
2658a94a473SJed BrownPETSc provides two ways to specify periodicity:
2668a94a473SJed Brown
2678a94a473SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
2688a94a473SJed Brown
2698a94a473SJed Brown``` yaml
2708a94a473SJed Browndm_plex:
2718a94a473SJed Brown  shape: box
2728a94a473SJed Brown  box_faces: 10,12,4
2738a94a473SJed Brown  box_bd: none,none,periodic
2748a94a473SJed Brown```
2758a94a473SJed Brown
2768a94a473SJed BrownThe coordinates for such cases are stored as a new field, and
2778a94a473SJed Brown
278019b7682STimothy Aiken### Advection
279019b7682STimothy Aiken
28017be3a41SJeremy 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$.
28117be3a41SJeremy L ThompsonThese are available in 2D and 3D.
282019b7682STimothy Aiken
283019b7682STimothy Aiken#### 2D advection
284019b7682STimothy Aiken
285bc7bbd5dSLeila GhaffariFor the 2D advection problem, the following additional command-line options are available:
286ccaff030SJeremy L Thompson
287bc7bbd5dSLeila Ghaffari:::{list-table} Advection2D Runtime Options
288bc7bbd5dSLeila Ghaffari:header-rows: 1
28989d0f5c0SLeila Ghaffari
290bc7bbd5dSLeila Ghaffari* - Option
291bc7bbd5dSLeila Ghaffari  - Description
292bc7bbd5dSLeila Ghaffari  - Default value
293bc7bbd5dSLeila Ghaffari  - Unit
29489d0f5c0SLeila Ghaffari
295bc7bbd5dSLeila Ghaffari* - `-rc`
296bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
297bc7bbd5dSLeila Ghaffari  - `1000`
298bc7bbd5dSLeila Ghaffari  - `m`
29989d0f5c0SLeila Ghaffari
300bc7bbd5dSLeila Ghaffari* - `-units_meter`
301bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
302bc7bbd5dSLeila Ghaffari  - `1E-2`
303bc7bbd5dSLeila Ghaffari  -
30489d0f5c0SLeila Ghaffari
305bc7bbd5dSLeila Ghaffari* - `-units_second`
306bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
307bc7bbd5dSLeila Ghaffari  - `1E-2`
308bc7bbd5dSLeila Ghaffari  -
30989d0f5c0SLeila Ghaffari
310bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
311bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
312bc7bbd5dSLeila Ghaffari  - `1E-6`
313bc7bbd5dSLeila Ghaffari  -
31477841947SLeila Ghaffari
315bc7bbd5dSLeila Ghaffari* - `-strong_form`
316bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
317bc7bbd5dSLeila Ghaffari  - `0`
318bc7bbd5dSLeila Ghaffari  -
31977841947SLeila Ghaffari
320bc7bbd5dSLeila Ghaffari* - `-stab`
321bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
322bc7bbd5dSLeila Ghaffari  - `none`
323bc7bbd5dSLeila Ghaffari  -
32477841947SLeila Ghaffari
325bc7bbd5dSLeila Ghaffari* - `-CtauS`
326bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
327bc7bbd5dSLeila Ghaffari  - `0`
328bc7bbd5dSLeila Ghaffari  -
32977841947SLeila Ghaffari
330bc7bbd5dSLeila Ghaffari* - `-wind_type`
331bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
332bc7bbd5dSLeila Ghaffari  - `rotation`
333bc7bbd5dSLeila Ghaffari  -
33477841947SLeila Ghaffari
335bc7bbd5dSLeila Ghaffari* - `-wind_translation`
336bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
337bc7bbd5dSLeila Ghaffari  - `1,0,0`
338bc7bbd5dSLeila Ghaffari  -
33989d0f5c0SLeila Ghaffari
340bc7bbd5dSLeila Ghaffari* - `-E_wind`
341bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
342bc7bbd5dSLeila Ghaffari  - `1E6`
343bc7bbd5dSLeila Ghaffari  - `J`
344bc7bbd5dSLeila Ghaffari:::
345e43605a5SLeila Ghaffari
346bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with:
347e43605a5SLeila Ghaffari
348bc7bbd5dSLeila Ghaffari```
3494534a52eSLeila 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
350bc7bbd5dSLeila Ghaffari```
351e43605a5SLeila Ghaffari
352bc7bbd5dSLeila Ghaffariand the `translation` mode with:
353e43605a5SLeila Ghaffari
354bc7bbd5dSLeila Ghaffari```
3554534a52eSLeila 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
356bc7bbd5dSLeila Ghaffari```
3574534a52eSLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
358e43605a5SLeila Ghaffari
359019b7682STimothy Aiken#### 3D advection
360019b7682STimothy Aiken
361bc7bbd5dSLeila GhaffariFor the 3D advection problem, the following additional command-line options are available:
362e43605a5SLeila Ghaffari
363bc7bbd5dSLeila Ghaffari:::{list-table} Advection3D Runtime Options
364bc7bbd5dSLeila Ghaffari:header-rows: 1
365e43605a5SLeila Ghaffari
366bc7bbd5dSLeila Ghaffari* - Option
367bc7bbd5dSLeila Ghaffari  - Description
368bc7bbd5dSLeila Ghaffari  - Default value
369bc7bbd5dSLeila Ghaffari  - Unit
370e43605a5SLeila Ghaffari
371bc7bbd5dSLeila Ghaffari* - `-rc`
372bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
373bc7bbd5dSLeila Ghaffari  - `1000`
374bc7bbd5dSLeila Ghaffari  - `m`
375e43605a5SLeila Ghaffari
376bc7bbd5dSLeila Ghaffari* - `-units_meter`
377bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
378bc7bbd5dSLeila Ghaffari  - `1E-2`
379bc7bbd5dSLeila Ghaffari  -
380e43605a5SLeila Ghaffari
381bc7bbd5dSLeila Ghaffari* - `-units_second`
382bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
383bc7bbd5dSLeila Ghaffari  - `1E-2`
384bc7bbd5dSLeila Ghaffari  -
385e43605a5SLeila Ghaffari
386bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
387bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
388bc7bbd5dSLeila Ghaffari  - `1E-6`
389bc7bbd5dSLeila Ghaffari  -
390e43605a5SLeila Ghaffari
391bc7bbd5dSLeila Ghaffari* - `-strong_form`
392bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
393bc7bbd5dSLeila Ghaffari  - `0`
394bc7bbd5dSLeila Ghaffari  -
395e43605a5SLeila Ghaffari
396bc7bbd5dSLeila Ghaffari* - `-stab`
397bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
398bc7bbd5dSLeila Ghaffari  - `none`
399bc7bbd5dSLeila Ghaffari  -
400e43605a5SLeila Ghaffari
401bc7bbd5dSLeila Ghaffari* - `-CtauS`
402bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
403bc7bbd5dSLeila Ghaffari  - `0`
404bc7bbd5dSLeila Ghaffari  -
405e43605a5SLeila Ghaffari
406bc7bbd5dSLeila Ghaffari* - `-wind_type`
407bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
408bc7bbd5dSLeila Ghaffari  - `rotation`
409bc7bbd5dSLeila Ghaffari  -
410e43605a5SLeila Ghaffari
411bc7bbd5dSLeila Ghaffari* - `-wind_translation`
412bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
413bc7bbd5dSLeila Ghaffari  - `1,0,0`
414bc7bbd5dSLeila Ghaffari  -
415e43605a5SLeila Ghaffari
416bc7bbd5dSLeila Ghaffari* - `-E_wind`
417bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
418bc7bbd5dSLeila Ghaffari  - `1E6`
419bc7bbd5dSLeila Ghaffari  - `J`
420e43605a5SLeila Ghaffari
421bc7bbd5dSLeila Ghaffari* - `-bubble_type`
422bc7bbd5dSLeila Ghaffari  - `sphere` (3D) or `cylinder` (2D)
423bc7bbd5dSLeila Ghaffari  - `shpere`
424bc7bbd5dSLeila Ghaffari  -
425e43605a5SLeila Ghaffari
426bc7bbd5dSLeila Ghaffari* - `-bubble_continuity`
427bc7bbd5dSLeila Ghaffari  - `smooth`, `back_sharp`, or `thick`
428bc7bbd5dSLeila Ghaffari  - `smooth`
429bc7bbd5dSLeila Ghaffari  -
430bc7bbd5dSLeila Ghaffari:::
431ccaff030SJeremy L Thompson
432bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with:
433ccaff030SJeremy L Thompson
434bc7bbd5dSLeila Ghaffari```
4354534a52eSLeila 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
436bc7bbd5dSLeila Ghaffari```
437ccaff030SJeremy L Thompson
438bc7bbd5dSLeila Ghaffariand the `translation` mode with:
439ccaff030SJeremy L Thompson
440bc7bbd5dSLeila Ghaffari```
4414534a52eSLeila 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
442bc7bbd5dSLeila Ghaffari```
443ccaff030SJeremy L Thompson
444019b7682STimothy Aiken### Inviscid Ideal Gas
445019b7682STimothy Aiken
446019b7682STimothy Aiken#### Isentropic Euler vortex
447019b7682STimothy Aiken
448bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
449ccaff030SJeremy L Thompson
450bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
451bc7bbd5dSLeila Ghaffari:header-rows: 1
452ccaff030SJeremy L Thompson
453bc7bbd5dSLeila Ghaffari* - Option
454bc7bbd5dSLeila Ghaffari  - Description
455bc7bbd5dSLeila Ghaffari  - Default value
456bc7bbd5dSLeila Ghaffari  - Unit
457ccaff030SJeremy L Thompson
458bc7bbd5dSLeila Ghaffari* - `-center`
459bc7bbd5dSLeila Ghaffari  - Location of vortex center
460bc7bbd5dSLeila Ghaffari  - `(lx,ly,lz)/2`
461bc7bbd5dSLeila Ghaffari  - `(m,m,m)`
462ccaff030SJeremy L Thompson
463bc7bbd5dSLeila Ghaffari* - `-units_meter`
464bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
465bc7bbd5dSLeila Ghaffari  - `1E-2`
466bc7bbd5dSLeila Ghaffari  -
467ccaff030SJeremy L Thompson
468bc7bbd5dSLeila Ghaffari* - `-units_second`
469bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
470bc7bbd5dSLeila Ghaffari  - `1E-2`
471bc7bbd5dSLeila Ghaffari  -
472ccaff030SJeremy L Thompson
473bc7bbd5dSLeila Ghaffari* - `-mean_velocity`
474bc7bbd5dSLeila Ghaffari  - Background velocity vector
475bc7bbd5dSLeila Ghaffari  - `(1,1,0)`
476bc7bbd5dSLeila Ghaffari  -
477ccaff030SJeremy L Thompson
478bc7bbd5dSLeila Ghaffari* - `-vortex_strength`
479bc7bbd5dSLeila Ghaffari  - Strength of vortex < 10
480bc7bbd5dSLeila Ghaffari  - `5`
481bc7bbd5dSLeila Ghaffari  -
482932417b3SJed Brown
483932417b3SJed Brown* - `-c_tau`
484932417b3SJed Brown  - Stabilization constant
485504dc8e0SLeila Ghaffari  - `0.5`
486932417b3SJed Brown  -
487bc7bbd5dSLeila Ghaffari:::
488ccaff030SJeremy L Thompson
489bc7bbd5dSLeila GhaffariThis problem can be run with:
490ccaff030SJeremy L Thompson
491bc7bbd5dSLeila Ghaffari```
4924534a52eSLeila 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.
493bc7bbd5dSLeila Ghaffari```
494ccaff030SJeremy L Thompson
495019b7682STimothy Aiken#### Sod shock tube
496019b7682STimothy Aiken
497019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
498019b7682STimothy Aiken
499019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options
500019b7682STimothy Aiken:header-rows: 1
501019b7682STimothy Aiken
502019b7682STimothy Aiken* - Option
503019b7682STimothy Aiken  - Description
504019b7682STimothy Aiken  - Default value
505019b7682STimothy Aiken  - Unit
506019b7682STimothy Aiken
507019b7682STimothy Aiken* - `-units_meter`
508019b7682STimothy Aiken  - 1 meter in scaled length units
509019b7682STimothy Aiken  - `1E-2`
510019b7682STimothy Aiken  -
511019b7682STimothy Aiken
512019b7682STimothy Aiken* - `-units_second`
513019b7682STimothy Aiken  - 1 second in scaled time units
514019b7682STimothy Aiken  - `1E-2`
515019b7682STimothy Aiken  -
516019b7682STimothy Aiken
517019b7682STimothy Aiken* - `-yzb`
518019b7682STimothy Aiken  - Use YZB discontinuity capturing
519019b7682STimothy Aiken  - `none`
520019b7682STimothy Aiken  -
521019b7682STimothy Aiken
522019b7682STimothy Aiken* - `-stab`
523019b7682STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
524019b7682STimothy Aiken  - `none`
525019b7682STimothy Aiken  -
526019b7682STimothy Aiken:::
527019b7682STimothy Aiken
528019b7682STimothy AikenThis problem can be run with:
529019b7682STimothy Aiken
530019b7682STimothy Aiken```
531019b7682STimothy 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
532019b7682STimothy Aiken```
533019b7682STimothy Aiken
534019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas
535019b7682STimothy Aiken
53688626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
537ccaff030SJeremy L Thompson
53888626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
539bc7bbd5dSLeila Ghaffari:header-rows: 1
540ccaff030SJeremy L Thompson
541bc7bbd5dSLeila Ghaffari* - Option
542bc7bbd5dSLeila Ghaffari  - Description
543bc7bbd5dSLeila Ghaffari  - Default value
544bc7bbd5dSLeila Ghaffari  - Unit
545ccaff030SJeremy L Thompson
546bc7bbd5dSLeila Ghaffari* - `-units_meter`
547bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
54888626eedSJames Wright  - `1`
549bc7bbd5dSLeila Ghaffari  -
550ccaff030SJeremy L Thompson
551bc7bbd5dSLeila Ghaffari* - `-units_second`
552bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
55388626eedSJames Wright  - `1`
554bc7bbd5dSLeila Ghaffari  -
555ccaff030SJeremy L Thompson
556bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
557bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
55888626eedSJames Wright  - `1`
559bc7bbd5dSLeila Ghaffari  -
560ccaff030SJeremy L Thompson
561bc7bbd5dSLeila Ghaffari* - `-units_Kelvin`
562bc7bbd5dSLeila Ghaffari  - 1 Kelvin in scaled temperature units
563bc7bbd5dSLeila Ghaffari  - `1`
564bc7bbd5dSLeila Ghaffari  -
565ccaff030SJeremy L Thompson
566bc7bbd5dSLeila Ghaffari* - `-stab`
567bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
568bc7bbd5dSLeila Ghaffari  - `none`
569bc7bbd5dSLeila Ghaffari  -
570ccaff030SJeremy L Thompson
571932417b3SJed Brown* - `-c_tau`
57288626eedSJames Wright  - Stabilization constant, $c_\tau$
573504dc8e0SLeila Ghaffari  - `0.5`
574932417b3SJed Brown  -
575932417b3SJed Brown
57688626eedSJames Wright* - `-Ctau_t`
57788626eedSJames Wright  - Stabilization time constant, $C_t$
57888626eedSJames Wright  - `1.0`
57988626eedSJames Wright  -
580ccaff030SJeremy L Thompson
58188626eedSJames Wright* - `-Ctau_v`
58288626eedSJames Wright  - Stabilization viscous constant, $C_v$
58394c01735SLeila Ghaffari  - `36, 60, 128 for degree = 1, 2, 3`
58488626eedSJames Wright  -
585ccaff030SJeremy L Thompson
58688626eedSJames Wright* - `-Ctau_C`
58788626eedSJames Wright  - Stabilization continuity constant, $C_c$
58888626eedSJames Wright  - `1.0`
58988626eedSJames Wright  -
590ccaff030SJeremy L Thompson
59188626eedSJames Wright* - `-Ctau_M`
59288626eedSJames Wright  - Stabilization momentum constant, $C_m$
59388626eedSJames Wright  - `1.0`
59488626eedSJames Wright  -
59588626eedSJames Wright
59688626eedSJames Wright* - `-Ctau_E`
59788626eedSJames Wright  - Stabilization energy constant, $C_E$
59888626eedSJames Wright  - `1.0`
59988626eedSJames Wright  -
600ccaff030SJeremy L Thompson
601bc7bbd5dSLeila Ghaffari* - `-cv`
602bc7bbd5dSLeila Ghaffari  - Heat capacity at constant volume
603bc7bbd5dSLeila Ghaffari  - `717`
604bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
605ccaff030SJeremy L Thompson
606bc7bbd5dSLeila Ghaffari* - `-cp`
607bc7bbd5dSLeila Ghaffari  - Heat capacity at constant pressure
608bc7bbd5dSLeila Ghaffari  - `1004`
609bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
610ccaff030SJeremy L Thompson
611bc7bbd5dSLeila Ghaffari* - `-g`
612bc7bbd5dSLeila Ghaffari  - Gravitational acceleration
613bc7bbd5dSLeila Ghaffari  - `9.81`
614bc7bbd5dSLeila Ghaffari  - `m/s^2`
615ccaff030SJeremy L Thompson
616bc7bbd5dSLeila Ghaffari* - `-lambda`
617bc7bbd5dSLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
618bc7bbd5dSLeila Ghaffari  - `-2/3`
619bc7bbd5dSLeila Ghaffari  -
620ccaff030SJeremy L Thompson
621bc7bbd5dSLeila Ghaffari* - `-mu`
622bc7bbd5dSLeila Ghaffari  - Shear dynamic viscosity coefficient
623bc7bbd5dSLeila Ghaffari  - `75`
624bc7bbd5dSLeila Ghaffari  -  `Pa s`
62577841947SLeila Ghaffari
626bc7bbd5dSLeila Ghaffari* - `-k`
627bc7bbd5dSLeila Ghaffari  - Thermal conductivity
628bc7bbd5dSLeila Ghaffari  - `0.02638`
629bc7bbd5dSLeila Ghaffari  - `W/(m K)`
630a1df05f8SJed Brown
631a1df05f8SJed Brown* - `-newtonian_unit_tests`
632a1df05f8SJed Brown  - Developer option to test properties
633a1df05f8SJed Brown  - `false`
634a1df05f8SJed Brown  - boolean
635de2fdd78SJames Wright
6365c0afad3SJames Wright* - `-state_var`
6375c0afad3SJames Wright  - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$)
6385c0afad3SJames Wright  - `conservative`
6395c0afad3SJames Wright  - string
640bc7bbd5dSLeila Ghaffari:::
64177841947SLeila Ghaffari
6427ec884f8SJames Wright#### Newtonian Wave
6437ec884f8SJames Wright
644061ff11eSJames WrightThe newtonian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
6457ec884f8SJames Wright
64689e3cb53SJames Wright:::{list-table} Newtonian Wave Runtime Options
6477ec884f8SJames Wright:header-rows: 1
6487ec884f8SJames Wright
6497ec884f8SJames Wright* - Option
6507ec884f8SJames Wright  - Description
6517ec884f8SJames Wright  - Default value
6527ec884f8SJames Wright  - Unit
6537ec884f8SJames Wright
654f1e435c9SJed Brown* - `-freestream_riemann`
655f1e435c9SJed Brown  - Riemann solver for boundaries (HLL or HLLC)
656f1e435c9SJed Brown  - `hllc`
657f1e435c9SJed Brown  -
658f1e435c9SJed Brown
659f1e435c9SJed Brown* - `-freestream_velocity`
6607ec884f8SJames Wright  - Freestream velocity vector
6617ec884f8SJames Wright  - `0,0,0`
6627ec884f8SJames Wright  - `m/s`
6637ec884f8SJames Wright
664f1e435c9SJed Brown* - `-freestream_temperature`
6657ec884f8SJames Wright  - Freestream temperature
6667ec884f8SJames Wright  - `288`
6677ec884f8SJames Wright  - `K`
6687ec884f8SJames Wright
669f1e435c9SJed Brown* - `-freestream_pressure`
67089e3cb53SJames Wright  - Freestream pressure
6717ec884f8SJames Wright  - `1.01e5`
6727ec884f8SJames Wright  - `Pa`
6737ec884f8SJames Wright
6747ec884f8SJames Wright* - `-epicenter`
6757ec884f8SJames Wright  - Coordinates of center of perturbation
6767ec884f8SJames Wright  - `0,0,0`
6777ec884f8SJames Wright  - `m`
6787ec884f8SJames Wright
6797ec884f8SJames Wright* - `-amplitude`
6807ec884f8SJames Wright  - Amplitude of the perturbation
6817ec884f8SJames Wright  - `0.1`
6827ec884f8SJames Wright  -
6837ec884f8SJames Wright
6847ec884f8SJames Wright* - `-width`
6857ec884f8SJames Wright  - Width parameter of the perturbation
6867ec884f8SJames Wright  - `0.002`
6877ec884f8SJames Wright  - `m`
6887ec884f8SJames Wright
6897ec884f8SJames Wright:::
6907ec884f8SJames Wright
6917ec884f8SJames WrightThis problem can be run with the `newtonianwave.yaml` file via:
6927ec884f8SJames Wright
6937ec884f8SJames Wright```
6947ec884f8SJames Wright./navierstokes -options_file newtonianwave.yaml
6957ec884f8SJames Wright```
6967ec884f8SJames Wright
6977ec884f8SJames Wright```{literalinclude} ../../../../../examples/fluids/newtonianwave.yaml
6987ec884f8SJames Wright:language: yaml
6997ec884f8SJames Wright```
700a1df05f8SJed Brown
701d310b3d3SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder
702d310b3d3SAdeleke O. Bankole
703d310b3d3SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
704d310b3d3SAdeleke O. Bankole
705d310b3d3SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options
706d310b3d3SAdeleke O. Bankole:header-rows: 1
707d310b3d3SAdeleke O. Bankole
708d310b3d3SAdeleke O. Bankole* - Option
709d310b3d3SAdeleke O. Bankole  - Description
710d310b3d3SAdeleke O. Bankole  - Default value
711d310b3d3SAdeleke O. Bankole  - Unit
712d310b3d3SAdeleke O. Bankole
713d310b3d3SAdeleke O. Bankole* - `-freestream_velocity`
714d310b3d3SAdeleke O. Bankole  - Freestream velocity vector
715d310b3d3SAdeleke O. Bankole  - `0,0,0`
716d310b3d3SAdeleke O. Bankole  - `m/s`
717d310b3d3SAdeleke O. Bankole
718d310b3d3SAdeleke O. Bankole* - `-freestream_temperature`
719d310b3d3SAdeleke O. Bankole  - Freestream temperature
720d310b3d3SAdeleke O. Bankole  - `288`
721d310b3d3SAdeleke O. Bankole  - `K`
722d310b3d3SAdeleke O. Bankole
723d310b3d3SAdeleke O. Bankole* - `-freestream_pressure`
724d310b3d3SAdeleke O. Bankole  - Freestream pressure
725d310b3d3SAdeleke O. Bankole  - `1.01e5`
726d310b3d3SAdeleke O. Bankole  - `Pa`
727d310b3d3SAdeleke O. Bankole
728d310b3d3SAdeleke O. Bankole:::
729d310b3d3SAdeleke O. Bankole
730d310b3d3SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
731d310b3d3SAdeleke O. BankoleTo run this problem, first generate a mesh:
732d310b3d3SAdeleke O. Bankole
733d310b3d3SAdeleke O. Bankole```console
734d310b3d3SAdeleke O. Bankole$ make -C examples/fluids/meshes
735d310b3d3SAdeleke O. Bankole```
736d310b3d3SAdeleke O. Bankole
737d310b3d3SAdeleke O. BankoleThen run by building the executable and running:
738d310b3d3SAdeleke O. Bankole
739d310b3d3SAdeleke O. Bankole```console
740d310b3d3SAdeleke O. Bankole$ make build/fluids-navierstokes
741d310b3d3SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file vortexshedding.yaml
742d310b3d3SAdeleke O. Bankole```
743d310b3d3SAdeleke O. Bankole
744d310b3d3SAdeleke O. BankoleThe vortex shedding period is roughly 6 and this problem runs until time 100 (2000 time steps).
745d310b3d3SAdeleke O. Bankole
746d310b3d3SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml
747d310b3d3SAdeleke O. Bankole:language: yaml
748d310b3d3SAdeleke O. Bankole```
749d310b3d3SAdeleke O. Bankole
750019b7682STimothy Aiken#### Density current
751019b7682STimothy Aiken
752061ff11eSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
75388626eedSJames Wright
75488626eedSJames Wright:::{list-table} Density Current Runtime Options
75588626eedSJames Wright:header-rows: 1
75688626eedSJames Wright
75788626eedSJames Wright* - Option
75888626eedSJames Wright  - Description
75988626eedSJames Wright  - Default value
76088626eedSJames Wright  - Unit
76188626eedSJames Wright
76288626eedSJames Wright* - `-center`
76388626eedSJames Wright  - Location of bubble center
76488626eedSJames Wright  - `(lx,ly,lz)/2`
76588626eedSJames Wright  - `(m,m,m)`
76688626eedSJames Wright
76788626eedSJames Wright* - `-dc_axis`
76888626eedSJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
76988626eedSJames Wright  - `(0,0,0)`
77088626eedSJames Wright  -
77188626eedSJames Wright
77288626eedSJames Wright* - `-rc`
77388626eedSJames Wright  - Characteristic radius of thermal bubble
77488626eedSJames Wright  - `1000`
77588626eedSJames Wright  - `m`
77688626eedSJames Wright
77788626eedSJames Wright* - `-theta0`
77888626eedSJames Wright  - Reference potential temperature
77988626eedSJames Wright  - `300`
78088626eedSJames Wright  - `K`
78188626eedSJames Wright
78288626eedSJames Wright* - `-thetaC`
78388626eedSJames Wright  - Perturbation of potential temperature
78488626eedSJames Wright  - `-15`
78588626eedSJames Wright  - `K`
78688626eedSJames Wright
78788626eedSJames Wright* - `-P0`
78888626eedSJames Wright  - Atmospheric pressure
78988626eedSJames Wright  - `1E5`
79088626eedSJames Wright  - `Pa`
79188626eedSJames Wright
79288626eedSJames Wright* - `-N`
79388626eedSJames Wright  - Brunt-Vaisala frequency
79488626eedSJames Wright  - `0.01`
79588626eedSJames Wright  - `1/s`
79688626eedSJames Wright:::
79788626eedSJames Wright
798bc7bbd5dSLeila GhaffariThis problem can be run with:
799ccaff030SJeremy L Thompson
800bc7bbd5dSLeila Ghaffari```
80188626eedSJames 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
80288626eedSJames Wright```
80388626eedSJames Wright
804019b7682STimothy Aiken#### Channel flow
805019b7682STimothy Aiken
806061ff11eSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
80788626eedSJames Wright
80888626eedSJames Wright:::{list-table} Channel Runtime Options
80988626eedSJames Wright:header-rows: 1
81088626eedSJames Wright
81188626eedSJames Wright* - Option
81288626eedSJames Wright  - Description
81388626eedSJames Wright  - Default value
81488626eedSJames Wright  - Unit
81588626eedSJames Wright
81688626eedSJames Wright* - `-umax`
81788626eedSJames Wright  - Maximum/centerline velocity of the flow
81888626eedSJames Wright  - `10`
81988626eedSJames Wright  - `m/s`
82088626eedSJames Wright
82188626eedSJames Wright* - `-theta0`
82288626eedSJames Wright  - Reference potential temperature
82388626eedSJames Wright  - `300`
82488626eedSJames Wright  - `K`
82588626eedSJames Wright
82688626eedSJames Wright* - `-P0`
82788626eedSJames Wright  - Atmospheric pressure
82888626eedSJames Wright  - `1E5`
82988626eedSJames Wright  - `Pa`
830a1df05f8SJed Brown
831a1df05f8SJed Brown* - `-body_force_scale`
832a1df05f8SJed Brown  - Multiplier for body force (`-1` for flow reversal)
833a1df05f8SJed Brown  - 1
834a1df05f8SJed Brown  -
83588626eedSJames Wright:::
83688626eedSJames Wright
83788626eedSJames WrightThis problem can be run with the `channel.yaml` file via:
83888626eedSJames Wright
83988626eedSJames Wright```
84088626eedSJames Wright./navierstokes -options_file channel.yaml
84188626eedSJames Wright```
84288626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
84388626eedSJames Wright:language: yaml
84488626eedSJames Wright```
84588626eedSJames Wright
8468a94a473SJed Brown(example-blasius)=
8478a94a473SJed Brown
848019b7682STimothy Aiken#### Blasius boundary layer
849019b7682STimothy Aiken
850061ff11eSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
85188626eedSJames Wright
85288626eedSJames Wright:::{list-table} Blasius Runtime Options
85388626eedSJames Wright:header-rows: 1
85488626eedSJames Wright
85588626eedSJames Wright* - Option
85688626eedSJames Wright  - Description
85788626eedSJames Wright  - Default value
85888626eedSJames Wright  - Unit
85988626eedSJames Wright
860fb455ff0SLeila Ghaffari* - `-velocity_infinity`
86188626eedSJames Wright  - Freestream velocity
86288626eedSJames Wright  - `40`
86388626eedSJames Wright  - `m/s`
86488626eedSJames Wright
865fb455ff0SLeila Ghaffari* - `-temperature_infinity`
866fb455ff0SLeila Ghaffari  - Freestream temperature
86788626eedSJames Wright  - `288`
86888626eedSJames Wright  - `K`
86988626eedSJames Wright
870fb455ff0SLeila Ghaffari* - `-temperature_wall`
871fb455ff0SLeila Ghaffari  - Wall temperature
87207d14e58SLeila Ghaffari  - `288`
873fb455ff0SLeila Ghaffari  - `K`
874fb455ff0SLeila Ghaffari
875fb455ff0SLeila Ghaffari* - `-delta0`
876fb455ff0SLeila Ghaffari  - Boundary layer height at the inflow
877fb455ff0SLeila Ghaffari  - `4.2e-3`
878fb455ff0SLeila Ghaffari  - `m`
879fb455ff0SLeila Ghaffari
88088626eedSJames Wright* - `-P0`
88188626eedSJames Wright  - Atmospheric pressure
88288626eedSJames Wright  - `1.01E5`
88388626eedSJames Wright  - `Pa`
88488626eedSJames Wright
88591eaef80SJames Wright* - `-platemesh_refine_height`
88691eaef80SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
88788626eedSJames Wright  - `5.9E-4`
88888626eedSJames Wright  - `m`
88988626eedSJames Wright
89091eaef80SJames Wright* - `-platemesh_Ndelta`
89191eaef80SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
89288626eedSJames Wright  - `45`
89388626eedSJames Wright  -
89488626eedSJames Wright
89591eaef80SJames Wright* - `-platemesh_growth`
89688626eedSJames Wright  - Growth rate of the elements in the refinement region
89788626eedSJames Wright  - `1.08`
89888626eedSJames Wright  -
89988626eedSJames Wright
90091eaef80SJames Wright* - `-platemesh_top_angle`
90188626eedSJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
90288626eedSJames Wright  - `5`
90388626eedSJames Wright  - `degrees`
904ba6664aeSJames Wright
905ba6664aeSJames Wright* - `-stg_use`
906ba6664aeSJames Wright  - Whether to use stg for the inflow conditions
907ba6664aeSJames Wright  - `false`
908ba6664aeSJames Wright  -
90991eaef80SJames Wright
91091eaef80SJames Wright* - `-platemesh_y_node_locs_path`
91191eaef80SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
91291eaef80SJames Wright  - `""`
91391eaef80SJames Wright  -
914fb455ff0SLeila Ghaffari
91507d14e58SLeila Ghaffari* - `-n_chebyshev`
916fb455ff0SLeila Ghaffari  - Number of Chebyshev terms
917fb455ff0SLeila Ghaffari  - `20`
918fb455ff0SLeila Ghaffari  -
919fb455ff0SLeila Ghaffari
92007d14e58SLeila Ghaffari* - `-chebyshev_`
92107d14e58SLeila Ghaffari  - Prefix for Chebyshev snes solve
92207d14e58SLeila Ghaffari  -
92307d14e58SLeila Ghaffari  -
92407d14e58SLeila Ghaffari
92588626eedSJames Wright:::
92688626eedSJames Wright
92788626eedSJames WrightThis problem can be run with the `blasius.yaml` file via:
92888626eedSJames Wright
92988626eedSJames Wright```
93088626eedSJames Wright./navierstokes -options_file blasius.yaml
93188626eedSJames Wright```
93288626eedSJames Wright
93388626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
93488626eedSJames Wright:language: yaml
935bc7bbd5dSLeila Ghaffari```
936ba6664aeSJames Wright
937ba6664aeSJames Wright#### STG Inflow for Flat Plate
938ba6664aeSJames Wright
93917be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
940ba6664aeSJames Wright
941ba6664aeSJames Wright:::{list-table} Blasius Runtime Options
942ba6664aeSJames Wright:header-rows: 1
943ba6664aeSJames Wright
944ba6664aeSJames Wright* - Option
945ba6664aeSJames Wright  - Description
946ba6664aeSJames Wright  - Default value
947ba6664aeSJames Wright  - Unit
948ba6664aeSJames Wright
949ba6664aeSJames Wright* - `-stg_inflow_path`
950ba6664aeSJames Wright  - Path to the STGInflow file
951ba6664aeSJames Wright  - `./STGInflow.dat`
952ba6664aeSJames Wright  -
953ba6664aeSJames Wright
954ba6664aeSJames Wright* - `-stg_rand_path`
955ba6664aeSJames Wright  - Path to the STGRand file
956ba6664aeSJames Wright  - `./STGRand.dat`
957ba6664aeSJames Wright  -
958ba6664aeSJames Wright
959ba6664aeSJames Wright* - `-stg_alpha`
960ba6664aeSJames Wright  - Growth rate of the wavemodes
961ba6664aeSJames Wright  - `1.01`
962ba6664aeSJames Wright  -
963ba6664aeSJames Wright
964ba6664aeSJames Wright* - `-stg_u0`
965ba6664aeSJames Wright  - Convective velocity, $U_0$
966ba6664aeSJames Wright  - `0.0`
967ba6664aeSJames Wright  - `m/s`
968ba6664aeSJames Wright
969ba6664aeSJames Wright* - `-stg_mean_only`
970ba6664aeSJames Wright  - Only impose the mean velocity (no fluctutations)
971ba6664aeSJames Wright  - `false`
972ba6664aeSJames Wright  -
973ba6664aeSJames Wright
97430af3636SJames Wright* - `-stg_strong`
97530af3636SJames Wright  - Strongly enforce the STG inflow boundary condition
97630af3636SJames Wright  - `false`
97730af3636SJames Wright  -
97830af3636SJames Wright
97989060322SJames Wright* - `-stg_fluctuating_IC`
98089060322SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
98189060322SJames Wright  - `false`
98289060322SJames Wright  -
98389060322SJames Wright
984ba6664aeSJames Wright:::
985ba6664aeSJames Wright
986ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via:
987ba6664aeSJames Wright
988ba6664aeSJames Wright```
989ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true
990ba6664aeSJames Wright```
991ba6664aeSJames Wright
99217be3a41SJeremy L ThompsonNote the added `-stg_use true` flag
99317be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
994