xref: /libCEED/examples/fluids/README.md (revision 9e529ead89a7f3a5d5c7dfd6c41dbcfe491e749c)
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
113b219b86SJames Wright## Build instructions
123b219b86SJames Wright
13bc7bbd5dSLeila GhaffariBuild by using:
14ccaff030SJeremy L Thompson
15ccaff030SJeremy L Thompson`make`
16ccaff030SJeremy L Thompson
17bc7bbd5dSLeila Ghaffariand run with:
18ccaff030SJeremy L Thompson
19bc7bbd5dSLeila Ghaffari```
20bc7bbd5dSLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree]
21bc7bbd5dSLeila Ghaffari```
22ccaff030SJeremy L Thompson
233b219b86SJames WrightIf you want to do *in situ* machine-learning training, specify `SMARTREDIS_DIR` in the make command like:
243b219b86SJames Wright
253b219b86SJames Wright```
263b219b86SJames Wrightmake SMARTREDIS_DIR=~/software/smartredis/install
273b219b86SJames Wright```
283b219b86SJames Wright
29bc7bbd5dSLeila Ghaffari## Runtime options
30ccaff030SJeremy L Thompson
31bc7bbd5dSLeila Ghaffari% inclusion-fluids-marker
32ccaff030SJeremy L Thompson
33bc7bbd5dSLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options.
34bc7bbd5dSLeila GhaffariThe following options are common among all problem types:
35ccaff030SJeremy L Thompson
36bc7bbd5dSLeila Ghaffari:::{list-table} Common Runtime Options
37bc7bbd5dSLeila Ghaffari:header-rows: 1
38ccaff030SJeremy L Thompson
39bc7bbd5dSLeila Ghaffari* - Option
40bc7bbd5dSLeila Ghaffari  - Description
41bc7bbd5dSLeila Ghaffari  - Default value
42ccaff030SJeremy L Thompson
43bc7bbd5dSLeila Ghaffari* - `-ceed`
44bc7bbd5dSLeila Ghaffari  - CEED resource specifier
45bc7bbd5dSLeila Ghaffari  - `/cpu/self/opt/blocked`
46ccaff030SJeremy L Thompson
473866774cSJames Wright* - `-test_type`
483866774cSJames Wright  - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified
493866774cSJames Wright  - `none`
50ccaff030SJeremy L Thompson
51bc7bbd5dSLeila Ghaffari* - `-compare_final_state_atol`
52bc7bbd5dSLeila Ghaffari  - Test absolute tolerance
53bc7bbd5dSLeila Ghaffari  - `1E-11`
54ccaff030SJeremy L Thompson
55bc7bbd5dSLeila Ghaffari* - `-compare_final_state_filename`
56bc7bbd5dSLeila Ghaffari  - Test filename
57bc7bbd5dSLeila Ghaffari  -
58ccaff030SJeremy L Thompson
59bc7bbd5dSLeila Ghaffari* - `-problem`
60*9e529eadSJames Wright  - Problem to solve (`advection`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`)
61bc7bbd5dSLeila Ghaffari  - `density_current`
62ccaff030SJeremy L Thompson
63bc7bbd5dSLeila Ghaffari* - `-implicit`
649e576805SJames Wright  - Use implicit time integrator formulation
65bc7bbd5dSLeila Ghaffari  -
66ccaff030SJeremy L Thompson
67bc7bbd5dSLeila Ghaffari* - `-degree`
68bc7bbd5dSLeila Ghaffari  - Polynomial degree of tensor product basis (must be >= 1)
69bc7bbd5dSLeila Ghaffari  - `1`
70ccaff030SJeremy L Thompson
712288fb52SJeremy L Thompson* - `-q_extra`
72bc7bbd5dSLeila Ghaffari  - Number of extra quadrature points
73fc14f3f6SLeila Ghaffari  - `0`
74ccaff030SJeremy L Thompson
7537cbb16aSJed Brown* - `-ts_monitor_solution`
7637cbb16aSJed Brown  - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
7737cbb16aSJed Brown  -
78ccaff030SJeremy L Thompson
7937cbb16aSJed Brown* - `-ts_monitor_solution_interval`
8037cbb16aSJed Brown  - Number of time steps between visualization output frames.
8137cbb16aSJed Brown  - `1`
8237cbb16aSJed Brown
8337cbb16aSJed Brown* - `-viewer_cgns_batch_size`
8437cbb16aSJed Brown  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
8537cbb16aSJed Brown  - `20`
8637cbb16aSJed Brown
8737cbb16aSJed Brown* - `-checkpoint_interval`
8837cbb16aSJed Brown  - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only
89bc7bbd5dSLeila Ghaffari  - `10`
90ccaff030SJeremy L Thompson
9137cbb16aSJed Brown* - `-checkpoint_vtk`
9237cbb16aSJed Brown  - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead.
9337cbb16aSJed Brown  - `false`
9437cbb16aSJed Brown
9537cbb16aSJed Brown* - `-viz_refine`
9637cbb16aSJed Brown  - Use regular refinement for VTK visualization
9737cbb16aSJed Brown  - `0`
9837cbb16aSJed Brown
99bc7bbd5dSLeila Ghaffari* - `-output_dir`
10037cbb16aSJed Brown  - Output directory for binary checkpoints and VTK files (if enabled).
101bc7bbd5dSLeila Ghaffari  - `.`
102ccaff030SJeremy L Thompson
10369293791SJames Wright* - `-output_add_stepnum2bin`
10469293791SJames Wright  - Whether to add step numbers to output binary files
10569293791SJames Wright  - `false`
10669293791SJames Wright
10769293791SJames Wright* - `-continue`
10869293791SJames Wright  - Continue from previous solution (input is step number of previous solution)
10969293791SJames Wright  - `0`
11069293791SJames Wright
11169293791SJames Wright* - `-continue_filename`
11269293791SJames Wright  - Path to solution binary file from which to continue from
11369293791SJames Wright  - `[output_dir]/ns-solution.bin`
11469293791SJames Wright
11569293791SJames Wright* - `-continue_time_filename`
1164de8550aSJed Brown  - Path to time stamp binary file (only for legacy checkpoints)
11769293791SJames Wright  - `[output_dir]/ns-time.bin`
11869293791SJames Wright
1194534a52eSLeila Ghaffari* - `-bc_wall`
1204534a52eSLeila Ghaffari  - Use wall boundary conditions on this list of faces
1214534a52eSLeila Ghaffari  -
1224534a52eSLeila Ghaffari
1234534a52eSLeila Ghaffari* - `-wall_comps`
1244534a52eSLeila Ghaffari  - An array of constrained component numbers for wall BCs
1254534a52eSLeila Ghaffari  -
1264534a52eSLeila Ghaffari
1274534a52eSLeila Ghaffari* - `-bc_slip_x`
1284534a52eSLeila Ghaffari  - Use slip boundary conditions, for the x component, on this list of faces
1294534a52eSLeila Ghaffari  -
1304534a52eSLeila Ghaffari
1314534a52eSLeila Ghaffari* - `-bc_slip_y`
1324534a52eSLeila Ghaffari  - Use slip boundary conditions, for the y component, on this list of faces
1334534a52eSLeila Ghaffari  -
1344534a52eSLeila Ghaffari
1354534a52eSLeila Ghaffari* - `-bc_slip_z`
1364534a52eSLeila Ghaffari  - Use slip boundary conditions, for the z component, on this list of faces
1374534a52eSLeila Ghaffari  -
1384534a52eSLeila Ghaffari
1394534a52eSLeila Ghaffari* - `-bc_inflow`
1404534a52eSLeila Ghaffari  - Use inflow boundary conditions on this list of faces
1414534a52eSLeila Ghaffari  -
1424534a52eSLeila Ghaffari
1434534a52eSLeila Ghaffari* - `-bc_outflow`
1444534a52eSLeila Ghaffari  - Use outflow boundary conditions on this list of faces
1454534a52eSLeila Ghaffari  -
14689d0f5c0SLeila Ghaffari
1477ec884f8SJames Wright* - `-bc_freestream`
1487ec884f8SJames Wright  - Use freestream boundary conditions on this list of faces
1497ec884f8SJames Wright  -
1507ec884f8SJames Wright
151b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval`
152ee3de563SJames Wright  - Number of timesteps between statistics collection
153ee3de563SJames Wright  - `1`
154ee3de563SJames Wright
155b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer`
156b7d66439SJames 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.
1578ed52730SJames Wright  -
1588ed52730SJames Wright
159b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval`
160ee3de563SJames Wright  - Number of timesteps between statistics file writing (`-1` means only at end of run)
161ee3de563SJames Wright  - `-1`
162ee3de563SJames Wright
163b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size`
1648ed52730SJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
1658ed52730SJames Wright  - `20`
1668ed52730SJames Wright
167ca69d878SAdeleke O. Bankole* - `-ts_monitor_wall_force`
168ca69d878SAdeleke O. Bankole  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
169ca69d878SAdeleke O. Bankole  -
170ca69d878SAdeleke O. Bankole
1712526956eSJames Wright* - `-mesh_transform`
1722526956eSJames Wright  - Transform the mesh, usually for an initial box mesh.
1732526956eSJames Wright  - `none`
1742526956eSJames Wright
175bc7bbd5dSLeila Ghaffari* - `-snes_view`
176bc7bbd5dSLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
177bc7bbd5dSLeila Ghaffari  -
17889d0f5c0SLeila Ghaffari
179bc7bbd5dSLeila Ghaffari* - `-log_view`
180bc7bbd5dSLeila Ghaffari  - View PETSc performance log
181bc7bbd5dSLeila Ghaffari  -
182ccaff030SJeremy L Thompson
183bc7bbd5dSLeila Ghaffari* - `-help`
184bc7bbd5dSLeila Ghaffari  - View comprehensive information about run-time options
185bc7bbd5dSLeila Ghaffari  -
186bc7bbd5dSLeila Ghaffari:::
187ccaff030SJeremy L Thompson
1887ec884f8SJames 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:
1894534a52eSLeila Ghaffari
19088626eedSJames Wright:::{list-table} 2D Face ID Labels
19188626eedSJames Wright:header-rows: 1
19288626eedSJames Wright* - PETSc Face Name
19388626eedSJames Wright  - Cartesian direction
19488626eedSJames Wright  - Face ID
19588626eedSJames Wright
19688626eedSJames Wright* - faceMarkerBottom
19788626eedSJames Wright  - -z
19888626eedSJames Wright  - 1
19988626eedSJames Wright
20088626eedSJames Wright* - faceMarkerRight
20188626eedSJames Wright  - +x
20288626eedSJames Wright  - 2
20388626eedSJames Wright
20488626eedSJames Wright* - faceMarkerTop
20588626eedSJames Wright  - +z
20688626eedSJames Wright  - 3
20788626eedSJames Wright
20888626eedSJames Wright* - faceMarkerLeft
20988626eedSJames Wright  - -x
21088626eedSJames Wright  - 4
21188626eedSJames Wright:::
21288626eedSJames Wright
213b5e826a6SLeila Ghaffari:::{list-table} 3D Face ID Labels
21488626eedSJames Wright:header-rows: 1
21588626eedSJames Wright* - PETSc Face Name
21688626eedSJames Wright  - Cartesian direction
21788626eedSJames Wright  - Face ID
21888626eedSJames Wright
21988626eedSJames Wright* - faceMarkerBottom
22088626eedSJames Wright  - -z
22188626eedSJames Wright  - 1
22288626eedSJames Wright
22388626eedSJames Wright* - faceMarkerTop
22488626eedSJames Wright  - +z
22588626eedSJames Wright  - 2
22688626eedSJames Wright
22788626eedSJames Wright* - faceMarkerFront
22888626eedSJames Wright  - -y
22988626eedSJames Wright  - 3
23088626eedSJames Wright
23188626eedSJames Wright* - faceMarkerBack
23288626eedSJames Wright  - +y
23388626eedSJames Wright  - 4
23488626eedSJames Wright
23588626eedSJames Wright* - faceMarkerRight
23688626eedSJames Wright  - +x
23788626eedSJames Wright  - 5
23888626eedSJames Wright
23988626eedSJames Wright* - faceMarkerLeft
24088626eedSJames Wright  - -x
24188626eedSJames Wright  - 6
24288626eedSJames Wright:::
2434534a52eSLeila Ghaffari
2448a94a473SJed Brown### Boundary conditions
2458a94a473SJed Brown
2463b219b86SJames WrightBoundary conditions for compressible viscous flows are notoriously tricky.
2473b219b86SJames WrightHere we offer some recommendations.
2488a94a473SJed Brown
2498a94a473SJed Brown#### Inflow
2508a94a473SJed Brown
2518a94a473SJed 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).
2528a94a473SJed BrownIt is stable and the least reflective boundary condition for acoustics.
2538a94a473SJed Brown
2548a94a473SJed BrownIf near a viscous wall, you may want a specified inflow profile.
2558a94a473SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
2568a94a473SJed 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.
2578a94a473SJed BrownThe strong approach gives sharper resolution of velocity structures.
2588a94a473SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
2598a94a473SJed Brown
260f3f66076SJames Wright#### Outflow
2618a94a473SJed Brown
2628a94a473SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
2638a94a473SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
2648a94a473SJed 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.
2658a94a473SJed Brown
2668a94a473SJed 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.
2678a94a473SJed Brown
2688a94a473SJed 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).
2698a94a473SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
2708a94a473SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
2718a94a473SJed Brown
272f3f66076SJames Wright#### Periodicity
2738a94a473SJed Brown
2748a94a473SJed BrownPETSc provides two ways to specify periodicity:
2758a94a473SJed Brown
2768a94a473SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
2778a94a473SJed Brown
2788a94a473SJed Brown```yaml
2798a94a473SJed Browndm_plex:
2808a94a473SJed Brown  shape: box
2818a94a473SJed Brown  box_faces: 10,12,4
2828a94a473SJed Brown  box_bd: none,none,periodic
2838a94a473SJed Brown```
2848a94a473SJed Brown
285ca69d878SAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
286ca69d878SAdeleke 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.
287ca69d878SAdeleke O. Bankole
288ca69d878SAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
289ca69d878SAdeleke O. Bankole
290ca69d878SAdeleke O. Bankole```yaml
291ca69d878SAdeleke O. Bankoledm_plex:
292ca69d878SAdeleke O. Bankole  shape: zbox
293ca69d878SAdeleke O. Bankole  box_faces: 10,12,4
294ca69d878SAdeleke O. Bankole  box_bd: none,none,periodic
295ca69d878SAdeleke O. Bankole```
296ca69d878SAdeleke O. Bankole
297ca69d878SAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use.
298ca69d878SAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity.
299ca69d878SAdeleke 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.
3008a94a473SJed Brown
301019b7682STimothy Aiken### Advection
302019b7682STimothy Aiken
30317be3a41SJeremy 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$.
304*9e529eadSJames WrightThe advection problems can be run in both 2D and 3D, based on the DM defined for the problem.
30594a05c6fSJames WrightThe following additional command-line options are available:
306019b7682STimothy Aiken
30794a05c6fSJames Wright:::{list-table} Advection Runtime Options
308bc7bbd5dSLeila Ghaffari:header-rows: 1
309e43605a5SLeila Ghaffari
310bc7bbd5dSLeila Ghaffari* - Option
311bc7bbd5dSLeila Ghaffari  - Description
312bc7bbd5dSLeila Ghaffari  - Default value
313bc7bbd5dSLeila Ghaffari  - Unit
314e43605a5SLeila Ghaffari
315bc7bbd5dSLeila Ghaffari* - `-rc`
316bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
317bc7bbd5dSLeila Ghaffari  - `1000`
318bc7bbd5dSLeila Ghaffari  - `m`
319e43605a5SLeila Ghaffari
320bc7bbd5dSLeila Ghaffari* - `-units_meter`
321bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
322bc7bbd5dSLeila Ghaffari  - `1E-2`
323bc7bbd5dSLeila Ghaffari  -
324e43605a5SLeila Ghaffari
325bc7bbd5dSLeila Ghaffari* - `-units_second`
326bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
327bc7bbd5dSLeila Ghaffari  - `1E-2`
328bc7bbd5dSLeila Ghaffari  -
329e43605a5SLeila Ghaffari
330bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
331bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
332bc7bbd5dSLeila Ghaffari  - `1E-6`
333bc7bbd5dSLeila Ghaffari  -
334e43605a5SLeila Ghaffari
335bc7bbd5dSLeila Ghaffari* - `-strong_form`
336bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
337bc7bbd5dSLeila Ghaffari  - `0`
338bc7bbd5dSLeila Ghaffari  -
339e43605a5SLeila Ghaffari
340bc7bbd5dSLeila Ghaffari* - `-stab`
341bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
342bc7bbd5dSLeila Ghaffari  - `none`
343bc7bbd5dSLeila Ghaffari  -
344e43605a5SLeila Ghaffari
345bc7bbd5dSLeila Ghaffari* - `-CtauS`
346bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
347bc7bbd5dSLeila Ghaffari  - `0`
348bc7bbd5dSLeila Ghaffari  -
349e43605a5SLeila Ghaffari
350bc7bbd5dSLeila Ghaffari* - `-wind_type`
351bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
352bc7bbd5dSLeila Ghaffari  - `rotation`
353bc7bbd5dSLeila Ghaffari  -
354e43605a5SLeila Ghaffari
355bc7bbd5dSLeila Ghaffari* - `-wind_translation`
356bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
357bc7bbd5dSLeila Ghaffari  - `1,0,0`
358bc7bbd5dSLeila Ghaffari  -
359e43605a5SLeila Ghaffari
360bc7bbd5dSLeila Ghaffari* - `-E_wind`
361bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
362bc7bbd5dSLeila Ghaffari  - `1E6`
363bc7bbd5dSLeila Ghaffari  - `J`
364e43605a5SLeila Ghaffari
3657b77ddfdSJames Wright* - `-advection_ic_type`
3667b77ddfdSJames Wright  - Initial condition type, from `sphere`, `cylinder`, `cosine_hill`, and `skew`
367f3f66076SJames Wright  - `sphere`
368bc7bbd5dSLeila Ghaffari  -
369e43605a5SLeila Ghaffari
370bc7bbd5dSLeila Ghaffari* - `-bubble_continuity`
371*9e529eadSJames Wright  - Different shapes for `sphere` and `cylinder` initial conditions, from `smooth`, `back_sharp`, `thick`, or `cosine`
372bc7bbd5dSLeila Ghaffari  - `smooth`
373bc7bbd5dSLeila Ghaffari  -
374bc7bbd5dSLeila Ghaffari:::
375ccaff030SJeremy L Thompson
37694a05c6fSJames WrightFor 3D advection, an example of the `rotation` mode can be run with:
377ccaff030SJeremy L Thompson
378bc7bbd5dSLeila Ghaffari```
3794534a52eSLeila 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
380bc7bbd5dSLeila Ghaffari```
381ccaff030SJeremy L Thompson
382bc7bbd5dSLeila Ghaffariand the `translation` mode with:
383ccaff030SJeremy L Thompson
384bc7bbd5dSLeila Ghaffari```
3854534a52eSLeila 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
386bc7bbd5dSLeila Ghaffari```
387ccaff030SJeremy L Thompson
38894a05c6fSJames WrightFor 2D advection, an example of the `rotation` mode can be run with:
38994a05c6fSJames Wright
39094a05c6fSJames Wright```
391*9e529eadSJames 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
39294a05c6fSJames Wright```
39394a05c6fSJames Wright
39494a05c6fSJames Wrightand the `translation` mode with:
39594a05c6fSJames Wright
39694a05c6fSJames Wright```
397*9e529eadSJames 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
39894a05c6fSJames Wright```
39994a05c6fSJames WrightNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
40094a05c6fSJames Wright
401019b7682STimothy Aiken### Inviscid Ideal Gas
402019b7682STimothy Aiken
403019b7682STimothy Aiken#### Isentropic Euler vortex
404019b7682STimothy Aiken
405bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
406ccaff030SJeremy L Thompson
407bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
408bc7bbd5dSLeila Ghaffari:header-rows: 1
409ccaff030SJeremy L Thompson
410bc7bbd5dSLeila Ghaffari* - Option
411bc7bbd5dSLeila Ghaffari  - Description
412bc7bbd5dSLeila Ghaffari  - Default value
413bc7bbd5dSLeila Ghaffari  - Unit
414ccaff030SJeremy L Thompson
415bc7bbd5dSLeila Ghaffari* - `-center`
416bc7bbd5dSLeila Ghaffari  - Location of vortex center
417bc7bbd5dSLeila Ghaffari  - `(lx,ly,lz)/2`
418bc7bbd5dSLeila Ghaffari  - `(m,m,m)`
419ccaff030SJeremy L Thompson
420bc7bbd5dSLeila Ghaffari* - `-units_meter`
421bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
422bc7bbd5dSLeila Ghaffari  - `1E-2`
423bc7bbd5dSLeila Ghaffari  -
424ccaff030SJeremy L Thompson
425bc7bbd5dSLeila Ghaffari* - `-units_second`
426bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
427bc7bbd5dSLeila Ghaffari  - `1E-2`
428bc7bbd5dSLeila Ghaffari  -
429ccaff030SJeremy L Thompson
430bc7bbd5dSLeila Ghaffari* - `-mean_velocity`
431bc7bbd5dSLeila Ghaffari  - Background velocity vector
432bc7bbd5dSLeila Ghaffari  - `(1,1,0)`
433bc7bbd5dSLeila Ghaffari  -
434ccaff030SJeremy L Thompson
435bc7bbd5dSLeila Ghaffari* - `-vortex_strength`
436bc7bbd5dSLeila Ghaffari  - Strength of vortex < 10
437bc7bbd5dSLeila Ghaffari  - `5`
438bc7bbd5dSLeila Ghaffari  -
439932417b3SJed Brown
440932417b3SJed Brown* - `-c_tau`
441932417b3SJed Brown  - Stabilization constant
442504dc8e0SLeila Ghaffari  - `0.5`
443932417b3SJed Brown  -
444bc7bbd5dSLeila Ghaffari:::
445ccaff030SJeremy L Thompson
446bc7bbd5dSLeila GhaffariThis problem can be run with:
447ccaff030SJeremy L Thompson
448bc7bbd5dSLeila Ghaffari```
4494534a52eSLeila 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.
450bc7bbd5dSLeila Ghaffari```
451ccaff030SJeremy L Thompson
452019b7682STimothy Aiken#### Sod shock tube
453019b7682STimothy Aiken
454019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
455019b7682STimothy Aiken
456019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options
457019b7682STimothy Aiken:header-rows: 1
458019b7682STimothy Aiken
459019b7682STimothy Aiken* - Option
460019b7682STimothy Aiken  - Description
461019b7682STimothy Aiken  - Default value
462019b7682STimothy Aiken  - Unit
463019b7682STimothy Aiken
464019b7682STimothy Aiken* - `-units_meter`
465019b7682STimothy Aiken  - 1 meter in scaled length units
466019b7682STimothy Aiken  - `1E-2`
467019b7682STimothy Aiken  -
468019b7682STimothy Aiken
469019b7682STimothy Aiken* - `-units_second`
470019b7682STimothy Aiken  - 1 second in scaled time units
471019b7682STimothy Aiken  - `1E-2`
472019b7682STimothy Aiken  -
473019b7682STimothy Aiken
474019b7682STimothy Aiken* - `-yzb`
475019b7682STimothy Aiken  - Use YZB discontinuity capturing
476019b7682STimothy Aiken  - `none`
477019b7682STimothy Aiken  -
478019b7682STimothy Aiken
479019b7682STimothy Aiken* - `-stab`
480019b7682STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
481019b7682STimothy Aiken  - `none`
482019b7682STimothy Aiken  -
483019b7682STimothy Aiken:::
484019b7682STimothy Aiken
485019b7682STimothy AikenThis problem can be run with:
486019b7682STimothy Aiken
487019b7682STimothy Aiken```
488019b7682STimothy 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
489019b7682STimothy Aiken```
490019b7682STimothy Aiken
491019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas
492019b7682STimothy Aiken
49388626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
494ccaff030SJeremy L Thompson
49588626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
496bc7bbd5dSLeila Ghaffari:header-rows: 1
497ccaff030SJeremy L Thompson
498bc7bbd5dSLeila Ghaffari* - Option
499bc7bbd5dSLeila Ghaffari  - Description
500bc7bbd5dSLeila Ghaffari  - Default value
501bc7bbd5dSLeila Ghaffari  - Unit
502ccaff030SJeremy L Thompson
503bc7bbd5dSLeila Ghaffari* - `-units_meter`
504bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
50588626eedSJames Wright  - `1`
506bc7bbd5dSLeila Ghaffari  -
507ccaff030SJeremy L Thompson
508bc7bbd5dSLeila Ghaffari* - `-units_second`
509bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
51088626eedSJames Wright  - `1`
511bc7bbd5dSLeila Ghaffari  -
512ccaff030SJeremy L Thompson
513bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
514bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
51588626eedSJames Wright  - `1`
516bc7bbd5dSLeila Ghaffari  -
517ccaff030SJeremy L Thompson
518bc7bbd5dSLeila Ghaffari* - `-units_Kelvin`
519bc7bbd5dSLeila Ghaffari  - 1 Kelvin in scaled temperature units
520bc7bbd5dSLeila Ghaffari  - `1`
521bc7bbd5dSLeila Ghaffari  -
522ccaff030SJeremy L Thompson
523bc7bbd5dSLeila Ghaffari* - `-stab`
524bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
525bc7bbd5dSLeila Ghaffari  - `none`
526bc7bbd5dSLeila Ghaffari  -
527ccaff030SJeremy L Thompson
528932417b3SJed Brown* - `-c_tau`
52988626eedSJames Wright  - Stabilization constant, $c_\tau$
530504dc8e0SLeila Ghaffari  - `0.5`
531932417b3SJed Brown  -
532932417b3SJed Brown
53388626eedSJames Wright* - `-Ctau_t`
53488626eedSJames Wright  - Stabilization time constant, $C_t$
53588626eedSJames Wright  - `1.0`
53688626eedSJames Wright  -
537ccaff030SJeremy L Thompson
53888626eedSJames Wright* - `-Ctau_v`
53988626eedSJames Wright  - Stabilization viscous constant, $C_v$
54094c01735SLeila Ghaffari  - `36, 60, 128 for degree = 1, 2, 3`
54188626eedSJames Wright  -
542ccaff030SJeremy L Thompson
54388626eedSJames Wright* - `-Ctau_C`
54488626eedSJames Wright  - Stabilization continuity constant, $C_c$
54588626eedSJames Wright  - `1.0`
54688626eedSJames Wright  -
547ccaff030SJeremy L Thompson
54888626eedSJames Wright* - `-Ctau_M`
54988626eedSJames Wright  - Stabilization momentum constant, $C_m$
55088626eedSJames Wright  - `1.0`
55188626eedSJames Wright  -
55288626eedSJames Wright
55388626eedSJames Wright* - `-Ctau_E`
55488626eedSJames Wright  - Stabilization energy constant, $C_E$
55588626eedSJames Wright  - `1.0`
55688626eedSJames Wright  -
557ccaff030SJeremy L Thompson
558bc7bbd5dSLeila Ghaffari* - `-cv`
559bc7bbd5dSLeila Ghaffari  - Heat capacity at constant volume
560bc7bbd5dSLeila Ghaffari  - `717`
561bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
562ccaff030SJeremy L Thompson
563bc7bbd5dSLeila Ghaffari* - `-cp`
564bc7bbd5dSLeila Ghaffari  - Heat capacity at constant pressure
565bc7bbd5dSLeila Ghaffari  - `1004`
566bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
567ccaff030SJeremy L Thompson
568a2726bdbSJames Wright* - `-gravity`
569a2726bdbSJames Wright  - Gravitational acceleration vector
570a2726bdbSJames Wright  - `0,0,0`
571bc7bbd5dSLeila Ghaffari  - `m/s^2`
572ccaff030SJeremy L Thompson
573bc7bbd5dSLeila Ghaffari* - `-lambda`
574bc7bbd5dSLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
575bc7bbd5dSLeila Ghaffari  - `-2/3`
576bc7bbd5dSLeila Ghaffari  -
577ccaff030SJeremy L Thompson
578bc7bbd5dSLeila Ghaffari* - `-mu`
579bc7bbd5dSLeila Ghaffari  - Shear dynamic viscosity coefficient
580a2726bdbSJames Wright  - `1.8e-5`
581bc7bbd5dSLeila Ghaffari  -  `Pa s`
58277841947SLeila Ghaffari
583bc7bbd5dSLeila Ghaffari* - `-k`
584bc7bbd5dSLeila Ghaffari  - Thermal conductivity
585bc7bbd5dSLeila Ghaffari  - `0.02638`
586bc7bbd5dSLeila Ghaffari  - `W/(m K)`
587a1df05f8SJed Brown
588a1df05f8SJed Brown* - `-newtonian_unit_tests`
589a1df05f8SJed Brown  - Developer option to test properties
590a1df05f8SJed Brown  - `false`
591a1df05f8SJed Brown  - boolean
592de2fdd78SJames Wright
5935c0afad3SJames Wright* - `-state_var`
5945c0afad3SJames Wright  - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$)
5955c0afad3SJames Wright  - `conservative`
5965c0afad3SJames Wright  - string
597530ad8c4SKenneth E. Jansen
598530ad8c4SKenneth E. Jansen* - `-idl_decay_time`
599530ad8c4SKenneth E. Jansen  - Characteristic timescale of the pressure deviance decay. The timestep is good starting point
600530ad8c4SKenneth E. Jansen  - `-1` (disabled)
601530ad8c4SKenneth E. Jansen  - `s`
602530ad8c4SKenneth E. Jansen
603530ad8c4SKenneth E. Jansen* - `-idl_start`
604530ad8c4SKenneth E. Jansen  - Start of IDL in the x direction
605530ad8c4SKenneth E. Jansen  - `0`
606530ad8c4SKenneth E. Jansen  - `m`
607530ad8c4SKenneth E. Jansen
608530ad8c4SKenneth E. Jansen* - `-idl_length`
609530ad8c4SKenneth E. Jansen  - Length of IDL in the positive x direction
610530ad8c4SKenneth E. Jansen  - `0`
611530ad8c4SKenneth E. Jansen  - `m`
612530ad8c4SKenneth E. Jansen
613c79d6dc9SJames Wright* - `-sgs_model_type`
614c79d6dc9SJames Wright  - Type of subgrid stress model to use. Currently only `data_driven` is available
615c79d6dc9SJames Wright  - `none`
616c79d6dc9SJames Wright  - string
617c79d6dc9SJames Wright
618c79d6dc9SJames Wright* - `-sgs_model_dd_leakyrelu_alpha`
619c79d6dc9SJames Wright  - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU
620c79d6dc9SJames Wright  - 0
621c79d6dc9SJames Wright  -
622c79d6dc9SJames Wright
623c79d6dc9SJames Wright* - `-sgs_model_dd_parameter_dir`
624c79d6dc9SJames Wright  - Path to directory with data-driven model parameters (weights, biases, etc.)
625c79d6dc9SJames Wright  - `./dd_sgs_parameters`
626c79d6dc9SJames Wright  - string
627c79d6dc9SJames Wright
6283f89fbfdSJames Wright* - `-diff_filter_monitor`
6293f89fbfdSJames Wright  - Enable differential filter TSMonitor
6303f89fbfdSJames Wright  - `false`
6313f89fbfdSJames Wright  - boolean
6323f89fbfdSJames Wright
6333f89fbfdSJames Wright* - `-diff_filter_grid_based_width`
6343f89fbfdSJames Wright  - Use filter width based on the grid size
6353f89fbfdSJames Wright  - `false`
6363f89fbfdSJames Wright  - boolean
6373f89fbfdSJames Wright
6383f89fbfdSJames Wright* - `-diff_filter_width_scaling`
6393f89fbfdSJames Wright  - Anisotropic scaling for filter width in wall-aligned coordinates (snz)
6403f89fbfdSJames Wright  - `1,1,1`
6413f89fbfdSJames Wright  - `m`
6423f89fbfdSJames Wright
6433f89fbfdSJames Wright* - `-diff_filter_kernel_scaling`
6443f89fbfdSJames Wright  - Scaling to make differential kernel size equivalent to other filter kernels
6453f89fbfdSJames Wright  - `0.1`
6463f89fbfdSJames Wright  - `m^2`
6473f89fbfdSJames Wright
6483f89fbfdSJames Wright* - `-diff_filter_wall_damping_function`
6493f89fbfdSJames Wright  - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`)
6503f89fbfdSJames Wright  - `none`
6513f89fbfdSJames Wright  - string
6523f89fbfdSJames Wright
6533f89fbfdSJames Wright* - `-diff_filter_wall_damping_constant`
6549d9c52bbSJed Brown  - Constant for the wall-damping function. $A^+$ for `van_driest` damping function.
6553f89fbfdSJames Wright  - 25
6563f89fbfdSJames Wright  -
6573f89fbfdSJames Wright
6583f89fbfdSJames Wright* - `-diff_filter_friction_length`
6593f89fbfdSJames Wright  - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions
6603f89fbfdSJames Wright  - 0
6613f89fbfdSJames Wright  - `m`
6623f89fbfdSJames Wright
6633b219b86SJames Wright* - `-sgs_train_enable`
6643b219b86SJames Wright  - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis.
6653b219b86SJames Wright  - `false`
6663b219b86SJames Wright  - boolean
6673b219b86SJames Wright
6683b219b86SJames Wright* - `-sgs_train_write_data_interval`
6693b219b86SJames Wright  - Number of timesteps between writing training data into SmartRedis database
6703b219b86SJames Wright  - `1`
6713b219b86SJames Wright  -
6723b219b86SJames Wright
6733b219b86SJames Wright* - `-sgs_train_overwrite_data`
6743b219b86SJames Wright  - Whether new training data should overwrite old data on database
6753b219b86SJames Wright  - `true`
6763b219b86SJames Wright  - boolean
6773b219b86SJames Wright
6783b219b86SJames Wright* - `-smartsim_collocated_num_ranks`
6793b219b86SJames Wright  - Number of MPI ranks associated with each collocated database (i.e. ranks per node)
6803b219b86SJames Wright  - `1`
6813b219b86SJames Wright  -
682bc7bbd5dSLeila Ghaffari:::
68377841947SLeila Ghaffari
684530ad8c4SKenneth E. Jansen#### Gaussian Wave
6857ec884f8SJames Wright
686530ad8c4SKenneth E. JansenThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
6877ec884f8SJames Wright
688530ad8c4SKenneth E. Jansen:::{list-table} Gaussian Wave Runtime Options
6897ec884f8SJames Wright:header-rows: 1
6907ec884f8SJames Wright
6917ec884f8SJames Wright* - Option
6927ec884f8SJames Wright  - Description
6937ec884f8SJames Wright  - Default value
6947ec884f8SJames Wright  - Unit
6957ec884f8SJames Wright
696f1e435c9SJed Brown* - `-freestream_riemann`
697f1e435c9SJed Brown  - Riemann solver for boundaries (HLL or HLLC)
698f1e435c9SJed Brown  - `hllc`
699f1e435c9SJed Brown  -
700f1e435c9SJed Brown
701f1e435c9SJed Brown* - `-freestream_velocity`
7027ec884f8SJames Wright  - Freestream velocity vector
7037ec884f8SJames Wright  - `0,0,0`
7047ec884f8SJames Wright  - `m/s`
7057ec884f8SJames Wright
706f1e435c9SJed Brown* - `-freestream_temperature`
7077ec884f8SJames Wright  - Freestream temperature
7087ec884f8SJames Wright  - `288`
7097ec884f8SJames Wright  - `K`
7107ec884f8SJames Wright
711f1e435c9SJed Brown* - `-freestream_pressure`
71289e3cb53SJames Wright  - Freestream pressure
7137ec884f8SJames Wright  - `1.01e5`
7147ec884f8SJames Wright  - `Pa`
7157ec884f8SJames Wright
7167ec884f8SJames Wright* - `-epicenter`
7177ec884f8SJames Wright  - Coordinates of center of perturbation
7187ec884f8SJames Wright  - `0,0,0`
7197ec884f8SJames Wright  - `m`
7207ec884f8SJames Wright
7217ec884f8SJames Wright* - `-amplitude`
7227ec884f8SJames Wright  - Amplitude of the perturbation
7237ec884f8SJames Wright  - `0.1`
7247ec884f8SJames Wright  -
7257ec884f8SJames Wright
7267ec884f8SJames Wright* - `-width`
7277ec884f8SJames Wright  - Width parameter of the perturbation
7287ec884f8SJames Wright  - `0.002`
7297ec884f8SJames Wright  - `m`
7307ec884f8SJames Wright
7317ec884f8SJames Wright:::
7327ec884f8SJames Wright
733530ad8c4SKenneth E. JansenThis problem can be run with the `gaussianwave.yaml` file via:
7347ec884f8SJames Wright
7357ec884f8SJames Wright```
736530ad8c4SKenneth E. Jansen./navierstokes -options_file gaussianwave.yaml
7377ec884f8SJames Wright```
7387ec884f8SJames Wright
739530ad8c4SKenneth E. Jansen```{literalinclude} ../../../../../examples/fluids/gaussianwave.yaml
7407ec884f8SJames Wright:language: yaml
7417ec884f8SJames Wright```
742a1df05f8SJed Brown
743d310b3d3SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder
744d310b3d3SAdeleke O. Bankole
745d310b3d3SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
746d310b3d3SAdeleke O. Bankole
747d310b3d3SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options
748d310b3d3SAdeleke O. Bankole:header-rows: 1
749d310b3d3SAdeleke O. Bankole
750d310b3d3SAdeleke O. Bankole* - Option
751d310b3d3SAdeleke O. Bankole  - Description
752d310b3d3SAdeleke O. Bankole  - Default value
753d310b3d3SAdeleke O. Bankole  - Unit
754d310b3d3SAdeleke O. Bankole
755d310b3d3SAdeleke O. Bankole* - `-freestream_velocity`
756d310b3d3SAdeleke O. Bankole  - Freestream velocity vector
757d310b3d3SAdeleke O. Bankole  - `0,0,0`
758d310b3d3SAdeleke O. Bankole  - `m/s`
759d310b3d3SAdeleke O. Bankole
760d310b3d3SAdeleke O. Bankole* - `-freestream_temperature`
761d310b3d3SAdeleke O. Bankole  - Freestream temperature
762d310b3d3SAdeleke O. Bankole  - `288`
763d310b3d3SAdeleke O. Bankole  - `K`
764d310b3d3SAdeleke O. Bankole
765d310b3d3SAdeleke O. Bankole* - `-freestream_pressure`
766d310b3d3SAdeleke O. Bankole  - Freestream pressure
767d310b3d3SAdeleke O. Bankole  - `1.01e5`
768d310b3d3SAdeleke O. Bankole  - `Pa`
769d310b3d3SAdeleke O. Bankole
770d310b3d3SAdeleke O. Bankole:::
771d310b3d3SAdeleke O. Bankole
772d310b3d3SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
773d310b3d3SAdeleke O. BankoleTo run this problem, first generate a mesh:
774d310b3d3SAdeleke O. Bankole
775d310b3d3SAdeleke O. Bankole```console
776d310b3d3SAdeleke O. Bankole$ make -C examples/fluids/meshes
777d310b3d3SAdeleke O. Bankole```
778d310b3d3SAdeleke O. Bankole
779d310b3d3SAdeleke O. BankoleThen run by building the executable and running:
780d310b3d3SAdeleke O. Bankole
781d310b3d3SAdeleke O. Bankole```console
782d310b3d3SAdeleke O. Bankole$ make build/fluids-navierstokes
783ca69d878SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_
784d310b3d3SAdeleke O. Bankole```
785d310b3d3SAdeleke O. Bankole
786ca69d878SAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
787ca69d878SAdeleke 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.
788ca69d878SAdeleke O. Bankole
789ca69d878SAdeleke O. Bankole```console
790d6734f85SAdeleke O. Bankole$ python examples/fluids/postprocess/vortexshedding.py
791ca69d878SAdeleke O. Bankole```
792d310b3d3SAdeleke O. Bankole
793d310b3d3SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml
794d310b3d3SAdeleke O. Bankole:language: yaml
795d310b3d3SAdeleke O. Bankole```
796d310b3d3SAdeleke O. Bankole
797019b7682STimothy Aiken#### Density current
798019b7682STimothy Aiken
799061ff11eSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
80088626eedSJames Wright
80188626eedSJames Wright:::{list-table} Density Current Runtime Options
80288626eedSJames Wright:header-rows: 1
80388626eedSJames Wright
80488626eedSJames Wright* - Option
80588626eedSJames Wright  - Description
80688626eedSJames Wright  - Default value
80788626eedSJames Wright  - Unit
80888626eedSJames Wright
80988626eedSJames Wright* - `-center`
81088626eedSJames Wright  - Location of bubble center
81188626eedSJames Wright  - `(lx,ly,lz)/2`
81288626eedSJames Wright  - `(m,m,m)`
81388626eedSJames Wright
81488626eedSJames Wright* - `-dc_axis`
81588626eedSJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
81688626eedSJames Wright  - `(0,0,0)`
81788626eedSJames Wright  -
81888626eedSJames Wright
81988626eedSJames Wright* - `-rc`
82088626eedSJames Wright  - Characteristic radius of thermal bubble
82188626eedSJames Wright  - `1000`
82288626eedSJames Wright  - `m`
82388626eedSJames Wright
82488626eedSJames Wright* - `-theta0`
82588626eedSJames Wright  - Reference potential temperature
82688626eedSJames Wright  - `300`
82788626eedSJames Wright  - `K`
82888626eedSJames Wright
82988626eedSJames Wright* - `-thetaC`
83088626eedSJames Wright  - Perturbation of potential temperature
83188626eedSJames Wright  - `-15`
83288626eedSJames Wright  - `K`
83388626eedSJames Wright
83488626eedSJames Wright* - `-P0`
83588626eedSJames Wright  - Atmospheric pressure
83688626eedSJames Wright  - `1E5`
83788626eedSJames Wright  - `Pa`
83888626eedSJames Wright
83988626eedSJames Wright* - `-N`
84088626eedSJames Wright  - Brunt-Vaisala frequency
84188626eedSJames Wright  - `0.01`
84288626eedSJames Wright  - `1/s`
84388626eedSJames Wright:::
84488626eedSJames Wright
845bc7bbd5dSLeila GhaffariThis problem can be run with:
846ccaff030SJeremy L Thompson
847bc7bbd5dSLeila Ghaffari```
84888626eedSJames 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
84988626eedSJames Wright```
85088626eedSJames Wright
851019b7682STimothy Aiken#### Channel flow
852019b7682STimothy Aiken
853061ff11eSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
85488626eedSJames Wright
85588626eedSJames Wright:::{list-table} Channel Runtime Options
85688626eedSJames Wright:header-rows: 1
85788626eedSJames Wright
85888626eedSJames Wright* - Option
85988626eedSJames Wright  - Description
86088626eedSJames Wright  - Default value
86188626eedSJames Wright  - Unit
86288626eedSJames Wright
86388626eedSJames Wright* - `-umax`
86488626eedSJames Wright  - Maximum/centerline velocity of the flow
86588626eedSJames Wright  - `10`
86688626eedSJames Wright  - `m/s`
86788626eedSJames Wright
86888626eedSJames Wright* - `-theta0`
86988626eedSJames Wright  - Reference potential temperature
87088626eedSJames Wright  - `300`
87188626eedSJames Wright  - `K`
87288626eedSJames Wright
87388626eedSJames Wright* - `-P0`
87488626eedSJames Wright  - Atmospheric pressure
87588626eedSJames Wright  - `1E5`
87688626eedSJames Wright  - `Pa`
877a1df05f8SJed Brown
878a1df05f8SJed Brown* - `-body_force_scale`
879a1df05f8SJed Brown  - Multiplier for body force (`-1` for flow reversal)
880a1df05f8SJed Brown  - 1
881a1df05f8SJed Brown  -
88288626eedSJames Wright:::
88388626eedSJames Wright
88488626eedSJames WrightThis problem can be run with the `channel.yaml` file via:
88588626eedSJames Wright
88688626eedSJames Wright```
88788626eedSJames Wright./navierstokes -options_file channel.yaml
88888626eedSJames Wright```
88988626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
89088626eedSJames Wright:language: yaml
89188626eedSJames Wright```
89288626eedSJames Wright
8938a94a473SJed Brown(example-blasius)=
8948a94a473SJed Brown
895019b7682STimothy Aiken#### Blasius boundary layer
896019b7682STimothy Aiken
897061ff11eSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
89888626eedSJames Wright
89988626eedSJames Wright:::{list-table} Blasius Runtime Options
90088626eedSJames Wright:header-rows: 1
90188626eedSJames Wright
90288626eedSJames Wright* - Option
90388626eedSJames Wright  - Description
90488626eedSJames Wright  - Default value
90588626eedSJames Wright  - Unit
90688626eedSJames Wright
907fb455ff0SLeila Ghaffari* - `-velocity_infinity`
90888626eedSJames Wright  - Freestream velocity
90988626eedSJames Wright  - `40`
91088626eedSJames Wright  - `m/s`
91188626eedSJames Wright
912fb455ff0SLeila Ghaffari* - `-temperature_infinity`
913fb455ff0SLeila Ghaffari  - Freestream temperature
91488626eedSJames Wright  - `288`
91588626eedSJames Wright  - `K`
91688626eedSJames Wright
917fb455ff0SLeila Ghaffari* - `-temperature_wall`
918fb455ff0SLeila Ghaffari  - Wall temperature
91907d14e58SLeila Ghaffari  - `288`
920fb455ff0SLeila Ghaffari  - `K`
921fb455ff0SLeila Ghaffari
922fb455ff0SLeila Ghaffari* - `-delta0`
923fb455ff0SLeila Ghaffari  - Boundary layer height at the inflow
924fb455ff0SLeila Ghaffari  - `4.2e-3`
925fb455ff0SLeila Ghaffari  - `m`
926fb455ff0SLeila Ghaffari
92788626eedSJames Wright* - `-P0`
92888626eedSJames Wright  - Atmospheric pressure
92988626eedSJames Wright  - `1.01E5`
93088626eedSJames Wright  - `Pa`
93188626eedSJames Wright
9329309e21cSJames Wright* - `-platemesh_modify_mesh`
9339309e21cSJames Wright  - Whether to modify the mesh using the given options below.
9349309e21cSJames Wright  - `false`
9359309e21cSJames Wright  -
9369309e21cSJames Wright
93791eaef80SJames Wright* - `-platemesh_refine_height`
93891eaef80SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
93988626eedSJames Wright  - `5.9E-4`
94088626eedSJames Wright  - `m`
94188626eedSJames Wright
94291eaef80SJames Wright* - `-platemesh_Ndelta`
94391eaef80SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
94488626eedSJames Wright  - `45`
94588626eedSJames Wright  -
94688626eedSJames Wright
94791eaef80SJames Wright* - `-platemesh_growth`
94888626eedSJames Wright  - Growth rate of the elements in the refinement region
94988626eedSJames Wright  - `1.08`
95088626eedSJames Wright  -
95188626eedSJames Wright
95291eaef80SJames Wright* - `-platemesh_top_angle`
95388626eedSJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
95488626eedSJames Wright  - `5`
95588626eedSJames Wright  - `degrees`
956ba6664aeSJames Wright
95791eaef80SJames Wright* - `-platemesh_y_node_locs_path`
95891eaef80SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
95991eaef80SJames Wright  - `""`
96091eaef80SJames Wright  -
961fb455ff0SLeila Ghaffari
9629309e21cSJames Wright* - `-stg_use`
9639309e21cSJames Wright  - Whether to use STG for the inflow conditions
9649309e21cSJames Wright  - `false`
9659309e21cSJames Wright  -
9669309e21cSJames Wright
96707d14e58SLeila Ghaffari* - `-n_chebyshev`
968fb455ff0SLeila Ghaffari  - Number of Chebyshev terms
969fb455ff0SLeila Ghaffari  - `20`
970fb455ff0SLeila Ghaffari  -
971fb455ff0SLeila Ghaffari
97207d14e58SLeila Ghaffari* - `-chebyshev_`
97307d14e58SLeila Ghaffari  - Prefix for Chebyshev snes solve
97407d14e58SLeila Ghaffari  -
97507d14e58SLeila Ghaffari  -
97607d14e58SLeila Ghaffari
97788626eedSJames Wright:::
97888626eedSJames Wright
97988626eedSJames WrightThis problem can be run with the `blasius.yaml` file via:
98088626eedSJames Wright
98188626eedSJames Wright```
98288626eedSJames Wright./navierstokes -options_file blasius.yaml
98388626eedSJames Wright```
98488626eedSJames Wright
98588626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
98688626eedSJames Wright:language: yaml
987bc7bbd5dSLeila Ghaffari```
988ba6664aeSJames Wright
989ba6664aeSJames Wright#### STG Inflow for Flat Plate
990ba6664aeSJames Wright
99117be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
992ba6664aeSJames Wright
993ba6664aeSJames Wright:::{list-table} Blasius Runtime Options
994ba6664aeSJames Wright:header-rows: 1
995ba6664aeSJames Wright
996ba6664aeSJames Wright* - Option
997ba6664aeSJames Wright  - Description
998ba6664aeSJames Wright  - Default value
999ba6664aeSJames Wright  - Unit
1000ba6664aeSJames Wright
1001ba6664aeSJames Wright* - `-stg_inflow_path`
1002ba6664aeSJames Wright  - Path to the STGInflow file
1003ba6664aeSJames Wright  - `./STGInflow.dat`
1004ba6664aeSJames Wright  -
1005ba6664aeSJames Wright
1006ba6664aeSJames Wright* - `-stg_rand_path`
1007ba6664aeSJames Wright  - Path to the STGRand file
1008ba6664aeSJames Wright  - `./STGRand.dat`
1009ba6664aeSJames Wright  -
1010ba6664aeSJames Wright
1011ba6664aeSJames Wright* - `-stg_alpha`
1012ba6664aeSJames Wright  - Growth rate of the wavemodes
1013ba6664aeSJames Wright  - `1.01`
1014ba6664aeSJames Wright  -
1015ba6664aeSJames Wright
1016ba6664aeSJames Wright* - `-stg_u0`
1017ba6664aeSJames Wright  - Convective velocity, $U_0$
1018ba6664aeSJames Wright  - `0.0`
1019ba6664aeSJames Wright  - `m/s`
1020ba6664aeSJames Wright
1021ba6664aeSJames Wright* - `-stg_mean_only`
1022ba6664aeSJames Wright  - Only impose the mean velocity (no fluctutations)
1023ba6664aeSJames Wright  - `false`
1024ba6664aeSJames Wright  -
1025ba6664aeSJames Wright
102630af3636SJames Wright* - `-stg_strong`
102730af3636SJames Wright  - Strongly enforce the STG inflow boundary condition
102830af3636SJames Wright  - `false`
102930af3636SJames Wright  -
103030af3636SJames Wright
103189060322SJames Wright* - `-stg_fluctuating_IC`
103289060322SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
103389060322SJames Wright  - `false`
103489060322SJames Wright  -
103589060322SJames Wright
1036ba6664aeSJames Wright:::
1037ba6664aeSJames Wright
1038ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via:
1039ba6664aeSJames Wright
1040ba6664aeSJames Wright```
1041ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true
1042ba6664aeSJames Wright```
1043ba6664aeSJames Wright
104417be3a41SJeremy L ThompsonNote the added `-stg_use true` flag
104517be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
1046