xref: /honee/README.md (revision 91a368018eb14c2bc7a6cd3704e6f34e7aa15bb0)
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
39575f8106SLeila Ghaffari* - `-test`
40575f8106SLeila Ghaffari  - Run in test mode
41575f8106SLeila Ghaffari  - `false`
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
65575f8106SLeila Ghaffari  - `2`
66ea10196cSJeremy L Thompson
67575f8106SLeila Ghaffari* - `-viz_refine`
68575f8106SLeila Ghaffari  - Use regular refinement for visualization
69575f8106SLeila Ghaffari  - `0`
70ea10196cSJeremy L Thompson
71575f8106SLeila Ghaffari* - `-output_freq`
7264be3081SJames Wright  - Frequency of output, in number of steps. `0` has no output, `-1` outputs final state only
73575f8106SLeila Ghaffari  - `10`
74ea10196cSJeremy L Thompson
75575f8106SLeila Ghaffari* - `-output_dir`
76575f8106SLeila Ghaffari  - Output directory
77575f8106SLeila Ghaffari  - `.`
78ea10196cSJeremy L Thompson
79*91a36801SJames Wright* - `-output_add_stepnum2bin`
80*91a36801SJames Wright  - Whether to add step numbers to output binary files
81*91a36801SJames Wright  - `false`
82*91a36801SJames Wright
83*91a36801SJames Wright* - `-continue`
84*91a36801SJames Wright  - Continue from previous solution (input is step number of previous solution)
85*91a36801SJames Wright  - `0`
86*91a36801SJames Wright
87*91a36801SJames Wright* - `-continue_filename`
88*91a36801SJames Wright  - Path to solution binary file from which to continue from
89*91a36801SJames Wright  - `[output_dir]/ns-solution.bin`
90*91a36801SJames Wright
91*91a36801SJames Wright* - `-continue_time_filename`
92*91a36801SJames Wright  - Path to time stamp binary file from which to continue from
93*91a36801SJames Wright  - `[output_dir]/ns-time.bin`
94*91a36801SJames Wright
95f4277be3SLeila Ghaffari* - `-bc_wall`
96f4277be3SLeila Ghaffari  - Use wall boundary conditions on this list of faces
97f4277be3SLeila Ghaffari  -
98f4277be3SLeila Ghaffari
99f4277be3SLeila Ghaffari* - `-wall_comps`
100f4277be3SLeila Ghaffari  - An array of constrained component numbers for wall BCs
101f4277be3SLeila Ghaffari  -
102f4277be3SLeila Ghaffari
103f4277be3SLeila Ghaffari* - `-bc_slip_x`
104f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the x component, on this list of faces
105f4277be3SLeila Ghaffari  -
106f4277be3SLeila Ghaffari
107f4277be3SLeila Ghaffari* - `-bc_slip_y`
108f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the y component, on this list of faces
109f4277be3SLeila Ghaffari  -
110f4277be3SLeila Ghaffari
111f4277be3SLeila Ghaffari* - `-bc_slip_z`
112f4277be3SLeila Ghaffari  - Use slip boundary conditions, for the z component, on this list of faces
113f4277be3SLeila Ghaffari  -
114f4277be3SLeila Ghaffari
115f4277be3SLeila Ghaffari* - `-bc_inflow`
116f4277be3SLeila Ghaffari  - Use inflow boundary conditions on this list of faces
117f4277be3SLeila Ghaffari  -
118f4277be3SLeila Ghaffari
119f4277be3SLeila Ghaffari* - `-bc_outflow`
120f4277be3SLeila Ghaffari  - Use outflow boundary conditions on this list of faces
121f4277be3SLeila Ghaffari  -
1228ef11c93SLeila Ghaffari
12379b17980SJames Wright* - `-bc_freestream`
12479b17980SJames Wright  - Use freestream boundary conditions on this list of faces
12579b17980SJames Wright  -
12679b17980SJames Wright
127575f8106SLeila Ghaffari* - `-snes_view`
128575f8106SLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
129575f8106SLeila Ghaffari  -
1308ef11c93SLeila Ghaffari
131575f8106SLeila Ghaffari* - `-log_view`
132575f8106SLeila Ghaffari  - View PETSc performance log
133575f8106SLeila Ghaffari  -
134ea10196cSJeremy L Thompson
135575f8106SLeila Ghaffari* - `-help`
136575f8106SLeila Ghaffari  - View comprehensive information about run-time options
137575f8106SLeila Ghaffari  -
138575f8106SLeila Ghaffari:::
139ea10196cSJeremy L Thompson
14079b17980SJames 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:
141f4277be3SLeila Ghaffari
142bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels
143bb8a0c61SJames Wright:header-rows: 1
144bb8a0c61SJames Wright* - PETSc Face Name
145bb8a0c61SJames Wright  - Cartesian direction
146bb8a0c61SJames Wright  - Face ID
147bb8a0c61SJames Wright
148bb8a0c61SJames Wright* - faceMarkerBottom
149bb8a0c61SJames Wright  - -z
150bb8a0c61SJames Wright  - 1
151bb8a0c61SJames Wright
152bb8a0c61SJames Wright* - faceMarkerRight
153bb8a0c61SJames Wright  - +x
154bb8a0c61SJames Wright  - 2
155bb8a0c61SJames Wright
156bb8a0c61SJames Wright* - faceMarkerTop
157bb8a0c61SJames Wright  - +z
158bb8a0c61SJames Wright  - 3
159bb8a0c61SJames Wright
160bb8a0c61SJames Wright* - faceMarkerLeft
161bb8a0c61SJames Wright  - -x
162bb8a0c61SJames Wright  - 4
163bb8a0c61SJames Wright:::
164bb8a0c61SJames Wright
165bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels
166bb8a0c61SJames Wright:header-rows: 1
167bb8a0c61SJames Wright* - PETSc Face Name
168bb8a0c61SJames Wright  - Cartesian direction
169bb8a0c61SJames Wright  - Face ID
170bb8a0c61SJames Wright
171bb8a0c61SJames Wright* - faceMarkerBottom
172bb8a0c61SJames Wright  - -z
173bb8a0c61SJames Wright  - 1
174bb8a0c61SJames Wright
175bb8a0c61SJames Wright* - faceMarkerTop
176bb8a0c61SJames Wright  - +z
177bb8a0c61SJames Wright  - 2
178bb8a0c61SJames Wright
179bb8a0c61SJames Wright* - faceMarkerFront
180bb8a0c61SJames Wright  - -y
181bb8a0c61SJames Wright  - 3
182bb8a0c61SJames Wright
183bb8a0c61SJames Wright* - faceMarkerBack
184bb8a0c61SJames Wright  - +y
185bb8a0c61SJames Wright  - 4
186bb8a0c61SJames Wright
187bb8a0c61SJames Wright* - faceMarkerRight
188bb8a0c61SJames Wright  - +x
189bb8a0c61SJames Wright  - 5
190bb8a0c61SJames Wright
191bb8a0c61SJames Wright* - faceMarkerLeft
192bb8a0c61SJames Wright  - -x
193bb8a0c61SJames Wright  - 6
194bb8a0c61SJames Wright:::
195f4277be3SLeila Ghaffari
196af8870a9STimothy Aiken### Advection
197af8870a9STimothy Aiken
198b46bfc5eSJeremy 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$.
199b46bfc5eSJeremy L ThompsonThese are available in 2D and 3D.
200af8870a9STimothy Aiken
201af8870a9STimothy Aiken#### 2D advection
202af8870a9STimothy Aiken
203575f8106SLeila GhaffariFor the 2D advection problem, the following additional command-line options are available:
204ea10196cSJeremy L Thompson
205575f8106SLeila Ghaffari:::{list-table} Advection2D Runtime Options
206575f8106SLeila Ghaffari:header-rows: 1
2078ef11c93SLeila Ghaffari
208575f8106SLeila Ghaffari* - Option
209575f8106SLeila Ghaffari  - Description
210575f8106SLeila Ghaffari  - Default value
211575f8106SLeila Ghaffari  - Unit
2128ef11c93SLeila Ghaffari
213575f8106SLeila Ghaffari* - `-rc`
214575f8106SLeila Ghaffari  - Characteristic radius of thermal bubble
215575f8106SLeila Ghaffari  - `1000`
216575f8106SLeila Ghaffari  - `m`
2178ef11c93SLeila Ghaffari
218575f8106SLeila Ghaffari* - `-units_meter`
219575f8106SLeila Ghaffari  - 1 meter in scaled length units
220575f8106SLeila Ghaffari  - `1E-2`
221575f8106SLeila Ghaffari  -
2228ef11c93SLeila Ghaffari
223575f8106SLeila Ghaffari* - `-units_second`
224575f8106SLeila Ghaffari  - 1 second in scaled time units
225575f8106SLeila Ghaffari  - `1E-2`
226575f8106SLeila Ghaffari  -
2278ef11c93SLeila Ghaffari
228575f8106SLeila Ghaffari* - `-units_kilogram`
229575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
230575f8106SLeila Ghaffari  - `1E-6`
231575f8106SLeila Ghaffari  -
232a515125bSLeila Ghaffari
233575f8106SLeila Ghaffari* - `-strong_form`
234575f8106SLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
235575f8106SLeila Ghaffari  - `0`
236575f8106SLeila Ghaffari  -
237a515125bSLeila Ghaffari
238575f8106SLeila Ghaffari* - `-stab`
239575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
240575f8106SLeila Ghaffari  - `none`
241575f8106SLeila Ghaffari  -
242a515125bSLeila Ghaffari
243575f8106SLeila Ghaffari* - `-CtauS`
244575f8106SLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
245575f8106SLeila Ghaffari  - `0`
246575f8106SLeila Ghaffari  -
247a515125bSLeila Ghaffari
248575f8106SLeila Ghaffari* - `-wind_type`
249575f8106SLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
250575f8106SLeila Ghaffari  - `rotation`
251575f8106SLeila Ghaffari  -
252a515125bSLeila Ghaffari
253575f8106SLeila Ghaffari* - `-wind_translation`
254575f8106SLeila Ghaffari  - Constant wind vector when `-wind_type translation`
255575f8106SLeila Ghaffari  - `1,0,0`
256575f8106SLeila Ghaffari  -
2578ef11c93SLeila Ghaffari
258575f8106SLeila Ghaffari* - `-E_wind`
259575f8106SLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
260575f8106SLeila Ghaffari  - `1E6`
261575f8106SLeila Ghaffari  - `J`
262575f8106SLeila Ghaffari:::
263268c6924SLeila Ghaffari
264575f8106SLeila GhaffariAn example of the `rotation` mode can be run with:
265268c6924SLeila Ghaffari
266575f8106SLeila Ghaffari```
267f4277be3SLeila 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
268575f8106SLeila Ghaffari```
269268c6924SLeila Ghaffari
270575f8106SLeila Ghaffariand the `translation` mode with:
271268c6924SLeila Ghaffari
272575f8106SLeila Ghaffari```
273f4277be3SLeila 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
274575f8106SLeila Ghaffari```
275f4277be3SLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
276268c6924SLeila Ghaffari
277af8870a9STimothy Aiken#### 3D advection
278af8870a9STimothy Aiken
279575f8106SLeila GhaffariFor the 3D advection problem, the following additional command-line options are available:
280268c6924SLeila Ghaffari
281575f8106SLeila Ghaffari:::{list-table} Advection3D Runtime Options
282575f8106SLeila Ghaffari:header-rows: 1
283268c6924SLeila Ghaffari
284575f8106SLeila Ghaffari* - Option
285575f8106SLeila Ghaffari  - Description
286575f8106SLeila Ghaffari  - Default value
287575f8106SLeila Ghaffari  - Unit
288268c6924SLeila Ghaffari
289575f8106SLeila Ghaffari* - `-rc`
290575f8106SLeila Ghaffari  - Characteristic radius of thermal bubble
291575f8106SLeila Ghaffari  - `1000`
292575f8106SLeila Ghaffari  - `m`
293268c6924SLeila Ghaffari
294575f8106SLeila Ghaffari* - `-units_meter`
295575f8106SLeila Ghaffari  - 1 meter in scaled length units
296575f8106SLeila Ghaffari  - `1E-2`
297575f8106SLeila Ghaffari  -
298268c6924SLeila Ghaffari
299575f8106SLeila Ghaffari* - `-units_second`
300575f8106SLeila Ghaffari  - 1 second in scaled time units
301575f8106SLeila Ghaffari  - `1E-2`
302575f8106SLeila Ghaffari  -
303268c6924SLeila Ghaffari
304575f8106SLeila Ghaffari* - `-units_kilogram`
305575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
306575f8106SLeila Ghaffari  - `1E-6`
307575f8106SLeila Ghaffari  -
308268c6924SLeila Ghaffari
309575f8106SLeila Ghaffari* - `-strong_form`
310575f8106SLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
311575f8106SLeila Ghaffari  - `0`
312575f8106SLeila Ghaffari  -
313268c6924SLeila Ghaffari
314575f8106SLeila Ghaffari* - `-stab`
315575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
316575f8106SLeila Ghaffari  - `none`
317575f8106SLeila Ghaffari  -
318268c6924SLeila Ghaffari
319575f8106SLeila Ghaffari* - `-CtauS`
320575f8106SLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
321575f8106SLeila Ghaffari  - `0`
322575f8106SLeila Ghaffari  -
323268c6924SLeila Ghaffari
324575f8106SLeila Ghaffari* - `-wind_type`
325575f8106SLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
326575f8106SLeila Ghaffari  - `rotation`
327575f8106SLeila Ghaffari  -
328268c6924SLeila Ghaffari
329575f8106SLeila Ghaffari* - `-wind_translation`
330575f8106SLeila Ghaffari  - Constant wind vector when `-wind_type translation`
331575f8106SLeila Ghaffari  - `1,0,0`
332575f8106SLeila Ghaffari  -
333268c6924SLeila Ghaffari
334575f8106SLeila Ghaffari* - `-E_wind`
335575f8106SLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
336575f8106SLeila Ghaffari  - `1E6`
337575f8106SLeila Ghaffari  - `J`
338268c6924SLeila Ghaffari
339575f8106SLeila Ghaffari* - `-bubble_type`
340575f8106SLeila Ghaffari  - `sphere` (3D) or `cylinder` (2D)
341575f8106SLeila Ghaffari  - `shpere`
342575f8106SLeila Ghaffari  -
343268c6924SLeila Ghaffari
344575f8106SLeila Ghaffari* - `-bubble_continuity`
345575f8106SLeila Ghaffari  - `smooth`, `back_sharp`, or `thick`
346575f8106SLeila Ghaffari  - `smooth`
347575f8106SLeila Ghaffari  -
348575f8106SLeila Ghaffari:::
349ea10196cSJeremy L Thompson
350575f8106SLeila GhaffariAn example of the `rotation` mode can be run with:
351ea10196cSJeremy L Thompson
352575f8106SLeila Ghaffari```
353f4277be3SLeila 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
354575f8106SLeila Ghaffari```
355ea10196cSJeremy L Thompson
356575f8106SLeila Ghaffariand the `translation` mode with:
357ea10196cSJeremy L Thompson
358575f8106SLeila Ghaffari```
359f4277be3SLeila 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
360575f8106SLeila Ghaffari```
361ea10196cSJeremy L Thompson
362af8870a9STimothy Aiken### Inviscid Ideal Gas
363af8870a9STimothy Aiken
364af8870a9STimothy Aiken#### Isentropic Euler vortex
365af8870a9STimothy Aiken
366575f8106SLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
367ea10196cSJeremy L Thompson
368575f8106SLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
369575f8106SLeila Ghaffari:header-rows: 1
370ea10196cSJeremy L Thompson
371575f8106SLeila Ghaffari* - Option
372575f8106SLeila Ghaffari  - Description
373575f8106SLeila Ghaffari  - Default value
374575f8106SLeila Ghaffari  - Unit
375ea10196cSJeremy L Thompson
376575f8106SLeila Ghaffari* - `-center`
377575f8106SLeila Ghaffari  - Location of vortex center
378575f8106SLeila Ghaffari  - `(lx,ly,lz)/2`
379575f8106SLeila Ghaffari  - `(m,m,m)`
380ea10196cSJeremy L Thompson
381575f8106SLeila Ghaffari* - `-units_meter`
382575f8106SLeila Ghaffari  - 1 meter in scaled length units
383575f8106SLeila Ghaffari  - `1E-2`
384575f8106SLeila Ghaffari  -
385ea10196cSJeremy L Thompson
386575f8106SLeila Ghaffari* - `-units_second`
387575f8106SLeila Ghaffari  - 1 second in scaled time units
388575f8106SLeila Ghaffari  - `1E-2`
389575f8106SLeila Ghaffari  -
390ea10196cSJeremy L Thompson
391575f8106SLeila Ghaffari* - `-mean_velocity`
392575f8106SLeila Ghaffari  - Background velocity vector
393575f8106SLeila Ghaffari  - `(1,1,0)`
394575f8106SLeila Ghaffari  -
395ea10196cSJeremy L Thompson
396575f8106SLeila Ghaffari* - `-vortex_strength`
397575f8106SLeila Ghaffari  - Strength of vortex < 10
398575f8106SLeila Ghaffari  - `5`
399575f8106SLeila Ghaffari  -
400d8a22b9eSJed Brown
401d8a22b9eSJed Brown* - `-c_tau`
402d8a22b9eSJed Brown  - Stabilization constant
403f821ee77SLeila Ghaffari  - `0.5`
404d8a22b9eSJed Brown  -
405575f8106SLeila Ghaffari:::
406ea10196cSJeremy L Thompson
407575f8106SLeila GhaffariThis problem can be run with:
408ea10196cSJeremy L Thompson
409575f8106SLeila Ghaffari```
410f4277be3SLeila 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.
411575f8106SLeila Ghaffari```
412ea10196cSJeremy L Thompson
413af8870a9STimothy Aiken#### Sod shock tube
414af8870a9STimothy Aiken
415af8870a9STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
416af8870a9STimothy Aiken
417af8870a9STimothy Aiken:::{list-table} Shock Tube Runtime Options
418af8870a9STimothy Aiken:header-rows: 1
419af8870a9STimothy Aiken
420af8870a9STimothy Aiken* - Option
421af8870a9STimothy Aiken  - Description
422af8870a9STimothy Aiken  - Default value
423af8870a9STimothy Aiken  - Unit
424af8870a9STimothy Aiken
425af8870a9STimothy Aiken* - `-units_meter`
426af8870a9STimothy Aiken  - 1 meter in scaled length units
427af8870a9STimothy Aiken  - `1E-2`
428af8870a9STimothy Aiken  -
429af8870a9STimothy Aiken
430af8870a9STimothy Aiken* - `-units_second`
431af8870a9STimothy Aiken  - 1 second in scaled time units
432af8870a9STimothy Aiken  - `1E-2`
433af8870a9STimothy Aiken  -
434af8870a9STimothy Aiken
435af8870a9STimothy Aiken* - `-yzb`
436af8870a9STimothy Aiken  - Use YZB discontinuity capturing
437af8870a9STimothy Aiken  - `none`
438af8870a9STimothy Aiken  -
439af8870a9STimothy Aiken
440af8870a9STimothy Aiken* - `-stab`
441af8870a9STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
442af8870a9STimothy Aiken  - `none`
443af8870a9STimothy Aiken  -
444af8870a9STimothy Aiken:::
445af8870a9STimothy Aiken
446af8870a9STimothy AikenThis problem can be run with:
447af8870a9STimothy Aiken
448af8870a9STimothy Aiken```
449af8870a9STimothy 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
450af8870a9STimothy Aiken```
451af8870a9STimothy Aiken
452af8870a9STimothy Aiken### Newtonian viscosity, Ideal Gas
453af8870a9STimothy Aiken
454bb8a0c61SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
455ea10196cSJeremy L Thompson
456bb8a0c61SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
457575f8106SLeila Ghaffari:header-rows: 1
458ea10196cSJeremy L Thompson
459575f8106SLeila Ghaffari* - Option
460575f8106SLeila Ghaffari  - Description
461575f8106SLeila Ghaffari  - Default value
462575f8106SLeila Ghaffari  - Unit
463ea10196cSJeremy L Thompson
464575f8106SLeila Ghaffari* - `-units_meter`
465575f8106SLeila Ghaffari  - 1 meter in scaled length units
466bb8a0c61SJames Wright  - `1`
467575f8106SLeila Ghaffari  -
468ea10196cSJeremy L Thompson
469575f8106SLeila Ghaffari* - `-units_second`
470575f8106SLeila Ghaffari  - 1 second in scaled time units
471bb8a0c61SJames Wright  - `1`
472575f8106SLeila Ghaffari  -
473ea10196cSJeremy L Thompson
474575f8106SLeila Ghaffari* - `-units_kilogram`
475575f8106SLeila Ghaffari  - 1 kilogram in scaled mass units
476bb8a0c61SJames Wright  - `1`
477575f8106SLeila Ghaffari  -
478ea10196cSJeremy L Thompson
479575f8106SLeila Ghaffari* - `-units_Kelvin`
480575f8106SLeila Ghaffari  - 1 Kelvin in scaled temperature units
481575f8106SLeila Ghaffari  - `1`
482575f8106SLeila Ghaffari  -
483ea10196cSJeremy L Thompson
484575f8106SLeila Ghaffari* - `-stab`
485575f8106SLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
486575f8106SLeila Ghaffari  - `none`
487575f8106SLeila Ghaffari  -
488ea10196cSJeremy L Thompson
489d8a22b9eSJed Brown* - `-c_tau`
490bb8a0c61SJames Wright  - Stabilization constant, $c_\tau$
491f821ee77SLeila Ghaffari  - `0.5`
492d8a22b9eSJed Brown  -
493d8a22b9eSJed Brown
494bb8a0c61SJames Wright* - `-Ctau_t`
495bb8a0c61SJames Wright  - Stabilization time constant, $C_t$
496bb8a0c61SJames Wright  - `1.0`
497bb8a0c61SJames Wright  -
498ea10196cSJeremy L Thompson
499bb8a0c61SJames Wright* - `-Ctau_v`
500bb8a0c61SJames Wright  - Stabilization viscous constant, $C_v$
501bb8a0c61SJames Wright  - `36.0`
502bb8a0c61SJames Wright  -
503ea10196cSJeremy L Thompson
504bb8a0c61SJames Wright* - `-Ctau_C`
505bb8a0c61SJames Wright  - Stabilization continuity constant, $C_c$
506bb8a0c61SJames Wright  - `1.0`
507bb8a0c61SJames Wright  -
508ea10196cSJeremy L Thompson
509bb8a0c61SJames Wright* - `-Ctau_M`
510bb8a0c61SJames Wright  - Stabilization momentum constant, $C_m$
511bb8a0c61SJames Wright  - `1.0`
512bb8a0c61SJames Wright  -
513bb8a0c61SJames Wright
514bb8a0c61SJames Wright* - `-Ctau_E`
515bb8a0c61SJames Wright  - Stabilization energy constant, $C_E$
516bb8a0c61SJames Wright  - `1.0`
517bb8a0c61SJames Wright  -
518ea10196cSJeremy L Thompson
519575f8106SLeila Ghaffari* - `-cv`
520575f8106SLeila Ghaffari  - Heat capacity at constant volume
521575f8106SLeila Ghaffari  - `717`
522575f8106SLeila Ghaffari  - `J/(kg K)`
523ea10196cSJeremy L Thompson
524575f8106SLeila Ghaffari* - `-cp`
525575f8106SLeila Ghaffari  - Heat capacity at constant pressure
526575f8106SLeila Ghaffari  - `1004`
527575f8106SLeila Ghaffari  - `J/(kg K)`
528ea10196cSJeremy L Thompson
529575f8106SLeila Ghaffari* - `-g`
530575f8106SLeila Ghaffari  - Gravitational acceleration
531575f8106SLeila Ghaffari  - `9.81`
532575f8106SLeila Ghaffari  - `m/s^2`
533ea10196cSJeremy L Thompson
534575f8106SLeila Ghaffari* - `-lambda`
535575f8106SLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
536575f8106SLeila Ghaffari  - `-2/3`
537575f8106SLeila Ghaffari  -
538ea10196cSJeremy L Thompson
539575f8106SLeila Ghaffari* - `-mu`
540575f8106SLeila Ghaffari  - Shear dynamic viscosity coefficient
541575f8106SLeila Ghaffari  - `75`
542575f8106SLeila Ghaffari  -  `Pa s`
543a515125bSLeila Ghaffari
544575f8106SLeila Ghaffari* - `-k`
545575f8106SLeila Ghaffari  - Thermal conductivity
546575f8106SLeila Ghaffari  - `0.02638`
547575f8106SLeila Ghaffari  - `W/(m K)`
548edd152dcSJed Brown
549edd152dcSJed Brown* - `-newtonian_unit_tests`
550edd152dcSJed Brown  - Developer option to test properties
551edd152dcSJed Brown  - `false`
552edd152dcSJed Brown  - boolean
553aa61a79eSJames Wright
554ba952bfeSJames Wright* - `-state_var`
555ba952bfeSJames Wright  - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$)
556ba952bfeSJames Wright  - `conservative`
557ba952bfeSJames Wright  - string
558575f8106SLeila Ghaffari:::
559a515125bSLeila Ghaffari
56079b17980SJames Wright#### Newtonian Wave
56179b17980SJames Wright
56283c686feSJames WrightThe newtonian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options:
56379b17980SJames Wright
564ff82278dSJames Wright:::{list-table} Newtonian Wave Runtime Options
56579b17980SJames Wright:header-rows: 1
56679b17980SJames Wright
56779b17980SJames Wright* - Option
56879b17980SJames Wright  - Description
56979b17980SJames Wright  - Default value
57079b17980SJames Wright  - Unit
57179b17980SJames Wright
572ff82278dSJames Wright* - `-velocity_freestream`
57379b17980SJames Wright  - Freestream velocity vector
57479b17980SJames Wright  - `0,0,0`
57579b17980SJames Wright  - `m/s`
57679b17980SJames Wright
577ff82278dSJames Wright* - `-temperature_freestream`
57879b17980SJames Wright  - Freestream temperature
57979b17980SJames Wright  - `288`
58079b17980SJames Wright  - `K`
58179b17980SJames Wright
582ff82278dSJames Wright* - `-pressure_freestream`
583ff82278dSJames Wright  - Freestream pressure
58479b17980SJames Wright  - `1.01e5`
58579b17980SJames Wright  - `Pa`
58679b17980SJames Wright
58779b17980SJames Wright* - `-epicenter`
58879b17980SJames Wright  - Coordinates of center of perturbation
58979b17980SJames Wright  - `0,0,0`
59079b17980SJames Wright  - `m`
59179b17980SJames Wright
59279b17980SJames Wright* - `-amplitude`
59379b17980SJames Wright  - Amplitude of the perturbation
59479b17980SJames Wright  - `0.1`
59579b17980SJames Wright  -
59679b17980SJames Wright
59779b17980SJames Wright* - `-width`
59879b17980SJames Wright  - Width parameter of the perturbation
59979b17980SJames Wright  - `0.002`
60079b17980SJames Wright  - `m`
60179b17980SJames Wright
60279b17980SJames Wright:::
60379b17980SJames Wright
60479b17980SJames WrightThis problem can be run with the `newtonianwave.yaml` file via:
60579b17980SJames Wright
60679b17980SJames Wright```
60779b17980SJames Wright./navierstokes -options_file newtonianwave.yaml
60879b17980SJames Wright```
60979b17980SJames Wright
61079b17980SJames Wright```{literalinclude} ../../../../../examples/fluids/newtonianwave.yaml
61179b17980SJames Wright:language: yaml
61279b17980SJames Wright```
613edd152dcSJed Brown
614af8870a9STimothy Aiken#### Density current
615af8870a9STimothy Aiken
61683c686feSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options:
617bb8a0c61SJames Wright
618bb8a0c61SJames Wright:::{list-table} Density Current Runtime Options
619bb8a0c61SJames Wright:header-rows: 1
620bb8a0c61SJames Wright
621bb8a0c61SJames Wright* - Option
622bb8a0c61SJames Wright  - Description
623bb8a0c61SJames Wright  - Default value
624bb8a0c61SJames Wright  - Unit
625bb8a0c61SJames Wright
626bb8a0c61SJames Wright* - `-center`
627bb8a0c61SJames Wright  - Location of bubble center
628bb8a0c61SJames Wright  - `(lx,ly,lz)/2`
629bb8a0c61SJames Wright  - `(m,m,m)`
630bb8a0c61SJames Wright
631bb8a0c61SJames Wright* - `-dc_axis`
632bb8a0c61SJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
633bb8a0c61SJames Wright  - `(0,0,0)`
634bb8a0c61SJames Wright  -
635bb8a0c61SJames Wright
636bb8a0c61SJames Wright* - `-rc`
637bb8a0c61SJames Wright  - Characteristic radius of thermal bubble
638bb8a0c61SJames Wright  - `1000`
639bb8a0c61SJames Wright  - `m`
640bb8a0c61SJames Wright
641bb8a0c61SJames Wright* - `-theta0`
642bb8a0c61SJames Wright  - Reference potential temperature
643bb8a0c61SJames Wright  - `300`
644bb8a0c61SJames Wright  - `K`
645bb8a0c61SJames Wright
646bb8a0c61SJames Wright* - `-thetaC`
647bb8a0c61SJames Wright  - Perturbation of potential temperature
648bb8a0c61SJames Wright  - `-15`
649bb8a0c61SJames Wright  - `K`
650bb8a0c61SJames Wright
651bb8a0c61SJames Wright* - `-P0`
652bb8a0c61SJames Wright  - Atmospheric pressure
653bb8a0c61SJames Wright  - `1E5`
654bb8a0c61SJames Wright  - `Pa`
655bb8a0c61SJames Wright
656bb8a0c61SJames Wright* - `-N`
657bb8a0c61SJames Wright  - Brunt-Vaisala frequency
658bb8a0c61SJames Wright  - `0.01`
659bb8a0c61SJames Wright  - `1/s`
660bb8a0c61SJames Wright:::
661bb8a0c61SJames Wright
662575f8106SLeila GhaffariThis problem can be run with:
663ea10196cSJeremy L Thompson
664575f8106SLeila Ghaffari```
665bb8a0c61SJames 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
666bb8a0c61SJames Wright```
667bb8a0c61SJames Wright
668af8870a9STimothy Aiken#### Channel flow
669af8870a9STimothy Aiken
67083c686feSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options:
671bb8a0c61SJames Wright
672bb8a0c61SJames Wright:::{list-table} Channel Runtime Options
673bb8a0c61SJames Wright:header-rows: 1
674bb8a0c61SJames Wright
675bb8a0c61SJames Wright* - Option
676bb8a0c61SJames Wright  - Description
677bb8a0c61SJames Wright  - Default value
678bb8a0c61SJames Wright  - Unit
679bb8a0c61SJames Wright
680bb8a0c61SJames Wright* - `-umax`
681bb8a0c61SJames Wright  - Maximum/centerline velocity of the flow
682bb8a0c61SJames Wright  - `10`
683bb8a0c61SJames Wright  - `m/s`
684bb8a0c61SJames Wright
685bb8a0c61SJames Wright* - `-theta0`
686bb8a0c61SJames Wright  - Reference potential temperature
687bb8a0c61SJames Wright  - `300`
688bb8a0c61SJames Wright  - `K`
689bb8a0c61SJames Wright
690bb8a0c61SJames Wright* - `-P0`
691bb8a0c61SJames Wright  - Atmospheric pressure
692bb8a0c61SJames Wright  - `1E5`
693bb8a0c61SJames Wright  - `Pa`
694edd152dcSJed Brown
695edd152dcSJed Brown* - `-body_force_scale`
696edd152dcSJed Brown  - Multiplier for body force (`-1` for flow reversal)
697edd152dcSJed Brown  - 1
698edd152dcSJed Brown  -
699bb8a0c61SJames Wright:::
700bb8a0c61SJames Wright
701bb8a0c61SJames WrightThis problem can be run with the `channel.yaml` file via:
702bb8a0c61SJames Wright
703bb8a0c61SJames Wright```
704bb8a0c61SJames Wright./navierstokes -options_file channel.yaml
705bb8a0c61SJames Wright```
706bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
707bb8a0c61SJames Wright:language: yaml
708bb8a0c61SJames Wright```
709bb8a0c61SJames Wright
710af8870a9STimothy Aiken#### Blasius boundary layer
711af8870a9STimothy Aiken
71283c686feSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options:
713bb8a0c61SJames Wright
714bb8a0c61SJames Wright:::{list-table} Blasius Runtime Options
715bb8a0c61SJames Wright:header-rows: 1
716bb8a0c61SJames Wright
717bb8a0c61SJames Wright* - Option
718bb8a0c61SJames Wright  - Description
719bb8a0c61SJames Wright  - Default value
720bb8a0c61SJames Wright  - Unit
721bb8a0c61SJames Wright
722aef1eb53SLeila Ghaffari* - `-velocity_infinity`
723bb8a0c61SJames Wright  - Freestream velocity
724bb8a0c61SJames Wright  - `40`
725bb8a0c61SJames Wright  - `m/s`
726bb8a0c61SJames Wright
727aef1eb53SLeila Ghaffari* - `-temperature_infinity`
728aef1eb53SLeila Ghaffari  - Freestream temperature
729bb8a0c61SJames Wright  - `288`
730bb8a0c61SJames Wright  - `K`
731bb8a0c61SJames Wright
732aef1eb53SLeila Ghaffari* - `-temperature_wall`
733aef1eb53SLeila Ghaffari  - Wall temperature
7340d850f2eSLeila Ghaffari  - `288`
735aef1eb53SLeila Ghaffari  - `K`
736aef1eb53SLeila Ghaffari
737aef1eb53SLeila Ghaffari* - `-delta0`
738aef1eb53SLeila Ghaffari  - Boundary layer height at the inflow
739aef1eb53SLeila Ghaffari  - `4.2e-3`
740aef1eb53SLeila Ghaffari  - `m`
741aef1eb53SLeila Ghaffari
742bb8a0c61SJames Wright* - `-P0`
743bb8a0c61SJames Wright  - Atmospheric pressure
744bb8a0c61SJames Wright  - `1.01E5`
745bb8a0c61SJames Wright  - `Pa`
746bb8a0c61SJames Wright
74798b448e2SJames Wright* - `-platemesh_refine_height`
74898b448e2SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
749bb8a0c61SJames Wright  - `5.9E-4`
750bb8a0c61SJames Wright  - `m`
751bb8a0c61SJames Wright
75298b448e2SJames Wright* - `-platemesh_Ndelta`
75398b448e2SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
754bb8a0c61SJames Wright  - `45`
755bb8a0c61SJames Wright  -
756bb8a0c61SJames Wright
75798b448e2SJames Wright* - `-platemesh_growth`
758bb8a0c61SJames Wright  - Growth rate of the elements in the refinement region
759bb8a0c61SJames Wright  - `1.08`
760bb8a0c61SJames Wright  -
761bb8a0c61SJames Wright
76298b448e2SJames Wright* - `-platemesh_top_angle`
763bb8a0c61SJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
764bb8a0c61SJames Wright  - `5`
765bb8a0c61SJames Wright  - `degrees`
766493642f1SJames Wright
767493642f1SJames Wright* - `-stg_use`
768493642f1SJames Wright  - Whether to use stg for the inflow conditions
769493642f1SJames Wright  - `false`
770493642f1SJames Wright  -
77198b448e2SJames Wright
77298b448e2SJames Wright* - `-platemesh_y_node_locs_path`
77398b448e2SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
77498b448e2SJames Wright  - `""`
77598b448e2SJames Wright  -
776aef1eb53SLeila Ghaffari
7770d850f2eSLeila Ghaffari* - `-n_chebyshev`
778aef1eb53SLeila Ghaffari  - Number of Chebyshev terms
779aef1eb53SLeila Ghaffari  - `20`
780aef1eb53SLeila Ghaffari  -
781aef1eb53SLeila Ghaffari
7820d850f2eSLeila Ghaffari* - `-chebyshev_`
7830d850f2eSLeila Ghaffari  - Prefix for Chebyshev snes solve
7840d850f2eSLeila Ghaffari  -
7850d850f2eSLeila Ghaffari  -
7860d850f2eSLeila Ghaffari
787bb8a0c61SJames Wright:::
788bb8a0c61SJames Wright
789bb8a0c61SJames WrightThis problem can be run with the `blasius.yaml` file via:
790bb8a0c61SJames Wright
791bb8a0c61SJames Wright```
792bb8a0c61SJames Wright./navierstokes -options_file blasius.yaml
793bb8a0c61SJames Wright```
794bb8a0c61SJames Wright
795bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
796bb8a0c61SJames Wright:language: yaml
797575f8106SLeila Ghaffari```
798493642f1SJames Wright
799493642f1SJames Wright#### STG Inflow for Flat Plate
800493642f1SJames Wright
801b46bfc5eSJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
802493642f1SJames Wright
803493642f1SJames Wright:::{list-table} Blasius Runtime Options
804493642f1SJames Wright:header-rows: 1
805493642f1SJames Wright
806493642f1SJames Wright* - Option
807493642f1SJames Wright  - Description
808493642f1SJames Wright  - Default value
809493642f1SJames Wright  - Unit
810493642f1SJames Wright
811493642f1SJames Wright* - `-stg_inflow_path`
812493642f1SJames Wright  - Path to the STGInflow file
813493642f1SJames Wright  - `./STGInflow.dat`
814493642f1SJames Wright  -
815493642f1SJames Wright
816493642f1SJames Wright* - `-stg_rand_path`
817493642f1SJames Wright  - Path to the STGRand file
818493642f1SJames Wright  - `./STGRand.dat`
819493642f1SJames Wright  -
820493642f1SJames Wright
821493642f1SJames Wright* - `-stg_alpha`
822493642f1SJames Wright  - Growth rate of the wavemodes
823493642f1SJames Wright  - `1.01`
824493642f1SJames Wright  -
825493642f1SJames Wright
826493642f1SJames Wright* - `-stg_u0`
827493642f1SJames Wright  - Convective velocity, $U_0$
828493642f1SJames Wright  - `0.0`
829493642f1SJames Wright  - `m/s`
830493642f1SJames Wright
831493642f1SJames Wright* - `-stg_mean_only`
832493642f1SJames Wright  - Only impose the mean velocity (no fluctutations)
833493642f1SJames Wright  - `false`
834493642f1SJames Wright  -
835493642f1SJames Wright
83629ea39e3SJames Wright* - `-stg_strong`
83729ea39e3SJames Wright  - Strongly enforce the STG inflow boundary condition
83829ea39e3SJames Wright  - `false`
83929ea39e3SJames Wright  -
84029ea39e3SJames Wright
841d4e0f297SJames Wright* - `-stg_fluctuating_IC`
842d4e0f297SJames Wright  - "Extrude" the fluctuations through the domain as an initial condition
843d4e0f297SJames Wright  - `false`
844d4e0f297SJames Wright  -
845d4e0f297SJames Wright
846493642f1SJames Wright:::
847493642f1SJames Wright
848493642f1SJames WrightThis problem can be run with the `blasius.yaml` file via:
849493642f1SJames Wright
850493642f1SJames Wright```
851493642f1SJames Wright./navierstokes -options_file blasius.yaml -stg_use true
852493642f1SJames Wright```
853493642f1SJames Wright
854b46bfc5eSJeremy L ThompsonNote the added `-stg_use true` flag
855b46bfc5eSJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
856