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 11179b17980SJames Wright* - `-bc_freestream` 11279b17980SJames Wright - Use freestream boundary conditions on this list of faces 11379b17980SJames Wright - 11479b17980SJames Wright 115575f8106SLeila Ghaffari* - `-snes_view` 116575f8106SLeila Ghaffari - View PETSc `SNES` nonlinear solver configuration 117575f8106SLeila Ghaffari - 1188ef11c93SLeila Ghaffari 119575f8106SLeila Ghaffari* - `-log_view` 120575f8106SLeila Ghaffari - View PETSc performance log 121575f8106SLeila Ghaffari - 122ea10196cSJeremy L Thompson 123575f8106SLeila Ghaffari* - `-help` 124575f8106SLeila Ghaffari - View comprehensive information about run-time options 125575f8106SLeila Ghaffari - 126575f8106SLeila Ghaffari::: 127ea10196cSJeremy L Thompson 12879b17980SJames WrightFor the case of a square/cubic mesh, the list of face indices to be used with `-bc_wall`, `bc_inflow`, `bc_outflow`, `bc_freestream` and/or `-bc_slip_x`, `-bc_slip_y`, and `-bc_slip_z` are: 129f4277be3SLeila Ghaffari 130bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels 131bb8a0c61SJames Wright:header-rows: 1 132bb8a0c61SJames Wright* - PETSc Face Name 133bb8a0c61SJames Wright - Cartesian direction 134bb8a0c61SJames Wright - Face ID 135bb8a0c61SJames Wright 136bb8a0c61SJames Wright* - faceMarkerBottom 137bb8a0c61SJames Wright - -z 138bb8a0c61SJames Wright - 1 139bb8a0c61SJames Wright 140bb8a0c61SJames Wright* - faceMarkerRight 141bb8a0c61SJames Wright - +x 142bb8a0c61SJames Wright - 2 143bb8a0c61SJames Wright 144bb8a0c61SJames Wright* - faceMarkerTop 145bb8a0c61SJames Wright - +z 146bb8a0c61SJames Wright - 3 147bb8a0c61SJames Wright 148bb8a0c61SJames Wright* - faceMarkerLeft 149bb8a0c61SJames Wright - -x 150bb8a0c61SJames Wright - 4 151bb8a0c61SJames Wright::: 152bb8a0c61SJames Wright 153bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels 154bb8a0c61SJames Wright:header-rows: 1 155bb8a0c61SJames Wright* - PETSc Face Name 156bb8a0c61SJames Wright - Cartesian direction 157bb8a0c61SJames Wright - Face ID 158bb8a0c61SJames Wright 159bb8a0c61SJames Wright* - faceMarkerBottom 160bb8a0c61SJames Wright - -z 161bb8a0c61SJames Wright - 1 162bb8a0c61SJames Wright 163bb8a0c61SJames Wright* - faceMarkerTop 164bb8a0c61SJames Wright - +z 165bb8a0c61SJames Wright - 2 166bb8a0c61SJames Wright 167bb8a0c61SJames Wright* - faceMarkerFront 168bb8a0c61SJames Wright - -y 169bb8a0c61SJames Wright - 3 170bb8a0c61SJames Wright 171bb8a0c61SJames Wright* - faceMarkerBack 172bb8a0c61SJames Wright - +y 173bb8a0c61SJames Wright - 4 174bb8a0c61SJames Wright 175bb8a0c61SJames Wright* - faceMarkerRight 176bb8a0c61SJames Wright - +x 177bb8a0c61SJames Wright - 5 178bb8a0c61SJames Wright 179bb8a0c61SJames Wright* - faceMarkerLeft 180bb8a0c61SJames Wright - -x 181bb8a0c61SJames Wright - 6 182bb8a0c61SJames Wright::: 183f4277be3SLeila Ghaffari 184af8870a9STimothy Aiken### Advection 185af8870a9STimothy Aiken 186b46bfc5eSJeremy 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$. 187b46bfc5eSJeremy L ThompsonThese are available in 2D and 3D. 188af8870a9STimothy Aiken 189af8870a9STimothy Aiken#### 2D advection 190af8870a9STimothy Aiken 191575f8106SLeila GhaffariFor the 2D advection problem, the following additional command-line options are available: 192ea10196cSJeremy L Thompson 193575f8106SLeila Ghaffari:::{list-table} Advection2D Runtime Options 194575f8106SLeila Ghaffari:header-rows: 1 1958ef11c93SLeila Ghaffari 196575f8106SLeila Ghaffari* - Option 197575f8106SLeila Ghaffari - Description 198575f8106SLeila Ghaffari - Default value 199575f8106SLeila Ghaffari - Unit 2008ef11c93SLeila Ghaffari 201575f8106SLeila Ghaffari* - `-rc` 202575f8106SLeila Ghaffari - Characteristic radius of thermal bubble 203575f8106SLeila Ghaffari - `1000` 204575f8106SLeila Ghaffari - `m` 2058ef11c93SLeila Ghaffari 206575f8106SLeila Ghaffari* - `-units_meter` 207575f8106SLeila Ghaffari - 1 meter in scaled length units 208575f8106SLeila Ghaffari - `1E-2` 209575f8106SLeila Ghaffari - 2108ef11c93SLeila Ghaffari 211575f8106SLeila Ghaffari* - `-units_second` 212575f8106SLeila Ghaffari - 1 second in scaled time units 213575f8106SLeila Ghaffari - `1E-2` 214575f8106SLeila Ghaffari - 2158ef11c93SLeila Ghaffari 216575f8106SLeila Ghaffari* - `-units_kilogram` 217575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 218575f8106SLeila Ghaffari - `1E-6` 219575f8106SLeila Ghaffari - 220a515125bSLeila Ghaffari 221575f8106SLeila Ghaffari* - `-strong_form` 222575f8106SLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 223575f8106SLeila Ghaffari - `0` 224575f8106SLeila Ghaffari - 225a515125bSLeila Ghaffari 226575f8106SLeila Ghaffari* - `-stab` 227575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 228575f8106SLeila Ghaffari - `none` 229575f8106SLeila Ghaffari - 230a515125bSLeila Ghaffari 231575f8106SLeila Ghaffari* - `-CtauS` 232575f8106SLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 233575f8106SLeila Ghaffari - `0` 234575f8106SLeila Ghaffari - 235a515125bSLeila Ghaffari 236575f8106SLeila Ghaffari* - `-wind_type` 237575f8106SLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 238575f8106SLeila Ghaffari - `rotation` 239575f8106SLeila Ghaffari - 240a515125bSLeila Ghaffari 241575f8106SLeila Ghaffari* - `-wind_translation` 242575f8106SLeila Ghaffari - Constant wind vector when `-wind_type translation` 243575f8106SLeila Ghaffari - `1,0,0` 244575f8106SLeila Ghaffari - 2458ef11c93SLeila Ghaffari 246575f8106SLeila Ghaffari* - `-E_wind` 247575f8106SLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 248575f8106SLeila Ghaffari - `1E6` 249575f8106SLeila Ghaffari - `J` 250575f8106SLeila Ghaffari::: 251268c6924SLeila Ghaffari 252575f8106SLeila GhaffariAn example of the `rotation` mode can be run with: 253268c6924SLeila Ghaffari 254575f8106SLeila Ghaffari``` 255f4277be3SLeila 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 256575f8106SLeila Ghaffari``` 257268c6924SLeila Ghaffari 258575f8106SLeila Ghaffariand the `translation` mode with: 259268c6924SLeila Ghaffari 260575f8106SLeila Ghaffari``` 261f4277be3SLeila 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 262575f8106SLeila Ghaffari``` 263f4277be3SLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 264268c6924SLeila Ghaffari 265af8870a9STimothy Aiken#### 3D advection 266af8870a9STimothy Aiken 267575f8106SLeila GhaffariFor the 3D advection problem, the following additional command-line options are available: 268268c6924SLeila Ghaffari 269575f8106SLeila Ghaffari:::{list-table} Advection3D Runtime Options 270575f8106SLeila Ghaffari:header-rows: 1 271268c6924SLeila Ghaffari 272575f8106SLeila Ghaffari* - Option 273575f8106SLeila Ghaffari - Description 274575f8106SLeila Ghaffari - Default value 275575f8106SLeila Ghaffari - Unit 276268c6924SLeila Ghaffari 277575f8106SLeila Ghaffari* - `-rc` 278575f8106SLeila Ghaffari - Characteristic radius of thermal bubble 279575f8106SLeila Ghaffari - `1000` 280575f8106SLeila Ghaffari - `m` 281268c6924SLeila Ghaffari 282575f8106SLeila Ghaffari* - `-units_meter` 283575f8106SLeila Ghaffari - 1 meter in scaled length units 284575f8106SLeila Ghaffari - `1E-2` 285575f8106SLeila Ghaffari - 286268c6924SLeila Ghaffari 287575f8106SLeila Ghaffari* - `-units_second` 288575f8106SLeila Ghaffari - 1 second in scaled time units 289575f8106SLeila Ghaffari - `1E-2` 290575f8106SLeila Ghaffari - 291268c6924SLeila Ghaffari 292575f8106SLeila Ghaffari* - `-units_kilogram` 293575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 294575f8106SLeila Ghaffari - `1E-6` 295575f8106SLeila Ghaffari - 296268c6924SLeila Ghaffari 297575f8106SLeila Ghaffari* - `-strong_form` 298575f8106SLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 299575f8106SLeila Ghaffari - `0` 300575f8106SLeila Ghaffari - 301268c6924SLeila Ghaffari 302575f8106SLeila Ghaffari* - `-stab` 303575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 304575f8106SLeila Ghaffari - `none` 305575f8106SLeila Ghaffari - 306268c6924SLeila Ghaffari 307575f8106SLeila Ghaffari* - `-CtauS` 308575f8106SLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 309575f8106SLeila Ghaffari - `0` 310575f8106SLeila Ghaffari - 311268c6924SLeila Ghaffari 312575f8106SLeila Ghaffari* - `-wind_type` 313575f8106SLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 314575f8106SLeila Ghaffari - `rotation` 315575f8106SLeila Ghaffari - 316268c6924SLeila Ghaffari 317575f8106SLeila Ghaffari* - `-wind_translation` 318575f8106SLeila Ghaffari - Constant wind vector when `-wind_type translation` 319575f8106SLeila Ghaffari - `1,0,0` 320575f8106SLeila Ghaffari - 321268c6924SLeila Ghaffari 322575f8106SLeila Ghaffari* - `-E_wind` 323575f8106SLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 324575f8106SLeila Ghaffari - `1E6` 325575f8106SLeila Ghaffari - `J` 326268c6924SLeila Ghaffari 327575f8106SLeila Ghaffari* - `-bubble_type` 328575f8106SLeila Ghaffari - `sphere` (3D) or `cylinder` (2D) 329575f8106SLeila Ghaffari - `shpere` 330575f8106SLeila Ghaffari - 331268c6924SLeila Ghaffari 332575f8106SLeila Ghaffari* - `-bubble_continuity` 333575f8106SLeila Ghaffari - `smooth`, `back_sharp`, or `thick` 334575f8106SLeila Ghaffari - `smooth` 335575f8106SLeila Ghaffari - 336575f8106SLeila Ghaffari::: 337ea10196cSJeremy L Thompson 338575f8106SLeila GhaffariAn example of the `rotation` mode can be run with: 339ea10196cSJeremy L Thompson 340575f8106SLeila Ghaffari``` 341f4277be3SLeila 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 342575f8106SLeila Ghaffari``` 343ea10196cSJeremy L Thompson 344575f8106SLeila Ghaffariand the `translation` mode with: 345ea10196cSJeremy L Thompson 346575f8106SLeila Ghaffari``` 347f4277be3SLeila 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 348575f8106SLeila Ghaffari``` 349ea10196cSJeremy L Thompson 350af8870a9STimothy Aiken### Inviscid Ideal Gas 351af8870a9STimothy Aiken 352af8870a9STimothy Aiken#### Isentropic Euler vortex 353af8870a9STimothy Aiken 354575f8106SLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available: 355ea10196cSJeremy L Thompson 356575f8106SLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options 357575f8106SLeila Ghaffari:header-rows: 1 358ea10196cSJeremy L Thompson 359575f8106SLeila Ghaffari* - Option 360575f8106SLeila Ghaffari - Description 361575f8106SLeila Ghaffari - Default value 362575f8106SLeila Ghaffari - Unit 363ea10196cSJeremy L Thompson 364575f8106SLeila Ghaffari* - `-center` 365575f8106SLeila Ghaffari - Location of vortex center 366575f8106SLeila Ghaffari - `(lx,ly,lz)/2` 367575f8106SLeila Ghaffari - `(m,m,m)` 368ea10196cSJeremy L Thompson 369575f8106SLeila Ghaffari* - `-units_meter` 370575f8106SLeila Ghaffari - 1 meter in scaled length units 371575f8106SLeila Ghaffari - `1E-2` 372575f8106SLeila Ghaffari - 373ea10196cSJeremy L Thompson 374575f8106SLeila Ghaffari* - `-units_second` 375575f8106SLeila Ghaffari - 1 second in scaled time units 376575f8106SLeila Ghaffari - `1E-2` 377575f8106SLeila Ghaffari - 378ea10196cSJeremy L Thompson 379575f8106SLeila Ghaffari* - `-mean_velocity` 380575f8106SLeila Ghaffari - Background velocity vector 381575f8106SLeila Ghaffari - `(1,1,0)` 382575f8106SLeila Ghaffari - 383ea10196cSJeremy L Thompson 384575f8106SLeila Ghaffari* - `-vortex_strength` 385575f8106SLeila Ghaffari - Strength of vortex < 10 386575f8106SLeila Ghaffari - `5` 387575f8106SLeila Ghaffari - 388d8a22b9eSJed Brown 389d8a22b9eSJed Brown* - `-c_tau` 390d8a22b9eSJed Brown - Stabilization constant 391f821ee77SLeila Ghaffari - `0.5` 392d8a22b9eSJed Brown - 393575f8106SLeila Ghaffari::: 394ea10196cSJeremy L Thompson 395575f8106SLeila GhaffariThis problem can be run with: 396ea10196cSJeremy L Thompson 397575f8106SLeila Ghaffari``` 398f4277be3SLeila 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. 399575f8106SLeila Ghaffari``` 400ea10196cSJeremy L Thompson 401af8870a9STimothy Aiken#### Sod shock tube 402af8870a9STimothy Aiken 403af8870a9STimothy AikenFor the Shock Tube problem, the following additional command-line options are available: 404af8870a9STimothy Aiken 405af8870a9STimothy Aiken:::{list-table} Shock Tube Runtime Options 406af8870a9STimothy Aiken:header-rows: 1 407af8870a9STimothy Aiken 408af8870a9STimothy Aiken* - Option 409af8870a9STimothy Aiken - Description 410af8870a9STimothy Aiken - Default value 411af8870a9STimothy Aiken - Unit 412af8870a9STimothy Aiken 413af8870a9STimothy Aiken* - `-units_meter` 414af8870a9STimothy Aiken - 1 meter in scaled length units 415af8870a9STimothy Aiken - `1E-2` 416af8870a9STimothy Aiken - 417af8870a9STimothy Aiken 418af8870a9STimothy Aiken* - `-units_second` 419af8870a9STimothy Aiken - 1 second in scaled time units 420af8870a9STimothy Aiken - `1E-2` 421af8870a9STimothy Aiken - 422af8870a9STimothy Aiken 423af8870a9STimothy Aiken* - `-yzb` 424af8870a9STimothy Aiken - Use YZB discontinuity capturing 425af8870a9STimothy Aiken - `none` 426af8870a9STimothy Aiken - 427af8870a9STimothy Aiken 428af8870a9STimothy Aiken* - `-stab` 429af8870a9STimothy Aiken - Stabilization method (`none`, `su`, or `supg`) 430af8870a9STimothy Aiken - `none` 431af8870a9STimothy Aiken - 432af8870a9STimothy Aiken::: 433af8870a9STimothy Aiken 434af8870a9STimothy AikenThis problem can be run with: 435af8870a9STimothy Aiken 436af8870a9STimothy Aiken``` 437af8870a9STimothy 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 438af8870a9STimothy Aiken``` 439af8870a9STimothy Aiken 440af8870a9STimothy Aiken### Newtonian viscosity, Ideal Gas 441af8870a9STimothy Aiken 442bb8a0c61SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available: 443ea10196cSJeremy L Thompson 444bb8a0c61SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options 445575f8106SLeila Ghaffari:header-rows: 1 446ea10196cSJeremy L Thompson 447575f8106SLeila Ghaffari* - Option 448575f8106SLeila Ghaffari - Description 449575f8106SLeila Ghaffari - Default value 450575f8106SLeila Ghaffari - Unit 451ea10196cSJeremy L Thompson 452575f8106SLeila Ghaffari* - `-units_meter` 453575f8106SLeila Ghaffari - 1 meter in scaled length units 454bb8a0c61SJames Wright - `1` 455575f8106SLeila Ghaffari - 456ea10196cSJeremy L Thompson 457575f8106SLeila Ghaffari* - `-units_second` 458575f8106SLeila Ghaffari - 1 second in scaled time units 459bb8a0c61SJames Wright - `1` 460575f8106SLeila Ghaffari - 461ea10196cSJeremy L Thompson 462575f8106SLeila Ghaffari* - `-units_kilogram` 463575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 464bb8a0c61SJames Wright - `1` 465575f8106SLeila Ghaffari - 466ea10196cSJeremy L Thompson 467575f8106SLeila Ghaffari* - `-units_Kelvin` 468575f8106SLeila Ghaffari - 1 Kelvin in scaled temperature units 469575f8106SLeila Ghaffari - `1` 470575f8106SLeila Ghaffari - 471ea10196cSJeremy L Thompson 472575f8106SLeila Ghaffari* - `-stab` 473575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 474575f8106SLeila Ghaffari - `none` 475575f8106SLeila Ghaffari - 476ea10196cSJeremy L Thompson 477d8a22b9eSJed Brown* - `-c_tau` 478bb8a0c61SJames Wright - Stabilization constant, $c_\tau$ 479f821ee77SLeila Ghaffari - `0.5` 480d8a22b9eSJed Brown - 481d8a22b9eSJed Brown 482bb8a0c61SJames Wright* - `-Ctau_t` 483bb8a0c61SJames Wright - Stabilization time constant, $C_t$ 484bb8a0c61SJames Wright - `1.0` 485bb8a0c61SJames Wright - 486ea10196cSJeremy L Thompson 487bb8a0c61SJames Wright* - `-Ctau_v` 488bb8a0c61SJames Wright - Stabilization viscous constant, $C_v$ 489bb8a0c61SJames Wright - `36.0` 490bb8a0c61SJames Wright - 491ea10196cSJeremy L Thompson 492bb8a0c61SJames Wright* - `-Ctau_C` 493bb8a0c61SJames Wright - Stabilization continuity constant, $C_c$ 494bb8a0c61SJames Wright - `1.0` 495bb8a0c61SJames Wright - 496ea10196cSJeremy L Thompson 497bb8a0c61SJames Wright* - `-Ctau_M` 498bb8a0c61SJames Wright - Stabilization momentum constant, $C_m$ 499bb8a0c61SJames Wright - `1.0` 500bb8a0c61SJames Wright - 501bb8a0c61SJames Wright 502bb8a0c61SJames Wright* - `-Ctau_E` 503bb8a0c61SJames Wright - Stabilization energy constant, $C_E$ 504bb8a0c61SJames Wright - `1.0` 505bb8a0c61SJames Wright - 506ea10196cSJeremy L Thompson 507575f8106SLeila Ghaffari* - `-cv` 508575f8106SLeila Ghaffari - Heat capacity at constant volume 509575f8106SLeila Ghaffari - `717` 510575f8106SLeila Ghaffari - `J/(kg K)` 511ea10196cSJeremy L Thompson 512575f8106SLeila Ghaffari* - `-cp` 513575f8106SLeila Ghaffari - Heat capacity at constant pressure 514575f8106SLeila Ghaffari - `1004` 515575f8106SLeila Ghaffari - `J/(kg K)` 516ea10196cSJeremy L Thompson 517575f8106SLeila Ghaffari* - `-g` 518575f8106SLeila Ghaffari - Gravitational acceleration 519575f8106SLeila Ghaffari - `9.81` 520575f8106SLeila Ghaffari - `m/s^2` 521ea10196cSJeremy L Thompson 522575f8106SLeila Ghaffari* - `-lambda` 523575f8106SLeila Ghaffari - Stokes hypothesis second viscosity coefficient 524575f8106SLeila Ghaffari - `-2/3` 525575f8106SLeila Ghaffari - 526ea10196cSJeremy L Thompson 527575f8106SLeila Ghaffari* - `-mu` 528575f8106SLeila Ghaffari - Shear dynamic viscosity coefficient 529575f8106SLeila Ghaffari - `75` 530575f8106SLeila Ghaffari - `Pa s` 531a515125bSLeila Ghaffari 532575f8106SLeila Ghaffari* - `-k` 533575f8106SLeila Ghaffari - Thermal conductivity 534575f8106SLeila Ghaffari - `0.02638` 535575f8106SLeila Ghaffari - `W/(m K)` 536edd152dcSJed Brown 537edd152dcSJed Brown* - `-newtonian_unit_tests` 538edd152dcSJed Brown - Developer option to test properties 539edd152dcSJed Brown - `false` 540edd152dcSJed Brown - boolean 541aa61a79eSJames Wright 542ba952bfeSJames Wright* - `-state_var` 543ba952bfeSJames Wright - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$) 544ba952bfeSJames Wright - `conservative` 545ba952bfeSJames Wright - string 546575f8106SLeila Ghaffari::: 547a515125bSLeila Ghaffari 54879b17980SJames Wright#### Newtonian Wave 54979b17980SJames Wright 55079b17980SJames WrightThe newtonian wave problem the following command-line options are available in addition to the Newtonian Ideal Gas options: 55179b17980SJames Wright 552*ff82278dSJames Wright:::{list-table} Newtonian Wave Runtime Options 55379b17980SJames Wright:header-rows: 1 55479b17980SJames Wright 55579b17980SJames Wright* - Option 55679b17980SJames Wright - Description 55779b17980SJames Wright - Default value 55879b17980SJames Wright - Unit 55979b17980SJames Wright 560*ff82278dSJames Wright* - `-velocity_freestream` 56179b17980SJames Wright - Freestream velocity vector 56279b17980SJames Wright - `0,0,0` 56379b17980SJames Wright - `m/s` 56479b17980SJames Wright 565*ff82278dSJames Wright* - `-temperature_freestream` 56679b17980SJames Wright - Freestream temperature 56779b17980SJames Wright - `288` 56879b17980SJames Wright - `K` 56979b17980SJames Wright 570*ff82278dSJames Wright* - `-pressure_freestream` 571*ff82278dSJames Wright - Freestream pressure 57279b17980SJames Wright - `1.01e5` 57379b17980SJames Wright - `Pa` 57479b17980SJames Wright 57579b17980SJames Wright* - `-epicenter` 57679b17980SJames Wright - Coordinates of center of perturbation 57779b17980SJames Wright - `0,0,0` 57879b17980SJames Wright - `m` 57979b17980SJames Wright 58079b17980SJames Wright* - `-amplitude` 58179b17980SJames Wright - Amplitude of the perturbation 58279b17980SJames Wright - `0.1` 58379b17980SJames Wright - 58479b17980SJames Wright 58579b17980SJames Wright* - `-width` 58679b17980SJames Wright - Width parameter of the perturbation 58779b17980SJames Wright - `0.002` 58879b17980SJames Wright - `m` 58979b17980SJames Wright 59079b17980SJames Wright::: 59179b17980SJames Wright 59279b17980SJames WrightThis problem can be run with the `newtonianwave.yaml` file via: 59379b17980SJames Wright 59479b17980SJames Wright``` 59579b17980SJames Wright./navierstokes -options_file newtonianwave.yaml 59679b17980SJames Wright``` 59779b17980SJames Wright 59879b17980SJames Wright```{literalinclude} ../../../../../examples/fluids/newtonianwave.yaml 59979b17980SJames Wright:language: yaml 60079b17980SJames Wright``` 601edd152dcSJed Brown 602af8870a9STimothy Aiken#### Density current 603af8870a9STimothy Aiken 604b46bfc5eSJeremy L ThompsonThe Density Current problem the following command-line options are available in addition to the Newtonian Ideal Gas options: 605bb8a0c61SJames Wright 606bb8a0c61SJames Wright:::{list-table} Density Current Runtime Options 607bb8a0c61SJames Wright:header-rows: 1 608bb8a0c61SJames Wright 609bb8a0c61SJames Wright* - Option 610bb8a0c61SJames Wright - Description 611bb8a0c61SJames Wright - Default value 612bb8a0c61SJames Wright - Unit 613bb8a0c61SJames Wright 614bb8a0c61SJames Wright* - `-center` 615bb8a0c61SJames Wright - Location of bubble center 616bb8a0c61SJames Wright - `(lx,ly,lz)/2` 617bb8a0c61SJames Wright - `(m,m,m)` 618bb8a0c61SJames Wright 619bb8a0c61SJames Wright* - `-dc_axis` 620bb8a0c61SJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 621bb8a0c61SJames Wright - `(0,0,0)` 622bb8a0c61SJames Wright - 623bb8a0c61SJames Wright 624bb8a0c61SJames Wright* - `-rc` 625bb8a0c61SJames Wright - Characteristic radius of thermal bubble 626bb8a0c61SJames Wright - `1000` 627bb8a0c61SJames Wright - `m` 628bb8a0c61SJames Wright 629bb8a0c61SJames Wright* - `-theta0` 630bb8a0c61SJames Wright - Reference potential temperature 631bb8a0c61SJames Wright - `300` 632bb8a0c61SJames Wright - `K` 633bb8a0c61SJames Wright 634bb8a0c61SJames Wright* - `-thetaC` 635bb8a0c61SJames Wright - Perturbation of potential temperature 636bb8a0c61SJames Wright - `-15` 637bb8a0c61SJames Wright - `K` 638bb8a0c61SJames Wright 639bb8a0c61SJames Wright* - `-P0` 640bb8a0c61SJames Wright - Atmospheric pressure 641bb8a0c61SJames Wright - `1E5` 642bb8a0c61SJames Wright - `Pa` 643bb8a0c61SJames Wright 644bb8a0c61SJames Wright* - `-N` 645bb8a0c61SJames Wright - Brunt-Vaisala frequency 646bb8a0c61SJames Wright - `0.01` 647bb8a0c61SJames Wright - `1/s` 648bb8a0c61SJames Wright::: 649bb8a0c61SJames Wright 650575f8106SLeila GhaffariThis problem can be run with: 651ea10196cSJeremy L Thompson 652575f8106SLeila Ghaffari``` 653bb8a0c61SJames 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 654bb8a0c61SJames Wright``` 655bb8a0c61SJames Wright 656af8870a9STimothy Aiken#### Channel flow 657af8870a9STimothy Aiken 658b46bfc5eSJeremy L ThompsonThe Channel problem the following command-line options are available in addition to the Newtonian Ideal Gas options: 659bb8a0c61SJames Wright 660bb8a0c61SJames Wright:::{list-table} Channel Runtime Options 661bb8a0c61SJames Wright:header-rows: 1 662bb8a0c61SJames Wright 663bb8a0c61SJames Wright* - Option 664bb8a0c61SJames Wright - Description 665bb8a0c61SJames Wright - Default value 666bb8a0c61SJames Wright - Unit 667bb8a0c61SJames Wright 668bb8a0c61SJames Wright* - `-umax` 669bb8a0c61SJames Wright - Maximum/centerline velocity of the flow 670bb8a0c61SJames Wright - `10` 671bb8a0c61SJames Wright - `m/s` 672bb8a0c61SJames Wright 673bb8a0c61SJames Wright* - `-theta0` 674bb8a0c61SJames Wright - Reference potential temperature 675bb8a0c61SJames Wright - `300` 676bb8a0c61SJames Wright - `K` 677bb8a0c61SJames Wright 678bb8a0c61SJames Wright* - `-P0` 679bb8a0c61SJames Wright - Atmospheric pressure 680bb8a0c61SJames Wright - `1E5` 681bb8a0c61SJames Wright - `Pa` 682edd152dcSJed Brown 683edd152dcSJed Brown* - `-body_force_scale` 684edd152dcSJed Brown - Multiplier for body force (`-1` for flow reversal) 685edd152dcSJed Brown - 1 686edd152dcSJed Brown - 687bb8a0c61SJames Wright::: 688bb8a0c61SJames Wright 689bb8a0c61SJames WrightThis problem can be run with the `channel.yaml` file via: 690bb8a0c61SJames Wright 691bb8a0c61SJames Wright``` 692bb8a0c61SJames Wright./navierstokes -options_file channel.yaml 693bb8a0c61SJames Wright``` 694bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml 695bb8a0c61SJames Wright:language: yaml 696bb8a0c61SJames Wright``` 697bb8a0c61SJames Wright 698af8870a9STimothy Aiken#### Blasius boundary layer 699af8870a9STimothy Aiken 700b46bfc5eSJeremy L ThompsonThe Blasius problem the following command-line options are available in addition to the Newtonian Ideal Gas options: 701bb8a0c61SJames Wright 702bb8a0c61SJames Wright:::{list-table} Blasius Runtime Options 703bb8a0c61SJames Wright:header-rows: 1 704bb8a0c61SJames Wright 705bb8a0c61SJames Wright* - Option 706bb8a0c61SJames Wright - Description 707bb8a0c61SJames Wright - Default value 708bb8a0c61SJames Wright - Unit 709bb8a0c61SJames Wright 710aef1eb53SLeila Ghaffari* - `-velocity_infinity` 711bb8a0c61SJames Wright - Freestream velocity 712bb8a0c61SJames Wright - `40` 713bb8a0c61SJames Wright - `m/s` 714bb8a0c61SJames Wright 715aef1eb53SLeila Ghaffari* - `-temperature_infinity` 716aef1eb53SLeila Ghaffari - Freestream temperature 717bb8a0c61SJames Wright - `288` 718bb8a0c61SJames Wright - `K` 719bb8a0c61SJames Wright 720aef1eb53SLeila Ghaffari* - `-temperature_wall` 721aef1eb53SLeila Ghaffari - Wall temperature 7220d850f2eSLeila Ghaffari - `288` 723aef1eb53SLeila Ghaffari - `K` 724aef1eb53SLeila Ghaffari 725aef1eb53SLeila Ghaffari* - `-delta0` 726aef1eb53SLeila Ghaffari - Boundary layer height at the inflow 727aef1eb53SLeila Ghaffari - `4.2e-3` 728aef1eb53SLeila Ghaffari - `m` 729aef1eb53SLeila Ghaffari 730bb8a0c61SJames Wright* - `-P0` 731bb8a0c61SJames Wright - Atmospheric pressure 732bb8a0c61SJames Wright - `1.01E5` 733bb8a0c61SJames Wright - `Pa` 734bb8a0c61SJames Wright 73598b448e2SJames Wright* - `-platemesh_refine_height` 73698b448e2SJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 737bb8a0c61SJames Wright - `5.9E-4` 738bb8a0c61SJames Wright - `m` 739bb8a0c61SJames Wright 74098b448e2SJames Wright* - `-platemesh_Ndelta` 74198b448e2SJames Wright - Number of elements to keep below `-platemesh_refine_height` 742bb8a0c61SJames Wright - `45` 743bb8a0c61SJames Wright - 744bb8a0c61SJames Wright 74598b448e2SJames Wright* - `-platemesh_growth` 746bb8a0c61SJames Wright - Growth rate of the elements in the refinement region 747bb8a0c61SJames Wright - `1.08` 748bb8a0c61SJames Wright - 749bb8a0c61SJames Wright 75098b448e2SJames Wright* - `-platemesh_top_angle` 751bb8a0c61SJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 752bb8a0c61SJames Wright - `5` 753bb8a0c61SJames Wright - `degrees` 754493642f1SJames Wright 755493642f1SJames Wright* - `-stg_use` 756493642f1SJames Wright - Whether to use stg for the inflow conditions 757493642f1SJames Wright - `false` 758493642f1SJames Wright - 75998b448e2SJames Wright 76098b448e2SJames Wright* - `-platemesh_y_node_locs_path` 76198b448e2SJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 76298b448e2SJames Wright - `""` 76398b448e2SJames Wright - 764aef1eb53SLeila Ghaffari 7650d850f2eSLeila Ghaffari* - `-n_chebyshev` 766aef1eb53SLeila Ghaffari - Number of Chebyshev terms 767aef1eb53SLeila Ghaffari - `20` 768aef1eb53SLeila Ghaffari - 769aef1eb53SLeila Ghaffari 7700d850f2eSLeila Ghaffari* - `-chebyshev_` 7710d850f2eSLeila Ghaffari - Prefix for Chebyshev snes solve 7720d850f2eSLeila Ghaffari - 7730d850f2eSLeila Ghaffari - 7740d850f2eSLeila Ghaffari 775bb8a0c61SJames Wright::: 776bb8a0c61SJames Wright 777bb8a0c61SJames WrightThis problem can be run with the `blasius.yaml` file via: 778bb8a0c61SJames Wright 779bb8a0c61SJames Wright``` 780bb8a0c61SJames Wright./navierstokes -options_file blasius.yaml 781bb8a0c61SJames Wright``` 782bb8a0c61SJames Wright 783bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml 784bb8a0c61SJames Wright:language: yaml 785575f8106SLeila Ghaffari``` 786493642f1SJames Wright 787493642f1SJames Wright#### STG Inflow for Flat Plate 788493642f1SJames Wright 789b46bfc5eSJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options: 790493642f1SJames Wright 791493642f1SJames Wright:::{list-table} Blasius Runtime Options 792493642f1SJames Wright:header-rows: 1 793493642f1SJames Wright 794493642f1SJames Wright* - Option 795493642f1SJames Wright - Description 796493642f1SJames Wright - Default value 797493642f1SJames Wright - Unit 798493642f1SJames Wright 799493642f1SJames Wright* - `-stg_inflow_path` 800493642f1SJames Wright - Path to the STGInflow file 801493642f1SJames Wright - `./STGInflow.dat` 802493642f1SJames Wright - 803493642f1SJames Wright 804493642f1SJames Wright* - `-stg_rand_path` 805493642f1SJames Wright - Path to the STGRand file 806493642f1SJames Wright - `./STGRand.dat` 807493642f1SJames Wright - 808493642f1SJames Wright 809493642f1SJames Wright* - `-stg_alpha` 810493642f1SJames Wright - Growth rate of the wavemodes 811493642f1SJames Wright - `1.01` 812493642f1SJames Wright - 813493642f1SJames Wright 814493642f1SJames Wright* - `-stg_u0` 815493642f1SJames Wright - Convective velocity, $U_0$ 816493642f1SJames Wright - `0.0` 817493642f1SJames Wright - `m/s` 818493642f1SJames Wright 819493642f1SJames Wright* - `-stg_mean_only` 820493642f1SJames Wright - Only impose the mean velocity (no fluctutations) 821493642f1SJames Wright - `false` 822493642f1SJames Wright - 823493642f1SJames Wright 82429ea39e3SJames Wright* - `-stg_strong` 82529ea39e3SJames Wright - Strongly enforce the STG inflow boundary condition 82629ea39e3SJames Wright - `false` 82729ea39e3SJames Wright - 82829ea39e3SJames Wright 829493642f1SJames Wright::: 830493642f1SJames Wright 831493642f1SJames WrightThis problem can be run with the `blasius.yaml` file via: 832493642f1SJames Wright 833493642f1SJames Wright``` 834493642f1SJames Wright./navierstokes -options_file blasius.yaml -stg_use true 835493642f1SJames Wright``` 836493642f1SJames Wright 837b46bfc5eSJeremy L ThompsonNote the added `-stg_use true` flag 838b46bfc5eSJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow. 839