xref: /libCEED/examples/fluids/README.md (revision 91eaef80a564ba0fab6277aaac11ed9994a4b0d5)
1ccaff030SJeremy L Thompson## libCEED: Navier-Stokes Example
2ccaff030SJeremy L Thompson
3ccaff030SJeremy L ThompsonThis page provides a description of the Navier-Stokes example for the libCEED library, based on PETSc.
4b8962995SJeremy L ThompsonPETSc v3.17 or a development version of PETSc at commit 0e95d842 or later is required.
5ccaff030SJeremy L Thompson
677841947SLeila GhaffariThe Navier-Stokes problem solves the compressible Navier-Stokes equations in three dimensions using an explicit time integration.
777841947SLeila GhaffariThe state variables are mass density, momentum density, and energy density.
8ccaff030SJeremy L Thompson
977841947SLeila GhaffariThe main Navier-Stokes solver for libCEED is defined in [`navierstokes.c`](navierstokes.c) with different problem definitions according to the application of interest.
10ccaff030SJeremy L Thompson
11bc7bbd5dSLeila GhaffariBuild by using:
12ccaff030SJeremy L Thompson
13ccaff030SJeremy L Thompson`make`
14ccaff030SJeremy L Thompson
15bc7bbd5dSLeila Ghaffariand run with:
16ccaff030SJeremy L Thompson
17bc7bbd5dSLeila Ghaffari```
18bc7bbd5dSLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree]
19bc7bbd5dSLeila Ghaffari```
20ccaff030SJeremy L Thompson
21bc7bbd5dSLeila Ghaffari## Runtime options
22ccaff030SJeremy L Thompson
23bc7bbd5dSLeila Ghaffari% inclusion-fluids-marker
24ccaff030SJeremy L Thompson
25bc7bbd5dSLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options.
26bc7bbd5dSLeila GhaffariThe following options are common among all problem types:
27ccaff030SJeremy L Thompson
28bc7bbd5dSLeila Ghaffari:::{list-table} Common Runtime Options
29bc7bbd5dSLeila Ghaffari:header-rows: 1
30ccaff030SJeremy L Thompson
31bc7bbd5dSLeila Ghaffari* - Option
32bc7bbd5dSLeila Ghaffari  - Description
33bc7bbd5dSLeila Ghaffari  - Default value
34ccaff030SJeremy L Thompson
35bc7bbd5dSLeila Ghaffari* - `-ceed`
36bc7bbd5dSLeila Ghaffari  - CEED resource specifier
37bc7bbd5dSLeila Ghaffari  - `/cpu/self/opt/blocked`
38ccaff030SJeremy L Thompson
39bc7bbd5dSLeila Ghaffari* - `-test`
40bc7bbd5dSLeila Ghaffari  - Run in test mode
41bc7bbd5dSLeila Ghaffari  - `false`
42ccaff030SJeremy L Thompson
43bc7bbd5dSLeila Ghaffari* - `-compare_final_state_atol`
44bc7bbd5dSLeila Ghaffari  - Test absolute tolerance
45bc7bbd5dSLeila Ghaffari  - `1E-11`
46ccaff030SJeremy L Thompson
47bc7bbd5dSLeila Ghaffari* - `-compare_final_state_filename`
48bc7bbd5dSLeila Ghaffari  - Test filename
49bc7bbd5dSLeila Ghaffari  -
50ccaff030SJeremy L Thompson
51bc7bbd5dSLeila Ghaffari* - `-problem`
52bc7bbd5dSLeila Ghaffari  - Problem to solve (`advection`, `advection2d`, `density_current`, or `euler_vortex`)
53bc7bbd5dSLeila Ghaffari  - `density_current`
54ccaff030SJeremy L Thompson
55bc7bbd5dSLeila Ghaffari* - `-implicit`
56bc7bbd5dSLeila Ghaffari  - Use implicit time integartor formulation
57bc7bbd5dSLeila Ghaffari  -
58ccaff030SJeremy L Thompson
59bc7bbd5dSLeila Ghaffari* - `-degree`
60bc7bbd5dSLeila Ghaffari  - Polynomial degree of tensor product basis (must be >= 1)
61bc7bbd5dSLeila Ghaffari  - `1`
62ccaff030SJeremy L Thompson
632288fb52SJeremy L Thompson* - `-q_extra`
64bc7bbd5dSLeila Ghaffari  - Number of extra quadrature points
65bc7bbd5dSLeila Ghaffari  - `2`
66ccaff030SJeremy L Thompson
67bc7bbd5dSLeila Ghaffari* - `-viz_refine`
68bc7bbd5dSLeila Ghaffari  - Use regular refinement for visualization
69bc7bbd5dSLeila Ghaffari  - `0`
70ccaff030SJeremy L Thompson
71bc7bbd5dSLeila Ghaffari* - `-output_freq`
72bc7bbd5dSLeila Ghaffari  - Frequency of output, in number of steps
73bc7bbd5dSLeila Ghaffari  - `10`
74ccaff030SJeremy L Thompson
75bc7bbd5dSLeila Ghaffari* - `-continue`
76bc7bbd5dSLeila Ghaffari  - Continue from previous solution
77bc7bbd5dSLeila Ghaffari  - `0`
78ccaff030SJeremy L Thompson
79bc7bbd5dSLeila Ghaffari* - `-output_dir`
80bc7bbd5dSLeila Ghaffari  - Output directory
81bc7bbd5dSLeila Ghaffari  - `.`
82ccaff030SJeremy L Thompson
834534a52eSLeila Ghaffari* - `-bc_wall`
844534a52eSLeila Ghaffari  - Use wall boundary conditions on this list of faces
854534a52eSLeila Ghaffari  -
864534a52eSLeila Ghaffari
874534a52eSLeila Ghaffari* - `-wall_comps`
884534a52eSLeila Ghaffari  - An array of constrained component numbers for wall BCs
894534a52eSLeila Ghaffari  -
904534a52eSLeila Ghaffari
914534a52eSLeila Ghaffari* - `-bc_slip_x`
924534a52eSLeila Ghaffari  - Use slip boundary conditions, for the x component, on this list of faces
934534a52eSLeila Ghaffari  -
944534a52eSLeila Ghaffari
954534a52eSLeila Ghaffari* - `-bc_slip_y`
964534a52eSLeila Ghaffari  - Use slip boundary conditions, for the y component, on this list of faces
974534a52eSLeila Ghaffari  -
984534a52eSLeila Ghaffari
994534a52eSLeila Ghaffari* - `-bc_slip_z`
1004534a52eSLeila Ghaffari  - Use slip boundary conditions, for the z component, on this list of faces
1014534a52eSLeila Ghaffari  -
1024534a52eSLeila Ghaffari
1034534a52eSLeila Ghaffari* - `-bc_inflow`
1044534a52eSLeila Ghaffari  - Use inflow boundary conditions on this list of faces
1054534a52eSLeila Ghaffari  -
1064534a52eSLeila Ghaffari
1074534a52eSLeila Ghaffari* - `-bc_outflow`
1084534a52eSLeila Ghaffari  - Use outflow boundary conditions on this list of faces
1094534a52eSLeila Ghaffari  -
11089d0f5c0SLeila Ghaffari
111bc7bbd5dSLeila Ghaffari* - `-snes_view`
112bc7bbd5dSLeila Ghaffari  - View PETSc `SNES` nonlinear solver configuration
113bc7bbd5dSLeila Ghaffari  -
11489d0f5c0SLeila Ghaffari
115bc7bbd5dSLeila Ghaffari* - `-log_view`
116bc7bbd5dSLeila Ghaffari  - View PETSc performance log
117bc7bbd5dSLeila Ghaffari  -
118ccaff030SJeremy L Thompson
119bc7bbd5dSLeila Ghaffari* - `-help`
120bc7bbd5dSLeila Ghaffari  - View comprehensive information about run-time options
121bc7bbd5dSLeila Ghaffari  -
122bc7bbd5dSLeila Ghaffari:::
123ccaff030SJeremy L Thompson
1244534a52eSLeila GhaffariFor the case of a square/cubic mesh, the list of face indices to be used with `-bc_wall`, `bc_inflow`, `bc_outflow` and/or `-bc_slip_x`, `-bc_slip_y`, and `-bc_slip_z` are:
1254534a52eSLeila Ghaffari
12688626eedSJames Wright:::{list-table} 2D Face ID Labels
12788626eedSJames Wright:header-rows: 1
12888626eedSJames Wright* - PETSc Face Name
12988626eedSJames Wright  - Cartesian direction
13088626eedSJames Wright  - Face ID
13188626eedSJames Wright
13288626eedSJames Wright* - faceMarkerBottom
13388626eedSJames Wright  - -z
13488626eedSJames Wright  - 1
13588626eedSJames Wright
13688626eedSJames Wright* - faceMarkerRight
13788626eedSJames Wright  - +x
13888626eedSJames Wright  - 2
13988626eedSJames Wright
14088626eedSJames Wright* - faceMarkerTop
14188626eedSJames Wright  - +z
14288626eedSJames Wright  - 3
14388626eedSJames Wright
14488626eedSJames Wright* - faceMarkerLeft
14588626eedSJames Wright  - -x
14688626eedSJames Wright  - 4
14788626eedSJames Wright:::
14888626eedSJames Wright
14988626eedSJames Wright:::{list-table} 2D Face ID Labels
15088626eedSJames Wright:header-rows: 1
15188626eedSJames Wright* - PETSc Face Name
15288626eedSJames Wright  - Cartesian direction
15388626eedSJames Wright  - Face ID
15488626eedSJames Wright
15588626eedSJames Wright* - faceMarkerBottom
15688626eedSJames Wright  - -z
15788626eedSJames Wright  - 1
15888626eedSJames Wright
15988626eedSJames Wright* - faceMarkerTop
16088626eedSJames Wright  - +z
16188626eedSJames Wright  - 2
16288626eedSJames Wright
16388626eedSJames Wright* - faceMarkerFront
16488626eedSJames Wright  - -y
16588626eedSJames Wright  - 3
16688626eedSJames Wright
16788626eedSJames Wright* - faceMarkerBack
16888626eedSJames Wright  - +y
16988626eedSJames Wright  - 4
17088626eedSJames Wright
17188626eedSJames Wright* - faceMarkerRight
17288626eedSJames Wright  - +x
17388626eedSJames Wright  - 5
17488626eedSJames Wright
17588626eedSJames Wright* - faceMarkerLeft
17688626eedSJames Wright  - -x
17788626eedSJames Wright  - 6
17888626eedSJames Wright:::
1794534a52eSLeila Ghaffari
180019b7682STimothy Aiken### Advection
181019b7682STimothy Aiken
182019b7682STimothy AikenFor 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$. These are available in 2D and 3D.
183019b7682STimothy Aiken
184019b7682STimothy Aiken#### 2D advection
185019b7682STimothy Aiken
186bc7bbd5dSLeila GhaffariFor the 2D advection problem, the following additional command-line options are available:
187ccaff030SJeremy L Thompson
188bc7bbd5dSLeila Ghaffari:::{list-table} Advection2D Runtime Options
189bc7bbd5dSLeila Ghaffari:header-rows: 1
19089d0f5c0SLeila Ghaffari
191bc7bbd5dSLeila Ghaffari* - Option
192bc7bbd5dSLeila Ghaffari  - Description
193bc7bbd5dSLeila Ghaffari  - Default value
194bc7bbd5dSLeila Ghaffari  - Unit
19589d0f5c0SLeila Ghaffari
196bc7bbd5dSLeila Ghaffari* - `-rc`
197bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
198bc7bbd5dSLeila Ghaffari  - `1000`
199bc7bbd5dSLeila Ghaffari  - `m`
20089d0f5c0SLeila Ghaffari
201bc7bbd5dSLeila Ghaffari* - `-units_meter`
202bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
203bc7bbd5dSLeila Ghaffari  - `1E-2`
204bc7bbd5dSLeila Ghaffari  -
20589d0f5c0SLeila Ghaffari
206bc7bbd5dSLeila Ghaffari* - `-units_second`
207bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
208bc7bbd5dSLeila Ghaffari  - `1E-2`
209bc7bbd5dSLeila Ghaffari  -
21089d0f5c0SLeila Ghaffari
211bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
212bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
213bc7bbd5dSLeila Ghaffari  - `1E-6`
214bc7bbd5dSLeila Ghaffari  -
21577841947SLeila Ghaffari
216bc7bbd5dSLeila Ghaffari* - `-strong_form`
217bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
218bc7bbd5dSLeila Ghaffari  - `0`
219bc7bbd5dSLeila Ghaffari  -
22077841947SLeila Ghaffari
221bc7bbd5dSLeila Ghaffari* - `-stab`
222bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
223bc7bbd5dSLeila Ghaffari  - `none`
224bc7bbd5dSLeila Ghaffari  -
22577841947SLeila Ghaffari
226bc7bbd5dSLeila Ghaffari* - `-CtauS`
227bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
228bc7bbd5dSLeila Ghaffari  - `0`
229bc7bbd5dSLeila Ghaffari  -
23077841947SLeila Ghaffari
231bc7bbd5dSLeila Ghaffari* - `-wind_type`
232bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
233bc7bbd5dSLeila Ghaffari  - `rotation`
234bc7bbd5dSLeila Ghaffari  -
23577841947SLeila Ghaffari
236bc7bbd5dSLeila Ghaffari* - `-wind_translation`
237bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
238bc7bbd5dSLeila Ghaffari  - `1,0,0`
239bc7bbd5dSLeila Ghaffari  -
24089d0f5c0SLeila Ghaffari
241bc7bbd5dSLeila Ghaffari* - `-E_wind`
242bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
243bc7bbd5dSLeila Ghaffari  - `1E6`
244bc7bbd5dSLeila Ghaffari  - `J`
245bc7bbd5dSLeila Ghaffari:::
246e43605a5SLeila Ghaffari
247bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with:
248e43605a5SLeila Ghaffari
249bc7bbd5dSLeila Ghaffari```
2504534a52eSLeila 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
251bc7bbd5dSLeila Ghaffari```
252e43605a5SLeila Ghaffari
253bc7bbd5dSLeila Ghaffariand the `translation` mode with:
254e43605a5SLeila Ghaffari
255bc7bbd5dSLeila Ghaffari```
2564534a52eSLeila 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
257bc7bbd5dSLeila Ghaffari```
2584534a52eSLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
259e43605a5SLeila Ghaffari
260019b7682STimothy Aiken#### 3D advection
261019b7682STimothy Aiken
262bc7bbd5dSLeila GhaffariFor the 3D advection problem, the following additional command-line options are available:
263e43605a5SLeila Ghaffari
264bc7bbd5dSLeila Ghaffari:::{list-table} Advection3D Runtime Options
265bc7bbd5dSLeila Ghaffari:header-rows: 1
266e43605a5SLeila Ghaffari
267bc7bbd5dSLeila Ghaffari* - Option
268bc7bbd5dSLeila Ghaffari  - Description
269bc7bbd5dSLeila Ghaffari  - Default value
270bc7bbd5dSLeila Ghaffari  - Unit
271e43605a5SLeila Ghaffari
272bc7bbd5dSLeila Ghaffari* - `-rc`
273bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
274bc7bbd5dSLeila Ghaffari  - `1000`
275bc7bbd5dSLeila Ghaffari  - `m`
276e43605a5SLeila Ghaffari
277bc7bbd5dSLeila Ghaffari* - `-units_meter`
278bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
279bc7bbd5dSLeila Ghaffari  - `1E-2`
280bc7bbd5dSLeila Ghaffari  -
281e43605a5SLeila Ghaffari
282bc7bbd5dSLeila Ghaffari* - `-units_second`
283bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
284bc7bbd5dSLeila Ghaffari  - `1E-2`
285bc7bbd5dSLeila Ghaffari  -
286e43605a5SLeila Ghaffari
287bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
288bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
289bc7bbd5dSLeila Ghaffari  - `1E-6`
290bc7bbd5dSLeila Ghaffari  -
291e43605a5SLeila Ghaffari
292bc7bbd5dSLeila Ghaffari* - `-strong_form`
293bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
294bc7bbd5dSLeila Ghaffari  - `0`
295bc7bbd5dSLeila Ghaffari  -
296e43605a5SLeila Ghaffari
297bc7bbd5dSLeila Ghaffari* - `-stab`
298bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
299bc7bbd5dSLeila Ghaffari  - `none`
300bc7bbd5dSLeila Ghaffari  -
301e43605a5SLeila Ghaffari
302bc7bbd5dSLeila Ghaffari* - `-CtauS`
303bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
304bc7bbd5dSLeila Ghaffari  - `0`
305bc7bbd5dSLeila Ghaffari  -
306e43605a5SLeila Ghaffari
307bc7bbd5dSLeila Ghaffari* - `-wind_type`
308bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
309bc7bbd5dSLeila Ghaffari  - `rotation`
310bc7bbd5dSLeila Ghaffari  -
311e43605a5SLeila Ghaffari
312bc7bbd5dSLeila Ghaffari* - `-wind_translation`
313bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
314bc7bbd5dSLeila Ghaffari  - `1,0,0`
315bc7bbd5dSLeila Ghaffari  -
316e43605a5SLeila Ghaffari
317bc7bbd5dSLeila Ghaffari* - `-E_wind`
318bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
319bc7bbd5dSLeila Ghaffari  - `1E6`
320bc7bbd5dSLeila Ghaffari  - `J`
321e43605a5SLeila Ghaffari
322bc7bbd5dSLeila Ghaffari* - `-bubble_type`
323bc7bbd5dSLeila Ghaffari  - `sphere` (3D) or `cylinder` (2D)
324bc7bbd5dSLeila Ghaffari  - `shpere`
325bc7bbd5dSLeila Ghaffari  -
326e43605a5SLeila Ghaffari
327bc7bbd5dSLeila Ghaffari* - `-bubble_continuity`
328bc7bbd5dSLeila Ghaffari  - `smooth`, `back_sharp`, or `thick`
329bc7bbd5dSLeila Ghaffari  - `smooth`
330bc7bbd5dSLeila Ghaffari  -
331bc7bbd5dSLeila Ghaffari:::
332ccaff030SJeremy L Thompson
333bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with:
334ccaff030SJeremy L Thompson
335bc7bbd5dSLeila Ghaffari```
3364534a52eSLeila 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
337bc7bbd5dSLeila Ghaffari```
338ccaff030SJeremy L Thompson
339bc7bbd5dSLeila Ghaffariand the `translation` mode with:
340ccaff030SJeremy L Thompson
341bc7bbd5dSLeila Ghaffari```
3424534a52eSLeila 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
343bc7bbd5dSLeila Ghaffari```
344ccaff030SJeremy L Thompson
345019b7682STimothy Aiken### Inviscid Ideal Gas
346019b7682STimothy Aiken
347019b7682STimothy Aiken#### Isentropic Euler vortex
348019b7682STimothy Aiken
349bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
350ccaff030SJeremy L Thompson
351bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
352bc7bbd5dSLeila Ghaffari:header-rows: 1
353ccaff030SJeremy L Thompson
354bc7bbd5dSLeila Ghaffari* - Option
355bc7bbd5dSLeila Ghaffari  - Description
356bc7bbd5dSLeila Ghaffari  - Default value
357bc7bbd5dSLeila Ghaffari  - Unit
358ccaff030SJeremy L Thompson
359bc7bbd5dSLeila Ghaffari* - `-center`
360bc7bbd5dSLeila Ghaffari  - Location of vortex center
361bc7bbd5dSLeila Ghaffari  - `(lx,ly,lz)/2`
362bc7bbd5dSLeila Ghaffari  - `(m,m,m)`
363ccaff030SJeremy L Thompson
364bc7bbd5dSLeila Ghaffari* - `-units_meter`
365bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
366bc7bbd5dSLeila Ghaffari  - `1E-2`
367bc7bbd5dSLeila Ghaffari  -
368ccaff030SJeremy L Thompson
369bc7bbd5dSLeila Ghaffari* - `-units_second`
370bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
371bc7bbd5dSLeila Ghaffari  - `1E-2`
372bc7bbd5dSLeila Ghaffari  -
373ccaff030SJeremy L Thompson
374bc7bbd5dSLeila Ghaffari* - `-mean_velocity`
375bc7bbd5dSLeila Ghaffari  - Background velocity vector
376bc7bbd5dSLeila Ghaffari  - `(1,1,0)`
377bc7bbd5dSLeila Ghaffari  -
378ccaff030SJeremy L Thompson
379bc7bbd5dSLeila Ghaffari* - `-vortex_strength`
380bc7bbd5dSLeila Ghaffari  - Strength of vortex < 10
381bc7bbd5dSLeila Ghaffari  - `5`
382bc7bbd5dSLeila Ghaffari  -
383932417b3SJed Brown
384932417b3SJed Brown* - `-c_tau`
385932417b3SJed Brown  - Stabilization constant
386504dc8e0SLeila Ghaffari  - `0.5`
387932417b3SJed Brown  -
388bc7bbd5dSLeila Ghaffari:::
389ccaff030SJeremy L Thompson
390bc7bbd5dSLeila GhaffariThis problem can be run with:
391ccaff030SJeremy L Thompson
392bc7bbd5dSLeila Ghaffari```
3934534a52eSLeila 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.
394bc7bbd5dSLeila Ghaffari```
395ccaff030SJeremy L Thompson
396019b7682STimothy Aiken#### Sod shock tube
397019b7682STimothy Aiken
398019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
399019b7682STimothy Aiken
400019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options
401019b7682STimothy Aiken:header-rows: 1
402019b7682STimothy Aiken
403019b7682STimothy Aiken* - Option
404019b7682STimothy Aiken  - Description
405019b7682STimothy Aiken  - Default value
406019b7682STimothy Aiken  - Unit
407019b7682STimothy Aiken
408019b7682STimothy Aiken* - `-units_meter`
409019b7682STimothy Aiken  - 1 meter in scaled length units
410019b7682STimothy Aiken  - `1E-2`
411019b7682STimothy Aiken  -
412019b7682STimothy Aiken
413019b7682STimothy Aiken* - `-units_second`
414019b7682STimothy Aiken  - 1 second in scaled time units
415019b7682STimothy Aiken  - `1E-2`
416019b7682STimothy Aiken  -
417019b7682STimothy Aiken
418019b7682STimothy Aiken* - `-yzb`
419019b7682STimothy Aiken  - Use YZB discontinuity capturing
420019b7682STimothy Aiken  - `none`
421019b7682STimothy Aiken  -
422019b7682STimothy Aiken
423019b7682STimothy Aiken* - `-stab`
424019b7682STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
425019b7682STimothy Aiken  - `none`
426019b7682STimothy Aiken  -
427019b7682STimothy Aiken:::
428019b7682STimothy Aiken
429019b7682STimothy AikenThis problem can be run with:
430019b7682STimothy Aiken
431019b7682STimothy Aiken```
432019b7682STimothy 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
433019b7682STimothy Aiken```
434019b7682STimothy Aiken
435019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas
436019b7682STimothy Aiken
43788626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
438ccaff030SJeremy L Thompson
43988626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
440bc7bbd5dSLeila Ghaffari:header-rows: 1
441ccaff030SJeremy L Thompson
442bc7bbd5dSLeila Ghaffari* - Option
443bc7bbd5dSLeila Ghaffari  - Description
444bc7bbd5dSLeila Ghaffari  - Default value
445bc7bbd5dSLeila Ghaffari  - Unit
446ccaff030SJeremy L Thompson
447bc7bbd5dSLeila Ghaffari* - `-units_meter`
448bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
44988626eedSJames Wright  - `1`
450bc7bbd5dSLeila Ghaffari  -
451ccaff030SJeremy L Thompson
452bc7bbd5dSLeila Ghaffari* - `-units_second`
453bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
45488626eedSJames Wright  - `1`
455bc7bbd5dSLeila Ghaffari  -
456ccaff030SJeremy L Thompson
457bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
458bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
45988626eedSJames Wright  - `1`
460bc7bbd5dSLeila Ghaffari  -
461ccaff030SJeremy L Thompson
462bc7bbd5dSLeila Ghaffari* - `-units_Kelvin`
463bc7bbd5dSLeila Ghaffari  - 1 Kelvin in scaled temperature units
464bc7bbd5dSLeila Ghaffari  - `1`
465bc7bbd5dSLeila Ghaffari  -
466ccaff030SJeremy L Thompson
467bc7bbd5dSLeila Ghaffari* - `-stab`
468bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
469bc7bbd5dSLeila Ghaffari  - `none`
470bc7bbd5dSLeila Ghaffari  -
471ccaff030SJeremy L Thompson
472932417b3SJed Brown* - `-c_tau`
47388626eedSJames Wright  - Stabilization constant, $c_\tau$
474504dc8e0SLeila Ghaffari  - `0.5`
475932417b3SJed Brown  -
476932417b3SJed Brown
47788626eedSJames Wright* - `-Ctau_t`
47888626eedSJames Wright  - Stabilization time constant, $C_t$
47988626eedSJames Wright  - `1.0`
48088626eedSJames Wright  -
481ccaff030SJeremy L Thompson
48288626eedSJames Wright* - `-Ctau_v`
48388626eedSJames Wright  - Stabilization viscous constant, $C_v$
48488626eedSJames Wright  - `36.0`
48588626eedSJames Wright  -
486ccaff030SJeremy L Thompson
48788626eedSJames Wright* - `-Ctau_C`
48888626eedSJames Wright  - Stabilization continuity constant, $C_c$
48988626eedSJames Wright  - `1.0`
49088626eedSJames Wright  -
491ccaff030SJeremy L Thompson
49288626eedSJames Wright* - `-Ctau_M`
49388626eedSJames Wright  - Stabilization momentum constant, $C_m$
49488626eedSJames Wright  - `1.0`
49588626eedSJames Wright  -
49688626eedSJames Wright
49788626eedSJames Wright* - `-Ctau_E`
49888626eedSJames Wright  - Stabilization energy constant, $C_E$
49988626eedSJames Wright  - `1.0`
50088626eedSJames Wright  -
501ccaff030SJeremy L Thompson
502bc7bbd5dSLeila Ghaffari* - `-cv`
503bc7bbd5dSLeila Ghaffari  - Heat capacity at constant volume
504bc7bbd5dSLeila Ghaffari  - `717`
505bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
506ccaff030SJeremy L Thompson
507bc7bbd5dSLeila Ghaffari* - `-cp`
508bc7bbd5dSLeila Ghaffari  - Heat capacity at constant pressure
509bc7bbd5dSLeila Ghaffari  - `1004`
510bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
511ccaff030SJeremy L Thompson
512bc7bbd5dSLeila Ghaffari* - `-g`
513bc7bbd5dSLeila Ghaffari  - Gravitational acceleration
514bc7bbd5dSLeila Ghaffari  - `9.81`
515bc7bbd5dSLeila Ghaffari  - `m/s^2`
516ccaff030SJeremy L Thompson
517bc7bbd5dSLeila Ghaffari* - `-lambda`
518bc7bbd5dSLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
519bc7bbd5dSLeila Ghaffari  - `-2/3`
520bc7bbd5dSLeila Ghaffari  -
521ccaff030SJeremy L Thompson
522bc7bbd5dSLeila Ghaffari* - `-mu`
523bc7bbd5dSLeila Ghaffari  - Shear dynamic viscosity coefficient
524bc7bbd5dSLeila Ghaffari  - `75`
525bc7bbd5dSLeila Ghaffari  -  `Pa s`
52677841947SLeila Ghaffari
527bc7bbd5dSLeila Ghaffari* - `-k`
528bc7bbd5dSLeila Ghaffari  - Thermal conductivity
529bc7bbd5dSLeila Ghaffari  - `0.02638`
530bc7bbd5dSLeila Ghaffari  - `W/(m K)`
531bc7bbd5dSLeila Ghaffari:::
53277841947SLeila Ghaffari
533019b7682STimothy Aiken#### Density current
534019b7682STimothy Aiken
53588626eedSJames WrightThe Density Current problem the following command-line options are available in
53688626eedSJames Wrightaddition to the Newtonian Ideal Gas options:
53788626eedSJames Wright
53888626eedSJames Wright:::{list-table} Density Current Runtime Options
53988626eedSJames Wright:header-rows: 1
54088626eedSJames Wright
54188626eedSJames Wright* - Option
54288626eedSJames Wright  - Description
54388626eedSJames Wright  - Default value
54488626eedSJames Wright  - Unit
54588626eedSJames Wright
54688626eedSJames Wright* - `-center`
54788626eedSJames Wright  - Location of bubble center
54888626eedSJames Wright  - `(lx,ly,lz)/2`
54988626eedSJames Wright  - `(m,m,m)`
55088626eedSJames Wright
55188626eedSJames Wright* - `-dc_axis`
55288626eedSJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
55388626eedSJames Wright  - `(0,0,0)`
55488626eedSJames Wright  -
55588626eedSJames Wright
55688626eedSJames Wright* - `-rc`
55788626eedSJames Wright  - Characteristic radius of thermal bubble
55888626eedSJames Wright  - `1000`
55988626eedSJames Wright  - `m`
56088626eedSJames Wright
56188626eedSJames Wright* - `-theta0`
56288626eedSJames Wright  - Reference potential temperature
56388626eedSJames Wright  - `300`
56488626eedSJames Wright  - `K`
56588626eedSJames Wright
56688626eedSJames Wright* - `-thetaC`
56788626eedSJames Wright  - Perturbation of potential temperature
56888626eedSJames Wright  - `-15`
56988626eedSJames Wright  - `K`
57088626eedSJames Wright
57188626eedSJames Wright* - `-P0`
57288626eedSJames Wright  - Atmospheric pressure
57388626eedSJames Wright  - `1E5`
57488626eedSJames Wright  - `Pa`
57588626eedSJames Wright
57688626eedSJames Wright* - `-N`
57788626eedSJames Wright  - Brunt-Vaisala frequency
57888626eedSJames Wright  - `0.01`
57988626eedSJames Wright  - `1/s`
58088626eedSJames Wright:::
58188626eedSJames Wright
582bc7bbd5dSLeila GhaffariThis problem can be run with:
583ccaff030SJeremy L Thompson
584bc7bbd5dSLeila Ghaffari```
58588626eedSJames 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
58688626eedSJames Wright```
58788626eedSJames Wright
588019b7682STimothy Aiken#### Channel flow
589019b7682STimothy Aiken
59088626eedSJames WrightThe Channel problem the following command-line options are available in
59188626eedSJames Wrightaddition to the Newtonian Ideal Gas options:
59288626eedSJames Wright
59388626eedSJames Wright:::{list-table} Channel Runtime Options
59488626eedSJames Wright:header-rows: 1
59588626eedSJames Wright
59688626eedSJames Wright* - Option
59788626eedSJames Wright  - Description
59888626eedSJames Wright  - Default value
59988626eedSJames Wright  - Unit
60088626eedSJames Wright
60188626eedSJames Wright* - `-umax`
60288626eedSJames Wright  - Maximum/centerline velocity of the flow
60388626eedSJames Wright  - `10`
60488626eedSJames Wright  - `m/s`
60588626eedSJames Wright
60688626eedSJames Wright* - `-theta0`
60788626eedSJames Wright  - Reference potential temperature
60888626eedSJames Wright  - `300`
60988626eedSJames Wright  - `K`
61088626eedSJames Wright
61188626eedSJames Wright* - `-P0`
61288626eedSJames Wright  - Atmospheric pressure
61388626eedSJames Wright  - `1E5`
61488626eedSJames Wright  - `Pa`
61588626eedSJames Wright:::
61688626eedSJames Wright
61788626eedSJames WrightThis problem can be run with the `channel.yaml` file via:
61888626eedSJames Wright
61988626eedSJames Wright```
62088626eedSJames Wright./navierstokes -options_file channel.yaml
62188626eedSJames Wright```
62288626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
62388626eedSJames Wright:language: yaml
62488626eedSJames Wright```
62588626eedSJames Wright
626019b7682STimothy Aiken#### Blasius boundary layer
627019b7682STimothy Aiken
62888626eedSJames WrightThe Blasius problem the following command-line options are available in
62988626eedSJames Wrightaddition to the Newtonian Ideal Gas options:
63088626eedSJames Wright
63188626eedSJames Wright:::{list-table} Blasius Runtime Options
63288626eedSJames Wright:header-rows: 1
63388626eedSJames Wright
63488626eedSJames Wright* - Option
63588626eedSJames Wright  - Description
63688626eedSJames Wright  - Default value
63788626eedSJames Wright  - Unit
63888626eedSJames Wright
63988626eedSJames Wright* - `-Uinf`
64088626eedSJames Wright  - Freestream velocity
64188626eedSJames Wright  - `40`
64288626eedSJames Wright  - `m/s`
64388626eedSJames Wright
64488626eedSJames Wright* - `-delta0`
64588626eedSJames Wright  - Boundary layer height at the inflow
64688626eedSJames Wright  - `4.2e-4`
64788626eedSJames Wright  - `m`
64888626eedSJames Wright
64988626eedSJames Wright* - `-theta0`
65088626eedSJames Wright  - Reference potential temperature
65188626eedSJames Wright  - `288`
65288626eedSJames Wright  - `K`
65388626eedSJames Wright
65488626eedSJames Wright* - `-P0`
65588626eedSJames Wright  - Atmospheric pressure
65688626eedSJames Wright  - `1.01E5`
65788626eedSJames Wright  - `Pa`
65888626eedSJames Wright
659*91eaef80SJames Wright* - `-platemesh_refine_height`
660*91eaef80SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
66188626eedSJames Wright  - `5.9E-4`
66288626eedSJames Wright  - `m`
66388626eedSJames Wright
664*91eaef80SJames Wright* - `-platemesh_Ndelta`
665*91eaef80SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
66688626eedSJames Wright  - `45`
66788626eedSJames Wright  -
66888626eedSJames Wright
669*91eaef80SJames Wright* - `-platemesh_growth`
67088626eedSJames Wright  - Growth rate of the elements in the refinement region
67188626eedSJames Wright  - `1.08`
67288626eedSJames Wright  -
67388626eedSJames Wright
674*91eaef80SJames Wright* - `-platemesh_top_angle`
67588626eedSJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
67688626eedSJames Wright  - `5`
67788626eedSJames Wright  - `degrees`
678ba6664aeSJames Wright
679ba6664aeSJames Wright* - `-stg_use`
680ba6664aeSJames Wright  - Whether to use stg for the inflow conditions
681ba6664aeSJames Wright  - `false`
682ba6664aeSJames Wright  -
683*91eaef80SJames Wright
684*91eaef80SJames Wright* - `-platemesh_y_node_locs_path`
685*91eaef80SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
686*91eaef80SJames Wright  - `""`
687*91eaef80SJames Wright  -
68888626eedSJames Wright:::
68988626eedSJames Wright
69088626eedSJames WrightThis problem can be run with the `blasius.yaml` file via:
69188626eedSJames Wright
69288626eedSJames Wright```
69388626eedSJames Wright./navierstokes -options_file blasius.yaml
69488626eedSJames Wright```
69588626eedSJames Wright
69688626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
69788626eedSJames Wright:language: yaml
698bc7bbd5dSLeila Ghaffari```
699ba6664aeSJames Wright
700ba6664aeSJames Wright#### STG Inflow for Flat Plate
701ba6664aeSJames Wright
702ba6664aeSJames WrightUsing the STG Inflow for the blasius problem adds the following command-line
703ba6664aeSJames Wrightoptions:
704ba6664aeSJames Wright
705ba6664aeSJames Wright:::{list-table} Blasius Runtime Options
706ba6664aeSJames Wright:header-rows: 1
707ba6664aeSJames Wright
708ba6664aeSJames Wright* - Option
709ba6664aeSJames Wright  - Description
710ba6664aeSJames Wright  - Default value
711ba6664aeSJames Wright  - Unit
712ba6664aeSJames Wright
713ba6664aeSJames Wright* - `-stg_inflow_path`
714ba6664aeSJames Wright  - Path to the STGInflow file
715ba6664aeSJames Wright  - `./STGInflow.dat`
716ba6664aeSJames Wright  -
717ba6664aeSJames Wright
718ba6664aeSJames Wright* - `-stg_rand_path`
719ba6664aeSJames Wright  - Path to the STGRand file
720ba6664aeSJames Wright  - `./STGRand.dat`
721ba6664aeSJames Wright  -
722ba6664aeSJames Wright
723ba6664aeSJames Wright* - `-stg_alpha`
724ba6664aeSJames Wright  - Growth rate of the wavemodes
725ba6664aeSJames Wright  - `1.01`
726ba6664aeSJames Wright  -
727ba6664aeSJames Wright
728ba6664aeSJames Wright* - `-stg_u0`
729ba6664aeSJames Wright  - Convective velocity, $U_0$
730ba6664aeSJames Wright  - `0.0`
731ba6664aeSJames Wright  - `m/s`
732ba6664aeSJames Wright
733ba6664aeSJames Wright* - `-stg_mean_only`
734ba6664aeSJames Wright  - Only impose the mean velocity (no fluctutations)
735ba6664aeSJames Wright  - `false`
736ba6664aeSJames Wright  -
737ba6664aeSJames Wright
738ba6664aeSJames Wright:::
739ba6664aeSJames Wright
740ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via:
741ba6664aeSJames Wright
742ba6664aeSJames Wright```
743ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true
744ba6664aeSJames Wright```
745ba6664aeSJames Wright
746ba6664aeSJames WrightNote the added `-stg_use true` flag. This overrides the `stg: use: false`
747ba6664aeSJames Wrightsetting in the `blasius.yaml` file, enabling the use of the STG inflow.
748