xref: /libCEED/examples/fluids/README.md (revision 0b22eb44be7c6b7434e6bc4a1e1128f52e461d62)
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`
72*0b22eb44SJames Wright  - Frequency of output, in number of steps. `0` has no output, `-1` outputs final state only
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
18217be3a41SJeremy 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$.
18317be3a41SJeremy L ThompsonThese are available in 2D and 3D.
184019b7682STimothy Aiken
185019b7682STimothy Aiken#### 2D advection
186019b7682STimothy Aiken
187bc7bbd5dSLeila GhaffariFor the 2D advection problem, the following additional command-line options are available:
188ccaff030SJeremy L Thompson
189bc7bbd5dSLeila Ghaffari:::{list-table} Advection2D Runtime Options
190bc7bbd5dSLeila Ghaffari:header-rows: 1
19189d0f5c0SLeila Ghaffari
192bc7bbd5dSLeila Ghaffari* - Option
193bc7bbd5dSLeila Ghaffari  - Description
194bc7bbd5dSLeila Ghaffari  - Default value
195bc7bbd5dSLeila Ghaffari  - Unit
19689d0f5c0SLeila Ghaffari
197bc7bbd5dSLeila Ghaffari* - `-rc`
198bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
199bc7bbd5dSLeila Ghaffari  - `1000`
200bc7bbd5dSLeila Ghaffari  - `m`
20189d0f5c0SLeila Ghaffari
202bc7bbd5dSLeila Ghaffari* - `-units_meter`
203bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
204bc7bbd5dSLeila Ghaffari  - `1E-2`
205bc7bbd5dSLeila Ghaffari  -
20689d0f5c0SLeila Ghaffari
207bc7bbd5dSLeila Ghaffari* - `-units_second`
208bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
209bc7bbd5dSLeila Ghaffari  - `1E-2`
210bc7bbd5dSLeila Ghaffari  -
21189d0f5c0SLeila Ghaffari
212bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
213bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
214bc7bbd5dSLeila Ghaffari  - `1E-6`
215bc7bbd5dSLeila Ghaffari  -
21677841947SLeila Ghaffari
217bc7bbd5dSLeila Ghaffari* - `-strong_form`
218bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
219bc7bbd5dSLeila Ghaffari  - `0`
220bc7bbd5dSLeila Ghaffari  -
22177841947SLeila Ghaffari
222bc7bbd5dSLeila Ghaffari* - `-stab`
223bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
224bc7bbd5dSLeila Ghaffari  - `none`
225bc7bbd5dSLeila Ghaffari  -
22677841947SLeila Ghaffari
227bc7bbd5dSLeila Ghaffari* - `-CtauS`
228bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
229bc7bbd5dSLeila Ghaffari  - `0`
230bc7bbd5dSLeila Ghaffari  -
23177841947SLeila Ghaffari
232bc7bbd5dSLeila Ghaffari* - `-wind_type`
233bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
234bc7bbd5dSLeila Ghaffari  - `rotation`
235bc7bbd5dSLeila Ghaffari  -
23677841947SLeila Ghaffari
237bc7bbd5dSLeila Ghaffari* - `-wind_translation`
238bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
239bc7bbd5dSLeila Ghaffari  - `1,0,0`
240bc7bbd5dSLeila Ghaffari  -
24189d0f5c0SLeila Ghaffari
242bc7bbd5dSLeila Ghaffari* - `-E_wind`
243bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
244bc7bbd5dSLeila Ghaffari  - `1E6`
245bc7bbd5dSLeila Ghaffari  - `J`
246bc7bbd5dSLeila Ghaffari:::
247e43605a5SLeila Ghaffari
248bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with:
249e43605a5SLeila Ghaffari
250bc7bbd5dSLeila Ghaffari```
2514534a52eSLeila 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
252bc7bbd5dSLeila Ghaffari```
253e43605a5SLeila Ghaffari
254bc7bbd5dSLeila Ghaffariand the `translation` mode with:
255e43605a5SLeila Ghaffari
256bc7bbd5dSLeila Ghaffari```
2574534a52eSLeila 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
258bc7bbd5dSLeila Ghaffari```
2594534a52eSLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`.
260e43605a5SLeila Ghaffari
261019b7682STimothy Aiken#### 3D advection
262019b7682STimothy Aiken
263bc7bbd5dSLeila GhaffariFor the 3D advection problem, the following additional command-line options are available:
264e43605a5SLeila Ghaffari
265bc7bbd5dSLeila Ghaffari:::{list-table} Advection3D Runtime Options
266bc7bbd5dSLeila Ghaffari:header-rows: 1
267e43605a5SLeila Ghaffari
268bc7bbd5dSLeila Ghaffari* - Option
269bc7bbd5dSLeila Ghaffari  - Description
270bc7bbd5dSLeila Ghaffari  - Default value
271bc7bbd5dSLeila Ghaffari  - Unit
272e43605a5SLeila Ghaffari
273bc7bbd5dSLeila Ghaffari* - `-rc`
274bc7bbd5dSLeila Ghaffari  - Characteristic radius of thermal bubble
275bc7bbd5dSLeila Ghaffari  - `1000`
276bc7bbd5dSLeila Ghaffari  - `m`
277e43605a5SLeila Ghaffari
278bc7bbd5dSLeila Ghaffari* - `-units_meter`
279bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
280bc7bbd5dSLeila Ghaffari  - `1E-2`
281bc7bbd5dSLeila Ghaffari  -
282e43605a5SLeila Ghaffari
283bc7bbd5dSLeila Ghaffari* - `-units_second`
284bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
285bc7bbd5dSLeila Ghaffari  - `1E-2`
286bc7bbd5dSLeila Ghaffari  -
287e43605a5SLeila Ghaffari
288bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
289bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
290bc7bbd5dSLeila Ghaffari  - `1E-6`
291bc7bbd5dSLeila Ghaffari  -
292e43605a5SLeila Ghaffari
293bc7bbd5dSLeila Ghaffari* - `-strong_form`
294bc7bbd5dSLeila Ghaffari  - Strong (1) or weak/integrated by parts (0) residual
295bc7bbd5dSLeila Ghaffari  - `0`
296bc7bbd5dSLeila Ghaffari  -
297e43605a5SLeila Ghaffari
298bc7bbd5dSLeila Ghaffari* - `-stab`
299bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
300bc7bbd5dSLeila Ghaffari  - `none`
301bc7bbd5dSLeila Ghaffari  -
302e43605a5SLeila Ghaffari
303bc7bbd5dSLeila Ghaffari* - `-CtauS`
304bc7bbd5dSLeila Ghaffari  - Scale coefficient for stabilization tau (nondimensional)
305bc7bbd5dSLeila Ghaffari  - `0`
306bc7bbd5dSLeila Ghaffari  -
307e43605a5SLeila Ghaffari
308bc7bbd5dSLeila Ghaffari* - `-wind_type`
309bc7bbd5dSLeila Ghaffari  - Wind type in Advection (`rotation` or `translation`)
310bc7bbd5dSLeila Ghaffari  - `rotation`
311bc7bbd5dSLeila Ghaffari  -
312e43605a5SLeila Ghaffari
313bc7bbd5dSLeila Ghaffari* - `-wind_translation`
314bc7bbd5dSLeila Ghaffari  - Constant wind vector when `-wind_type translation`
315bc7bbd5dSLeila Ghaffari  - `1,0,0`
316bc7bbd5dSLeila Ghaffari  -
317e43605a5SLeila Ghaffari
318bc7bbd5dSLeila Ghaffari* - `-E_wind`
319bc7bbd5dSLeila Ghaffari  - Total energy of inflow wind when `-wind_type translation`
320bc7bbd5dSLeila Ghaffari  - `1E6`
321bc7bbd5dSLeila Ghaffari  - `J`
322e43605a5SLeila Ghaffari
323bc7bbd5dSLeila Ghaffari* - `-bubble_type`
324bc7bbd5dSLeila Ghaffari  - `sphere` (3D) or `cylinder` (2D)
325bc7bbd5dSLeila Ghaffari  - `shpere`
326bc7bbd5dSLeila Ghaffari  -
327e43605a5SLeila Ghaffari
328bc7bbd5dSLeila Ghaffari* - `-bubble_continuity`
329bc7bbd5dSLeila Ghaffari  - `smooth`, `back_sharp`, or `thick`
330bc7bbd5dSLeila Ghaffari  - `smooth`
331bc7bbd5dSLeila Ghaffari  -
332bc7bbd5dSLeila Ghaffari:::
333ccaff030SJeremy L Thompson
334bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with:
335ccaff030SJeremy L Thompson
336bc7bbd5dSLeila Ghaffari```
3374534a52eSLeila 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
338bc7bbd5dSLeila Ghaffari```
339ccaff030SJeremy L Thompson
340bc7bbd5dSLeila Ghaffariand the `translation` mode with:
341ccaff030SJeremy L Thompson
342bc7bbd5dSLeila Ghaffari```
3434534a52eSLeila 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
344bc7bbd5dSLeila Ghaffari```
345ccaff030SJeremy L Thompson
346019b7682STimothy Aiken### Inviscid Ideal Gas
347019b7682STimothy Aiken
348019b7682STimothy Aiken#### Isentropic Euler vortex
349019b7682STimothy Aiken
350bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available:
351ccaff030SJeremy L Thompson
352bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options
353bc7bbd5dSLeila Ghaffari:header-rows: 1
354ccaff030SJeremy L Thompson
355bc7bbd5dSLeila Ghaffari* - Option
356bc7bbd5dSLeila Ghaffari  - Description
357bc7bbd5dSLeila Ghaffari  - Default value
358bc7bbd5dSLeila Ghaffari  - Unit
359ccaff030SJeremy L Thompson
360bc7bbd5dSLeila Ghaffari* - `-center`
361bc7bbd5dSLeila Ghaffari  - Location of vortex center
362bc7bbd5dSLeila Ghaffari  - `(lx,ly,lz)/2`
363bc7bbd5dSLeila Ghaffari  - `(m,m,m)`
364ccaff030SJeremy L Thompson
365bc7bbd5dSLeila Ghaffari* - `-units_meter`
366bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
367bc7bbd5dSLeila Ghaffari  - `1E-2`
368bc7bbd5dSLeila Ghaffari  -
369ccaff030SJeremy L Thompson
370bc7bbd5dSLeila Ghaffari* - `-units_second`
371bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
372bc7bbd5dSLeila Ghaffari  - `1E-2`
373bc7bbd5dSLeila Ghaffari  -
374ccaff030SJeremy L Thompson
375bc7bbd5dSLeila Ghaffari* - `-mean_velocity`
376bc7bbd5dSLeila Ghaffari  - Background velocity vector
377bc7bbd5dSLeila Ghaffari  - `(1,1,0)`
378bc7bbd5dSLeila Ghaffari  -
379ccaff030SJeremy L Thompson
380bc7bbd5dSLeila Ghaffari* - `-vortex_strength`
381bc7bbd5dSLeila Ghaffari  - Strength of vortex < 10
382bc7bbd5dSLeila Ghaffari  - `5`
383bc7bbd5dSLeila Ghaffari  -
384932417b3SJed Brown
385932417b3SJed Brown* - `-c_tau`
386932417b3SJed Brown  - Stabilization constant
387504dc8e0SLeila Ghaffari  - `0.5`
388932417b3SJed Brown  -
389bc7bbd5dSLeila Ghaffari:::
390ccaff030SJeremy L Thompson
391bc7bbd5dSLeila GhaffariThis problem can be run with:
392ccaff030SJeremy L Thompson
393bc7bbd5dSLeila Ghaffari```
3944534a52eSLeila 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.
395bc7bbd5dSLeila Ghaffari```
396ccaff030SJeremy L Thompson
397019b7682STimothy Aiken#### Sod shock tube
398019b7682STimothy Aiken
399019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available:
400019b7682STimothy Aiken
401019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options
402019b7682STimothy Aiken:header-rows: 1
403019b7682STimothy Aiken
404019b7682STimothy Aiken* - Option
405019b7682STimothy Aiken  - Description
406019b7682STimothy Aiken  - Default value
407019b7682STimothy Aiken  - Unit
408019b7682STimothy Aiken
409019b7682STimothy Aiken* - `-units_meter`
410019b7682STimothy Aiken  - 1 meter in scaled length units
411019b7682STimothy Aiken  - `1E-2`
412019b7682STimothy Aiken  -
413019b7682STimothy Aiken
414019b7682STimothy Aiken* - `-units_second`
415019b7682STimothy Aiken  - 1 second in scaled time units
416019b7682STimothy Aiken  - `1E-2`
417019b7682STimothy Aiken  -
418019b7682STimothy Aiken
419019b7682STimothy Aiken* - `-yzb`
420019b7682STimothy Aiken  - Use YZB discontinuity capturing
421019b7682STimothy Aiken  - `none`
422019b7682STimothy Aiken  -
423019b7682STimothy Aiken
424019b7682STimothy Aiken* - `-stab`
425019b7682STimothy Aiken  - Stabilization method (`none`, `su`, or `supg`)
426019b7682STimothy Aiken  - `none`
427019b7682STimothy Aiken  -
428019b7682STimothy Aiken:::
429019b7682STimothy Aiken
430019b7682STimothy AikenThis problem can be run with:
431019b7682STimothy Aiken
432019b7682STimothy Aiken```
433019b7682STimothy 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
434019b7682STimothy Aiken```
435019b7682STimothy Aiken
436019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas
437019b7682STimothy Aiken
43888626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available:
439ccaff030SJeremy L Thompson
44088626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options
441bc7bbd5dSLeila Ghaffari:header-rows: 1
442ccaff030SJeremy L Thompson
443bc7bbd5dSLeila Ghaffari* - Option
444bc7bbd5dSLeila Ghaffari  - Description
445bc7bbd5dSLeila Ghaffari  - Default value
446bc7bbd5dSLeila Ghaffari  - Unit
447ccaff030SJeremy L Thompson
448bc7bbd5dSLeila Ghaffari* - `-units_meter`
449bc7bbd5dSLeila Ghaffari  - 1 meter in scaled length units
45088626eedSJames Wright  - `1`
451bc7bbd5dSLeila Ghaffari  -
452ccaff030SJeremy L Thompson
453bc7bbd5dSLeila Ghaffari* - `-units_second`
454bc7bbd5dSLeila Ghaffari  - 1 second in scaled time units
45588626eedSJames Wright  - `1`
456bc7bbd5dSLeila Ghaffari  -
457ccaff030SJeremy L Thompson
458bc7bbd5dSLeila Ghaffari* - `-units_kilogram`
459bc7bbd5dSLeila Ghaffari  - 1 kilogram in scaled mass units
46088626eedSJames Wright  - `1`
461bc7bbd5dSLeila Ghaffari  -
462ccaff030SJeremy L Thompson
463bc7bbd5dSLeila Ghaffari* - `-units_Kelvin`
464bc7bbd5dSLeila Ghaffari  - 1 Kelvin in scaled temperature units
465bc7bbd5dSLeila Ghaffari  - `1`
466bc7bbd5dSLeila Ghaffari  -
467ccaff030SJeremy L Thompson
468bc7bbd5dSLeila Ghaffari* - `-stab`
469bc7bbd5dSLeila Ghaffari  - Stabilization method (`none`, `su`, or `supg`)
470bc7bbd5dSLeila Ghaffari  - `none`
471bc7bbd5dSLeila Ghaffari  -
472ccaff030SJeremy L Thompson
473932417b3SJed Brown* - `-c_tau`
47488626eedSJames Wright  - Stabilization constant, $c_\tau$
475504dc8e0SLeila Ghaffari  - `0.5`
476932417b3SJed Brown  -
477932417b3SJed Brown
47888626eedSJames Wright* - `-Ctau_t`
47988626eedSJames Wright  - Stabilization time constant, $C_t$
48088626eedSJames Wright  - `1.0`
48188626eedSJames Wright  -
482ccaff030SJeremy L Thompson
48388626eedSJames Wright* - `-Ctau_v`
48488626eedSJames Wright  - Stabilization viscous constant, $C_v$
48588626eedSJames Wright  - `36.0`
48688626eedSJames Wright  -
487ccaff030SJeremy L Thompson
48888626eedSJames Wright* - `-Ctau_C`
48988626eedSJames Wright  - Stabilization continuity constant, $C_c$
49088626eedSJames Wright  - `1.0`
49188626eedSJames Wright  -
492ccaff030SJeremy L Thompson
49388626eedSJames Wright* - `-Ctau_M`
49488626eedSJames Wright  - Stabilization momentum constant, $C_m$
49588626eedSJames Wright  - `1.0`
49688626eedSJames Wright  -
49788626eedSJames Wright
49888626eedSJames Wright* - `-Ctau_E`
49988626eedSJames Wright  - Stabilization energy constant, $C_E$
50088626eedSJames Wright  - `1.0`
50188626eedSJames Wright  -
502ccaff030SJeremy L Thompson
503bc7bbd5dSLeila Ghaffari* - `-cv`
504bc7bbd5dSLeila Ghaffari  - Heat capacity at constant volume
505bc7bbd5dSLeila Ghaffari  - `717`
506bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
507ccaff030SJeremy L Thompson
508bc7bbd5dSLeila Ghaffari* - `-cp`
509bc7bbd5dSLeila Ghaffari  - Heat capacity at constant pressure
510bc7bbd5dSLeila Ghaffari  - `1004`
511bc7bbd5dSLeila Ghaffari  - `J/(kg K)`
512ccaff030SJeremy L Thompson
513bc7bbd5dSLeila Ghaffari* - `-g`
514bc7bbd5dSLeila Ghaffari  - Gravitational acceleration
515bc7bbd5dSLeila Ghaffari  - `9.81`
516bc7bbd5dSLeila Ghaffari  - `m/s^2`
517ccaff030SJeremy L Thompson
518bc7bbd5dSLeila Ghaffari* - `-lambda`
519bc7bbd5dSLeila Ghaffari  - Stokes hypothesis second viscosity coefficient
520bc7bbd5dSLeila Ghaffari  - `-2/3`
521bc7bbd5dSLeila Ghaffari  -
522ccaff030SJeremy L Thompson
523bc7bbd5dSLeila Ghaffari* - `-mu`
524bc7bbd5dSLeila Ghaffari  - Shear dynamic viscosity coefficient
525bc7bbd5dSLeila Ghaffari  - `75`
526bc7bbd5dSLeila Ghaffari  -  `Pa s`
52777841947SLeila Ghaffari
528bc7bbd5dSLeila Ghaffari* - `-k`
529bc7bbd5dSLeila Ghaffari  - Thermal conductivity
530bc7bbd5dSLeila Ghaffari  - `0.02638`
531bc7bbd5dSLeila Ghaffari  - `W/(m K)`
532a1df05f8SJed Brown
533a1df05f8SJed Brown* - `-newtonian_unit_tests`
534a1df05f8SJed Brown  - Developer option to test properties
535a1df05f8SJed Brown  - `false`
536a1df05f8SJed Brown  - boolean
537bc7bbd5dSLeila Ghaffari:::
53877841947SLeila Ghaffari
539a1df05f8SJed Brown
540019b7682STimothy Aiken#### Density current
541019b7682STimothy Aiken
54217be3a41SJeremy L ThompsonThe Density Current problem the following command-line options are available in addition to the Newtonian Ideal Gas options:
54388626eedSJames Wright
54488626eedSJames Wright:::{list-table} Density Current Runtime Options
54588626eedSJames Wright:header-rows: 1
54688626eedSJames Wright
54788626eedSJames Wright* - Option
54888626eedSJames Wright  - Description
54988626eedSJames Wright  - Default value
55088626eedSJames Wright  - Unit
55188626eedSJames Wright
55288626eedSJames Wright* - `-center`
55388626eedSJames Wright  - Location of bubble center
55488626eedSJames Wright  - `(lx,ly,lz)/2`
55588626eedSJames Wright  - `(m,m,m)`
55688626eedSJames Wright
55788626eedSJames Wright* - `-dc_axis`
55888626eedSJames Wright  - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric
55988626eedSJames Wright  - `(0,0,0)`
56088626eedSJames Wright  -
56188626eedSJames Wright
56288626eedSJames Wright* - `-rc`
56388626eedSJames Wright  - Characteristic radius of thermal bubble
56488626eedSJames Wright  - `1000`
56588626eedSJames Wright  - `m`
56688626eedSJames Wright
56788626eedSJames Wright* - `-theta0`
56888626eedSJames Wright  - Reference potential temperature
56988626eedSJames Wright  - `300`
57088626eedSJames Wright  - `K`
57188626eedSJames Wright
57288626eedSJames Wright* - `-thetaC`
57388626eedSJames Wright  - Perturbation of potential temperature
57488626eedSJames Wright  - `-15`
57588626eedSJames Wright  - `K`
57688626eedSJames Wright
57788626eedSJames Wright* - `-P0`
57888626eedSJames Wright  - Atmospheric pressure
57988626eedSJames Wright  - `1E5`
58088626eedSJames Wright  - `Pa`
58188626eedSJames Wright
58288626eedSJames Wright* - `-N`
58388626eedSJames Wright  - Brunt-Vaisala frequency
58488626eedSJames Wright  - `0.01`
58588626eedSJames Wright  - `1/s`
58688626eedSJames Wright:::
58788626eedSJames Wright
588bc7bbd5dSLeila GhaffariThis problem can be run with:
589ccaff030SJeremy L Thompson
590bc7bbd5dSLeila Ghaffari```
59188626eedSJames 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
59288626eedSJames Wright```
59388626eedSJames Wright
594019b7682STimothy Aiken#### Channel flow
595019b7682STimothy Aiken
59617be3a41SJeremy L ThompsonThe Channel problem the following command-line options are available in addition to the Newtonian Ideal Gas options:
59788626eedSJames Wright
59888626eedSJames Wright:::{list-table} Channel Runtime Options
59988626eedSJames Wright:header-rows: 1
60088626eedSJames Wright
60188626eedSJames Wright* - Option
60288626eedSJames Wright  - Description
60388626eedSJames Wright  - Default value
60488626eedSJames Wright  - Unit
60588626eedSJames Wright
60688626eedSJames Wright* - `-umax`
60788626eedSJames Wright  - Maximum/centerline velocity of the flow
60888626eedSJames Wright  - `10`
60988626eedSJames Wright  - `m/s`
61088626eedSJames Wright
61188626eedSJames Wright* - `-theta0`
61288626eedSJames Wright  - Reference potential temperature
61388626eedSJames Wright  - `300`
61488626eedSJames Wright  - `K`
61588626eedSJames Wright
61688626eedSJames Wright* - `-P0`
61788626eedSJames Wright  - Atmospheric pressure
61888626eedSJames Wright  - `1E5`
61988626eedSJames Wright  - `Pa`
620a1df05f8SJed Brown
621a1df05f8SJed Brown* - `-body_force_scale`
622a1df05f8SJed Brown  - Multiplier for body force (`-1` for flow reversal)
623a1df05f8SJed Brown  - 1
624a1df05f8SJed Brown  -
62588626eedSJames Wright:::
62688626eedSJames Wright
62788626eedSJames WrightThis problem can be run with the `channel.yaml` file via:
62888626eedSJames Wright
62988626eedSJames Wright```
63088626eedSJames Wright./navierstokes -options_file channel.yaml
63188626eedSJames Wright```
63288626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml
63388626eedSJames Wright:language: yaml
63488626eedSJames Wright```
63588626eedSJames Wright
636019b7682STimothy Aiken#### Blasius boundary layer
637019b7682STimothy Aiken
63817be3a41SJeremy L ThompsonThe Blasius problem the following command-line options are available in addition to the Newtonian Ideal Gas options:
63988626eedSJames Wright
64088626eedSJames Wright:::{list-table} Blasius Runtime Options
64188626eedSJames Wright:header-rows: 1
64288626eedSJames Wright
64388626eedSJames Wright* - Option
64488626eedSJames Wright  - Description
64588626eedSJames Wright  - Default value
64688626eedSJames Wright  - Unit
64788626eedSJames Wright
64888626eedSJames Wright* - `-Uinf`
64988626eedSJames Wright  - Freestream velocity
65088626eedSJames Wright  - `40`
65188626eedSJames Wright  - `m/s`
65288626eedSJames Wright
65388626eedSJames Wright* - `-delta0`
65488626eedSJames Wright  - Boundary layer height at the inflow
65588626eedSJames Wright  - `4.2e-4`
65688626eedSJames Wright  - `m`
65788626eedSJames Wright
65888626eedSJames Wright* - `-theta0`
65988626eedSJames Wright  - Reference potential temperature
66088626eedSJames Wright  - `288`
66188626eedSJames Wright  - `K`
66288626eedSJames Wright
66388626eedSJames Wright* - `-P0`
66488626eedSJames Wright  - Atmospheric pressure
66588626eedSJames Wright  - `1.01E5`
66688626eedSJames Wright  - `Pa`
66788626eedSJames Wright
66891eaef80SJames Wright* - `-platemesh_refine_height`
66991eaef80SJames Wright  - Height at which `-platemesh_Ndelta` number of elements should refined into
67088626eedSJames Wright  - `5.9E-4`
67188626eedSJames Wright  - `m`
67288626eedSJames Wright
67391eaef80SJames Wright* - `-platemesh_Ndelta`
67491eaef80SJames Wright  - Number of elements to keep below `-platemesh_refine_height`
67588626eedSJames Wright  - `45`
67688626eedSJames Wright  -
67788626eedSJames Wright
67891eaef80SJames Wright* - `-platemesh_growth`
67988626eedSJames Wright  - Growth rate of the elements in the refinement region
68088626eedSJames Wright  - `1.08`
68188626eedSJames Wright  -
68288626eedSJames Wright
68391eaef80SJames Wright* - `-platemesh_top_angle`
68488626eedSJames Wright  - Downward angle of the top face of the domain. This face serves as an outlet.
68588626eedSJames Wright  - `5`
68688626eedSJames Wright  - `degrees`
687ba6664aeSJames Wright
688ba6664aeSJames Wright* - `-stg_use`
689ba6664aeSJames Wright  - Whether to use stg for the inflow conditions
690ba6664aeSJames Wright  - `false`
691ba6664aeSJames Wright  -
69291eaef80SJames Wright
69391eaef80SJames Wright* - `-platemesh_y_node_locs_path`
69491eaef80SJames Wright  - Path to file with y node locations. If empty, will use mesh warping instead.
69591eaef80SJames Wright  - `""`
69691eaef80SJames Wright  -
69788626eedSJames Wright:::
69888626eedSJames Wright
69988626eedSJames WrightThis problem can be run with the `blasius.yaml` file via:
70088626eedSJames Wright
70188626eedSJames Wright```
70288626eedSJames Wright./navierstokes -options_file blasius.yaml
70388626eedSJames Wright```
70488626eedSJames Wright
70588626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml
70688626eedSJames Wright:language: yaml
707bc7bbd5dSLeila Ghaffari```
708ba6664aeSJames Wright
709ba6664aeSJames Wright#### STG Inflow for Flat Plate
710ba6664aeSJames Wright
71117be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options:
712ba6664aeSJames Wright
713ba6664aeSJames Wright:::{list-table} Blasius Runtime Options
714ba6664aeSJames Wright:header-rows: 1
715ba6664aeSJames Wright
716ba6664aeSJames Wright* - Option
717ba6664aeSJames Wright  - Description
718ba6664aeSJames Wright  - Default value
719ba6664aeSJames Wright  - Unit
720ba6664aeSJames Wright
721ba6664aeSJames Wright* - `-stg_inflow_path`
722ba6664aeSJames Wright  - Path to the STGInflow file
723ba6664aeSJames Wright  - `./STGInflow.dat`
724ba6664aeSJames Wright  -
725ba6664aeSJames Wright
726ba6664aeSJames Wright* - `-stg_rand_path`
727ba6664aeSJames Wright  - Path to the STGRand file
728ba6664aeSJames Wright  - `./STGRand.dat`
729ba6664aeSJames Wright  -
730ba6664aeSJames Wright
731ba6664aeSJames Wright* - `-stg_alpha`
732ba6664aeSJames Wright  - Growth rate of the wavemodes
733ba6664aeSJames Wright  - `1.01`
734ba6664aeSJames Wright  -
735ba6664aeSJames Wright
736ba6664aeSJames Wright* - `-stg_u0`
737ba6664aeSJames Wright  - Convective velocity, $U_0$
738ba6664aeSJames Wright  - `0.0`
739ba6664aeSJames Wright  - `m/s`
740ba6664aeSJames Wright
741ba6664aeSJames Wright* - `-stg_mean_only`
742ba6664aeSJames Wright  - Only impose the mean velocity (no fluctutations)
743ba6664aeSJames Wright  - `false`
744ba6664aeSJames Wright  -
745ba6664aeSJames Wright
74630af3636SJames Wright* - `-stg_strong`
74730af3636SJames Wright  - Strongly enforce the STG inflow boundary condition
74830af3636SJames Wright  - `false`
74930af3636SJames Wright  -
75030af3636SJames Wright
751ba6664aeSJames Wright:::
752ba6664aeSJames Wright
753ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via:
754ba6664aeSJames Wright
755ba6664aeSJames Wright```
756ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true
757ba6664aeSJames Wright```
758ba6664aeSJames Wright
75917be3a41SJeremy L ThompsonNote the added `-stg_use true` flag
76017be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow.
761