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* - `-continue` 76575f8106SLeila Ghaffari - Continue from previous solution 77575f8106SLeila Ghaffari - `0` 78ea10196cSJeremy L Thompson 79575f8106SLeila Ghaffari* - `-output_dir` 80575f8106SLeila Ghaffari - Output directory 81575f8106SLeila Ghaffari - `.` 82ea10196cSJeremy L Thompson 83f4277be3SLeila Ghaffari* - `-bc_wall` 84f4277be3SLeila Ghaffari - Use wall boundary conditions on this list of faces 85f4277be3SLeila Ghaffari - 86f4277be3SLeila Ghaffari 87f4277be3SLeila Ghaffari* - `-wall_comps` 88f4277be3SLeila Ghaffari - An array of constrained component numbers for wall BCs 89f4277be3SLeila Ghaffari - 90f4277be3SLeila Ghaffari 91f4277be3SLeila Ghaffari* - `-bc_slip_x` 92f4277be3SLeila Ghaffari - Use slip boundary conditions, for the x component, on this list of faces 93f4277be3SLeila Ghaffari - 94f4277be3SLeila Ghaffari 95f4277be3SLeila Ghaffari* - `-bc_slip_y` 96f4277be3SLeila Ghaffari - Use slip boundary conditions, for the y component, on this list of faces 97f4277be3SLeila Ghaffari - 98f4277be3SLeila Ghaffari 99f4277be3SLeila Ghaffari* - `-bc_slip_z` 100f4277be3SLeila Ghaffari - Use slip boundary conditions, for the z component, on this list of faces 101f4277be3SLeila Ghaffari - 102f4277be3SLeila Ghaffari 103f4277be3SLeila Ghaffari* - `-bc_inflow` 104f4277be3SLeila Ghaffari - Use inflow boundary conditions on this list of faces 105f4277be3SLeila Ghaffari - 106f4277be3SLeila Ghaffari 107f4277be3SLeila Ghaffari* - `-bc_outflow` 108f4277be3SLeila Ghaffari - Use outflow boundary conditions on this list of faces 109f4277be3SLeila Ghaffari - 1108ef11c93SLeila Ghaffari 111575f8106SLeila Ghaffari* - `-snes_view` 112575f8106SLeila Ghaffari - View PETSc `SNES` nonlinear solver configuration 113575f8106SLeila Ghaffari - 1148ef11c93SLeila Ghaffari 115575f8106SLeila Ghaffari* - `-log_view` 116575f8106SLeila Ghaffari - View PETSc performance log 117575f8106SLeila Ghaffari - 118ea10196cSJeremy L Thompson 119575f8106SLeila Ghaffari* - `-help` 120575f8106SLeila Ghaffari - View comprehensive information about run-time options 121575f8106SLeila Ghaffari - 122575f8106SLeila Ghaffari::: 123ea10196cSJeremy L Thompson 124f4277be3SLeila 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: 125f4277be3SLeila Ghaffari 126bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels 127bb8a0c61SJames Wright:header-rows: 1 128bb8a0c61SJames Wright* - PETSc Face Name 129bb8a0c61SJames Wright - Cartesian direction 130bb8a0c61SJames Wright - Face ID 131bb8a0c61SJames Wright 132bb8a0c61SJames Wright* - faceMarkerBottom 133bb8a0c61SJames Wright - -z 134bb8a0c61SJames Wright - 1 135bb8a0c61SJames Wright 136bb8a0c61SJames Wright* - faceMarkerRight 137bb8a0c61SJames Wright - +x 138bb8a0c61SJames Wright - 2 139bb8a0c61SJames Wright 140bb8a0c61SJames Wright* - faceMarkerTop 141bb8a0c61SJames Wright - +z 142bb8a0c61SJames Wright - 3 143bb8a0c61SJames Wright 144bb8a0c61SJames Wright* - faceMarkerLeft 145bb8a0c61SJames Wright - -x 146bb8a0c61SJames Wright - 4 147bb8a0c61SJames Wright::: 148bb8a0c61SJames Wright 149bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels 150bb8a0c61SJames Wright:header-rows: 1 151bb8a0c61SJames Wright* - PETSc Face Name 152bb8a0c61SJames Wright - Cartesian direction 153bb8a0c61SJames Wright - Face ID 154bb8a0c61SJames Wright 155bb8a0c61SJames Wright* - faceMarkerBottom 156bb8a0c61SJames Wright - -z 157bb8a0c61SJames Wright - 1 158bb8a0c61SJames Wright 159bb8a0c61SJames Wright* - faceMarkerTop 160bb8a0c61SJames Wright - +z 161bb8a0c61SJames Wright - 2 162bb8a0c61SJames Wright 163bb8a0c61SJames Wright* - faceMarkerFront 164bb8a0c61SJames Wright - -y 165bb8a0c61SJames Wright - 3 166bb8a0c61SJames Wright 167bb8a0c61SJames Wright* - faceMarkerBack 168bb8a0c61SJames Wright - +y 169bb8a0c61SJames Wright - 4 170bb8a0c61SJames Wright 171bb8a0c61SJames Wright* - faceMarkerRight 172bb8a0c61SJames Wright - +x 173bb8a0c61SJames Wright - 5 174bb8a0c61SJames Wright 175bb8a0c61SJames Wright* - faceMarkerLeft 176bb8a0c61SJames Wright - -x 177bb8a0c61SJames Wright - 6 178bb8a0c61SJames Wright::: 179f4277be3SLeila Ghaffari 180af8870a9STimothy Aiken### Advection 181af8870a9STimothy Aiken 182b46bfc5eSJeremy 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$. 183b46bfc5eSJeremy L ThompsonThese are available in 2D and 3D. 184af8870a9STimothy Aiken 185af8870a9STimothy Aiken#### 2D advection 186af8870a9STimothy Aiken 187575f8106SLeila GhaffariFor the 2D advection problem, the following additional command-line options are available: 188ea10196cSJeremy L Thompson 189575f8106SLeila Ghaffari:::{list-table} Advection2D Runtime Options 190575f8106SLeila Ghaffari:header-rows: 1 1918ef11c93SLeila Ghaffari 192575f8106SLeila Ghaffari* - Option 193575f8106SLeila Ghaffari - Description 194575f8106SLeila Ghaffari - Default value 195575f8106SLeila Ghaffari - Unit 1968ef11c93SLeila Ghaffari 197575f8106SLeila Ghaffari* - `-rc` 198575f8106SLeila Ghaffari - Characteristic radius of thermal bubble 199575f8106SLeila Ghaffari - `1000` 200575f8106SLeila Ghaffari - `m` 2018ef11c93SLeila Ghaffari 202575f8106SLeila Ghaffari* - `-units_meter` 203575f8106SLeila Ghaffari - 1 meter in scaled length units 204575f8106SLeila Ghaffari - `1E-2` 205575f8106SLeila Ghaffari - 2068ef11c93SLeila Ghaffari 207575f8106SLeila Ghaffari* - `-units_second` 208575f8106SLeila Ghaffari - 1 second in scaled time units 209575f8106SLeila Ghaffari - `1E-2` 210575f8106SLeila Ghaffari - 2118ef11c93SLeila Ghaffari 212575f8106SLeila Ghaffari* - `-units_kilogram` 213575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 214575f8106SLeila Ghaffari - `1E-6` 215575f8106SLeila Ghaffari - 216a515125bSLeila Ghaffari 217575f8106SLeila Ghaffari* - `-strong_form` 218575f8106SLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 219575f8106SLeila Ghaffari - `0` 220575f8106SLeila Ghaffari - 221a515125bSLeila Ghaffari 222575f8106SLeila Ghaffari* - `-stab` 223575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 224575f8106SLeila Ghaffari - `none` 225575f8106SLeila Ghaffari - 226a515125bSLeila Ghaffari 227575f8106SLeila Ghaffari* - `-CtauS` 228575f8106SLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 229575f8106SLeila Ghaffari - `0` 230575f8106SLeila Ghaffari - 231a515125bSLeila Ghaffari 232575f8106SLeila Ghaffari* - `-wind_type` 233575f8106SLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 234575f8106SLeila Ghaffari - `rotation` 235575f8106SLeila Ghaffari - 236a515125bSLeila Ghaffari 237575f8106SLeila Ghaffari* - `-wind_translation` 238575f8106SLeila Ghaffari - Constant wind vector when `-wind_type translation` 239575f8106SLeila Ghaffari - `1,0,0` 240575f8106SLeila Ghaffari - 2418ef11c93SLeila Ghaffari 242575f8106SLeila Ghaffari* - `-E_wind` 243575f8106SLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 244575f8106SLeila Ghaffari - `1E6` 245575f8106SLeila Ghaffari - `J` 246575f8106SLeila Ghaffari::: 247268c6924SLeila Ghaffari 248575f8106SLeila GhaffariAn example of the `rotation` mode can be run with: 249268c6924SLeila Ghaffari 250575f8106SLeila Ghaffari``` 251f4277be3SLeila 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 252575f8106SLeila Ghaffari``` 253268c6924SLeila Ghaffari 254575f8106SLeila Ghaffariand the `translation` mode with: 255268c6924SLeila Ghaffari 256575f8106SLeila Ghaffari``` 257f4277be3SLeila 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 258575f8106SLeila Ghaffari``` 259f4277be3SLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 260268c6924SLeila Ghaffari 261af8870a9STimothy Aiken#### 3D advection 262af8870a9STimothy Aiken 263575f8106SLeila GhaffariFor the 3D advection problem, the following additional command-line options are available: 264268c6924SLeila Ghaffari 265575f8106SLeila Ghaffari:::{list-table} Advection3D Runtime Options 266575f8106SLeila Ghaffari:header-rows: 1 267268c6924SLeila Ghaffari 268575f8106SLeila Ghaffari* - Option 269575f8106SLeila Ghaffari - Description 270575f8106SLeila Ghaffari - Default value 271575f8106SLeila Ghaffari - Unit 272268c6924SLeila Ghaffari 273575f8106SLeila Ghaffari* - `-rc` 274575f8106SLeila Ghaffari - Characteristic radius of thermal bubble 275575f8106SLeila Ghaffari - `1000` 276575f8106SLeila Ghaffari - `m` 277268c6924SLeila Ghaffari 278575f8106SLeila Ghaffari* - `-units_meter` 279575f8106SLeila Ghaffari - 1 meter in scaled length units 280575f8106SLeila Ghaffari - `1E-2` 281575f8106SLeila Ghaffari - 282268c6924SLeila Ghaffari 283575f8106SLeila Ghaffari* - `-units_second` 284575f8106SLeila Ghaffari - 1 second in scaled time units 285575f8106SLeila Ghaffari - `1E-2` 286575f8106SLeila Ghaffari - 287268c6924SLeila Ghaffari 288575f8106SLeila Ghaffari* - `-units_kilogram` 289575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 290575f8106SLeila Ghaffari - `1E-6` 291575f8106SLeila Ghaffari - 292268c6924SLeila Ghaffari 293575f8106SLeila Ghaffari* - `-strong_form` 294575f8106SLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 295575f8106SLeila Ghaffari - `0` 296575f8106SLeila Ghaffari - 297268c6924SLeila Ghaffari 298575f8106SLeila Ghaffari* - `-stab` 299575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 300575f8106SLeila Ghaffari - `none` 301575f8106SLeila Ghaffari - 302268c6924SLeila Ghaffari 303575f8106SLeila Ghaffari* - `-CtauS` 304575f8106SLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 305575f8106SLeila Ghaffari - `0` 306575f8106SLeila Ghaffari - 307268c6924SLeila Ghaffari 308575f8106SLeila Ghaffari* - `-wind_type` 309575f8106SLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 310575f8106SLeila Ghaffari - `rotation` 311575f8106SLeila Ghaffari - 312268c6924SLeila Ghaffari 313575f8106SLeila Ghaffari* - `-wind_translation` 314575f8106SLeila Ghaffari - Constant wind vector when `-wind_type translation` 315575f8106SLeila Ghaffari - `1,0,0` 316575f8106SLeila Ghaffari - 317268c6924SLeila Ghaffari 318575f8106SLeila Ghaffari* - `-E_wind` 319575f8106SLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 320575f8106SLeila Ghaffari - `1E6` 321575f8106SLeila Ghaffari - `J` 322268c6924SLeila Ghaffari 323575f8106SLeila Ghaffari* - `-bubble_type` 324575f8106SLeila Ghaffari - `sphere` (3D) or `cylinder` (2D) 325575f8106SLeila Ghaffari - `shpere` 326575f8106SLeila Ghaffari - 327268c6924SLeila Ghaffari 328575f8106SLeila Ghaffari* - `-bubble_continuity` 329575f8106SLeila Ghaffari - `smooth`, `back_sharp`, or `thick` 330575f8106SLeila Ghaffari - `smooth` 331575f8106SLeila Ghaffari - 332575f8106SLeila Ghaffari::: 333ea10196cSJeremy L Thompson 334575f8106SLeila GhaffariAn example of the `rotation` mode can be run with: 335ea10196cSJeremy L Thompson 336575f8106SLeila Ghaffari``` 337f4277be3SLeila 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 338575f8106SLeila Ghaffari``` 339ea10196cSJeremy L Thompson 340575f8106SLeila Ghaffariand the `translation` mode with: 341ea10196cSJeremy L Thompson 342575f8106SLeila Ghaffari``` 343f4277be3SLeila 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 344575f8106SLeila Ghaffari``` 345ea10196cSJeremy L Thompson 346af8870a9STimothy Aiken### Inviscid Ideal Gas 347af8870a9STimothy Aiken 348af8870a9STimothy Aiken#### Isentropic Euler vortex 349af8870a9STimothy Aiken 350575f8106SLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available: 351ea10196cSJeremy L Thompson 352575f8106SLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options 353575f8106SLeila Ghaffari:header-rows: 1 354ea10196cSJeremy L Thompson 355575f8106SLeila Ghaffari* - Option 356575f8106SLeila Ghaffari - Description 357575f8106SLeila Ghaffari - Default value 358575f8106SLeila Ghaffari - Unit 359ea10196cSJeremy L Thompson 360575f8106SLeila Ghaffari* - `-center` 361575f8106SLeila Ghaffari - Location of vortex center 362575f8106SLeila Ghaffari - `(lx,ly,lz)/2` 363575f8106SLeila Ghaffari - `(m,m,m)` 364ea10196cSJeremy L Thompson 365575f8106SLeila Ghaffari* - `-units_meter` 366575f8106SLeila Ghaffari - 1 meter in scaled length units 367575f8106SLeila Ghaffari - `1E-2` 368575f8106SLeila Ghaffari - 369ea10196cSJeremy L Thompson 370575f8106SLeila Ghaffari* - `-units_second` 371575f8106SLeila Ghaffari - 1 second in scaled time units 372575f8106SLeila Ghaffari - `1E-2` 373575f8106SLeila Ghaffari - 374ea10196cSJeremy L Thompson 375575f8106SLeila Ghaffari* - `-mean_velocity` 376575f8106SLeila Ghaffari - Background velocity vector 377575f8106SLeila Ghaffari - `(1,1,0)` 378575f8106SLeila Ghaffari - 379ea10196cSJeremy L Thompson 380575f8106SLeila Ghaffari* - `-vortex_strength` 381575f8106SLeila Ghaffari - Strength of vortex < 10 382575f8106SLeila Ghaffari - `5` 383575f8106SLeila Ghaffari - 384d8a22b9eSJed Brown 385d8a22b9eSJed Brown* - `-c_tau` 386d8a22b9eSJed Brown - Stabilization constant 387f821ee77SLeila Ghaffari - `0.5` 388d8a22b9eSJed Brown - 389575f8106SLeila Ghaffari::: 390ea10196cSJeremy L Thompson 391575f8106SLeila GhaffariThis problem can be run with: 392ea10196cSJeremy L Thompson 393575f8106SLeila Ghaffari``` 394f4277be3SLeila 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. 395575f8106SLeila Ghaffari``` 396ea10196cSJeremy L Thompson 397af8870a9STimothy Aiken#### Sod shock tube 398af8870a9STimothy Aiken 399af8870a9STimothy AikenFor the Shock Tube problem, the following additional command-line options are available: 400af8870a9STimothy Aiken 401af8870a9STimothy Aiken:::{list-table} Shock Tube Runtime Options 402af8870a9STimothy Aiken:header-rows: 1 403af8870a9STimothy Aiken 404af8870a9STimothy Aiken* - Option 405af8870a9STimothy Aiken - Description 406af8870a9STimothy Aiken - Default value 407af8870a9STimothy Aiken - Unit 408af8870a9STimothy Aiken 409af8870a9STimothy Aiken* - `-units_meter` 410af8870a9STimothy Aiken - 1 meter in scaled length units 411af8870a9STimothy Aiken - `1E-2` 412af8870a9STimothy Aiken - 413af8870a9STimothy Aiken 414af8870a9STimothy Aiken* - `-units_second` 415af8870a9STimothy Aiken - 1 second in scaled time units 416af8870a9STimothy Aiken - `1E-2` 417af8870a9STimothy Aiken - 418af8870a9STimothy Aiken 419af8870a9STimothy Aiken* - `-yzb` 420af8870a9STimothy Aiken - Use YZB discontinuity capturing 421af8870a9STimothy Aiken - `none` 422af8870a9STimothy Aiken - 423af8870a9STimothy Aiken 424af8870a9STimothy Aiken* - `-stab` 425af8870a9STimothy Aiken - Stabilization method (`none`, `su`, or `supg`) 426af8870a9STimothy Aiken - `none` 427af8870a9STimothy Aiken - 428af8870a9STimothy Aiken::: 429af8870a9STimothy Aiken 430af8870a9STimothy AikenThis problem can be run with: 431af8870a9STimothy Aiken 432af8870a9STimothy Aiken``` 433af8870a9STimothy 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 434af8870a9STimothy Aiken``` 435af8870a9STimothy Aiken 436af8870a9STimothy Aiken### Newtonian viscosity, Ideal Gas 437af8870a9STimothy Aiken 438bb8a0c61SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available: 439ea10196cSJeremy L Thompson 440bb8a0c61SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options 441575f8106SLeila Ghaffari:header-rows: 1 442ea10196cSJeremy L Thompson 443575f8106SLeila Ghaffari* - Option 444575f8106SLeila Ghaffari - Description 445575f8106SLeila Ghaffari - Default value 446575f8106SLeila Ghaffari - Unit 447ea10196cSJeremy L Thompson 448575f8106SLeila Ghaffari* - `-units_meter` 449575f8106SLeila Ghaffari - 1 meter in scaled length units 450bb8a0c61SJames Wright - `1` 451575f8106SLeila Ghaffari - 452ea10196cSJeremy L Thompson 453575f8106SLeila Ghaffari* - `-units_second` 454575f8106SLeila Ghaffari - 1 second in scaled time units 455bb8a0c61SJames Wright - `1` 456575f8106SLeila Ghaffari - 457ea10196cSJeremy L Thompson 458575f8106SLeila Ghaffari* - `-units_kilogram` 459575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 460bb8a0c61SJames Wright - `1` 461575f8106SLeila Ghaffari - 462ea10196cSJeremy L Thompson 463575f8106SLeila Ghaffari* - `-units_Kelvin` 464575f8106SLeila Ghaffari - 1 Kelvin in scaled temperature units 465575f8106SLeila Ghaffari - `1` 466575f8106SLeila Ghaffari - 467ea10196cSJeremy L Thompson 468575f8106SLeila Ghaffari* - `-stab` 469575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 470575f8106SLeila Ghaffari - `none` 471575f8106SLeila Ghaffari - 472ea10196cSJeremy L Thompson 473d8a22b9eSJed Brown* - `-c_tau` 474bb8a0c61SJames Wright - Stabilization constant, $c_\tau$ 475f821ee77SLeila Ghaffari - `0.5` 476d8a22b9eSJed Brown - 477d8a22b9eSJed Brown 478bb8a0c61SJames Wright* - `-Ctau_t` 479bb8a0c61SJames Wright - Stabilization time constant, $C_t$ 480bb8a0c61SJames Wright - `1.0` 481bb8a0c61SJames Wright - 482ea10196cSJeremy L Thompson 483bb8a0c61SJames Wright* - `-Ctau_v` 484bb8a0c61SJames Wright - Stabilization viscous constant, $C_v$ 485bb8a0c61SJames Wright - `36.0` 486bb8a0c61SJames Wright - 487ea10196cSJeremy L Thompson 488bb8a0c61SJames Wright* - `-Ctau_C` 489bb8a0c61SJames Wright - Stabilization continuity constant, $C_c$ 490bb8a0c61SJames Wright - `1.0` 491bb8a0c61SJames Wright - 492ea10196cSJeremy L Thompson 493bb8a0c61SJames Wright* - `-Ctau_M` 494bb8a0c61SJames Wright - Stabilization momentum constant, $C_m$ 495bb8a0c61SJames Wright - `1.0` 496bb8a0c61SJames Wright - 497bb8a0c61SJames Wright 498bb8a0c61SJames Wright* - `-Ctau_E` 499bb8a0c61SJames Wright - Stabilization energy constant, $C_E$ 500bb8a0c61SJames Wright - `1.0` 501bb8a0c61SJames Wright - 502ea10196cSJeremy L Thompson 503575f8106SLeila Ghaffari* - `-cv` 504575f8106SLeila Ghaffari - Heat capacity at constant volume 505575f8106SLeila Ghaffari - `717` 506575f8106SLeila Ghaffari - `J/(kg K)` 507ea10196cSJeremy L Thompson 508575f8106SLeila Ghaffari* - `-cp` 509575f8106SLeila Ghaffari - Heat capacity at constant pressure 510575f8106SLeila Ghaffari - `1004` 511575f8106SLeila Ghaffari - `J/(kg K)` 512ea10196cSJeremy L Thompson 513575f8106SLeila Ghaffari* - `-g` 514575f8106SLeila Ghaffari - Gravitational acceleration 515575f8106SLeila Ghaffari - `9.81` 516575f8106SLeila Ghaffari - `m/s^2` 517ea10196cSJeremy L Thompson 518575f8106SLeila Ghaffari* - `-lambda` 519575f8106SLeila Ghaffari - Stokes hypothesis second viscosity coefficient 520575f8106SLeila Ghaffari - `-2/3` 521575f8106SLeila Ghaffari - 522ea10196cSJeremy L Thompson 523575f8106SLeila Ghaffari* - `-mu` 524575f8106SLeila Ghaffari - Shear dynamic viscosity coefficient 525575f8106SLeila Ghaffari - `75` 526575f8106SLeila Ghaffari - `Pa s` 527a515125bSLeila Ghaffari 528575f8106SLeila Ghaffari* - `-k` 529575f8106SLeila Ghaffari - Thermal conductivity 530575f8106SLeila Ghaffari - `0.02638` 531575f8106SLeila Ghaffari - `W/(m K)` 532edd152dcSJed Brown 533edd152dcSJed Brown* - `-newtonian_unit_tests` 534edd152dcSJed Brown - Developer option to test properties 535edd152dcSJed Brown - `false` 536edd152dcSJed Brown - boolean 537aa61a79eSJames Wright 538*ba952bfeSJames Wright* - `-state_var` 539*ba952bfeSJames Wright - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$) 540*ba952bfeSJames Wright - `conservative` 541*ba952bfeSJames Wright - string 542575f8106SLeila Ghaffari::: 543a515125bSLeila Ghaffari 544edd152dcSJed Brown 545af8870a9STimothy Aiken#### Density current 546af8870a9STimothy Aiken 547b46bfc5eSJeremy L ThompsonThe Density Current problem the following command-line options are available in addition to the Newtonian Ideal Gas options: 548bb8a0c61SJames Wright 549bb8a0c61SJames Wright:::{list-table} Density Current Runtime Options 550bb8a0c61SJames Wright:header-rows: 1 551bb8a0c61SJames Wright 552bb8a0c61SJames Wright* - Option 553bb8a0c61SJames Wright - Description 554bb8a0c61SJames Wright - Default value 555bb8a0c61SJames Wright - Unit 556bb8a0c61SJames Wright 557bb8a0c61SJames Wright* - `-center` 558bb8a0c61SJames Wright - Location of bubble center 559bb8a0c61SJames Wright - `(lx,ly,lz)/2` 560bb8a0c61SJames Wright - `(m,m,m)` 561bb8a0c61SJames Wright 562bb8a0c61SJames Wright* - `-dc_axis` 563bb8a0c61SJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 564bb8a0c61SJames Wright - `(0,0,0)` 565bb8a0c61SJames Wright - 566bb8a0c61SJames Wright 567bb8a0c61SJames Wright* - `-rc` 568bb8a0c61SJames Wright - Characteristic radius of thermal bubble 569bb8a0c61SJames Wright - `1000` 570bb8a0c61SJames Wright - `m` 571bb8a0c61SJames Wright 572bb8a0c61SJames Wright* - `-theta0` 573bb8a0c61SJames Wright - Reference potential temperature 574bb8a0c61SJames Wright - `300` 575bb8a0c61SJames Wright - `K` 576bb8a0c61SJames Wright 577bb8a0c61SJames Wright* - `-thetaC` 578bb8a0c61SJames Wright - Perturbation of potential temperature 579bb8a0c61SJames Wright - `-15` 580bb8a0c61SJames Wright - `K` 581bb8a0c61SJames Wright 582bb8a0c61SJames Wright* - `-P0` 583bb8a0c61SJames Wright - Atmospheric pressure 584bb8a0c61SJames Wright - `1E5` 585bb8a0c61SJames Wright - `Pa` 586bb8a0c61SJames Wright 587bb8a0c61SJames Wright* - `-N` 588bb8a0c61SJames Wright - Brunt-Vaisala frequency 589bb8a0c61SJames Wright - `0.01` 590bb8a0c61SJames Wright - `1/s` 591bb8a0c61SJames Wright::: 592bb8a0c61SJames Wright 593575f8106SLeila GhaffariThis problem can be run with: 594ea10196cSJeremy L Thompson 595575f8106SLeila Ghaffari``` 596bb8a0c61SJames 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 597bb8a0c61SJames Wright``` 598bb8a0c61SJames Wright 599af8870a9STimothy Aiken#### Channel flow 600af8870a9STimothy Aiken 601b46bfc5eSJeremy L ThompsonThe Channel problem the following command-line options are available in addition to the Newtonian Ideal Gas options: 602bb8a0c61SJames Wright 603bb8a0c61SJames Wright:::{list-table} Channel Runtime Options 604bb8a0c61SJames Wright:header-rows: 1 605bb8a0c61SJames Wright 606bb8a0c61SJames Wright* - Option 607bb8a0c61SJames Wright - Description 608bb8a0c61SJames Wright - Default value 609bb8a0c61SJames Wright - Unit 610bb8a0c61SJames Wright 611bb8a0c61SJames Wright* - `-umax` 612bb8a0c61SJames Wright - Maximum/centerline velocity of the flow 613bb8a0c61SJames Wright - `10` 614bb8a0c61SJames Wright - `m/s` 615bb8a0c61SJames Wright 616bb8a0c61SJames Wright* - `-theta0` 617bb8a0c61SJames Wright - Reference potential temperature 618bb8a0c61SJames Wright - `300` 619bb8a0c61SJames Wright - `K` 620bb8a0c61SJames Wright 621bb8a0c61SJames Wright* - `-P0` 622bb8a0c61SJames Wright - Atmospheric pressure 623bb8a0c61SJames Wright - `1E5` 624bb8a0c61SJames Wright - `Pa` 625edd152dcSJed Brown 626edd152dcSJed Brown* - `-body_force_scale` 627edd152dcSJed Brown - Multiplier for body force (`-1` for flow reversal) 628edd152dcSJed Brown - 1 629edd152dcSJed Brown - 630bb8a0c61SJames Wright::: 631bb8a0c61SJames Wright 632bb8a0c61SJames WrightThis problem can be run with the `channel.yaml` file via: 633bb8a0c61SJames Wright 634bb8a0c61SJames Wright``` 635bb8a0c61SJames Wright./navierstokes -options_file channel.yaml 636bb8a0c61SJames Wright``` 637bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml 638bb8a0c61SJames Wright:language: yaml 639bb8a0c61SJames Wright``` 640bb8a0c61SJames Wright 641af8870a9STimothy Aiken#### Blasius boundary layer 642af8870a9STimothy Aiken 643b46bfc5eSJeremy L ThompsonThe Blasius problem the following command-line options are available in addition to the Newtonian Ideal Gas options: 644bb8a0c61SJames Wright 645bb8a0c61SJames Wright:::{list-table} Blasius Runtime Options 646bb8a0c61SJames Wright:header-rows: 1 647bb8a0c61SJames Wright 648bb8a0c61SJames Wright* - Option 649bb8a0c61SJames Wright - Description 650bb8a0c61SJames Wright - Default value 651bb8a0c61SJames Wright - Unit 652bb8a0c61SJames Wright 653bb8a0c61SJames Wright* - `-Uinf` 654bb8a0c61SJames Wright - Freestream velocity 655bb8a0c61SJames Wright - `40` 656bb8a0c61SJames Wright - `m/s` 657bb8a0c61SJames Wright 658bb8a0c61SJames Wright* - `-delta0` 659bb8a0c61SJames Wright - Boundary layer height at the inflow 660bb8a0c61SJames Wright - `4.2e-4` 661bb8a0c61SJames Wright - `m` 662bb8a0c61SJames Wright 663bb8a0c61SJames Wright* - `-theta0` 664bb8a0c61SJames Wright - Reference potential temperature 665bb8a0c61SJames Wright - `288` 666bb8a0c61SJames Wright - `K` 667bb8a0c61SJames Wright 668bb8a0c61SJames Wright* - `-P0` 669bb8a0c61SJames Wright - Atmospheric pressure 670bb8a0c61SJames Wright - `1.01E5` 671bb8a0c61SJames Wright - `Pa` 672bb8a0c61SJames Wright 67398b448e2SJames Wright* - `-platemesh_refine_height` 67498b448e2SJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 675bb8a0c61SJames Wright - `5.9E-4` 676bb8a0c61SJames Wright - `m` 677bb8a0c61SJames Wright 67898b448e2SJames Wright* - `-platemesh_Ndelta` 67998b448e2SJames Wright - Number of elements to keep below `-platemesh_refine_height` 680bb8a0c61SJames Wright - `45` 681bb8a0c61SJames Wright - 682bb8a0c61SJames Wright 68398b448e2SJames Wright* - `-platemesh_growth` 684bb8a0c61SJames Wright - Growth rate of the elements in the refinement region 685bb8a0c61SJames Wright - `1.08` 686bb8a0c61SJames Wright - 687bb8a0c61SJames Wright 68898b448e2SJames Wright* - `-platemesh_top_angle` 689bb8a0c61SJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 690bb8a0c61SJames Wright - `5` 691bb8a0c61SJames Wright - `degrees` 692493642f1SJames Wright 693493642f1SJames Wright* - `-stg_use` 694493642f1SJames Wright - Whether to use stg for the inflow conditions 695493642f1SJames Wright - `false` 696493642f1SJames Wright - 69798b448e2SJames Wright 69898b448e2SJames Wright* - `-platemesh_y_node_locs_path` 69998b448e2SJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 70098b448e2SJames Wright - `""` 70198b448e2SJames Wright - 702bb8a0c61SJames Wright::: 703bb8a0c61SJames Wright 704bb8a0c61SJames WrightThis problem can be run with the `blasius.yaml` file via: 705bb8a0c61SJames Wright 706bb8a0c61SJames Wright``` 707bb8a0c61SJames Wright./navierstokes -options_file blasius.yaml 708bb8a0c61SJames Wright``` 709bb8a0c61SJames Wright 710bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml 711bb8a0c61SJames Wright:language: yaml 712575f8106SLeila Ghaffari``` 713493642f1SJames Wright 714493642f1SJames Wright#### STG Inflow for Flat Plate 715493642f1SJames Wright 716b46bfc5eSJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options: 717493642f1SJames Wright 718493642f1SJames Wright:::{list-table} Blasius Runtime Options 719493642f1SJames Wright:header-rows: 1 720493642f1SJames Wright 721493642f1SJames Wright* - Option 722493642f1SJames Wright - Description 723493642f1SJames Wright - Default value 724493642f1SJames Wright - Unit 725493642f1SJames Wright 726493642f1SJames Wright* - `-stg_inflow_path` 727493642f1SJames Wright - Path to the STGInflow file 728493642f1SJames Wright - `./STGInflow.dat` 729493642f1SJames Wright - 730493642f1SJames Wright 731493642f1SJames Wright* - `-stg_rand_path` 732493642f1SJames Wright - Path to the STGRand file 733493642f1SJames Wright - `./STGRand.dat` 734493642f1SJames Wright - 735493642f1SJames Wright 736493642f1SJames Wright* - `-stg_alpha` 737493642f1SJames Wright - Growth rate of the wavemodes 738493642f1SJames Wright - `1.01` 739493642f1SJames Wright - 740493642f1SJames Wright 741493642f1SJames Wright* - `-stg_u0` 742493642f1SJames Wright - Convective velocity, $U_0$ 743493642f1SJames Wright - `0.0` 744493642f1SJames Wright - `m/s` 745493642f1SJames Wright 746493642f1SJames Wright* - `-stg_mean_only` 747493642f1SJames Wright - Only impose the mean velocity (no fluctutations) 748493642f1SJames Wright - `false` 749493642f1SJames Wright - 750493642f1SJames Wright 75129ea39e3SJames Wright* - `-stg_strong` 75229ea39e3SJames Wright - Strongly enforce the STG inflow boundary condition 75329ea39e3SJames Wright - `false` 75429ea39e3SJames Wright - 75529ea39e3SJames Wright 756493642f1SJames Wright::: 757493642f1SJames Wright 758493642f1SJames WrightThis problem can be run with the `blasius.yaml` file via: 759493642f1SJames Wright 760493642f1SJames Wright``` 761493642f1SJames Wright./navierstokes -options_file blasius.yaml -stg_use true 762493642f1SJames Wright``` 763493642f1SJames Wright 764b46bfc5eSJeremy L ThompsonNote the added `-stg_use true` flag 765b46bfc5eSJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow. 766