xref: /honee/README.md (revision acad75472e65572f93c530153d49977445aa4798)
1ea10196cSJeremy L Thompson## libCEED: Navier-Stokes Example
2ea10196cSJeremy L Thompson
3ea10196cSJeremy L ThompsonThis page provides a description of the Navier-Stokes example for the libCEED library, based on PETSc.
4b9842f74SJeremy L ThompsonPETSc v3.17 or a development version of PETSc at commit 0e95d842 or later is required.
5ea10196cSJeremy L Thompson
6a515125bSLeila GhaffariThe Navier-Stokes problem solves the compressible Navier-Stokes equations in three dimensions using an explicit time integration.
7a515125bSLeila GhaffariThe state variables are mass density, momentum density, and energy density.
8ea10196cSJeremy L Thompson
9a515125bSLeila GhaffariThe main Navier-Stokes solver for libCEED is defined in [`navierstokes.c`](navierstokes.c) with different problem definitions according to the application of interest.
10ea10196cSJeremy L Thompson
11*acad7547SJames Wright## Build instructions
12*acad7547SJames Wright
13575f8106SLeila GhaffariBuild by using:
14ea10196cSJeremy L Thompson
15ea10196cSJeremy L Thompson`make`
16ea10196cSJeremy L Thompson
17575f8106SLeila Ghaffariand run with:
18ea10196cSJeremy L Thompson
19575f8106SLeila Ghaffari```
20575f8106SLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree]
21575f8106SLeila Ghaffari```
22ea10196cSJeremy L Thompson
23*acad7547SJames WrightIf you want to do *in situ* machine-learning training, specify `SMARTREDIS_DIR` in the make command like:
24*acad7547SJames Wright
25*acad7547SJames Wright```
26*acad7547SJames Wrightmake SMARTREDIS_DIR=~/software/smartredis/install
27*acad7547SJames Wright```
28*acad7547SJames Wright
29575f8106SLeila Ghaffari## Runtime options
30ea10196cSJeremy L Thompson
31575f8106SLeila Ghaffari% inclusion-fluids-marker
32ea10196cSJeremy L Thompson
33575f8106SLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options.
34575f8106SLeila GhaffariThe following options are common among all problem types:
35ea10196cSJeremy L Thompson
36575f8106SLeila Ghaffari:::{list-table} Common Runtime Options
37575f8106SLeila Ghaffari:header-rows: 1
38ea10196cSJeremy L Thompson
39575f8106SLeila Ghaffari* - Option
40575f8106SLeila Ghaffari  - Description
41575f8106SLeila Ghaffari  - Default value
42ea10196cSJeremy L Thompson
43575f8106SLeila Ghaffari* - `-ceed`
44575f8106SLeila Ghaffari  - CEED resource specifier
45575f8106SLeila Ghaffari  - `/cpu/self/opt/blocked`
46ea10196cSJeremy L Thompson
47707de87aSJames Wright* - `-test_type`
48707de87aSJames Wright  - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified
49707de87aSJames Wright  - `none`
50ea10196cSJeremy L Thompson
51575f8106SLeila Ghaffari* - `-compare_final_state_atol`
52575f8106SLeila Ghaffari  - Test absolute tolerance
53575f8106SLeila Ghaffari  - `1E-11`
54ea10196cSJeremy L Thompson
55575f8106SLeila Ghaffari* - `-compare_final_state_filename`
56575f8106SLeila Ghaffari  - Test filename
57575f8106SLeila Ghaffari  -
58ea10196cSJeremy L Thompson
59575f8106SLeila Ghaffari* - `-problem`
6021871b7aSJames Wright  - Problem to solve (`advection`, `advection2d`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`)
61575f8106SLeila Ghaffari  - `density_current`
62ea10196cSJeremy L Thompson
63575f8106SLeila Ghaffari* - `-implicit`
6421871b7aSJames Wright  - Use implicit time integrator formulation
65575f8106SLeila Ghaffari  -
66ea10196cSJeremy L Thompson
67575f8106SLeila Ghaffari* - `-degree`
68575f8106SLeila Ghaffari  - Polynomial degree of tensor product basis (must be >= 1)
69575f8106SLeila Ghaffari  - `1`
70ea10196cSJeremy L Thompson
71c1680e98SJeremy L Thompson* - `-q_extra`
72575f8106SLeila Ghaffari  - Number of extra quadrature points
731219168aSLeila Ghaffari  - `0`
74ea10196cSJeremy L Thompson
75852e5969SJed Brown* - `-ts_monitor_solution`
76852e5969SJed Brown  - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
77852e5969SJed Brown  -
78ea10196cSJeremy L Thompson
79852e5969SJed Brown* - `-ts_monitor_solution_interval`
80852e5969SJed Brown  - Number of time steps between visualization output frames.
81852e5969SJed Brown  - `1`
82852e5969SJed Brown
83852e5969SJed Brown* - `-viewer_cgns_batch_size`
84852e5969SJed Brown  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
85852e5969SJed Brown  - `20`
86852e5969SJed Brown
87852e5969SJed Brown* - `-checkpoint_interval`
88852e5969SJed Brown  - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only
89575f8106SLeila Ghaffari  - `10`
90ea10196cSJeremy L Thompson
91852e5969SJed Brown* - `-checkpoint_vtk`
92852e5969SJed Brown  - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead.
93852e5969SJed Brown  - `false`
94852e5969SJed Brown
95852e5969SJed Brown* - `-viz_refine`
96852e5969SJed Brown  - Use regular refinement for VTK visualization
97852e5969SJed Brown  - `0`
98852e5969SJed Brown
99575f8106SLeila Ghaffari* - `-output_dir`
100852e5969SJed Brown  - Output directory for binary checkpoints and VTK files (if enabled).
101575f8106SLeila Ghaffari  - `.`
102ea10196cSJeremy L Thompson
10391a36801SJames Wright* - `-output_add_stepnum2bin`
10491a36801SJames Wright  - Whether to add step numbers to output binary files
10591a36801SJames Wright  - `false`
10691a36801SJames Wright
10791a36801SJames Wright* - `-continue`
10891a36801SJames Wright  - Continue from previous solution (input is step number of previous solution)
10991a36801SJames Wright  - `0`
11091a36801SJames Wright
11191a36801SJames Wright* - `-continue_filename`
11291a36801SJames Wright  - Path to solution binary file from which to continue from
11391a36801SJames Wright  - `[output_dir]/ns-solution.bin`
11491a36801SJames Wright
11591a36801SJames Wright* - `-continue_time_filename`
1169293eaa1SJed Brown  - Path to time stamp binary file (only for legacy checkpoints)
11791a36801SJames Wright  - `[output_dir]/ns-time.bin`
11891a36801SJames Wright
119f4277be3SLeila Ghaffari* - `-bc_wall`
120f4277be3SLeila Ghaffari  - Use wall boundary conditions on this list of faces
121f4277be3SLeila Ghaffari  -
122f4277be3SLeila Ghaffari
123f4277be3SLeila Ghaffari* - `-wall_comps`
124f4277be3SLeila Ghaffari  - An array of constrained component numbers for wall BCs
125f4277be3SLeila Ghaffari  -
126f4277be3SLeila Ghaffari
127f4277be3SLeila Ghaffari* - `-bc_slip_x`
128f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the x component, on this list of faces
129f4277be3SLeila Ghaffari  -
130f4277be3SLeila Ghaffari
131f4277be3SLeila Ghaffari* - `-bc_slip_y`
132f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the y component, on this list of faces
133f4277be3SLeila Ghaffari  -
134f4277be3SLeila Ghaffari
135f4277be3SLeila Ghaffari* - `-bc_slip_z`
136f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the z component, on this list of faces
137f4277be3SLeila Ghaffari  -
138f4277be3SLeila Ghaffari
139f4277be3SLeila Ghaffari* - `-bc_inflow`
140f4277be3SLeila Ghaffari  - Use inflow boundary conditions on this list of faces
141f4277be3SLeila Ghaffari  -
142f4277be3SLeila Ghaffari
143f4277be3SLeila Ghaffari* - `-bc_outflow`
144f4277be3SLeila Ghaffari  - Use outflow boundary conditions on this list of faces
145f4277be3SLeila Ghaffari  -
1468ef11c93SLeila Ghaffari
14779b17980SJames Wright* - `-bc_freestream`
14879b17980SJames Wright  - Use freestream boundary conditions on this list of faces
14979b17980SJames Wright  -
15079b17980SJames Wright
151c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval`
152a8ce54bfSJames Wright  - Number of timesteps between statistics collection
153a8ce54bfSJames Wright  - `1`
154a8ce54bfSJames Wright
155c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer`
156c931fa59SJames 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.
157109cd75bSJames Wright  -
158109cd75bSJames Wright
159c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval`
160a8ce54bfSJames Wright  - Number of timesteps between statistics file writing (`-1` means only at end of run)
161a8ce54bfSJames Wright  - `-1`
162a8ce54bfSJames Wright
163c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size`
164109cd75bSJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
165109cd75bSJames Wright  - `20`
166109cd75bSJames Wright
167c5e9980aSAdeleke O. Bankole* - `-ts_monitor_wall_force`
168c5e9980aSAdeleke O. Bankole  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
169c5e9980aSAdeleke O. Bankole  -
170c5e9980aSAdeleke O. Bankole
171f31f4833SJames Wright* - `-mesh_transform`
172f31f4833SJames Wright  - Transform the mesh, usually for an initial box mesh.
173f31f4833SJames Wright  - `none`
174f31f4833SJames Wright
175575f8106SLeila Ghaffari* - `-snes_view`
176575f8106SLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
177575f8106SLeila Ghaffari  -
1788ef11c93SLeila Ghaffari
179575f8106SLeila Ghaffari* - `-log_view`
180575f8106SLeila Ghaffari  - View PETSc performance log
181575f8106SLeila Ghaffari  -
182ea10196cSJeremy L Thompson
183575f8106SLeila Ghaffari* - `-help`
184575f8106SLeila Ghaffari  - View comprehensive information about run-time options
185575f8106SLeila Ghaffari  -
186575f8106SLeila Ghaffari:::
187ea10196cSJeremy L Thompson
18879b17980SJames 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:
189f4277be3SLeila Ghaffari
190bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels
191bb8a0c61SJames Wright:header-rows: 1
192bb8a0c61SJames Wright* - PETSc Face Name
193bb8a0c61SJames Wright  - Cartesian direction
194bb8a0c61SJames Wright  - Face ID
195bb8a0c61SJames Wright
196bb8a0c61SJames Wright* - faceMarkerBottom
197bb8a0c61SJames Wright  - -z
198bb8a0c61SJames Wright  - 1
199bb8a0c61SJames Wright
200bb8a0c61SJames Wright* - faceMarkerRight
201bb8a0c61SJames Wright  - +x
202bb8a0c61SJames Wright  - 2
203bb8a0c61SJames Wright
204bb8a0c61SJames Wright* - faceMarkerTop
205bb8a0c61SJames Wright  - +z
206bb8a0c61SJames Wright  - 3
207bb8a0c61SJames Wright
208bb8a0c61SJames Wright* - faceMarkerLeft
209bb8a0c61SJames Wright  - -x
210bb8a0c61SJames Wright  - 4
211bb8a0c61SJames Wright:::
212bb8a0c61SJames Wright
213c52f2c1bSLeila Ghaffari:::{list-table} 3D Face ID Labels
214bb8a0c61SJames Wright:header-rows: 1
215bb8a0c61SJames Wright* - PETSc Face Name
216bb8a0c61SJames Wright  - Cartesian direction
217bb8a0c61SJames Wright  - Face ID
218bb8a0c61SJames Wright
219bb8a0c61SJames Wright* - faceMarkerBottom
220bb8a0c61SJames Wright  - -z
221bb8a0c61SJames Wright  - 1
222bb8a0c61SJames Wright
223bb8a0c61SJames Wright* - faceMarkerTop
224bb8a0c61SJames Wright  - +z
225bb8a0c61SJames Wright  - 2
226bb8a0c61SJames Wright
227bb8a0c61SJames Wright* - faceMarkerFront
228bb8a0c61SJames Wright  - -y
229bb8a0c61SJames Wright  - 3
230bb8a0c61SJames Wright
231bb8a0c61SJames Wright* - faceMarkerBack
232bb8a0c61SJames Wright  - +y
233bb8a0c61SJames Wright  - 4
234bb8a0c61SJames Wright
235bb8a0c61SJames Wright* - faceMarkerRight
236bb8a0c61SJames Wright  - +x
237bb8a0c61SJames Wright  - 5
238bb8a0c61SJames Wright
239bb8a0c61SJames Wright* - faceMarkerLeft
240bb8a0c61SJames Wright  - -x
241bb8a0c61SJames Wright  - 6
242bb8a0c61SJames Wright:::
243f4277be3SLeila Ghaffari
244c8c30d87SJed Brown### Boundary conditions
245c8c30d87SJed Brown
246*acad7547SJames WrightBoundary conditions for compressible viscous flows are notoriously tricky.
247*acad7547SJames WrightHere we offer some recommendations.
248c8c30d87SJed Brown
249c8c30d87SJed Brown#### Inflow
250c8c30d87SJed Brown
251c8c30d87SJed 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).
252c8c30d87SJed BrownIt is stable and the least reflective boundary condition for acoustics.
253c8c30d87SJed Brown
254c8c30d87SJed BrownIf near a viscous wall, you may want a specified inflow profile.
255c8c30d87SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
256c8c30d87SJed 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.
257c8c30d87SJed BrownThe strong approach gives sharper resolution of velocity structures.
258c8c30d87SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
259c8c30d87SJed Brown
260a899b243SJames Wright#### Outflow
261c8c30d87SJed Brown
262c8c30d87SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
263c8c30d87SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
264c8c30d87SJed 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.
265c8c30d87SJed Brown
266c8c30d87SJed 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.
267c8c30d87SJed Brown
268c8c30d87SJed 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).
269c8c30d87SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
270c8c30d87SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
271c8c30d87SJed Brown
272a899b243SJames Wright#### Periodicity
273c8c30d87SJed Brown
274c8c30d87SJed BrownPETSc provides two ways to specify periodicity:
275c8c30d87SJed Brown
276c8c30d87SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
277c8c30d87SJed Brown
278c8c30d87SJed Brown```yaml
279c8c30d87SJed Browndm_plex:
280c8c30d87SJed Brown  shape: box
281c8c30d87SJed Brown  box_faces: 10,12,4
282c8c30d87SJed Brown  box_bd: none,none,periodic
283c8c30d87SJed Brown```
284c8c30d87SJed Brown
285c5e9980aSAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
286c5e9980aSAdeleke 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.
287c5e9980aSAdeleke O. Bankole
288c5e9980aSAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
289c5e9980aSAdeleke O. Bankole
290c5e9980aSAdeleke O. Bankole```yaml
291c5e9980aSAdeleke O. Bankoledm_plex:
292c5e9980aSAdeleke O. Bankole  shape: zbox
293c5e9980aSAdeleke O. Bankole  box_faces: 10,12,4
294c5e9980aSAdeleke O. Bankole  box_bd: none,none,periodic
295c5e9980aSAdeleke O. Bankole```
296c5e9980aSAdeleke O. Bankole
297c5e9980aSAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use.
298c5e9980aSAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity.
299c5e9980aSAdeleke 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.
300c8c30d87SJed Brown
301af8870a9STimothy Aiken### Advection
302af8870a9STimothy Aiken
303b46bfc5eSJeremy 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$.
304b46bfc5eSJeremy L ThompsonThese are available in 2D and 3D.
305af8870a9STimothy Aiken
306af8870a9STimothy Aiken#### 2D advection
307af8870a9STimothy Aiken
308575f8106SLeila GhaffariFor the 2D advection problem, the following additional command-line options are available:
309ea10196cSJeremy L Thompson
310575f8106SLeila Ghaffari:::{list-table} Advection2D Runtime Options
311575f8106SLeila Ghaffari:header-rows: 1
3128ef11c93SLeila Ghaffari
313575f8106SLeila Ghaffari* - Option
314575f8106SLeila Ghaffari  - Description
315575f8106SLeila Ghaffari  - Default value
316575f8106SLeila Ghaffari  - Unit
3178ef11c93SLeila Ghaffari
318575f8106SLeila Ghaffari* - `-rc`
319575f8106SLeila Ghaffari  - Characteristic radius of thermal bubble
320575f8106SLeila Ghaffari  - `1000`
321575f8106SLeila Ghaffari  - `m`
3228ef11c93SLeila Ghaffari
323575f8106SLeila Ghaffari* - `-units_meter`
324575f8106SLeila Ghaffari  - 1 meter in scaled length units
325575f8106SLeila Ghaffari  - `1E-2`
326575f8106SLeila Ghaffari  -
3278ef11c93SLeila Ghaffari
328575f8106SLeila Ghaffari* - `-units_second`
329575f8106SLeila Ghaffari  - 1 second in scaled time units
330575f8106SLeila Ghaffari  - `1E-2`
331575f8106SLeila Ghaffari  -
3328ef11c93SLeila Ghaffari
333575f8106SLeila Ghaffari* - `-units_kilogram`
334575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
335575f8106SLeila Ghaffari  - `1E-6`
336575f8106SLeila Ghaffari  -
337a515125bSLeila Ghaffari
338575f8106SLeila Ghaffari* - `-strong_form`
339575f8106SLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
340575f8106SLeila Ghaffari  - `0`
341575f8106SLeila Ghaffari  -
342a515125bSLeila Ghaffari
343575f8106SLeila Ghaffari* - `-stab`
344575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
345575f8106SLeila Ghaffari  - `none`
346575f8106SLeila Ghaffari  -
347a515125bSLeila Ghaffari
348575f8106SLeila Ghaffari* - `-CtauS`
349575f8106SLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
350575f8106SLeila Ghaffari  - `0`
351575f8106SLeila Ghaffari  -
352a515125bSLeila Ghaffari
353575f8106SLeila Ghaffari* - `-wind_type`
354575f8106SLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
355575f8106SLeila Ghaffari  - `rotation`
356575f8106SLeila Ghaffari  -
357a515125bSLeila Ghaffari
358575f8106SLeila Ghaffari* - `-wind_translation`
359575f8106SLeila Ghaffari  - Constant wind vector when `-wind_type translation`
360575f8106SLeila Ghaffari  - `1,0,0`
361575f8106SLeila Ghaffari  -
3628ef11c93SLeila Ghaffari
363575f8106SLeila Ghaffari* - `-E_wind`
364575f8106SLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
365575f8106SLeila Ghaffari  - `1E6`
366575f8106SLeila Ghaffari  - `J`
367575f8106SLeila Ghaffari:::
368268c6924SLeila Ghaffari
369575f8106SLeila GhaffariAn example of the `rotation` mode can be run with:
370268c6924SLeila Ghaffari
371575f8106SLeila Ghaffari```
372f4277be3SLeila 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
373575f8106SLeila Ghaffari```
374268c6924SLeila Ghaffari
375575f8106SLeila Ghaffariand the `translation` mode with:
376268c6924SLeila Ghaffari
377575f8106SLeila Ghaffari```
378f4277be3SLeila 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
379575f8106SLeila Ghaffari```
380f4277be3SLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
381268c6924SLeila Ghaffari
382af8870a9STimothy Aiken#### 3D advection
383af8870a9STimothy Aiken
384575f8106SLeila GhaffariFor the 3D advection problem, the following additional command-line options are available:
385268c6924SLeila Ghaffari
386575f8106SLeila Ghaffari:::{list-table} Advection3D Runtime Options
387575f8106SLeila Ghaffari:header-rows: 1
388268c6924SLeila Ghaffari
389575f8106SLeila Ghaffari* - Option
390575f8106SLeila Ghaffari  - Description
391575f8106SLeila Ghaffari  - Default value
392575f8106SLeila Ghaffari  - Unit
393268c6924SLeila Ghaffari
394575f8106SLeila Ghaffari* - `-rc`
395575f8106SLeila Ghaffari  - Characteristic radius of thermal bubble
396575f8106SLeila Ghaffari  - `1000`
397575f8106SLeila Ghaffari  - `m`
398268c6924SLeila Ghaffari
399575f8106SLeila Ghaffari* - `-units_meter`
400575f8106SLeila Ghaffari  - 1 meter in scaled length units
401575f8106SLeila Ghaffari  - `1E-2`
402575f8106SLeila Ghaffari  -
403268c6924SLeila Ghaffari
404575f8106SLeila Ghaffari* - `-units_second`
405575f8106SLeila Ghaffari  - 1 second in scaled time units
406575f8106SLeila Ghaffari  - `1E-2`
407575f8106SLeila Ghaffari  -
408268c6924SLeila Ghaffari
409575f8106SLeila Ghaffari* - `-units_kilogram`
410575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
411575f8106SLeila Ghaffari  - `1E-6`
412575f8106SLeila Ghaffari  -
413268c6924SLeila Ghaffari
414575f8106SLeila Ghaffari* - `-strong_form`
415575f8106SLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
416575f8106SLeila Ghaffari  - `0`
417575f8106SLeila Ghaffari  -
418268c6924SLeila Ghaffari
419575f8106SLeila Ghaffari* - `-stab`
420575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
421575f8106SLeila Ghaffari  - `none`
422575f8106SLeila Ghaffari  -
423268c6924SLeila Ghaffari
424575f8106SLeila Ghaffari* - `-CtauS`
425575f8106SLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
426575f8106SLeila Ghaffari  - `0`
427575f8106SLeila Ghaffari  -
428268c6924SLeila Ghaffari
429575f8106SLeila Ghaffari* - `-wind_type`
430575f8106SLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
431575f8106SLeila Ghaffari  - `rotation`
432575f8106SLeila Ghaffari  -
433268c6924SLeila Ghaffari
434575f8106SLeila Ghaffari* - `-wind_translation`
435575f8106SLeila Ghaffari  - Constant wind vector when `-wind_type translation`
436575f8106SLeila Ghaffari  - `1,0,0`
437575f8106SLeila Ghaffari  -
438268c6924SLeila Ghaffari
439575f8106SLeila Ghaffari* - `-E_wind`
440575f8106SLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
441575f8106SLeila Ghaffari  - `1E6`
442575f8106SLeila Ghaffari  - `J`
443268c6924SLeila Ghaffari
444575f8106SLeila Ghaffari* - `-bubble_type`
445575f8106SLeila Ghaffari  - `sphere` (3D) or `cylinder` (2D)
446a899b243SJames Wright  - `sphere`
447575f8106SLeila Ghaffari  -
448268c6924SLeila Ghaffari
449575f8106SLeila Ghaffari* - `-bubble_continuity`
450575f8106SLeila Ghaffari  - `smooth`, `back_sharp`, or `thick`
451575f8106SLeila Ghaffari  - `smooth`
452575f8106SLeila Ghaffari  -
453575f8106SLeila Ghaffari:::
454ea10196cSJeremy L Thompson
455575f8106SLeila GhaffariAn example of the `rotation` mode can be run with:
456ea10196cSJeremy L Thompson
457575f8106SLeila Ghaffari```
458f4277be3SLeila 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
459575f8106SLeila Ghaffari```
460ea10196cSJeremy L Thompson
461575f8106SLeila Ghaffariand the `translation` mode with:
462ea10196cSJeremy L Thompson
463575f8106SLeila Ghaffari```
464f4277be3SLeila 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
465575f8106SLeila Ghaffari```
466ea10196cSJeremy L Thompson
467af8870a9STimothy Aiken### Inviscid Ideal Gas
468af8870a9STimothy Aiken
469af8870a9STimothy Aiken#### Isentropic Euler vortex
470af8870a9STimothy Aiken
471575f8106SLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
472ea10196cSJeremy L Thompson
473575f8106SLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
474575f8106SLeila Ghaffari:header-rows: 1
475ea10196cSJeremy L Thompson
476575f8106SLeila Ghaffari* - Option
477575f8106SLeila Ghaffari  - Description
478575f8106SLeila Ghaffari  - Default value
479575f8106SLeila Ghaffari  - Unit
480ea10196cSJeremy L Thompson
481575f8106SLeila Ghaffari* - `-center`
482575f8106SLeila Ghaffari  - Location of vortex center
483575f8106SLeila Ghaffari  - `(lx,ly,lz)/2`
484575f8106SLeila Ghaffari  - `(m,m,m)`
485ea10196cSJeremy L Thompson
486575f8106SLeila Ghaffari* - `-units_meter`
487575f8106SLeila Ghaffari  - 1 meter in scaled length units
488575f8106SLeila Ghaffari  - `1E-2`
489575f8106SLeila Ghaffari  -
490ea10196cSJeremy L Thompson
491575f8106SLeila Ghaffari* - `-units_second`
492575f8106SLeila Ghaffari  - 1 second in scaled time units
493575f8106SLeila Ghaffari  - `1E-2`
494575f8106SLeila Ghaffari  -
495ea10196cSJeremy L Thompson
496575f8106SLeila Ghaffari* - `-mean_velocity`
497575f8106SLeila Ghaffari  - Background velocity vector
498575f8106SLeila Ghaffari  - `(1,1,0)`
499575f8106SLeila Ghaffari  -
500ea10196cSJeremy L Thompson
501575f8106SLeila Ghaffari* - `-vortex_strength`
502575f8106SLeila Ghaffari  - Strength of vortex < 10
503575f8106SLeila Ghaffari  - `5`
504575f8106SLeila Ghaffari  -
505d8a22b9eSJed Brown
506d8a22b9eSJed Brown* - `-c_tau`
507d8a22b9eSJed Brown  - Stabilization constant
508f821ee77SLeila Ghaffari  - `0.5`
509d8a22b9eSJed Brown  -
510575f8106SLeila Ghaffari:::
511ea10196cSJeremy L Thompson
512575f8106SLeila GhaffariThis problem can be run with:
513ea10196cSJeremy L Thompson
514575f8106SLeila Ghaffari```
515f4277be3SLeila 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.
516575f8106SLeila Ghaffari```
517ea10196cSJeremy L Thompson
518af8870a9STimothy Aiken#### Sod shock tube
519af8870a9STimothy Aiken
520af8870a9STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
521af8870a9STimothy Aiken
522af8870a9STimothy Aiken:::{list-table} Shock Tube Runtime Options
523af8870a9STimothy Aiken:header-rows: 1
524af8870a9STimothy Aiken
525af8870a9STimothy Aiken* - Option
526af8870a9STimothy Aiken  - Description
527af8870a9STimothy Aiken  - Default value
528af8870a9STimothy Aiken  - Unit
529af8870a9STimothy Aiken
530af8870a9STimothy Aiken* - `-units_meter`
531af8870a9STimothy Aiken  - 1 meter in scaled length units
532af8870a9STimothy Aiken  - `1E-2`
533af8870a9STimothy Aiken  -
534af8870a9STimothy Aiken
535af8870a9STimothy Aiken* - `-units_second`
536af8870a9STimothy Aiken  - 1 second in scaled time units
537af8870a9STimothy Aiken  - `1E-2`
538af8870a9STimothy Aiken  -
539af8870a9STimothy Aiken
540af8870a9STimothy Aiken* - `-yzb`
541af8870a9STimothy Aiken  - Use YZB discontinuity capturing
542af8870a9STimothy Aiken  - `none`
543af8870a9STimothy Aiken  -
544af8870a9STimothy Aiken
545af8870a9STimothy Aiken* - `-stab`
546af8870a9STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
547af8870a9STimothy Aiken  - `none`
548af8870a9STimothy Aiken  -
549af8870a9STimothy Aiken:::
550af8870a9STimothy Aiken
551af8870a9STimothy AikenThis problem can be run with:
552af8870a9STimothy Aiken
553af8870a9STimothy Aiken```
554af8870a9STimothy 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
555af8870a9STimothy Aiken```
556af8870a9STimothy Aiken
557af8870a9STimothy Aiken### Newtonian viscosity, Ideal Gas
558af8870a9STimothy Aiken
559bb8a0c61SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
560ea10196cSJeremy L Thompson
561bb8a0c61SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
562575f8106SLeila Ghaffari:header-rows: 1
563ea10196cSJeremy L Thompson
564575f8106SLeila Ghaffari* - Option
565575f8106SLeila Ghaffari  - Description
566575f8106SLeila Ghaffari  - Default value
567575f8106SLeila Ghaffari  - Unit
568ea10196cSJeremy L Thompson
569575f8106SLeila Ghaffari* - `-units_meter`
570575f8106SLeila Ghaffari  - 1 meter in scaled length units
571bb8a0c61SJames Wright  - `1`
572575f8106SLeila Ghaffari  -
573ea10196cSJeremy L Thompson
574575f8106SLeila Ghaffari* - `-units_second`
575575f8106SLeila Ghaffari  - 1 second in scaled time units
576bb8a0c61SJames Wright  - `1`
577575f8106SLeila Ghaffari  -
578ea10196cSJeremy L Thompson
579575f8106SLeila Ghaffari* - `-units_kilogram`
580575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
581bb8a0c61SJames Wright  - `1`
582575f8106SLeila Ghaffari  -
583ea10196cSJeremy L Thompson
584575f8106SLeila Ghaffari* - `-units_Kelvin`
585575f8106SLeila Ghaffari  - 1 Kelvin in scaled temperature units
586575f8106SLeila Ghaffari  - `1`
587575f8106SLeila Ghaffari  -
588ea10196cSJeremy L Thompson
589575f8106SLeila Ghaffari* - `-stab`
590575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
591575f8106SLeila Ghaffari  - `none`
592575f8106SLeila Ghaffari  -
593ea10196cSJeremy L Thompson
594d8a22b9eSJed Brown* - `-c_tau`
595bb8a0c61SJames Wright  - Stabilization constant, $c_\tau$
596f821ee77SLeila Ghaffari  - `0.5`
597d8a22b9eSJed Brown  -
598d8a22b9eSJed Brown
599bb8a0c61SJames Wright* - `-Ctau_t`
600bb8a0c61SJames Wright  - Stabilization time constant, $C_t$
601bb8a0c61SJames Wright  - `1.0`
602bb8a0c61SJames Wright  -
603ea10196cSJeremy L Thompson
604bb8a0c61SJames Wright* - `-Ctau_v`
605bb8a0c61SJames Wright  - Stabilization viscous constant, $C_v$
606b5786772SLeila Ghaffari  - `36, 60, 128 for degree = 1, 2, 3`
607bb8a0c61SJames Wright  -
608ea10196cSJeremy L Thompson
609bb8a0c61SJames Wright* - `-Ctau_C`
610bb8a0c61SJames Wright  - Stabilization continuity constant, $C_c$
611bb8a0c61SJames Wright  - `1.0`
612bb8a0c61SJames Wright  -
613ea10196cSJeremy L Thompson
614bb8a0c61SJames Wright* - `-Ctau_M`
615bb8a0c61SJames Wright  - Stabilization momentum constant, $C_m$
616bb8a0c61SJames Wright  - `1.0`
617bb8a0c61SJames Wright  -
618bb8a0c61SJames Wright
619bb8a0c61SJames Wright* - `-Ctau_E`
620bb8a0c61SJames Wright  - Stabilization energy constant, $C_E$
621bb8a0c61SJames Wright  - `1.0`
622bb8a0c61SJames Wright  -
623ea10196cSJeremy L Thompson
624575f8106SLeila Ghaffari* - `-cv`
625575f8106SLeila Ghaffari  - Heat capacity at constant volume
626575f8106SLeila Ghaffari  - `717`
627575f8106SLeila Ghaffari  - `J/(kg K)`
628ea10196cSJeremy L Thompson
629575f8106SLeila Ghaffari* - `-cp`
630575f8106SLeila Ghaffari  - Heat capacity at constant pressure
631575f8106SLeila Ghaffari  - `1004`
632575f8106SLeila Ghaffari  - `J/(kg K)`
633ea10196cSJeremy L Thompson
634d9bb1cdbSJames Wright* - `-gravity`
635d9bb1cdbSJames Wright  - Gravitational acceleration vector
636d9bb1cdbSJames Wright  - `0,0,0`
637575f8106SLeila Ghaffari  - `m/s^2`
638ea10196cSJeremy L Thompson
639575f8106SLeila Ghaffari* - `-lambda`
640575f8106SLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
641575f8106SLeila Ghaffari  - `-2/3`
642575f8106SLeila Ghaffari  -
643ea10196cSJeremy L Thompson
644575f8106SLeila Ghaffari* - `-mu`
645575f8106SLeila Ghaffari  - Shear dynamic viscosity coefficient
646d9bb1cdbSJames Wright  - `1.8e-5`
647575f8106SLeila Ghaffari  -  `Pa s`
648a515125bSLeila Ghaffari
649575f8106SLeila Ghaffari* - `-k`
650575f8106SLeila Ghaffari  - Thermal conductivity
651575f8106SLeila Ghaffari  - `0.02638`
652575f8106SLeila Ghaffari  - `W/(m K)`
653edd152dcSJed Brown
654edd152dcSJed Brown* - `-newtonian_unit_tests`
655edd152dcSJed Brown  - Developer option to test properties
656edd152dcSJed Brown  - `false`
657edd152dcSJed Brown  - boolean
658aa61a79eSJames Wright
659ba952bfeSJames Wright* - `-state_var`
660ba952bfeSJames Wright  - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$)
661ba952bfeSJames Wright  - `conservative`
662ba952bfeSJames Wright  - string
663e7754af5SKenneth E. Jansen
664e7754af5SKenneth E. Jansen* - `-idl_decay_time`
665e7754af5SKenneth E. Jansen  - Characteristic timescale of the pressure deviance decay. The timestep is good starting point
666e7754af5SKenneth E. Jansen  - `-1` (disabled)
667e7754af5SKenneth E. Jansen  - `s`
668e7754af5SKenneth E. Jansen
669e7754af5SKenneth E. Jansen* - `-idl_start`
670e7754af5SKenneth E. Jansen  - Start of IDL in the x direction
671e7754af5SKenneth E. Jansen  - `0`
672e7754af5SKenneth E. Jansen  - `m`
673e7754af5SKenneth E. Jansen
674e7754af5SKenneth E. Jansen* - `-idl_length`
675e7754af5SKenneth E. Jansen  - Length of IDL in the positive x direction
676e7754af5SKenneth E. Jansen  - `0`
677e7754af5SKenneth E. Jansen  - `m`
678e7754af5SKenneth E. Jansen
679fb9b2996SJames Wright* - `-sgs_model_type`
680fb9b2996SJames Wright  - Type of subgrid stress model to use. Currently only `data_driven` is available
681fb9b2996SJames Wright  - `none`
682fb9b2996SJames Wright  - string
683fb9b2996SJames Wright
684fb9b2996SJames Wright* - `-sgs_model_dd_leakyrelu_alpha`
685fb9b2996SJames Wright  - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU
686fb9b2996SJames Wright  - 0
687fb9b2996SJames Wright  -
688fb9b2996SJames Wright
689fb9b2996SJames Wright* - `-sgs_model_dd_parameter_dir`
690fb9b2996SJames Wright  - Path to directory with data-driven model parameters (weights, biases, etc.)
691fb9b2996SJames Wright  - `./dd_sgs_parameters`
692fb9b2996SJames Wright  - string
693fb9b2996SJames Wright
694f4fad612SJames Wright* - `-diff_filter_monitor`
695f4fad612SJames Wright  - Enable differential filter TSMonitor
696f4fad612SJames Wright  - `false`
697f4fad612SJames Wright  - boolean
698f4fad612SJames Wright
699f4fad612SJames Wright* - `-diff_filter_grid_based_width`
700f4fad612SJames Wright  - Use filter width based on the grid size
701f4fad612SJames Wright  - `false`
702f4fad612SJames Wright  - boolean
703f4fad612SJames Wright
704f4fad612SJames Wright* - `-diff_filter_width_scaling`
705f4fad612SJames Wright  - Anisotropic scaling for filter width in wall-aligned coordinates (snz)
706f4fad612SJames Wright  - `1,1,1`
707f4fad612SJames Wright  - `m`
708f4fad612SJames Wright
709f4fad612SJames Wright* - `-diff_filter_kernel_scaling`
710f4fad612SJames Wright  - Scaling to make differential kernel size equivalent to other filter kernels
711f4fad612SJames Wright  - `0.1`
712f4fad612SJames Wright  - `m^2`
713f4fad612SJames Wright
714f4fad612SJames Wright* - `-diff_filter_wall_damping_function`
715f4fad612SJames Wright  - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`)
716f4fad612SJames Wright  - `none`
717f4fad612SJames Wright  - string
718f4fad612SJames Wright
719f4fad612SJames Wright* - `-diff_filter_wall_damping_constant`
720aaa4e91fSJed Brown  - Constant for the wall-damping function. $A^+$ for `van_driest` damping function.
721f4fad612SJames Wright  - 25
722f4fad612SJames Wright  -
723f4fad612SJames Wright
724f4fad612SJames Wright* - `-diff_filter_friction_length`
725f4fad612SJames Wright  - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions
726f4fad612SJames Wright  - 0
727f4fad612SJames Wright  - `m`
728f4fad612SJames Wright
729*acad7547SJames Wright* - `-sgs_train_enable`
730*acad7547SJames Wright  - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis.
731*acad7547SJames Wright  - `false`
732*acad7547SJames Wright  - boolean
733*acad7547SJames Wright
734*acad7547SJames Wright* - `-sgs_train_write_data_interval`
735*acad7547SJames Wright  - Number of timesteps between writing training data into SmartRedis database
736*acad7547SJames Wright  - `1`
737*acad7547SJames Wright  -
738*acad7547SJames Wright
739*acad7547SJames Wright* - `-sgs_train_overwrite_data`
740*acad7547SJames Wright  - Whether new training data should overwrite old data on database
741*acad7547SJames Wright  - `true`
742*acad7547SJames Wright  - boolean
743*acad7547SJames Wright
744*acad7547SJames Wright* - `-smartsim_collocated_num_ranks`
745*acad7547SJames Wright  - Number of MPI ranks associated with each collocated database (i.e. ranks per node)
746*acad7547SJames Wright  - `1`
747*acad7547SJames Wright  -
748575f8106SLeila Ghaffari:::
749a515125bSLeila Ghaffari
750e7754af5SKenneth E. Jansen#### Gaussian Wave
75179b17980SJames Wright
752e7754af5SKenneth E. JansenThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
75379b17980SJames Wright
754e7754af5SKenneth E. Jansen:::{list-table} Gaussian Wave Runtime Options
75579b17980SJames Wright:header-rows: 1
75679b17980SJames Wright
75779b17980SJames Wright* - Option
75879b17980SJames Wright  - Description
75979b17980SJames Wright  - Default value
76079b17980SJames Wright  - Unit
76179b17980SJames Wright
762edf614b5SJed Brown* - `-freestream_riemann`
763edf614b5SJed Brown  - Riemann solver for boundaries (HLL or HLLC)
764edf614b5SJed Brown  - `hllc`
765edf614b5SJed Brown  -
766edf614b5SJed Brown
767edf614b5SJed Brown* - `-freestream_velocity`
76879b17980SJames Wright  - Freestream velocity vector
76979b17980SJames Wright  - `0,0,0`
77079b17980SJames Wright  - `m/s`
77179b17980SJames Wright
772edf614b5SJed Brown* - `-freestream_temperature`
77379b17980SJames Wright  - Freestream temperature
77479b17980SJames Wright  - `288`
77579b17980SJames Wright  - `K`
77679b17980SJames Wright
777edf614b5SJed Brown* - `-freestream_pressure`
778ff82278dSJames Wright  - Freestream pressure
77979b17980SJames Wright  - `1.01e5`
78079b17980SJames Wright  - `Pa`
78179b17980SJames Wright
78279b17980SJames Wright* - `-epicenter`
78379b17980SJames Wright  - Coordinates of center of perturbation
78479b17980SJames Wright  - `0,0,0`
78579b17980SJames Wright  - `m`
78679b17980SJames Wright
78779b17980SJames Wright* - `-amplitude`
78879b17980SJames Wright  - Amplitude of the perturbation
78979b17980SJames Wright  - `0.1`
79079b17980SJames Wright  -
79179b17980SJames Wright
79279b17980SJames Wright* - `-width`
79379b17980SJames Wright  - Width parameter of the perturbation
79479b17980SJames Wright  - `0.002`
79579b17980SJames Wright  - `m`
79679b17980SJames Wright
79779b17980SJames Wright:::
79879b17980SJames Wright
799e7754af5SKenneth E. JansenThis problem can be run with the `gaussianwave.yaml` file via:
80079b17980SJames Wright
80179b17980SJames Wright```
802e7754af5SKenneth E. Jansen./navierstokes -options_file gaussianwave.yaml
80379b17980SJames Wright```
80479b17980SJames Wright
805e7754af5SKenneth E. Jansen```{literalinclude} ../../../../../examples/fluids/gaussianwave.yaml
80679b17980SJames Wright:language: yaml
80779b17980SJames Wright```
808edd152dcSJed Brown
809b8fb7609SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder
810b8fb7609SAdeleke O. Bankole
811b8fb7609SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
812b8fb7609SAdeleke O. Bankole
813b8fb7609SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options
814b8fb7609SAdeleke O. Bankole:header-rows: 1
815b8fb7609SAdeleke O. Bankole
816b8fb7609SAdeleke O. Bankole* - Option
817b8fb7609SAdeleke O. Bankole  - Description
818b8fb7609SAdeleke O. Bankole  - Default value
819b8fb7609SAdeleke O. Bankole  - Unit
820b8fb7609SAdeleke O. Bankole
821b8fb7609SAdeleke O. Bankole* - `-freestream_velocity`
822b8fb7609SAdeleke O. Bankole  - Freestream velocity vector
823b8fb7609SAdeleke O. Bankole  - `0,0,0`
824b8fb7609SAdeleke O. Bankole  - `m/s`
825b8fb7609SAdeleke O. Bankole
826b8fb7609SAdeleke O. Bankole* - `-freestream_temperature`
827b8fb7609SAdeleke O. Bankole  - Freestream temperature
828b8fb7609SAdeleke O. Bankole  - `288`
829b8fb7609SAdeleke O. Bankole  - `K`
830b8fb7609SAdeleke O. Bankole
831b8fb7609SAdeleke O. Bankole* - `-freestream_pressure`
832b8fb7609SAdeleke O. Bankole  - Freestream pressure
833b8fb7609SAdeleke O. Bankole  - `1.01e5`
834b8fb7609SAdeleke O. Bankole  - `Pa`
835b8fb7609SAdeleke O. Bankole
836b8fb7609SAdeleke O. Bankole:::
837b8fb7609SAdeleke O. Bankole
838b8fb7609SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
839b8fb7609SAdeleke O. BankoleTo run this problem, first generate a mesh:
840b8fb7609SAdeleke O. Bankole
841b8fb7609SAdeleke O. Bankole```console
842b8fb7609SAdeleke O. Bankole$ make -C examples/fluids/meshes
843b8fb7609SAdeleke O. Bankole```
844b8fb7609SAdeleke O. Bankole
845b8fb7609SAdeleke O. BankoleThen run by building the executable and running:
846b8fb7609SAdeleke O. Bankole
847b8fb7609SAdeleke O. Bankole```console
848b8fb7609SAdeleke O. Bankole$ make build/fluids-navierstokes
849c5e9980aSAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_
850b8fb7609SAdeleke O. Bankole```
851b8fb7609SAdeleke O. Bankole
852c5e9980aSAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
853c5e9980aSAdeleke 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.
854c5e9980aSAdeleke O. Bankole
855c5e9980aSAdeleke O. Bankole```console
8562004e3acSAdeleke O. Bankole$ python examples/fluids/postprocess/vortexshedding.py
857c5e9980aSAdeleke O. Bankole```
858b8fb7609SAdeleke O. Bankole
859b8fb7609SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml
860b8fb7609SAdeleke O. Bankole:language: yaml
861b8fb7609SAdeleke O. Bankole```
862b8fb7609SAdeleke O. Bankole
863af8870a9STimothy Aiken#### Density current
864af8870a9STimothy Aiken
86583c686feSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
866bb8a0c61SJames Wright
867bb8a0c61SJames Wright:::{list-table} Density Current Runtime Options
868bb8a0c61SJames Wright:header-rows: 1
869bb8a0c61SJames Wright
870bb8a0c61SJames Wright* - Option
871bb8a0c61SJames Wright  - Description
872bb8a0c61SJames Wright  - Default value
873bb8a0c61SJames Wright  - Unit
874bb8a0c61SJames Wright
875bb8a0c61SJames Wright* - `-center`
876bb8a0c61SJames Wright  - Location of bubble center
877bb8a0c61SJames Wright  - `(lx,ly,lz)/2`
878bb8a0c61SJames Wright  - `(m,m,m)`
879bb8a0c61SJames Wright
880bb8a0c61SJames Wright* - `-dc_axis`
881bb8a0c61SJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
882bb8a0c61SJames Wright  - `(0,0,0)`
883bb8a0c61SJames Wright  -
884bb8a0c61SJames Wright
885bb8a0c61SJames Wright* - `-rc`
886bb8a0c61SJames Wright  - Characteristic radius of thermal bubble
887bb8a0c61SJames Wright  - `1000`
888bb8a0c61SJames Wright  - `m`
889bb8a0c61SJames Wright
890bb8a0c61SJames Wright* - `-theta0`
891bb8a0c61SJames Wright  - Reference potential temperature
892bb8a0c61SJames Wright  - `300`
893bb8a0c61SJames Wright  - `K`
894bb8a0c61SJames Wright
895bb8a0c61SJames Wright* - `-thetaC`
896bb8a0c61SJames Wright  - Perturbation of potential temperature
897bb8a0c61SJames Wright  - `-15`
898bb8a0c61SJames Wright  - `K`
899bb8a0c61SJames Wright
900bb8a0c61SJames Wright* - `-P0`
901bb8a0c61SJames Wright  - Atmospheric pressure
902bb8a0c61SJames Wright  - `1E5`
903bb8a0c61SJames Wright  - `Pa`
904bb8a0c61SJames Wright
905bb8a0c61SJames Wright* - `-N`
906bb8a0c61SJames Wright  - Brunt-Vaisala frequency
907bb8a0c61SJames Wright  - `0.01`
908bb8a0c61SJames Wright  - `1/s`
909bb8a0c61SJames Wright:::
910bb8a0c61SJames Wright
911575f8106SLeila GhaffariThis problem can be run with:
912ea10196cSJeremy L Thompson
913575f8106SLeila Ghaffari```
914bb8a0c61SJames 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
915bb8a0c61SJames Wright```
916bb8a0c61SJames Wright
917af8870a9STimothy Aiken#### Channel flow
918af8870a9STimothy Aiken
91983c686feSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
920bb8a0c61SJames Wright
921bb8a0c61SJames Wright:::{list-table} Channel Runtime Options
922bb8a0c61SJames Wright:header-rows: 1
923bb8a0c61SJames Wright
924bb8a0c61SJames Wright* - Option
925bb8a0c61SJames Wright  - Description
926bb8a0c61SJames Wright  - Default value
927bb8a0c61SJames Wright  - Unit
928bb8a0c61SJames Wright
929bb8a0c61SJames Wright* - `-umax`
930bb8a0c61SJames Wright  - Maximum/centerline velocity of the flow
931bb8a0c61SJames Wright  - `10`
932bb8a0c61SJames Wright  - `m/s`
933bb8a0c61SJames Wright
934bb8a0c61SJames Wright* - `-theta0`
935bb8a0c61SJames Wright  - Reference potential temperature
936bb8a0c61SJames Wright  - `300`
937bb8a0c61SJames Wright  - `K`
938bb8a0c61SJames Wright
939bb8a0c61SJames Wright* - `-P0`
940bb8a0c61SJames Wright  - Atmospheric pressure
941bb8a0c61SJames Wright  - `1E5`
942bb8a0c61SJames Wright  - `Pa`
943edd152dcSJed Brown
944edd152dcSJed Brown* - `-body_force_scale`
945edd152dcSJed Brown  - Multiplier for body force (`-1` for flow reversal)
946edd152dcSJed Brown  - 1
947edd152dcSJed Brown  -
948bb8a0c61SJames Wright:::
949bb8a0c61SJames Wright
950bb8a0c61SJames WrightThis problem can be run with the `channel.yaml` file via:
951bb8a0c61SJames Wright
952bb8a0c61SJames Wright```
953bb8a0c61SJames Wright./navierstokes -options_file channel.yaml
954bb8a0c61SJames Wright```
955bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
956bb8a0c61SJames Wright:language: yaml
957bb8a0c61SJames Wright```
958bb8a0c61SJames Wright
959c8c30d87SJed Brown(example-blasius)=
960c8c30d87SJed Brown
961af8870a9STimothy Aiken#### Blasius boundary layer
962af8870a9STimothy Aiken
96383c686feSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
964bb8a0c61SJames Wright
965bb8a0c61SJames Wright:::{list-table} Blasius Runtime Options
966bb8a0c61SJames Wright:header-rows: 1
967bb8a0c61SJames Wright
968bb8a0c61SJames Wright* - Option
969bb8a0c61SJames Wright  - Description
970bb8a0c61SJames Wright  - Default value
971bb8a0c61SJames Wright  - Unit
972bb8a0c61SJames Wright
973aef1eb53SLeila Ghaffari* - `-velocity_infinity`
974bb8a0c61SJames Wright  - Freestream velocity
975bb8a0c61SJames Wright  - `40`
976bb8a0c61SJames Wright  - `m/s`
977bb8a0c61SJames Wright
978aef1eb53SLeila Ghaffari* - `-temperature_infinity`
979aef1eb53SLeila Ghaffari  - Freestream temperature
980bb8a0c61SJames Wright  - `288`
981bb8a0c61SJames Wright  - `K`
982bb8a0c61SJames Wright
983aef1eb53SLeila Ghaffari* - `-temperature_wall`
984aef1eb53SLeila Ghaffari  - Wall temperature
9850d850f2eSLeila Ghaffari  - `288`
986aef1eb53SLeila Ghaffari  - `K`
987aef1eb53SLeila Ghaffari
988aef1eb53SLeila Ghaffari* - `-delta0`
989aef1eb53SLeila Ghaffari  - Boundary layer height at the inflow
990aef1eb53SLeila Ghaffari  - `4.2e-3`
991aef1eb53SLeila Ghaffari  - `m`
992aef1eb53SLeila Ghaffari
993bb8a0c61SJames Wright* - `-P0`
994bb8a0c61SJames Wright  - Atmospheric pressure
995bb8a0c61SJames Wright  - `1.01E5`
996bb8a0c61SJames Wright  - `Pa`
997bb8a0c61SJames Wright
998c029f0c5SJames Wright* - `-platemesh_modify_mesh`
999c029f0c5SJames Wright  - Whether to modify the mesh using the given options below.
1000c029f0c5SJames Wright  - `false`
1001c029f0c5SJames Wright  -
1002c029f0c5SJames Wright
100398b448e2SJames Wright* - `-platemesh_refine_height`
100498b448e2SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
1005bb8a0c61SJames Wright  - `5.9E-4`
1006bb8a0c61SJames Wright  - `m`
1007bb8a0c61SJames Wright
100898b448e2SJames Wright* - `-platemesh_Ndelta`
100998b448e2SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
1010bb8a0c61SJames Wright  - `45`
1011bb8a0c61SJames Wright  -
1012bb8a0c61SJames Wright
101398b448e2SJames Wright* - `-platemesh_growth`
1014bb8a0c61SJames Wright  - Growth rate of the elements in the refinement region
1015bb8a0c61SJames Wright  - `1.08`
1016bb8a0c61SJames Wright  -
1017bb8a0c61SJames Wright
101898b448e2SJames Wright* - `-platemesh_top_angle`
1019bb8a0c61SJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
1020bb8a0c61SJames Wright  - `5`
1021bb8a0c61SJames Wright  - `degrees`
1022493642f1SJames Wright
102398b448e2SJames Wright* - `-platemesh_y_node_locs_path`
102498b448e2SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
102598b448e2SJames Wright  - `""`
102698b448e2SJames Wright  -
1027aef1eb53SLeila Ghaffari
1028c029f0c5SJames Wright* - `-stg_use`
1029c029f0c5SJames Wright  - Whether to use STG for the inflow conditions
1030c029f0c5SJames Wright  - `false`
1031c029f0c5SJames Wright  -
1032c029f0c5SJames Wright
10330d850f2eSLeila Ghaffari* - `-n_chebyshev`
1034aef1eb53SLeila Ghaffari  - Number of Chebyshev terms
1035aef1eb53SLeila Ghaffari  - `20`
1036aef1eb53SLeila Ghaffari  -
1037aef1eb53SLeila Ghaffari
10380d850f2eSLeila Ghaffari* - `-chebyshev_`
10390d850f2eSLeila Ghaffari  - Prefix for Chebyshev snes solve
10400d850f2eSLeila Ghaffari  -
10410d850f2eSLeila Ghaffari  -
10420d850f2eSLeila Ghaffari
1043bb8a0c61SJames Wright:::
1044bb8a0c61SJames Wright
1045bb8a0c61SJames WrightThis problem can be run with the `blasius.yaml` file via:
1046bb8a0c61SJames Wright
1047bb8a0c61SJames Wright```
1048bb8a0c61SJames Wright./navierstokes -options_file blasius.yaml
1049bb8a0c61SJames Wright```
1050bb8a0c61SJames Wright
1051bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
1052bb8a0c61SJames Wright:language: yaml
1053575f8106SLeila Ghaffari```
1054493642f1SJames Wright
1055493642f1SJames Wright#### STG Inflow for Flat Plate
1056493642f1SJames Wright
1057b46bfc5eSJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
1058493642f1SJames Wright
1059493642f1SJames Wright:::{list-table} Blasius Runtime Options
1060493642f1SJames Wright:header-rows: 1
1061493642f1SJames Wright
1062493642f1SJames Wright* - Option
1063493642f1SJames Wright  - Description
1064493642f1SJames Wright  - Default value
1065493642f1SJames Wright  - Unit
1066493642f1SJames Wright
1067493642f1SJames Wright* - `-stg_inflow_path`
1068493642f1SJames Wright  - Path to the STGInflow file
1069493642f1SJames Wright  - `./STGInflow.dat`
1070493642f1SJames Wright  -
1071493642f1SJames Wright
1072493642f1SJames Wright* - `-stg_rand_path`
1073493642f1SJames Wright  - Path to the STGRand file
1074493642f1SJames Wright  - `./STGRand.dat`
1075493642f1SJames Wright  -
1076493642f1SJames Wright
1077493642f1SJames Wright* - `-stg_alpha`
1078493642f1SJames Wright  - Growth rate of the wavemodes
1079493642f1SJames Wright  - `1.01`
1080493642f1SJames Wright  -
1081493642f1SJames Wright
1082493642f1SJames Wright* - `-stg_u0`
1083493642f1SJames Wright  - Convective velocity, $U_0$
1084493642f1SJames Wright  - `0.0`
1085493642f1SJames Wright  - `m/s`
1086493642f1SJames Wright
1087493642f1SJames Wright* - `-stg_mean_only`
1088493642f1SJames Wright  - Only impose the mean velocity (no fluctutations)
1089493642f1SJames Wright  - `false`
1090493642f1SJames Wright  -
1091493642f1SJames Wright
109229ea39e3SJames Wright* - `-stg_strong`
109329ea39e3SJames Wright  - Strongly enforce the STG inflow boundary condition
109429ea39e3SJames Wright  - `false`
109529ea39e3SJames Wright  -
109629ea39e3SJames Wright
1097d4e0f297SJames Wright* - `-stg_fluctuating_IC`
1098d4e0f297SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
1099d4e0f297SJames Wright  - `false`
1100d4e0f297SJames Wright  -
1101d4e0f297SJames Wright
1102493642f1SJames Wright:::
1103493642f1SJames Wright
1104493642f1SJames WrightThis problem can be run with the `blasius.yaml` file via:
1105493642f1SJames Wright
1106493642f1SJames Wright```
1107493642f1SJames Wright./navierstokes -options_file blasius.yaml -stg_use true
1108493642f1SJames Wright```
1109493642f1SJames Wright
1110b46bfc5eSJeremy L ThompsonNote the added `-stg_use true` flag
1111b46bfc5eSJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
1112