xref: /honee/README.md (revision f31f4833d4364b9626e2079df31d73ddeba2c602)
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
11575f8106SLeila GhaffariBuild by using:
12ea10196cSJeremy L Thompson
13ea10196cSJeremy L Thompson`make`
14ea10196cSJeremy L Thompson
15575f8106SLeila Ghaffariand run with:
16ea10196cSJeremy L Thompson
17575f8106SLeila Ghaffari```
18575f8106SLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree]
19575f8106SLeila Ghaffari```
20ea10196cSJeremy L Thompson
21575f8106SLeila Ghaffari## Runtime options
22ea10196cSJeremy L Thompson
23575f8106SLeila Ghaffari% inclusion-fluids-marker
24ea10196cSJeremy L Thompson
25575f8106SLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options.
26575f8106SLeila GhaffariThe following options are common among all problem types:
27ea10196cSJeremy L Thompson
28575f8106SLeila Ghaffari:::{list-table} Common Runtime Options
29575f8106SLeila Ghaffari:header-rows: 1
30ea10196cSJeremy L Thompson
31575f8106SLeila Ghaffari* - Option
32575f8106SLeila Ghaffari  - Description
33575f8106SLeila Ghaffari  - Default value
34ea10196cSJeremy L Thompson
35575f8106SLeila Ghaffari* - `-ceed`
36575f8106SLeila Ghaffari  - CEED resource specifier
37575f8106SLeila Ghaffari  - `/cpu/self/opt/blocked`
38ea10196cSJeremy L Thompson
39707de87aSJames Wright* - `-test_type`
40707de87aSJames Wright  - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified
41707de87aSJames Wright  - `none`
42ea10196cSJeremy L Thompson
43575f8106SLeila Ghaffari* - `-compare_final_state_atol`
44575f8106SLeila Ghaffari  - Test absolute tolerance
45575f8106SLeila Ghaffari  - `1E-11`
46ea10196cSJeremy L Thompson
47575f8106SLeila Ghaffari* - `-compare_final_state_filename`
48575f8106SLeila Ghaffari  - Test filename
49575f8106SLeila Ghaffari  -
50ea10196cSJeremy L Thompson
51575f8106SLeila Ghaffari* - `-problem`
52575f8106SLeila Ghaffari  - Problem to solve (`advection`, `advection2d`, `density_current`, or `euler_vortex`)
53575f8106SLeila Ghaffari  - `density_current`
54ea10196cSJeremy L Thompson
55575f8106SLeila Ghaffari* - `-implicit`
56575f8106SLeila Ghaffari  - Use implicit time integartor formulation
57575f8106SLeila Ghaffari  -
58ea10196cSJeremy L Thompson
59575f8106SLeila Ghaffari* - `-degree`
60575f8106SLeila Ghaffari  - Polynomial degree of tensor product basis (must be >= 1)
61575f8106SLeila Ghaffari  - `1`
62ea10196cSJeremy L Thompson
63c1680e98SJeremy L Thompson* - `-q_extra`
64575f8106SLeila Ghaffari  - Number of extra quadrature points
651219168aSLeila Ghaffari  - `0`
66ea10196cSJeremy L Thompson
67852e5969SJed Brown* - `-ts_monitor_solution`
68852e5969SJed Brown  - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`)
69852e5969SJed Brown  -
70ea10196cSJeremy L Thompson
71852e5969SJed Brown* - `-ts_monitor_solution_interval`
72852e5969SJed Brown  - Number of time steps between visualization output frames.
73852e5969SJed Brown  - `1`
74852e5969SJed Brown
75852e5969SJed Brown* - `-viewer_cgns_batch_size`
76852e5969SJed Brown  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
77852e5969SJed Brown  - `20`
78852e5969SJed Brown
79852e5969SJed Brown* - `-checkpoint_interval`
80852e5969SJed Brown  - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only
81575f8106SLeila Ghaffari  - `10`
82ea10196cSJeremy L Thompson
83852e5969SJed Brown* - `-checkpoint_vtk`
84852e5969SJed Brown  - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead.
85852e5969SJed Brown  - `false`
86852e5969SJed Brown
87852e5969SJed Brown* - `-viz_refine`
88852e5969SJed Brown  - Use regular refinement for VTK visualization
89852e5969SJed Brown  - `0`
90852e5969SJed Brown
91575f8106SLeila Ghaffari* - `-output_dir`
92852e5969SJed Brown  - Output directory for binary checkpoints and VTK files (if enabled).
93575f8106SLeila Ghaffari  - `.`
94ea10196cSJeremy L Thompson
9591a36801SJames Wright* - `-output_add_stepnum2bin`
9691a36801SJames Wright  - Whether to add step numbers to output binary files
9791a36801SJames Wright  - `false`
9891a36801SJames Wright
9991a36801SJames Wright* - `-continue`
10091a36801SJames Wright  - Continue from previous solution (input is step number of previous solution)
10191a36801SJames Wright  - `0`
10291a36801SJames Wright
10391a36801SJames Wright* - `-continue_filename`
10491a36801SJames Wright  - Path to solution binary file from which to continue from
10591a36801SJames Wright  - `[output_dir]/ns-solution.bin`
10691a36801SJames Wright
10791a36801SJames Wright* - `-continue_time_filename`
1089293eaa1SJed Brown  - Path to time stamp binary file (only for legacy checkpoints)
10991a36801SJames Wright  - `[output_dir]/ns-time.bin`
11091a36801SJames Wright
111f4277be3SLeila Ghaffari* - `-bc_wall`
112f4277be3SLeila Ghaffari  - Use wall boundary conditions on this list of faces
113f4277be3SLeila Ghaffari  -
114f4277be3SLeila Ghaffari
115f4277be3SLeila Ghaffari* - `-wall_comps`
116f4277be3SLeila Ghaffari  - An array of constrained component numbers for wall BCs
117f4277be3SLeila Ghaffari  -
118f4277be3SLeila Ghaffari
119f4277be3SLeila Ghaffari* - `-bc_slip_x`
120f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the x component, on this list of faces
121f4277be3SLeila Ghaffari  -
122f4277be3SLeila Ghaffari
123f4277be3SLeila Ghaffari* - `-bc_slip_y`
124f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the y component, on this list of faces
125f4277be3SLeila Ghaffari  -
126f4277be3SLeila Ghaffari
127f4277be3SLeila Ghaffari* - `-bc_slip_z`
128f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the z component, on this list of faces
129f4277be3SLeila Ghaffari  -
130f4277be3SLeila Ghaffari
131f4277be3SLeila Ghaffari* - `-bc_inflow`
132f4277be3SLeila Ghaffari  - Use inflow boundary conditions on this list of faces
133f4277be3SLeila Ghaffari  -
134f4277be3SLeila Ghaffari
135f4277be3SLeila Ghaffari* - `-bc_outflow`
136f4277be3SLeila Ghaffari  - Use outflow boundary conditions on this list of faces
137f4277be3SLeila Ghaffari  -
1388ef11c93SLeila Ghaffari
13979b17980SJames Wright* - `-bc_freestream`
14079b17980SJames Wright  - Use freestream boundary conditions on this list of faces
14179b17980SJames Wright  -
14279b17980SJames Wright
143c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval`
144a8ce54bfSJames Wright  - Number of timesteps between statistics collection
145a8ce54bfSJames Wright  - `1`
146a8ce54bfSJames Wright
147c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer`
148c931fa59SJames 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.
149109cd75bSJames Wright  -
150109cd75bSJames Wright
151c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval`
152a8ce54bfSJames Wright  - Number of timesteps between statistics file writing (`-1` means only at end of run)
153a8ce54bfSJames Wright  - `-1`
154a8ce54bfSJames Wright
155c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size`
156109cd75bSJames Wright  - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`).
157109cd75bSJames Wright  - `20`
158109cd75bSJames Wright
159c5e9980aSAdeleke O. Bankole* - `-ts_monitor_wall_force`
160c5e9980aSAdeleke O. Bankole  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
161c5e9980aSAdeleke O. Bankole  -
162c5e9980aSAdeleke O. Bankole
163*f31f4833SJames Wright* - `-mesh_transform`
164*f31f4833SJames Wright  - Transform the mesh, usually for an initial box mesh.
165*f31f4833SJames Wright  - `none`
166*f31f4833SJames Wright
167575f8106SLeila Ghaffari* - `-snes_view`
168575f8106SLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
169575f8106SLeila Ghaffari  -
1708ef11c93SLeila Ghaffari
171575f8106SLeila Ghaffari* - `-log_view`
172575f8106SLeila Ghaffari  - View PETSc performance log
173575f8106SLeila Ghaffari  -
174ea10196cSJeremy L Thompson
175575f8106SLeila Ghaffari* - `-help`
176575f8106SLeila Ghaffari  - View comprehensive information about run-time options
177575f8106SLeila Ghaffari  -
178575f8106SLeila Ghaffari:::
179ea10196cSJeremy L Thompson
18079b17980SJames 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:
181f4277be3SLeila Ghaffari
182bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels
183bb8a0c61SJames Wright:header-rows: 1
184bb8a0c61SJames Wright* - PETSc Face Name
185bb8a0c61SJames Wright  - Cartesian direction
186bb8a0c61SJames Wright  - Face ID
187bb8a0c61SJames Wright
188bb8a0c61SJames Wright* - faceMarkerBottom
189bb8a0c61SJames Wright  - -z
190bb8a0c61SJames Wright  - 1
191bb8a0c61SJames Wright
192bb8a0c61SJames Wright* - faceMarkerRight
193bb8a0c61SJames Wright  - +x
194bb8a0c61SJames Wright  - 2
195bb8a0c61SJames Wright
196bb8a0c61SJames Wright* - faceMarkerTop
197bb8a0c61SJames Wright  - +z
198bb8a0c61SJames Wright  - 3
199bb8a0c61SJames Wright
200bb8a0c61SJames Wright* - faceMarkerLeft
201bb8a0c61SJames Wright  - -x
202bb8a0c61SJames Wright  - 4
203bb8a0c61SJames Wright:::
204bb8a0c61SJames Wright
205c52f2c1bSLeila Ghaffari:::{list-table} 3D Face ID Labels
206bb8a0c61SJames Wright:header-rows: 1
207bb8a0c61SJames Wright* - PETSc Face Name
208bb8a0c61SJames Wright  - Cartesian direction
209bb8a0c61SJames Wright  - Face ID
210bb8a0c61SJames Wright
211bb8a0c61SJames Wright* - faceMarkerBottom
212bb8a0c61SJames Wright  - -z
213bb8a0c61SJames Wright  - 1
214bb8a0c61SJames Wright
215bb8a0c61SJames Wright* - faceMarkerTop
216bb8a0c61SJames Wright  - +z
217bb8a0c61SJames Wright  - 2
218bb8a0c61SJames Wright
219bb8a0c61SJames Wright* - faceMarkerFront
220bb8a0c61SJames Wright  - -y
221bb8a0c61SJames Wright  - 3
222bb8a0c61SJames Wright
223bb8a0c61SJames Wright* - faceMarkerBack
224bb8a0c61SJames Wright  - +y
225bb8a0c61SJames Wright  - 4
226bb8a0c61SJames Wright
227bb8a0c61SJames Wright* - faceMarkerRight
228bb8a0c61SJames Wright  - +x
229bb8a0c61SJames Wright  - 5
230bb8a0c61SJames Wright
231bb8a0c61SJames Wright* - faceMarkerLeft
232bb8a0c61SJames Wright  - -x
233bb8a0c61SJames Wright  - 6
234bb8a0c61SJames Wright:::
235f4277be3SLeila Ghaffari
236c8c30d87SJed Brown### Boundary conditions
237c8c30d87SJed Brown
238c8c30d87SJed BrownBoundary conditions for compressible viscous flows are notoriously tricky. Here we offer some recommendations
239c8c30d87SJed Brown
240c8c30d87SJed Brown#### Inflow
241c8c30d87SJed Brown
242c8c30d87SJed 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).
243c8c30d87SJed BrownIt is stable and the least reflective boundary condition for acoustics.
244c8c30d87SJed Brown
245c8c30d87SJed BrownIf near a viscous wall, you may want a specified inflow profile.
246c8c30d87SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
247c8c30d87SJed 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.
248c8c30d87SJed BrownThe strong approach gives sharper resolution of velocity structures.
249c8c30d87SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
250c8c30d87SJed Brown
251a899b243SJames Wright#### Outflow
252c8c30d87SJed Brown
253c8c30d87SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
254c8c30d87SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
255c8c30d87SJed 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.
256c8c30d87SJed Brown
257c8c30d87SJed 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.
258c8c30d87SJed Brown
259c8c30d87SJed 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).
260c8c30d87SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
261c8c30d87SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
262c8c30d87SJed Brown
263a899b243SJames Wright#### Periodicity
264c8c30d87SJed Brown
265c8c30d87SJed BrownPETSc provides two ways to specify periodicity:
266c8c30d87SJed Brown
267c8c30d87SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
268c8c30d87SJed Brown
269c8c30d87SJed Brown```yaml
270c8c30d87SJed Browndm_plex:
271c8c30d87SJed Brown  shape: box
272c8c30d87SJed Brown  box_faces: 10,12,4
273c8c30d87SJed Brown  box_bd: none,none,periodic
274c8c30d87SJed Brown```
275c8c30d87SJed Brown
276c5e9980aSAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
277c5e9980aSAdeleke 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.
278c5e9980aSAdeleke O. Bankole
279c5e9980aSAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
280c5e9980aSAdeleke O. Bankole
281c5e9980aSAdeleke O. Bankole```yaml
282c5e9980aSAdeleke O. Bankoledm_plex:
283c5e9980aSAdeleke O. Bankole  shape: zbox
284c5e9980aSAdeleke O. Bankole  box_faces: 10,12,4
285c5e9980aSAdeleke O. Bankole  box_bd: none,none,periodic
286c5e9980aSAdeleke O. Bankole```
287c5e9980aSAdeleke O. Bankole
288c5e9980aSAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use.
289c5e9980aSAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity.
290c5e9980aSAdeleke 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.
291c8c30d87SJed Brown
292af8870a9STimothy Aiken### Advection
293af8870a9STimothy Aiken
294b46bfc5eSJeremy 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$.
295b46bfc5eSJeremy L ThompsonThese are available in 2D and 3D.
296af8870a9STimothy Aiken
297af8870a9STimothy Aiken#### 2D advection
298af8870a9STimothy Aiken
299575f8106SLeila GhaffariFor the 2D advection problem, the following additional command-line options are available:
300ea10196cSJeremy L Thompson
301575f8106SLeila Ghaffari:::{list-table} Advection2D Runtime Options
302575f8106SLeila Ghaffari:header-rows: 1
3038ef11c93SLeila Ghaffari
304575f8106SLeila Ghaffari* - Option
305575f8106SLeila Ghaffari  - Description
306575f8106SLeila Ghaffari  - Default value
307575f8106SLeila Ghaffari  - Unit
3088ef11c93SLeila Ghaffari
309575f8106SLeila Ghaffari* - `-rc`
310575f8106SLeila Ghaffari  - Characteristic radius of thermal bubble
311575f8106SLeila Ghaffari  - `1000`
312575f8106SLeila Ghaffari  - `m`
3138ef11c93SLeila Ghaffari
314575f8106SLeila Ghaffari* - `-units_meter`
315575f8106SLeila Ghaffari  - 1 meter in scaled length units
316575f8106SLeila Ghaffari  - `1E-2`
317575f8106SLeila Ghaffari  -
3188ef11c93SLeila Ghaffari
319575f8106SLeila Ghaffari* - `-units_second`
320575f8106SLeila Ghaffari  - 1 second in scaled time units
321575f8106SLeila Ghaffari  - `1E-2`
322575f8106SLeila Ghaffari  -
3238ef11c93SLeila Ghaffari
324575f8106SLeila Ghaffari* - `-units_kilogram`
325575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
326575f8106SLeila Ghaffari  - `1E-6`
327575f8106SLeila Ghaffari  -
328a515125bSLeila Ghaffari
329575f8106SLeila Ghaffari* - `-strong_form`
330575f8106SLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
331575f8106SLeila Ghaffari  - `0`
332575f8106SLeila Ghaffari  -
333a515125bSLeila Ghaffari
334575f8106SLeila Ghaffari* - `-stab`
335575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
336575f8106SLeila Ghaffari  - `none`
337575f8106SLeila Ghaffari  -
338a515125bSLeila Ghaffari
339575f8106SLeila Ghaffari* - `-CtauS`
340575f8106SLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
341575f8106SLeila Ghaffari  - `0`
342575f8106SLeila Ghaffari  -
343a515125bSLeila Ghaffari
344575f8106SLeila Ghaffari* - `-wind_type`
345575f8106SLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
346575f8106SLeila Ghaffari  - `rotation`
347575f8106SLeila Ghaffari  -
348a515125bSLeila Ghaffari
349575f8106SLeila Ghaffari* - `-wind_translation`
350575f8106SLeila Ghaffari  - Constant wind vector when `-wind_type translation`
351575f8106SLeila Ghaffari  - `1,0,0`
352575f8106SLeila Ghaffari  -
3538ef11c93SLeila Ghaffari
354575f8106SLeila Ghaffari* - `-E_wind`
355575f8106SLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
356575f8106SLeila Ghaffari  - `1E6`
357575f8106SLeila Ghaffari  - `J`
358575f8106SLeila Ghaffari:::
359268c6924SLeila Ghaffari
360575f8106SLeila GhaffariAn example of the `rotation` mode can be run with:
361268c6924SLeila Ghaffari
362575f8106SLeila Ghaffari```
363f4277be3SLeila 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
364575f8106SLeila Ghaffari```
365268c6924SLeila Ghaffari
366575f8106SLeila Ghaffariand the `translation` mode with:
367268c6924SLeila Ghaffari
368575f8106SLeila Ghaffari```
369f4277be3SLeila 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
370575f8106SLeila Ghaffari```
371f4277be3SLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
372268c6924SLeila Ghaffari
373af8870a9STimothy Aiken#### 3D advection
374af8870a9STimothy Aiken
375575f8106SLeila GhaffariFor the 3D advection problem, the following additional command-line options are available:
376268c6924SLeila Ghaffari
377575f8106SLeila Ghaffari:::{list-table} Advection3D Runtime Options
378575f8106SLeila Ghaffari:header-rows: 1
379268c6924SLeila Ghaffari
380575f8106SLeila Ghaffari* - Option
381575f8106SLeila Ghaffari  - Description
382575f8106SLeila Ghaffari  - Default value
383575f8106SLeila Ghaffari  - Unit
384268c6924SLeila Ghaffari
385575f8106SLeila Ghaffari* - `-rc`
386575f8106SLeila Ghaffari  - Characteristic radius of thermal bubble
387575f8106SLeila Ghaffari  - `1000`
388575f8106SLeila Ghaffari  - `m`
389268c6924SLeila Ghaffari
390575f8106SLeila Ghaffari* - `-units_meter`
391575f8106SLeila Ghaffari  - 1 meter in scaled length units
392575f8106SLeila Ghaffari  - `1E-2`
393575f8106SLeila Ghaffari  -
394268c6924SLeila Ghaffari
395575f8106SLeila Ghaffari* - `-units_second`
396575f8106SLeila Ghaffari  - 1 second in scaled time units
397575f8106SLeila Ghaffari  - `1E-2`
398575f8106SLeila Ghaffari  -
399268c6924SLeila Ghaffari
400575f8106SLeila Ghaffari* - `-units_kilogram`
401575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
402575f8106SLeila Ghaffari  - `1E-6`
403575f8106SLeila Ghaffari  -
404268c6924SLeila Ghaffari
405575f8106SLeila Ghaffari* - `-strong_form`
406575f8106SLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
407575f8106SLeila Ghaffari  - `0`
408575f8106SLeila Ghaffari  -
409268c6924SLeila Ghaffari
410575f8106SLeila Ghaffari* - `-stab`
411575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
412575f8106SLeila Ghaffari  - `none`
413575f8106SLeila Ghaffari  -
414268c6924SLeila Ghaffari
415575f8106SLeila Ghaffari* - `-CtauS`
416575f8106SLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
417575f8106SLeila Ghaffari  - `0`
418575f8106SLeila Ghaffari  -
419268c6924SLeila Ghaffari
420575f8106SLeila Ghaffari* - `-wind_type`
421575f8106SLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
422575f8106SLeila Ghaffari  - `rotation`
423575f8106SLeila Ghaffari  -
424268c6924SLeila Ghaffari
425575f8106SLeila Ghaffari* - `-wind_translation`
426575f8106SLeila Ghaffari  - Constant wind vector when `-wind_type translation`
427575f8106SLeila Ghaffari  - `1,0,0`
428575f8106SLeila Ghaffari  -
429268c6924SLeila Ghaffari
430575f8106SLeila Ghaffari* - `-E_wind`
431575f8106SLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
432575f8106SLeila Ghaffari  - `1E6`
433575f8106SLeila Ghaffari  - `J`
434268c6924SLeila Ghaffari
435575f8106SLeila Ghaffari* - `-bubble_type`
436575f8106SLeila Ghaffari  - `sphere` (3D) or `cylinder` (2D)
437a899b243SJames Wright  - `sphere`
438575f8106SLeila Ghaffari  -
439268c6924SLeila Ghaffari
440575f8106SLeila Ghaffari* - `-bubble_continuity`
441575f8106SLeila Ghaffari  - `smooth`, `back_sharp`, or `thick`
442575f8106SLeila Ghaffari  - `smooth`
443575f8106SLeila Ghaffari  -
444575f8106SLeila Ghaffari:::
445ea10196cSJeremy L Thompson
446575f8106SLeila GhaffariAn example of the `rotation` mode can be run with:
447ea10196cSJeremy L Thompson
448575f8106SLeila Ghaffari```
449f4277be3SLeila 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
450575f8106SLeila Ghaffari```
451ea10196cSJeremy L Thompson
452575f8106SLeila Ghaffariand the `translation` mode with:
453ea10196cSJeremy L Thompson
454575f8106SLeila Ghaffari```
455f4277be3SLeila 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
456575f8106SLeila Ghaffari```
457ea10196cSJeremy L Thompson
458af8870a9STimothy Aiken### Inviscid Ideal Gas
459af8870a9STimothy Aiken
460af8870a9STimothy Aiken#### Isentropic Euler vortex
461af8870a9STimothy Aiken
462575f8106SLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
463ea10196cSJeremy L Thompson
464575f8106SLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
465575f8106SLeila Ghaffari:header-rows: 1
466ea10196cSJeremy L Thompson
467575f8106SLeila Ghaffari* - Option
468575f8106SLeila Ghaffari  - Description
469575f8106SLeila Ghaffari  - Default value
470575f8106SLeila Ghaffari  - Unit
471ea10196cSJeremy L Thompson
472575f8106SLeila Ghaffari* - `-center`
473575f8106SLeila Ghaffari  - Location of vortex center
474575f8106SLeila Ghaffari  - `(lx,ly,lz)/2`
475575f8106SLeila Ghaffari  - `(m,m,m)`
476ea10196cSJeremy L Thompson
477575f8106SLeila Ghaffari* - `-units_meter`
478575f8106SLeila Ghaffari  - 1 meter in scaled length units
479575f8106SLeila Ghaffari  - `1E-2`
480575f8106SLeila Ghaffari  -
481ea10196cSJeremy L Thompson
482575f8106SLeila Ghaffari* - `-units_second`
483575f8106SLeila Ghaffari  - 1 second in scaled time units
484575f8106SLeila Ghaffari  - `1E-2`
485575f8106SLeila Ghaffari  -
486ea10196cSJeremy L Thompson
487575f8106SLeila Ghaffari* - `-mean_velocity`
488575f8106SLeila Ghaffari  - Background velocity vector
489575f8106SLeila Ghaffari  - `(1,1,0)`
490575f8106SLeila Ghaffari  -
491ea10196cSJeremy L Thompson
492575f8106SLeila Ghaffari* - `-vortex_strength`
493575f8106SLeila Ghaffari  - Strength of vortex < 10
494575f8106SLeila Ghaffari  - `5`
495575f8106SLeila Ghaffari  -
496d8a22b9eSJed Brown
497d8a22b9eSJed Brown* - `-c_tau`
498d8a22b9eSJed Brown  - Stabilization constant
499f821ee77SLeila Ghaffari  - `0.5`
500d8a22b9eSJed Brown  -
501575f8106SLeila Ghaffari:::
502ea10196cSJeremy L Thompson
503575f8106SLeila GhaffariThis problem can be run with:
504ea10196cSJeremy L Thompson
505575f8106SLeila Ghaffari```
506f4277be3SLeila 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.
507575f8106SLeila Ghaffari```
508ea10196cSJeremy L Thompson
509af8870a9STimothy Aiken#### Sod shock tube
510af8870a9STimothy Aiken
511af8870a9STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
512af8870a9STimothy Aiken
513af8870a9STimothy Aiken:::{list-table} Shock Tube Runtime Options
514af8870a9STimothy Aiken:header-rows: 1
515af8870a9STimothy Aiken
516af8870a9STimothy Aiken* - Option
517af8870a9STimothy Aiken  - Description
518af8870a9STimothy Aiken  - Default value
519af8870a9STimothy Aiken  - Unit
520af8870a9STimothy Aiken
521af8870a9STimothy Aiken* - `-units_meter`
522af8870a9STimothy Aiken  - 1 meter in scaled length units
523af8870a9STimothy Aiken  - `1E-2`
524af8870a9STimothy Aiken  -
525af8870a9STimothy Aiken
526af8870a9STimothy Aiken* - `-units_second`
527af8870a9STimothy Aiken  - 1 second in scaled time units
528af8870a9STimothy Aiken  - `1E-2`
529af8870a9STimothy Aiken  -
530af8870a9STimothy Aiken
531af8870a9STimothy Aiken* - `-yzb`
532af8870a9STimothy Aiken  - Use YZB discontinuity capturing
533af8870a9STimothy Aiken  - `none`
534af8870a9STimothy Aiken  -
535af8870a9STimothy Aiken
536af8870a9STimothy Aiken* - `-stab`
537af8870a9STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
538af8870a9STimothy Aiken  - `none`
539af8870a9STimothy Aiken  -
540af8870a9STimothy Aiken:::
541af8870a9STimothy Aiken
542af8870a9STimothy AikenThis problem can be run with:
543af8870a9STimothy Aiken
544af8870a9STimothy Aiken```
545af8870a9STimothy 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
546af8870a9STimothy Aiken```
547af8870a9STimothy Aiken
548af8870a9STimothy Aiken### Newtonian viscosity, Ideal Gas
549af8870a9STimothy Aiken
550bb8a0c61SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
551ea10196cSJeremy L Thompson
552bb8a0c61SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
553575f8106SLeila Ghaffari:header-rows: 1
554ea10196cSJeremy L Thompson
555575f8106SLeila Ghaffari* - Option
556575f8106SLeila Ghaffari  - Description
557575f8106SLeila Ghaffari  - Default value
558575f8106SLeila Ghaffari  - Unit
559ea10196cSJeremy L Thompson
560575f8106SLeila Ghaffari* - `-units_meter`
561575f8106SLeila Ghaffari  - 1 meter in scaled length units
562bb8a0c61SJames Wright  - `1`
563575f8106SLeila Ghaffari  -
564ea10196cSJeremy L Thompson
565575f8106SLeila Ghaffari* - `-units_second`
566575f8106SLeila Ghaffari  - 1 second in scaled time units
567bb8a0c61SJames Wright  - `1`
568575f8106SLeila Ghaffari  -
569ea10196cSJeremy L Thompson
570575f8106SLeila Ghaffari* - `-units_kilogram`
571575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
572bb8a0c61SJames Wright  - `1`
573575f8106SLeila Ghaffari  -
574ea10196cSJeremy L Thompson
575575f8106SLeila Ghaffari* - `-units_Kelvin`
576575f8106SLeila Ghaffari  - 1 Kelvin in scaled temperature units
577575f8106SLeila Ghaffari  - `1`
578575f8106SLeila Ghaffari  -
579ea10196cSJeremy L Thompson
580575f8106SLeila Ghaffari* - `-stab`
581575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
582575f8106SLeila Ghaffari  - `none`
583575f8106SLeila Ghaffari  -
584ea10196cSJeremy L Thompson
585d8a22b9eSJed Brown* - `-c_tau`
586bb8a0c61SJames Wright  - Stabilization constant, $c_\tau$
587f821ee77SLeila Ghaffari  - `0.5`
588d8a22b9eSJed Brown  -
589d8a22b9eSJed Brown
590bb8a0c61SJames Wright* - `-Ctau_t`
591bb8a0c61SJames Wright  - Stabilization time constant, $C_t$
592bb8a0c61SJames Wright  - `1.0`
593bb8a0c61SJames Wright  -
594ea10196cSJeremy L Thompson
595bb8a0c61SJames Wright* - `-Ctau_v`
596bb8a0c61SJames Wright  - Stabilization viscous constant, $C_v$
597b5786772SLeila Ghaffari  - `36, 60, 128 for degree = 1, 2, 3`
598bb8a0c61SJames Wright  -
599ea10196cSJeremy L Thompson
600bb8a0c61SJames Wright* - `-Ctau_C`
601bb8a0c61SJames Wright  - Stabilization continuity constant, $C_c$
602bb8a0c61SJames Wright  - `1.0`
603bb8a0c61SJames Wright  -
604ea10196cSJeremy L Thompson
605bb8a0c61SJames Wright* - `-Ctau_M`
606bb8a0c61SJames Wright  - Stabilization momentum constant, $C_m$
607bb8a0c61SJames Wright  - `1.0`
608bb8a0c61SJames Wright  -
609bb8a0c61SJames Wright
610bb8a0c61SJames Wright* - `-Ctau_E`
611bb8a0c61SJames Wright  - Stabilization energy constant, $C_E$
612bb8a0c61SJames Wright  - `1.0`
613bb8a0c61SJames Wright  -
614ea10196cSJeremy L Thompson
615575f8106SLeila Ghaffari* - `-cv`
616575f8106SLeila Ghaffari  - Heat capacity at constant volume
617575f8106SLeila Ghaffari  - `717`
618575f8106SLeila Ghaffari  - `J/(kg K)`
619ea10196cSJeremy L Thompson
620575f8106SLeila Ghaffari* - `-cp`
621575f8106SLeila Ghaffari  - Heat capacity at constant pressure
622575f8106SLeila Ghaffari  - `1004`
623575f8106SLeila Ghaffari  - `J/(kg K)`
624ea10196cSJeremy L Thompson
625d9bb1cdbSJames Wright* - `-gravity`
626d9bb1cdbSJames Wright  - Gravitational acceleration vector
627d9bb1cdbSJames Wright  - `0,0,0`
628575f8106SLeila Ghaffari  - `m/s^2`
629ea10196cSJeremy L Thompson
630575f8106SLeila Ghaffari* - `-lambda`
631575f8106SLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
632575f8106SLeila Ghaffari  - `-2/3`
633575f8106SLeila Ghaffari  -
634ea10196cSJeremy L Thompson
635575f8106SLeila Ghaffari* - `-mu`
636575f8106SLeila Ghaffari  - Shear dynamic viscosity coefficient
637d9bb1cdbSJames Wright  - `1.8e-5`
638575f8106SLeila Ghaffari  -  `Pa s`
639a515125bSLeila Ghaffari
640575f8106SLeila Ghaffari* - `-k`
641575f8106SLeila Ghaffari  - Thermal conductivity
642575f8106SLeila Ghaffari  - `0.02638`
643575f8106SLeila Ghaffari  - `W/(m K)`
644edd152dcSJed Brown
645edd152dcSJed Brown* - `-newtonian_unit_tests`
646edd152dcSJed Brown  - Developer option to test properties
647edd152dcSJed Brown  - `false`
648edd152dcSJed Brown  - boolean
649aa61a79eSJames Wright
650ba952bfeSJames Wright* - `-state_var`
651ba952bfeSJames Wright  - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$)
652ba952bfeSJames Wright  - `conservative`
653ba952bfeSJames Wright  - string
654e7754af5SKenneth E. Jansen
655e7754af5SKenneth E. Jansen* - `-idl_decay_time`
656e7754af5SKenneth E. Jansen  - Characteristic timescale of the pressure deviance decay. The timestep is good starting point
657e7754af5SKenneth E. Jansen  - `-1` (disabled)
658e7754af5SKenneth E. Jansen  - `s`
659e7754af5SKenneth E. Jansen
660e7754af5SKenneth E. Jansen* - `-idl_start`
661e7754af5SKenneth E. Jansen  - Start of IDL in the x direction
662e7754af5SKenneth E. Jansen  - `0`
663e7754af5SKenneth E. Jansen  - `m`
664e7754af5SKenneth E. Jansen
665e7754af5SKenneth E. Jansen* - `-idl_length`
666e7754af5SKenneth E. Jansen  - Length of IDL in the positive x direction
667e7754af5SKenneth E. Jansen  - `0`
668e7754af5SKenneth E. Jansen  - `m`
669e7754af5SKenneth E. Jansen
670fb9b2996SJames Wright* - `-sgs_model_type`
671fb9b2996SJames Wright  - Type of subgrid stress model to use. Currently only `data_driven` is available
672fb9b2996SJames Wright  - `none`
673fb9b2996SJames Wright  - string
674fb9b2996SJames Wright
675fb9b2996SJames Wright* - `-sgs_model_dd_leakyrelu_alpha`
676fb9b2996SJames Wright  - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU
677fb9b2996SJames Wright  - 0
678fb9b2996SJames Wright  -
679fb9b2996SJames Wright
680fb9b2996SJames Wright* - `-sgs_model_dd_parameter_dir`
681fb9b2996SJames Wright  - Path to directory with data-driven model parameters (weights, biases, etc.)
682fb9b2996SJames Wright  - `./dd_sgs_parameters`
683fb9b2996SJames Wright  - string
684fb9b2996SJames Wright
685f4fad612SJames Wright* - `-diff_filter_monitor`
686f4fad612SJames Wright  - Enable differential filter TSMonitor
687f4fad612SJames Wright  - `false`
688f4fad612SJames Wright  - boolean
689f4fad612SJames Wright
690f4fad612SJames Wright* - `-diff_filter_grid_based_width`
691f4fad612SJames Wright  - Use filter width based on the grid size
692f4fad612SJames Wright  - `false`
693f4fad612SJames Wright  - boolean
694f4fad612SJames Wright
695f4fad612SJames Wright* - `-diff_filter_width_scaling`
696f4fad612SJames Wright  - Anisotropic scaling for filter width in wall-aligned coordinates (snz)
697f4fad612SJames Wright  - `1,1,1`
698f4fad612SJames Wright  - `m`
699f4fad612SJames Wright
700f4fad612SJames Wright* - `-diff_filter_kernel_scaling`
701f4fad612SJames Wright  - Scaling to make differential kernel size equivalent to other filter kernels
702f4fad612SJames Wright  - `0.1`
703f4fad612SJames Wright  - `m^2`
704f4fad612SJames Wright
705f4fad612SJames Wright* - `-diff_filter_wall_damping_function`
706f4fad612SJames Wright  - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`)
707f4fad612SJames Wright  - `none`
708f4fad612SJames Wright  - string
709f4fad612SJames Wright
710f4fad612SJames Wright* - `-diff_filter_wall_damping_constant`
711aaa4e91fSJed Brown  - Constant for the wall-damping function. $A^+$ for `van_driest` damping function.
712f4fad612SJames Wright  - 25
713f4fad612SJames Wright  -
714f4fad612SJames Wright
715f4fad612SJames Wright* - `-diff_filter_friction_length`
716f4fad612SJames Wright  - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions
717f4fad612SJames Wright  - 0
718f4fad612SJames Wright  - `m`
719f4fad612SJames Wright
720575f8106SLeila Ghaffari:::
721a515125bSLeila Ghaffari
722e7754af5SKenneth E. Jansen#### Gaussian Wave
72379b17980SJames Wright
724e7754af5SKenneth E. JansenThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
72579b17980SJames Wright
726e7754af5SKenneth E. Jansen:::{list-table} Gaussian Wave Runtime Options
72779b17980SJames Wright:header-rows: 1
72879b17980SJames Wright
72979b17980SJames Wright* - Option
73079b17980SJames Wright  - Description
73179b17980SJames Wright  - Default value
73279b17980SJames Wright  - Unit
73379b17980SJames Wright
734edf614b5SJed Brown* - `-freestream_riemann`
735edf614b5SJed Brown  - Riemann solver for boundaries (HLL or HLLC)
736edf614b5SJed Brown  - `hllc`
737edf614b5SJed Brown  -
738edf614b5SJed Brown
739edf614b5SJed Brown* - `-freestream_velocity`
74079b17980SJames Wright  - Freestream velocity vector
74179b17980SJames Wright  - `0,0,0`
74279b17980SJames Wright  - `m/s`
74379b17980SJames Wright
744edf614b5SJed Brown* - `-freestream_temperature`
74579b17980SJames Wright  - Freestream temperature
74679b17980SJames Wright  - `288`
74779b17980SJames Wright  - `K`
74879b17980SJames Wright
749edf614b5SJed Brown* - `-freestream_pressure`
750ff82278dSJames Wright  - Freestream pressure
75179b17980SJames Wright  - `1.01e5`
75279b17980SJames Wright  - `Pa`
75379b17980SJames Wright
75479b17980SJames Wright* - `-epicenter`
75579b17980SJames Wright  - Coordinates of center of perturbation
75679b17980SJames Wright  - `0,0,0`
75779b17980SJames Wright  - `m`
75879b17980SJames Wright
75979b17980SJames Wright* - `-amplitude`
76079b17980SJames Wright  - Amplitude of the perturbation
76179b17980SJames Wright  - `0.1`
76279b17980SJames Wright  -
76379b17980SJames Wright
76479b17980SJames Wright* - `-width`
76579b17980SJames Wright  - Width parameter of the perturbation
76679b17980SJames Wright  - `0.002`
76779b17980SJames Wright  - `m`
76879b17980SJames Wright
76979b17980SJames Wright:::
77079b17980SJames Wright
771e7754af5SKenneth E. JansenThis problem can be run with the `gaussianwave.yaml` file via:
77279b17980SJames Wright
77379b17980SJames Wright```
774e7754af5SKenneth E. Jansen./navierstokes -options_file gaussianwave.yaml
77579b17980SJames Wright```
77679b17980SJames Wright
777e7754af5SKenneth E. Jansen```{literalinclude} ../../../../../examples/fluids/gaussianwave.yaml
77879b17980SJames Wright:language: yaml
77979b17980SJames Wright```
780edd152dcSJed Brown
781b8fb7609SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder
782b8fb7609SAdeleke O. Bankole
783b8fb7609SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
784b8fb7609SAdeleke O. Bankole
785b8fb7609SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options
786b8fb7609SAdeleke O. Bankole:header-rows: 1
787b8fb7609SAdeleke O. Bankole
788b8fb7609SAdeleke O. Bankole* - Option
789b8fb7609SAdeleke O. Bankole  - Description
790b8fb7609SAdeleke O. Bankole  - Default value
791b8fb7609SAdeleke O. Bankole  - Unit
792b8fb7609SAdeleke O. Bankole
793b8fb7609SAdeleke O. Bankole* - `-freestream_velocity`
794b8fb7609SAdeleke O. Bankole  - Freestream velocity vector
795b8fb7609SAdeleke O. Bankole  - `0,0,0`
796b8fb7609SAdeleke O. Bankole  - `m/s`
797b8fb7609SAdeleke O. Bankole
798b8fb7609SAdeleke O. Bankole* - `-freestream_temperature`
799b8fb7609SAdeleke O. Bankole  - Freestream temperature
800b8fb7609SAdeleke O. Bankole  - `288`
801b8fb7609SAdeleke O. Bankole  - `K`
802b8fb7609SAdeleke O. Bankole
803b8fb7609SAdeleke O. Bankole* - `-freestream_pressure`
804b8fb7609SAdeleke O. Bankole  - Freestream pressure
805b8fb7609SAdeleke O. Bankole  - `1.01e5`
806b8fb7609SAdeleke O. Bankole  - `Pa`
807b8fb7609SAdeleke O. Bankole
808b8fb7609SAdeleke O. Bankole:::
809b8fb7609SAdeleke O. Bankole
810b8fb7609SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
811b8fb7609SAdeleke O. BankoleTo run this problem, first generate a mesh:
812b8fb7609SAdeleke O. Bankole
813b8fb7609SAdeleke O. Bankole```console
814b8fb7609SAdeleke O. Bankole$ make -C examples/fluids/meshes
815b8fb7609SAdeleke O. Bankole```
816b8fb7609SAdeleke O. Bankole
817b8fb7609SAdeleke O. BankoleThen run by building the executable and running:
818b8fb7609SAdeleke O. Bankole
819b8fb7609SAdeleke O. Bankole```console
820b8fb7609SAdeleke O. Bankole$ make build/fluids-navierstokes
821c5e9980aSAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_
822b8fb7609SAdeleke O. Bankole```
823b8fb7609SAdeleke O. Bankole
824c5e9980aSAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
825c5e9980aSAdeleke 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.
826c5e9980aSAdeleke O. Bankole
827c5e9980aSAdeleke O. Bankole```console
8282004e3acSAdeleke O. Bankole$ python examples/fluids/postprocess/vortexshedding.py
829c5e9980aSAdeleke O. Bankole```
830b8fb7609SAdeleke O. Bankole
831b8fb7609SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml
832b8fb7609SAdeleke O. Bankole:language: yaml
833b8fb7609SAdeleke O. Bankole```
834b8fb7609SAdeleke O. Bankole
835af8870a9STimothy Aiken#### Density current
836af8870a9STimothy Aiken
83783c686feSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
838bb8a0c61SJames Wright
839bb8a0c61SJames Wright:::{list-table} Density Current Runtime Options
840bb8a0c61SJames Wright:header-rows: 1
841bb8a0c61SJames Wright
842bb8a0c61SJames Wright* - Option
843bb8a0c61SJames Wright  - Description
844bb8a0c61SJames Wright  - Default value
845bb8a0c61SJames Wright  - Unit
846bb8a0c61SJames Wright
847bb8a0c61SJames Wright* - `-center`
848bb8a0c61SJames Wright  - Location of bubble center
849bb8a0c61SJames Wright  - `(lx,ly,lz)/2`
850bb8a0c61SJames Wright  - `(m,m,m)`
851bb8a0c61SJames Wright
852bb8a0c61SJames Wright* - `-dc_axis`
853bb8a0c61SJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
854bb8a0c61SJames Wright  - `(0,0,0)`
855bb8a0c61SJames Wright  -
856bb8a0c61SJames Wright
857bb8a0c61SJames Wright* - `-rc`
858bb8a0c61SJames Wright  - Characteristic radius of thermal bubble
859bb8a0c61SJames Wright  - `1000`
860bb8a0c61SJames Wright  - `m`
861bb8a0c61SJames Wright
862bb8a0c61SJames Wright* - `-theta0`
863bb8a0c61SJames Wright  - Reference potential temperature
864bb8a0c61SJames Wright  - `300`
865bb8a0c61SJames Wright  - `K`
866bb8a0c61SJames Wright
867bb8a0c61SJames Wright* - `-thetaC`
868bb8a0c61SJames Wright  - Perturbation of potential temperature
869bb8a0c61SJames Wright  - `-15`
870bb8a0c61SJames Wright  - `K`
871bb8a0c61SJames Wright
872bb8a0c61SJames Wright* - `-P0`
873bb8a0c61SJames Wright  - Atmospheric pressure
874bb8a0c61SJames Wright  - `1E5`
875bb8a0c61SJames Wright  - `Pa`
876bb8a0c61SJames Wright
877bb8a0c61SJames Wright* - `-N`
878bb8a0c61SJames Wright  - Brunt-Vaisala frequency
879bb8a0c61SJames Wright  - `0.01`
880bb8a0c61SJames Wright  - `1/s`
881bb8a0c61SJames Wright:::
882bb8a0c61SJames Wright
883575f8106SLeila GhaffariThis problem can be run with:
884ea10196cSJeremy L Thompson
885575f8106SLeila Ghaffari```
886bb8a0c61SJames 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
887bb8a0c61SJames Wright```
888bb8a0c61SJames Wright
889af8870a9STimothy Aiken#### Channel flow
890af8870a9STimothy Aiken
89183c686feSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
892bb8a0c61SJames Wright
893bb8a0c61SJames Wright:::{list-table} Channel Runtime Options
894bb8a0c61SJames Wright:header-rows: 1
895bb8a0c61SJames Wright
896bb8a0c61SJames Wright* - Option
897bb8a0c61SJames Wright  - Description
898bb8a0c61SJames Wright  - Default value
899bb8a0c61SJames Wright  - Unit
900bb8a0c61SJames Wright
901bb8a0c61SJames Wright* - `-umax`
902bb8a0c61SJames Wright  - Maximum/centerline velocity of the flow
903bb8a0c61SJames Wright  - `10`
904bb8a0c61SJames Wright  - `m/s`
905bb8a0c61SJames Wright
906bb8a0c61SJames Wright* - `-theta0`
907bb8a0c61SJames Wright  - Reference potential temperature
908bb8a0c61SJames Wright  - `300`
909bb8a0c61SJames Wright  - `K`
910bb8a0c61SJames Wright
911bb8a0c61SJames Wright* - `-P0`
912bb8a0c61SJames Wright  - Atmospheric pressure
913bb8a0c61SJames Wright  - `1E5`
914bb8a0c61SJames Wright  - `Pa`
915edd152dcSJed Brown
916edd152dcSJed Brown* - `-body_force_scale`
917edd152dcSJed Brown  - Multiplier for body force (`-1` for flow reversal)
918edd152dcSJed Brown  - 1
919edd152dcSJed Brown  -
920bb8a0c61SJames Wright:::
921bb8a0c61SJames Wright
922bb8a0c61SJames WrightThis problem can be run with the `channel.yaml` file via:
923bb8a0c61SJames Wright
924bb8a0c61SJames Wright```
925bb8a0c61SJames Wright./navierstokes -options_file channel.yaml
926bb8a0c61SJames Wright```
927bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
928bb8a0c61SJames Wright:language: yaml
929bb8a0c61SJames Wright```
930bb8a0c61SJames Wright
931c8c30d87SJed Brown(example-blasius)=
932c8c30d87SJed Brown
933af8870a9STimothy Aiken#### Blasius boundary layer
934af8870a9STimothy Aiken
93583c686feSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
936bb8a0c61SJames Wright
937bb8a0c61SJames Wright:::{list-table} Blasius Runtime Options
938bb8a0c61SJames Wright:header-rows: 1
939bb8a0c61SJames Wright
940bb8a0c61SJames Wright* - Option
941bb8a0c61SJames Wright  - Description
942bb8a0c61SJames Wright  - Default value
943bb8a0c61SJames Wright  - Unit
944bb8a0c61SJames Wright
945aef1eb53SLeila Ghaffari* - `-velocity_infinity`
946bb8a0c61SJames Wright  - Freestream velocity
947bb8a0c61SJames Wright  - `40`
948bb8a0c61SJames Wright  - `m/s`
949bb8a0c61SJames Wright
950aef1eb53SLeila Ghaffari* - `-temperature_infinity`
951aef1eb53SLeila Ghaffari  - Freestream temperature
952bb8a0c61SJames Wright  - `288`
953bb8a0c61SJames Wright  - `K`
954bb8a0c61SJames Wright
955aef1eb53SLeila Ghaffari* - `-temperature_wall`
956aef1eb53SLeila Ghaffari  - Wall temperature
9570d850f2eSLeila Ghaffari  - `288`
958aef1eb53SLeila Ghaffari  - `K`
959aef1eb53SLeila Ghaffari
960aef1eb53SLeila Ghaffari* - `-delta0`
961aef1eb53SLeila Ghaffari  - Boundary layer height at the inflow
962aef1eb53SLeila Ghaffari  - `4.2e-3`
963aef1eb53SLeila Ghaffari  - `m`
964aef1eb53SLeila Ghaffari
965bb8a0c61SJames Wright* - `-P0`
966bb8a0c61SJames Wright  - Atmospheric pressure
967bb8a0c61SJames Wright  - `1.01E5`
968bb8a0c61SJames Wright  - `Pa`
969bb8a0c61SJames Wright
970c029f0c5SJames Wright* - `-platemesh_modify_mesh`
971c029f0c5SJames Wright  - Whether to modify the mesh using the given options below.
972c029f0c5SJames Wright  - `false`
973c029f0c5SJames Wright  -
974c029f0c5SJames Wright
97598b448e2SJames Wright* - `-platemesh_refine_height`
97698b448e2SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
977bb8a0c61SJames Wright  - `5.9E-4`
978bb8a0c61SJames Wright  - `m`
979bb8a0c61SJames Wright
98098b448e2SJames Wright* - `-platemesh_Ndelta`
98198b448e2SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
982bb8a0c61SJames Wright  - `45`
983bb8a0c61SJames Wright  -
984bb8a0c61SJames Wright
98598b448e2SJames Wright* - `-platemesh_growth`
986bb8a0c61SJames Wright  - Growth rate of the elements in the refinement region
987bb8a0c61SJames Wright  - `1.08`
988bb8a0c61SJames Wright  -
989bb8a0c61SJames Wright
99098b448e2SJames Wright* - `-platemesh_top_angle`
991bb8a0c61SJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
992bb8a0c61SJames Wright  - `5`
993bb8a0c61SJames Wright  - `degrees`
994493642f1SJames Wright
99598b448e2SJames Wright* - `-platemesh_y_node_locs_path`
99698b448e2SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
99798b448e2SJames Wright  - `""`
99898b448e2SJames Wright  -
999aef1eb53SLeila Ghaffari
1000c029f0c5SJames Wright* - `-stg_use`
1001c029f0c5SJames Wright  - Whether to use STG for the inflow conditions
1002c029f0c5SJames Wright  - `false`
1003c029f0c5SJames Wright  -
1004c029f0c5SJames Wright
10050d850f2eSLeila Ghaffari* - `-n_chebyshev`
1006aef1eb53SLeila Ghaffari  - Number of Chebyshev terms
1007aef1eb53SLeila Ghaffari  - `20`
1008aef1eb53SLeila Ghaffari  -
1009aef1eb53SLeila Ghaffari
10100d850f2eSLeila Ghaffari* - `-chebyshev_`
10110d850f2eSLeila Ghaffari  - Prefix for Chebyshev snes solve
10120d850f2eSLeila Ghaffari  -
10130d850f2eSLeila Ghaffari  -
10140d850f2eSLeila Ghaffari
1015bb8a0c61SJames Wright:::
1016bb8a0c61SJames Wright
1017bb8a0c61SJames WrightThis problem can be run with the `blasius.yaml` file via:
1018bb8a0c61SJames Wright
1019bb8a0c61SJames Wright```
1020bb8a0c61SJames Wright./navierstokes -options_file blasius.yaml
1021bb8a0c61SJames Wright```
1022bb8a0c61SJames Wright
1023bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
1024bb8a0c61SJames Wright:language: yaml
1025575f8106SLeila Ghaffari```
1026493642f1SJames Wright
1027493642f1SJames Wright#### STG Inflow for Flat Plate
1028493642f1SJames Wright
1029b46bfc5eSJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
1030493642f1SJames Wright
1031493642f1SJames Wright:::{list-table} Blasius Runtime Options
1032493642f1SJames Wright:header-rows: 1
1033493642f1SJames Wright
1034493642f1SJames Wright* - Option
1035493642f1SJames Wright  - Description
1036493642f1SJames Wright  - Default value
1037493642f1SJames Wright  - Unit
1038493642f1SJames Wright
1039493642f1SJames Wright* - `-stg_inflow_path`
1040493642f1SJames Wright  - Path to the STGInflow file
1041493642f1SJames Wright  - `./STGInflow.dat`
1042493642f1SJames Wright  -
1043493642f1SJames Wright
1044493642f1SJames Wright* - `-stg_rand_path`
1045493642f1SJames Wright  - Path to the STGRand file
1046493642f1SJames Wright  - `./STGRand.dat`
1047493642f1SJames Wright  -
1048493642f1SJames Wright
1049493642f1SJames Wright* - `-stg_alpha`
1050493642f1SJames Wright  - Growth rate of the wavemodes
1051493642f1SJames Wright  - `1.01`
1052493642f1SJames Wright  -
1053493642f1SJames Wright
1054493642f1SJames Wright* - `-stg_u0`
1055493642f1SJames Wright  - Convective velocity, $U_0$
1056493642f1SJames Wright  - `0.0`
1057493642f1SJames Wright  - `m/s`
1058493642f1SJames Wright
1059493642f1SJames Wright* - `-stg_mean_only`
1060493642f1SJames Wright  - Only impose the mean velocity (no fluctutations)
1061493642f1SJames Wright  - `false`
1062493642f1SJames Wright  -
1063493642f1SJames Wright
106429ea39e3SJames Wright* - `-stg_strong`
106529ea39e3SJames Wright  - Strongly enforce the STG inflow boundary condition
106629ea39e3SJames Wright  - `false`
106729ea39e3SJames Wright  -
106829ea39e3SJames Wright
1069d4e0f297SJames Wright* - `-stg_fluctuating_IC`
1070d4e0f297SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
1071d4e0f297SJames Wright  - `false`
1072d4e0f297SJames Wright  -
1073d4e0f297SJames Wright
1074493642f1SJames Wright:::
1075493642f1SJames Wright
1076493642f1SJames WrightThis problem can be run with the `blasius.yaml` file via:
1077493642f1SJames Wright
1078493642f1SJames Wright```
1079493642f1SJames Wright./navierstokes -options_file blasius.yaml -stg_use true
1080493642f1SJames Wright```
1081493642f1SJames Wright
1082b46bfc5eSJeremy L ThompsonNote the added `-stg_use true` flag
1083b46bfc5eSJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
1084