xref: /honee/README.md (revision c5e9980ad559552e5e02639665d11e7187691949)
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
159*c5e9980aSAdeleke O. Bankole* - `-ts_monitor_wall_force`
160*c5e9980aSAdeleke O. Bankole  - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file.
161*c5e9980aSAdeleke O. Bankole  -
162*c5e9980aSAdeleke O. Bankole
163575f8106SLeila Ghaffari* - `-snes_view`
164575f8106SLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
165575f8106SLeila Ghaffari  -
1668ef11c93SLeila Ghaffari
167575f8106SLeila Ghaffari* - `-log_view`
168575f8106SLeila Ghaffari  - View PETSc performance log
169575f8106SLeila Ghaffari  -
170ea10196cSJeremy L Thompson
171575f8106SLeila Ghaffari* - `-help`
172575f8106SLeila Ghaffari  - View comprehensive information about run-time options
173575f8106SLeila Ghaffari  -
174575f8106SLeila Ghaffari:::
175ea10196cSJeremy L Thompson
17679b17980SJames 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:
177f4277be3SLeila Ghaffari
178bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels
179bb8a0c61SJames Wright:header-rows: 1
180bb8a0c61SJames Wright* - PETSc Face Name
181bb8a0c61SJames Wright  - Cartesian direction
182bb8a0c61SJames Wright  - Face ID
183bb8a0c61SJames Wright
184bb8a0c61SJames Wright* - faceMarkerBottom
185bb8a0c61SJames Wright  - -z
186bb8a0c61SJames Wright  - 1
187bb8a0c61SJames Wright
188bb8a0c61SJames Wright* - faceMarkerRight
189bb8a0c61SJames Wright  - +x
190bb8a0c61SJames Wright  - 2
191bb8a0c61SJames Wright
192bb8a0c61SJames Wright* - faceMarkerTop
193bb8a0c61SJames Wright  - +z
194bb8a0c61SJames Wright  - 3
195bb8a0c61SJames Wright
196bb8a0c61SJames Wright* - faceMarkerLeft
197bb8a0c61SJames Wright  - -x
198bb8a0c61SJames Wright  - 4
199bb8a0c61SJames Wright:::
200bb8a0c61SJames Wright
201bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels
202bb8a0c61SJames Wright:header-rows: 1
203bb8a0c61SJames Wright* - PETSc Face Name
204bb8a0c61SJames Wright  - Cartesian direction
205bb8a0c61SJames Wright  - Face ID
206bb8a0c61SJames Wright
207bb8a0c61SJames Wright* - faceMarkerBottom
208bb8a0c61SJames Wright  - -z
209bb8a0c61SJames Wright  - 1
210bb8a0c61SJames Wright
211bb8a0c61SJames Wright* - faceMarkerTop
212bb8a0c61SJames Wright  - +z
213bb8a0c61SJames Wright  - 2
214bb8a0c61SJames Wright
215bb8a0c61SJames Wright* - faceMarkerFront
216bb8a0c61SJames Wright  - -y
217bb8a0c61SJames Wright  - 3
218bb8a0c61SJames Wright
219bb8a0c61SJames Wright* - faceMarkerBack
220bb8a0c61SJames Wright  - +y
221bb8a0c61SJames Wright  - 4
222bb8a0c61SJames Wright
223bb8a0c61SJames Wright* - faceMarkerRight
224bb8a0c61SJames Wright  - +x
225bb8a0c61SJames Wright  - 5
226bb8a0c61SJames Wright
227bb8a0c61SJames Wright* - faceMarkerLeft
228bb8a0c61SJames Wright  - -x
229bb8a0c61SJames Wright  - 6
230bb8a0c61SJames Wright:::
231f4277be3SLeila Ghaffari
232c8c30d87SJed Brown### Boundary conditions
233c8c30d87SJed Brown
234c8c30d87SJed BrownBoundary conditions for compressible viscous flows are notoriously tricky. Here we offer some recommendations
235c8c30d87SJed Brown
236c8c30d87SJed Brown#### Inflow
237c8c30d87SJed Brown
238c8c30d87SJed 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).
239c8c30d87SJed BrownIt is stable and the least reflective boundary condition for acoustics.
240c8c30d87SJed Brown
241c8c30d87SJed BrownIf near a viscous wall, you may want a specified inflow profile.
242c8c30d87SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles.
243c8c30d87SJed 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.
244c8c30d87SJed BrownThe strong approach gives sharper resolution of velocity structures.
245c8c30d87SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent.
246c8c30d87SJed Brown
247c8c30d87SJed Brown### Outflow
248c8c30d87SJed Brown
249c8c30d87SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures.
250c8c30d87SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections.
251c8c30d87SJed 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.
252c8c30d87SJed Brown
253c8c30d87SJed 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.
254c8c30d87SJed Brown
255c8c30d87SJed 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).
256c8c30d87SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow.
257c8c30d87SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use.
258c8c30d87SJed Brown
259c8c30d87SJed Brown### Periodicity
260c8c30d87SJed Brown
261c8c30d87SJed BrownPETSc provides two ways to specify periodicity:
262c8c30d87SJed Brown
263c8c30d87SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using:
264c8c30d87SJed Brown
265c8c30d87SJed Brown```yaml
266c8c30d87SJed Browndm_plex:
267c8c30d87SJed Brown  shape: box
268c8c30d87SJed Brown  box_faces: 10,12,4
269c8c30d87SJed Brown  box_bd: none,none,periodic
270c8c30d87SJed Brown```
271c8c30d87SJed Brown
272*c5e9980aSAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary.
273*c5e9980aSAdeleke 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.
274*c5e9980aSAdeleke O. Bankole
275*c5e9980aSAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in:
276*c5e9980aSAdeleke O. Bankole
277*c5e9980aSAdeleke O. Bankole```yaml
278*c5e9980aSAdeleke O. Bankoledm_plex:
279*c5e9980aSAdeleke O. Bankole  shape: zbox
280*c5e9980aSAdeleke O. Bankole  box_faces: 10,12,4
281*c5e9980aSAdeleke O. Bankole  box_bd: none,none,periodic
282*c5e9980aSAdeleke O. Bankole```
283*c5e9980aSAdeleke O. Bankole
284*c5e9980aSAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use.
285*c5e9980aSAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity.
286*c5e9980aSAdeleke 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.
287c8c30d87SJed Brown
288af8870a9STimothy Aiken### Advection
289af8870a9STimothy Aiken
290b46bfc5eSJeremy 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$.
291b46bfc5eSJeremy L ThompsonThese are available in 2D and 3D.
292af8870a9STimothy Aiken
293af8870a9STimothy Aiken#### 2D advection
294af8870a9STimothy Aiken
295575f8106SLeila GhaffariFor the 2D advection problem, the following additional command-line options are available:
296ea10196cSJeremy L Thompson
297575f8106SLeila Ghaffari:::{list-table} Advection2D Runtime Options
298575f8106SLeila Ghaffari:header-rows: 1
2998ef11c93SLeila Ghaffari
300575f8106SLeila Ghaffari* - Option
301575f8106SLeila Ghaffari  - Description
302575f8106SLeila Ghaffari  - Default value
303575f8106SLeila Ghaffari  - Unit
3048ef11c93SLeila Ghaffari
305575f8106SLeila Ghaffari* - `-rc`
306575f8106SLeila Ghaffari  - Characteristic radius of thermal bubble
307575f8106SLeila Ghaffari  - `1000`
308575f8106SLeila Ghaffari  - `m`
3098ef11c93SLeila Ghaffari
310575f8106SLeila Ghaffari* - `-units_meter`
311575f8106SLeila Ghaffari  - 1 meter in scaled length units
312575f8106SLeila Ghaffari  - `1E-2`
313575f8106SLeila Ghaffari  -
3148ef11c93SLeila Ghaffari
315575f8106SLeila Ghaffari* - `-units_second`
316575f8106SLeila Ghaffari  - 1 second in scaled time units
317575f8106SLeila Ghaffari  - `1E-2`
318575f8106SLeila Ghaffari  -
3198ef11c93SLeila Ghaffari
320575f8106SLeila Ghaffari* - `-units_kilogram`
321575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
322575f8106SLeila Ghaffari  - `1E-6`
323575f8106SLeila Ghaffari  -
324a515125bSLeila Ghaffari
325575f8106SLeila Ghaffari* - `-strong_form`
326575f8106SLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
327575f8106SLeila Ghaffari  - `0`
328575f8106SLeila Ghaffari  -
329a515125bSLeila Ghaffari
330575f8106SLeila Ghaffari* - `-stab`
331575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
332575f8106SLeila Ghaffari  - `none`
333575f8106SLeila Ghaffari  -
334a515125bSLeila Ghaffari
335575f8106SLeila Ghaffari* - `-CtauS`
336575f8106SLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
337575f8106SLeila Ghaffari  - `0`
338575f8106SLeila Ghaffari  -
339a515125bSLeila Ghaffari
340575f8106SLeila Ghaffari* - `-wind_type`
341575f8106SLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
342575f8106SLeila Ghaffari  - `rotation`
343575f8106SLeila Ghaffari  -
344a515125bSLeila Ghaffari
345575f8106SLeila Ghaffari* - `-wind_translation`
346575f8106SLeila Ghaffari  - Constant wind vector when `-wind_type translation`
347575f8106SLeila Ghaffari  - `1,0,0`
348575f8106SLeila Ghaffari  -
3498ef11c93SLeila Ghaffari
350575f8106SLeila Ghaffari* - `-E_wind`
351575f8106SLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
352575f8106SLeila Ghaffari  - `1E6`
353575f8106SLeila Ghaffari  - `J`
354575f8106SLeila Ghaffari:::
355268c6924SLeila Ghaffari
356575f8106SLeila GhaffariAn example of the `rotation` mode can be run with:
357268c6924SLeila Ghaffari
358575f8106SLeila Ghaffari```
359f4277be3SLeila 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
360575f8106SLeila Ghaffari```
361268c6924SLeila Ghaffari
362575f8106SLeila Ghaffariand the `translation` mode with:
363268c6924SLeila Ghaffari
364575f8106SLeila Ghaffari```
365f4277be3SLeila 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
366575f8106SLeila Ghaffari```
367f4277be3SLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
368268c6924SLeila Ghaffari
369af8870a9STimothy Aiken#### 3D advection
370af8870a9STimothy Aiken
371575f8106SLeila GhaffariFor the 3D advection problem, the following additional command-line options are available:
372268c6924SLeila Ghaffari
373575f8106SLeila Ghaffari:::{list-table} Advection3D Runtime Options
374575f8106SLeila Ghaffari:header-rows: 1
375268c6924SLeila Ghaffari
376575f8106SLeila Ghaffari* - Option
377575f8106SLeila Ghaffari  - Description
378575f8106SLeila Ghaffari  - Default value
379575f8106SLeila Ghaffari  - Unit
380268c6924SLeila Ghaffari
381575f8106SLeila Ghaffari* - `-rc`
382575f8106SLeila Ghaffari  - Characteristic radius of thermal bubble
383575f8106SLeila Ghaffari  - `1000`
384575f8106SLeila Ghaffari  - `m`
385268c6924SLeila Ghaffari
386575f8106SLeila Ghaffari* - `-units_meter`
387575f8106SLeila Ghaffari  - 1 meter in scaled length units
388575f8106SLeila Ghaffari  - `1E-2`
389575f8106SLeila Ghaffari  -
390268c6924SLeila Ghaffari
391575f8106SLeila Ghaffari* - `-units_second`
392575f8106SLeila Ghaffari  - 1 second in scaled time units
393575f8106SLeila Ghaffari  - `1E-2`
394575f8106SLeila Ghaffari  -
395268c6924SLeila Ghaffari
396575f8106SLeila Ghaffari* - `-units_kilogram`
397575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
398575f8106SLeila Ghaffari  - `1E-6`
399575f8106SLeila Ghaffari  -
400268c6924SLeila Ghaffari
401575f8106SLeila Ghaffari* - `-strong_form`
402575f8106SLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
403575f8106SLeila Ghaffari  - `0`
404575f8106SLeila Ghaffari  -
405268c6924SLeila Ghaffari
406575f8106SLeila Ghaffari* - `-stab`
407575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
408575f8106SLeila Ghaffari  - `none`
409575f8106SLeila Ghaffari  -
410268c6924SLeila Ghaffari
411575f8106SLeila Ghaffari* - `-CtauS`
412575f8106SLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
413575f8106SLeila Ghaffari  - `0`
414575f8106SLeila Ghaffari  -
415268c6924SLeila Ghaffari
416575f8106SLeila Ghaffari* - `-wind_type`
417575f8106SLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
418575f8106SLeila Ghaffari  - `rotation`
419575f8106SLeila Ghaffari  -
420268c6924SLeila Ghaffari
421575f8106SLeila Ghaffari* - `-wind_translation`
422575f8106SLeila Ghaffari  - Constant wind vector when `-wind_type translation`
423575f8106SLeila Ghaffari  - `1,0,0`
424575f8106SLeila Ghaffari  -
425268c6924SLeila Ghaffari
426575f8106SLeila Ghaffari* - `-E_wind`
427575f8106SLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
428575f8106SLeila Ghaffari  - `1E6`
429575f8106SLeila Ghaffari  - `J`
430268c6924SLeila Ghaffari
431575f8106SLeila Ghaffari* - `-bubble_type`
432575f8106SLeila Ghaffari  - `sphere` (3D) or `cylinder` (2D)
433575f8106SLeila Ghaffari  - `shpere`
434575f8106SLeila Ghaffari  -
435268c6924SLeila Ghaffari
436575f8106SLeila Ghaffari* - `-bubble_continuity`
437575f8106SLeila Ghaffari  - `smooth`, `back_sharp`, or `thick`
438575f8106SLeila Ghaffari  - `smooth`
439575f8106SLeila Ghaffari  -
440575f8106SLeila Ghaffari:::
441ea10196cSJeremy L Thompson
442575f8106SLeila GhaffariAn example of the `rotation` mode can be run with:
443ea10196cSJeremy L Thompson
444575f8106SLeila Ghaffari```
445f4277be3SLeila 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
446575f8106SLeila Ghaffari```
447ea10196cSJeremy L Thompson
448575f8106SLeila Ghaffariand the `translation` mode with:
449ea10196cSJeremy L Thompson
450575f8106SLeila Ghaffari```
451f4277be3SLeila 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
452575f8106SLeila Ghaffari```
453ea10196cSJeremy L Thompson
454af8870a9STimothy Aiken### Inviscid Ideal Gas
455af8870a9STimothy Aiken
456af8870a9STimothy Aiken#### Isentropic Euler vortex
457af8870a9STimothy Aiken
458575f8106SLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
459ea10196cSJeremy L Thompson
460575f8106SLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
461575f8106SLeila Ghaffari:header-rows: 1
462ea10196cSJeremy L Thompson
463575f8106SLeila Ghaffari* - Option
464575f8106SLeila Ghaffari  - Description
465575f8106SLeila Ghaffari  - Default value
466575f8106SLeila Ghaffari  - Unit
467ea10196cSJeremy L Thompson
468575f8106SLeila Ghaffari* - `-center`
469575f8106SLeila Ghaffari  - Location of vortex center
470575f8106SLeila Ghaffari  - `(lx,ly,lz)/2`
471575f8106SLeila Ghaffari  - `(m,m,m)`
472ea10196cSJeremy L Thompson
473575f8106SLeila Ghaffari* - `-units_meter`
474575f8106SLeila Ghaffari  - 1 meter in scaled length units
475575f8106SLeila Ghaffari  - `1E-2`
476575f8106SLeila Ghaffari  -
477ea10196cSJeremy L Thompson
478575f8106SLeila Ghaffari* - `-units_second`
479575f8106SLeila Ghaffari  - 1 second in scaled time units
480575f8106SLeila Ghaffari  - `1E-2`
481575f8106SLeila Ghaffari  -
482ea10196cSJeremy L Thompson
483575f8106SLeila Ghaffari* - `-mean_velocity`
484575f8106SLeila Ghaffari  - Background velocity vector
485575f8106SLeila Ghaffari  - `(1,1,0)`
486575f8106SLeila Ghaffari  -
487ea10196cSJeremy L Thompson
488575f8106SLeila Ghaffari* - `-vortex_strength`
489575f8106SLeila Ghaffari  - Strength of vortex < 10
490575f8106SLeila Ghaffari  - `5`
491575f8106SLeila Ghaffari  -
492d8a22b9eSJed Brown
493d8a22b9eSJed Brown* - `-c_tau`
494d8a22b9eSJed Brown  - Stabilization constant
495f821ee77SLeila Ghaffari  - `0.5`
496d8a22b9eSJed Brown  -
497575f8106SLeila Ghaffari:::
498ea10196cSJeremy L Thompson
499575f8106SLeila GhaffariThis problem can be run with:
500ea10196cSJeremy L Thompson
501575f8106SLeila Ghaffari```
502f4277be3SLeila 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.
503575f8106SLeila Ghaffari```
504ea10196cSJeremy L Thompson
505af8870a9STimothy Aiken#### Sod shock tube
506af8870a9STimothy Aiken
507af8870a9STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
508af8870a9STimothy Aiken
509af8870a9STimothy Aiken:::{list-table} Shock Tube Runtime Options
510af8870a9STimothy Aiken:header-rows: 1
511af8870a9STimothy Aiken
512af8870a9STimothy Aiken* - Option
513af8870a9STimothy Aiken  - Description
514af8870a9STimothy Aiken  - Default value
515af8870a9STimothy Aiken  - Unit
516af8870a9STimothy Aiken
517af8870a9STimothy Aiken* - `-units_meter`
518af8870a9STimothy Aiken  - 1 meter in scaled length units
519af8870a9STimothy Aiken  - `1E-2`
520af8870a9STimothy Aiken  -
521af8870a9STimothy Aiken
522af8870a9STimothy Aiken* - `-units_second`
523af8870a9STimothy Aiken  - 1 second in scaled time units
524af8870a9STimothy Aiken  - `1E-2`
525af8870a9STimothy Aiken  -
526af8870a9STimothy Aiken
527af8870a9STimothy Aiken* - `-yzb`
528af8870a9STimothy Aiken  - Use YZB discontinuity capturing
529af8870a9STimothy Aiken  - `none`
530af8870a9STimothy Aiken  -
531af8870a9STimothy Aiken
532af8870a9STimothy Aiken* - `-stab`
533af8870a9STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
534af8870a9STimothy Aiken  - `none`
535af8870a9STimothy Aiken  -
536af8870a9STimothy Aiken:::
537af8870a9STimothy Aiken
538af8870a9STimothy AikenThis problem can be run with:
539af8870a9STimothy Aiken
540af8870a9STimothy Aiken```
541af8870a9STimothy 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
542af8870a9STimothy Aiken```
543af8870a9STimothy Aiken
544af8870a9STimothy Aiken### Newtonian viscosity, Ideal Gas
545af8870a9STimothy Aiken
546bb8a0c61SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
547ea10196cSJeremy L Thompson
548bb8a0c61SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
549575f8106SLeila Ghaffari:header-rows: 1
550ea10196cSJeremy L Thompson
551575f8106SLeila Ghaffari* - Option
552575f8106SLeila Ghaffari  - Description
553575f8106SLeila Ghaffari  - Default value
554575f8106SLeila Ghaffari  - Unit
555ea10196cSJeremy L Thompson
556575f8106SLeila Ghaffari* - `-units_meter`
557575f8106SLeila Ghaffari  - 1 meter in scaled length units
558bb8a0c61SJames Wright  - `1`
559575f8106SLeila Ghaffari  -
560ea10196cSJeremy L Thompson
561575f8106SLeila Ghaffari* - `-units_second`
562575f8106SLeila Ghaffari  - 1 second in scaled time units
563bb8a0c61SJames Wright  - `1`
564575f8106SLeila Ghaffari  -
565ea10196cSJeremy L Thompson
566575f8106SLeila Ghaffari* - `-units_kilogram`
567575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
568bb8a0c61SJames Wright  - `1`
569575f8106SLeila Ghaffari  -
570ea10196cSJeremy L Thompson
571575f8106SLeila Ghaffari* - `-units_Kelvin`
572575f8106SLeila Ghaffari  - 1 Kelvin in scaled temperature units
573575f8106SLeila Ghaffari  - `1`
574575f8106SLeila Ghaffari  -
575ea10196cSJeremy L Thompson
576575f8106SLeila Ghaffari* - `-stab`
577575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
578575f8106SLeila Ghaffari  - `none`
579575f8106SLeila Ghaffari  -
580ea10196cSJeremy L Thompson
581d8a22b9eSJed Brown* - `-c_tau`
582bb8a0c61SJames Wright  - Stabilization constant, $c_\tau$
583f821ee77SLeila Ghaffari  - `0.5`
584d8a22b9eSJed Brown  -
585d8a22b9eSJed Brown
586bb8a0c61SJames Wright* - `-Ctau_t`
587bb8a0c61SJames Wright  - Stabilization time constant, $C_t$
588bb8a0c61SJames Wright  - `1.0`
589bb8a0c61SJames Wright  -
590ea10196cSJeremy L Thompson
591bb8a0c61SJames Wright* - `-Ctau_v`
592bb8a0c61SJames Wright  - Stabilization viscous constant, $C_v$
593b5786772SLeila Ghaffari  - `36, 60, 128 for degree = 1, 2, 3`
594bb8a0c61SJames Wright  -
595ea10196cSJeremy L Thompson
596bb8a0c61SJames Wright* - `-Ctau_C`
597bb8a0c61SJames Wright  - Stabilization continuity constant, $C_c$
598bb8a0c61SJames Wright  - `1.0`
599bb8a0c61SJames Wright  -
600ea10196cSJeremy L Thompson
601bb8a0c61SJames Wright* - `-Ctau_M`
602bb8a0c61SJames Wright  - Stabilization momentum constant, $C_m$
603bb8a0c61SJames Wright  - `1.0`
604bb8a0c61SJames Wright  -
605bb8a0c61SJames Wright
606bb8a0c61SJames Wright* - `-Ctau_E`
607bb8a0c61SJames Wright  - Stabilization energy constant, $C_E$
608bb8a0c61SJames Wright  - `1.0`
609bb8a0c61SJames Wright  -
610ea10196cSJeremy L Thompson
611575f8106SLeila Ghaffari* - `-cv`
612575f8106SLeila Ghaffari  - Heat capacity at constant volume
613575f8106SLeila Ghaffari  - `717`
614575f8106SLeila Ghaffari  - `J/(kg K)`
615ea10196cSJeremy L Thompson
616575f8106SLeila Ghaffari* - `-cp`
617575f8106SLeila Ghaffari  - Heat capacity at constant pressure
618575f8106SLeila Ghaffari  - `1004`
619575f8106SLeila Ghaffari  - `J/(kg K)`
620ea10196cSJeremy L Thompson
621575f8106SLeila Ghaffari* - `-g`
622575f8106SLeila Ghaffari  - Gravitational acceleration
623575f8106SLeila Ghaffari  - `9.81`
624575f8106SLeila Ghaffari  - `m/s^2`
625ea10196cSJeremy L Thompson
626575f8106SLeila Ghaffari* - `-lambda`
627575f8106SLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
628575f8106SLeila Ghaffari  - `-2/3`
629575f8106SLeila Ghaffari  -
630ea10196cSJeremy L Thompson
631575f8106SLeila Ghaffari* - `-mu`
632575f8106SLeila Ghaffari  - Shear dynamic viscosity coefficient
633575f8106SLeila Ghaffari  - `75`
634575f8106SLeila Ghaffari  -  `Pa s`
635a515125bSLeila Ghaffari
636575f8106SLeila Ghaffari* - `-k`
637575f8106SLeila Ghaffari  - Thermal conductivity
638575f8106SLeila Ghaffari  - `0.02638`
639575f8106SLeila Ghaffari  - `W/(m K)`
640edd152dcSJed Brown
641edd152dcSJed Brown* - `-newtonian_unit_tests`
642edd152dcSJed Brown  - Developer option to test properties
643edd152dcSJed Brown  - `false`
644edd152dcSJed Brown  - boolean
645aa61a79eSJames Wright
646ba952bfeSJames Wright* - `-state_var`
647ba952bfeSJames Wright  - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$)
648ba952bfeSJames Wright  - `conservative`
649ba952bfeSJames Wright  - string
650575f8106SLeila Ghaffari:::
651a515125bSLeila Ghaffari
65279b17980SJames Wright#### Newtonian Wave
65379b17980SJames Wright
65483c686feSJames WrightThe newtonian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
65579b17980SJames Wright
656ff82278dSJames Wright:::{list-table} Newtonian Wave Runtime Options
65779b17980SJames Wright:header-rows: 1
65879b17980SJames Wright
65979b17980SJames Wright* - Option
66079b17980SJames Wright  - Description
66179b17980SJames Wright  - Default value
66279b17980SJames Wright  - Unit
66379b17980SJames Wright
664edf614b5SJed Brown* - `-freestream_riemann`
665edf614b5SJed Brown  - Riemann solver for boundaries (HLL or HLLC)
666edf614b5SJed Brown  - `hllc`
667edf614b5SJed Brown  -
668edf614b5SJed Brown
669edf614b5SJed Brown* - `-freestream_velocity`
67079b17980SJames Wright  - Freestream velocity vector
67179b17980SJames Wright  - `0,0,0`
67279b17980SJames Wright  - `m/s`
67379b17980SJames Wright
674edf614b5SJed Brown* - `-freestream_temperature`
67579b17980SJames Wright  - Freestream temperature
67679b17980SJames Wright  - `288`
67779b17980SJames Wright  - `K`
67879b17980SJames Wright
679edf614b5SJed Brown* - `-freestream_pressure`
680ff82278dSJames Wright  - Freestream pressure
68179b17980SJames Wright  - `1.01e5`
68279b17980SJames Wright  - `Pa`
68379b17980SJames Wright
68479b17980SJames Wright* - `-epicenter`
68579b17980SJames Wright  - Coordinates of center of perturbation
68679b17980SJames Wright  - `0,0,0`
68779b17980SJames Wright  - `m`
68879b17980SJames Wright
68979b17980SJames Wright* - `-amplitude`
69079b17980SJames Wright  - Amplitude of the perturbation
69179b17980SJames Wright  - `0.1`
69279b17980SJames Wright  -
69379b17980SJames Wright
69479b17980SJames Wright* - `-width`
69579b17980SJames Wright  - Width parameter of the perturbation
69679b17980SJames Wright  - `0.002`
69779b17980SJames Wright  - `m`
69879b17980SJames Wright
69979b17980SJames Wright:::
70079b17980SJames Wright
70179b17980SJames WrightThis problem can be run with the `newtonianwave.yaml` file via:
70279b17980SJames Wright
70379b17980SJames Wright```
70479b17980SJames Wright./navierstokes -options_file newtonianwave.yaml
70579b17980SJames Wright```
70679b17980SJames Wright
70779b17980SJames Wright```{literalinclude} ../../../../../examples/fluids/newtonianwave.yaml
70879b17980SJames Wright:language: yaml
70979b17980SJames Wright```
710edd152dcSJed Brown
711b8fb7609SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder
712b8fb7609SAdeleke O. Bankole
713b8fb7609SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options:
714b8fb7609SAdeleke O. Bankole
715b8fb7609SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options
716b8fb7609SAdeleke O. Bankole:header-rows: 1
717b8fb7609SAdeleke O. Bankole
718b8fb7609SAdeleke O. Bankole* - Option
719b8fb7609SAdeleke O. Bankole  - Description
720b8fb7609SAdeleke O. Bankole  - Default value
721b8fb7609SAdeleke O. Bankole  - Unit
722b8fb7609SAdeleke O. Bankole
723b8fb7609SAdeleke O. Bankole* - `-freestream_velocity`
724b8fb7609SAdeleke O. Bankole  - Freestream velocity vector
725b8fb7609SAdeleke O. Bankole  - `0,0,0`
726b8fb7609SAdeleke O. Bankole  - `m/s`
727b8fb7609SAdeleke O. Bankole
728b8fb7609SAdeleke O. Bankole* - `-freestream_temperature`
729b8fb7609SAdeleke O. Bankole  - Freestream temperature
730b8fb7609SAdeleke O. Bankole  - `288`
731b8fb7609SAdeleke O. Bankole  - `K`
732b8fb7609SAdeleke O. Bankole
733b8fb7609SAdeleke O. Bankole* - `-freestream_pressure`
734b8fb7609SAdeleke O. Bankole  - Freestream pressure
735b8fb7609SAdeleke O. Bankole  - `1.01e5`
736b8fb7609SAdeleke O. Bankole  - `Pa`
737b8fb7609SAdeleke O. Bankole
738b8fb7609SAdeleke O. Bankole:::
739b8fb7609SAdeleke O. Bankole
740b8fb7609SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`.
741b8fb7609SAdeleke O. BankoleTo run this problem, first generate a mesh:
742b8fb7609SAdeleke O. Bankole
743b8fb7609SAdeleke O. Bankole```console
744b8fb7609SAdeleke O. Bankole$ make -C examples/fluids/meshes
745b8fb7609SAdeleke O. Bankole```
746b8fb7609SAdeleke O. Bankole
747b8fb7609SAdeleke O. BankoleThen run by building the executable and running:
748b8fb7609SAdeleke O. Bankole
749b8fb7609SAdeleke O. Bankole```console
750b8fb7609SAdeleke O. Bankole$ make build/fluids-navierstokes
751*c5e9980aSAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_
752b8fb7609SAdeleke O. Bankole```
753b8fb7609SAdeleke O. Bankole
754*c5e9980aSAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps).
755*c5e9980aSAdeleke 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.
756*c5e9980aSAdeleke O. Bankole
757*c5e9980aSAdeleke O. Bankole```console
758*c5e9980aSAdeleke O. Bankole$ python examples/fluids/postprocess/force.csv
759*c5e9980aSAdeleke O. Bankole```
760b8fb7609SAdeleke O. Bankole
761b8fb7609SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml
762b8fb7609SAdeleke O. Bankole:language: yaml
763b8fb7609SAdeleke O. Bankole```
764b8fb7609SAdeleke O. Bankole
765af8870a9STimothy Aiken#### Density current
766af8870a9STimothy Aiken
76783c686feSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
768bb8a0c61SJames Wright
769bb8a0c61SJames Wright:::{list-table} Density Current Runtime Options
770bb8a0c61SJames Wright:header-rows: 1
771bb8a0c61SJames Wright
772bb8a0c61SJames Wright* - Option
773bb8a0c61SJames Wright  - Description
774bb8a0c61SJames Wright  - Default value
775bb8a0c61SJames Wright  - Unit
776bb8a0c61SJames Wright
777bb8a0c61SJames Wright* - `-center`
778bb8a0c61SJames Wright  - Location of bubble center
779bb8a0c61SJames Wright  - `(lx,ly,lz)/2`
780bb8a0c61SJames Wright  - `(m,m,m)`
781bb8a0c61SJames Wright
782bb8a0c61SJames Wright* - `-dc_axis`
783bb8a0c61SJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
784bb8a0c61SJames Wright  - `(0,0,0)`
785bb8a0c61SJames Wright  -
786bb8a0c61SJames Wright
787bb8a0c61SJames Wright* - `-rc`
788bb8a0c61SJames Wright  - Characteristic radius of thermal bubble
789bb8a0c61SJames Wright  - `1000`
790bb8a0c61SJames Wright  - `m`
791bb8a0c61SJames Wright
792bb8a0c61SJames Wright* - `-theta0`
793bb8a0c61SJames Wright  - Reference potential temperature
794bb8a0c61SJames Wright  - `300`
795bb8a0c61SJames Wright  - `K`
796bb8a0c61SJames Wright
797bb8a0c61SJames Wright* - `-thetaC`
798bb8a0c61SJames Wright  - Perturbation of potential temperature
799bb8a0c61SJames Wright  - `-15`
800bb8a0c61SJames Wright  - `K`
801bb8a0c61SJames Wright
802bb8a0c61SJames Wright* - `-P0`
803bb8a0c61SJames Wright  - Atmospheric pressure
804bb8a0c61SJames Wright  - `1E5`
805bb8a0c61SJames Wright  - `Pa`
806bb8a0c61SJames Wright
807bb8a0c61SJames Wright* - `-N`
808bb8a0c61SJames Wright  - Brunt-Vaisala frequency
809bb8a0c61SJames Wright  - `0.01`
810bb8a0c61SJames Wright  - `1/s`
811bb8a0c61SJames Wright:::
812bb8a0c61SJames Wright
813575f8106SLeila GhaffariThis problem can be run with:
814ea10196cSJeremy L Thompson
815575f8106SLeila Ghaffari```
816bb8a0c61SJames 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
817bb8a0c61SJames Wright```
818bb8a0c61SJames Wright
819af8870a9STimothy Aiken#### Channel flow
820af8870a9STimothy Aiken
82183c686feSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
822bb8a0c61SJames Wright
823bb8a0c61SJames Wright:::{list-table} Channel Runtime Options
824bb8a0c61SJames Wright:header-rows: 1
825bb8a0c61SJames Wright
826bb8a0c61SJames Wright* - Option
827bb8a0c61SJames Wright  - Description
828bb8a0c61SJames Wright  - Default value
829bb8a0c61SJames Wright  - Unit
830bb8a0c61SJames Wright
831bb8a0c61SJames Wright* - `-umax`
832bb8a0c61SJames Wright  - Maximum/centerline velocity of the flow
833bb8a0c61SJames Wright  - `10`
834bb8a0c61SJames Wright  - `m/s`
835bb8a0c61SJames Wright
836bb8a0c61SJames Wright* - `-theta0`
837bb8a0c61SJames Wright  - Reference potential temperature
838bb8a0c61SJames Wright  - `300`
839bb8a0c61SJames Wright  - `K`
840bb8a0c61SJames Wright
841bb8a0c61SJames Wright* - `-P0`
842bb8a0c61SJames Wright  - Atmospheric pressure
843bb8a0c61SJames Wright  - `1E5`
844bb8a0c61SJames Wright  - `Pa`
845edd152dcSJed Brown
846edd152dcSJed Brown* - `-body_force_scale`
847edd152dcSJed Brown  - Multiplier for body force (`-1` for flow reversal)
848edd152dcSJed Brown  - 1
849edd152dcSJed Brown  -
850bb8a0c61SJames Wright:::
851bb8a0c61SJames Wright
852bb8a0c61SJames WrightThis problem can be run with the `channel.yaml` file via:
853bb8a0c61SJames Wright
854bb8a0c61SJames Wright```
855bb8a0c61SJames Wright./navierstokes -options_file channel.yaml
856bb8a0c61SJames Wright```
857bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
858bb8a0c61SJames Wright:language: yaml
859bb8a0c61SJames Wright```
860bb8a0c61SJames Wright
861c8c30d87SJed Brown(example-blasius)=
862c8c30d87SJed Brown
863af8870a9STimothy Aiken#### Blasius boundary layer
864af8870a9STimothy Aiken
86583c686feSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
866bb8a0c61SJames Wright
867bb8a0c61SJames Wright:::{list-table} Blasius Runtime Options
868bb8a0c61SJames Wright:header-rows: 1
869bb8a0c61SJames Wright
870bb8a0c61SJames Wright* - Option
871bb8a0c61SJames Wright  - Description
872bb8a0c61SJames Wright  - Default value
873bb8a0c61SJames Wright  - Unit
874bb8a0c61SJames Wright
875aef1eb53SLeila Ghaffari* - `-velocity_infinity`
876bb8a0c61SJames Wright  - Freestream velocity
877bb8a0c61SJames Wright  - `40`
878bb8a0c61SJames Wright  - `m/s`
879bb8a0c61SJames Wright
880aef1eb53SLeila Ghaffari* - `-temperature_infinity`
881aef1eb53SLeila Ghaffari  - Freestream temperature
882bb8a0c61SJames Wright  - `288`
883bb8a0c61SJames Wright  - `K`
884bb8a0c61SJames Wright
885aef1eb53SLeila Ghaffari* - `-temperature_wall`
886aef1eb53SLeila Ghaffari  - Wall temperature
8870d850f2eSLeila Ghaffari  - `288`
888aef1eb53SLeila Ghaffari  - `K`
889aef1eb53SLeila Ghaffari
890aef1eb53SLeila Ghaffari* - `-delta0`
891aef1eb53SLeila Ghaffari  - Boundary layer height at the inflow
892aef1eb53SLeila Ghaffari  - `4.2e-3`
893aef1eb53SLeila Ghaffari  - `m`
894aef1eb53SLeila Ghaffari
895bb8a0c61SJames Wright* - `-P0`
896bb8a0c61SJames Wright  - Atmospheric pressure
897bb8a0c61SJames Wright  - `1.01E5`
898bb8a0c61SJames Wright  - `Pa`
899bb8a0c61SJames Wright
90098b448e2SJames Wright* - `-platemesh_refine_height`
90198b448e2SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
902bb8a0c61SJames Wright  - `5.9E-4`
903bb8a0c61SJames Wright  - `m`
904bb8a0c61SJames Wright
90598b448e2SJames Wright* - `-platemesh_Ndelta`
90698b448e2SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
907bb8a0c61SJames Wright  - `45`
908bb8a0c61SJames Wright  -
909bb8a0c61SJames Wright
91098b448e2SJames Wright* - `-platemesh_growth`
911bb8a0c61SJames Wright  - Growth rate of the elements in the refinement region
912bb8a0c61SJames Wright  - `1.08`
913bb8a0c61SJames Wright  -
914bb8a0c61SJames Wright
91598b448e2SJames Wright* - `-platemesh_top_angle`
916bb8a0c61SJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
917bb8a0c61SJames Wright  - `5`
918bb8a0c61SJames Wright  - `degrees`
919493642f1SJames Wright
920493642f1SJames Wright* - `-stg_use`
921493642f1SJames Wright  - Whether to use stg for the inflow conditions
922493642f1SJames Wright  - `false`
923493642f1SJames Wright  -
92498b448e2SJames Wright
92598b448e2SJames Wright* - `-platemesh_y_node_locs_path`
92698b448e2SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
92798b448e2SJames Wright  - `""`
92898b448e2SJames Wright  -
929aef1eb53SLeila Ghaffari
9300d850f2eSLeila Ghaffari* - `-n_chebyshev`
931aef1eb53SLeila Ghaffari  - Number of Chebyshev terms
932aef1eb53SLeila Ghaffari  - `20`
933aef1eb53SLeila Ghaffari  -
934aef1eb53SLeila Ghaffari
9350d850f2eSLeila Ghaffari* - `-chebyshev_`
9360d850f2eSLeila Ghaffari  - Prefix for Chebyshev snes solve
9370d850f2eSLeila Ghaffari  -
9380d850f2eSLeila Ghaffari  -
9390d850f2eSLeila Ghaffari
940bb8a0c61SJames Wright:::
941bb8a0c61SJames Wright
942bb8a0c61SJames WrightThis problem can be run with the `blasius.yaml` file via:
943bb8a0c61SJames Wright
944bb8a0c61SJames Wright```
945bb8a0c61SJames Wright./navierstokes -options_file blasius.yaml
946bb8a0c61SJames Wright```
947bb8a0c61SJames Wright
948bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
949bb8a0c61SJames Wright:language: yaml
950575f8106SLeila Ghaffari```
951493642f1SJames Wright
952493642f1SJames Wright#### STG Inflow for Flat Plate
953493642f1SJames Wright
954b46bfc5eSJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
955493642f1SJames Wright
956493642f1SJames Wright:::{list-table} Blasius Runtime Options
957493642f1SJames Wright:header-rows: 1
958493642f1SJames Wright
959493642f1SJames Wright* - Option
960493642f1SJames Wright  - Description
961493642f1SJames Wright  - Default value
962493642f1SJames Wright  - Unit
963493642f1SJames Wright
964493642f1SJames Wright* - `-stg_inflow_path`
965493642f1SJames Wright  - Path to the STGInflow file
966493642f1SJames Wright  - `./STGInflow.dat`
967493642f1SJames Wright  -
968493642f1SJames Wright
969493642f1SJames Wright* - `-stg_rand_path`
970493642f1SJames Wright  - Path to the STGRand file
971493642f1SJames Wright  - `./STGRand.dat`
972493642f1SJames Wright  -
973493642f1SJames Wright
974493642f1SJames Wright* - `-stg_alpha`
975493642f1SJames Wright  - Growth rate of the wavemodes
976493642f1SJames Wright  - `1.01`
977493642f1SJames Wright  -
978493642f1SJames Wright
979493642f1SJames Wright* - `-stg_u0`
980493642f1SJames Wright  - Convective velocity, $U_0$
981493642f1SJames Wright  - `0.0`
982493642f1SJames Wright  - `m/s`
983493642f1SJames Wright
984493642f1SJames Wright* - `-stg_mean_only`
985493642f1SJames Wright  - Only impose the mean velocity (no fluctutations)
986493642f1SJames Wright  - `false`
987493642f1SJames Wright  -
988493642f1SJames Wright
98929ea39e3SJames Wright* - `-stg_strong`
99029ea39e3SJames Wright  - Strongly enforce the STG inflow boundary condition
99129ea39e3SJames Wright  - `false`
99229ea39e3SJames Wright  -
99329ea39e3SJames Wright
994d4e0f297SJames Wright* - `-stg_fluctuating_IC`
995d4e0f297SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
996d4e0f297SJames Wright  - `false`
997d4e0f297SJames Wright  -
998d4e0f297SJames Wright
999493642f1SJames Wright:::
1000493642f1SJames Wright
1001493642f1SJames WrightThis problem can be run with the `blasius.yaml` file via:
1002493642f1SJames Wright
1003493642f1SJames Wright```
1004493642f1SJames Wright./navierstokes -options_file blasius.yaml -stg_use true
1005493642f1SJames Wright```
1006493642f1SJames Wright
1007b46bfc5eSJeremy L ThompsonNote the added `-stg_use true` flag
1008b46bfc5eSJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
1009