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 651219168aSLeila Ghaffari - `0` 66ea10196cSJeremy L Thompson 67852e5969SJed Brown* - `-ts_monitor_solution` 68852e5969SJed Brown - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`) 69852e5969SJed Brown - 70ea10196cSJeremy L Thompson 71852e5969SJed Brown* - `-ts_monitor_solution_interval` 72852e5969SJed Brown - Number of time steps between visualization output frames. 73852e5969SJed Brown - `1` 74852e5969SJed Brown 75852e5969SJed Brown* - `-viewer_cgns_batch_size` 76852e5969SJed Brown - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 77852e5969SJed Brown - `20` 78852e5969SJed Brown 79852e5969SJed Brown* - `-checkpoint_interval` 80852e5969SJed Brown - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only 81575f8106SLeila Ghaffari - `10` 82ea10196cSJeremy L Thompson 83852e5969SJed Brown* - `-checkpoint_vtk` 84852e5969SJed Brown - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead. 85852e5969SJed Brown - `false` 86852e5969SJed Brown 87852e5969SJed Brown* - `-viz_refine` 88852e5969SJed Brown - Use regular refinement for VTK visualization 89852e5969SJed Brown - `0` 90852e5969SJed Brown 91575f8106SLeila Ghaffari* - `-output_dir` 92852e5969SJed Brown - Output directory for binary checkpoints and VTK files (if enabled). 93575f8106SLeila Ghaffari - `.` 94ea10196cSJeremy L Thompson 9591a36801SJames Wright* - `-output_add_stepnum2bin` 9691a36801SJames Wright - Whether to add step numbers to output binary files 9791a36801SJames Wright - `false` 9891a36801SJames Wright 9991a36801SJames Wright* - `-continue` 10091a36801SJames Wright - Continue from previous solution (input is step number of previous solution) 10191a36801SJames Wright - `0` 10291a36801SJames Wright 10391a36801SJames Wright* - `-continue_filename` 10491a36801SJames Wright - Path to solution binary file from which to continue from 10591a36801SJames Wright - `[output_dir]/ns-solution.bin` 10691a36801SJames Wright 10791a36801SJames Wright* - `-continue_time_filename` 1089293eaa1SJed Brown - Path to time stamp binary file (only for legacy checkpoints) 10991a36801SJames Wright - `[output_dir]/ns-time.bin` 11091a36801SJames Wright 111f4277be3SLeila Ghaffari* - `-bc_wall` 112f4277be3SLeila Ghaffari - Use wall boundary conditions on this list of faces 113f4277be3SLeila Ghaffari - 114f4277be3SLeila Ghaffari 115f4277be3SLeila Ghaffari* - `-wall_comps` 116f4277be3SLeila Ghaffari - An array of constrained component numbers for wall BCs 117f4277be3SLeila Ghaffari - 118f4277be3SLeila Ghaffari 119f4277be3SLeila Ghaffari* - `-bc_slip_x` 120f4277be3SLeila Ghaffari - Use slip boundary conditions, for the x component, on this list of faces 121f4277be3SLeila Ghaffari - 122f4277be3SLeila Ghaffari 123f4277be3SLeila Ghaffari* - `-bc_slip_y` 124f4277be3SLeila Ghaffari - Use slip boundary conditions, for the y component, on this list of faces 125f4277be3SLeila Ghaffari - 126f4277be3SLeila Ghaffari 127f4277be3SLeila Ghaffari* - `-bc_slip_z` 128f4277be3SLeila Ghaffari - Use slip boundary conditions, for the z component, on this list of faces 129f4277be3SLeila Ghaffari - 130f4277be3SLeila Ghaffari 131f4277be3SLeila Ghaffari* - `-bc_inflow` 132f4277be3SLeila Ghaffari - Use inflow boundary conditions on this list of faces 133f4277be3SLeila Ghaffari - 134f4277be3SLeila Ghaffari 135f4277be3SLeila Ghaffari* - `-bc_outflow` 136f4277be3SLeila Ghaffari - Use outflow boundary conditions on this list of faces 137f4277be3SLeila Ghaffari - 1388ef11c93SLeila Ghaffari 13979b17980SJames Wright* - `-bc_freestream` 14079b17980SJames Wright - Use freestream boundary conditions on this list of faces 14179b17980SJames Wright - 14279b17980SJames Wright 143*c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval` 144a8ce54bfSJames Wright - Number of timesteps between statistics collection 145a8ce54bfSJames Wright - `1` 146a8ce54bfSJames Wright 147*c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer` 148*c931fa59SJames Wright - Sets the PetscViewer for the statistics file writing, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`). Also turns the statistics collection on. 149109cd75bSJames Wright - 150109cd75bSJames Wright 151*c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval` 152a8ce54bfSJames Wright - Number of timesteps between statistics file writing (`-1` means only at end of run) 153a8ce54bfSJames Wright - `-1` 154a8ce54bfSJames Wright 155*c931fa59SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size` 156109cd75bSJames Wright - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 157109cd75bSJames Wright - `20` 158109cd75bSJames Wright 159575f8106SLeila Ghaffari* - `-snes_view` 160575f8106SLeila Ghaffari - View PETSc `SNES` nonlinear solver configuration 161575f8106SLeila Ghaffari - 1628ef11c93SLeila Ghaffari 163575f8106SLeila Ghaffari* - `-log_view` 164575f8106SLeila Ghaffari - View PETSc performance log 165575f8106SLeila Ghaffari - 166ea10196cSJeremy L Thompson 167575f8106SLeila Ghaffari* - `-help` 168575f8106SLeila Ghaffari - View comprehensive information about run-time options 169575f8106SLeila Ghaffari - 170575f8106SLeila Ghaffari::: 171ea10196cSJeremy L Thompson 17279b17980SJames 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: 173f4277be3SLeila Ghaffari 174bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels 175bb8a0c61SJames Wright:header-rows: 1 176bb8a0c61SJames Wright* - PETSc Face Name 177bb8a0c61SJames Wright - Cartesian direction 178bb8a0c61SJames Wright - Face ID 179bb8a0c61SJames Wright 180bb8a0c61SJames Wright* - faceMarkerBottom 181bb8a0c61SJames Wright - -z 182bb8a0c61SJames Wright - 1 183bb8a0c61SJames Wright 184bb8a0c61SJames Wright* - faceMarkerRight 185bb8a0c61SJames Wright - +x 186bb8a0c61SJames Wright - 2 187bb8a0c61SJames Wright 188bb8a0c61SJames Wright* - faceMarkerTop 189bb8a0c61SJames Wright - +z 190bb8a0c61SJames Wright - 3 191bb8a0c61SJames Wright 192bb8a0c61SJames Wright* - faceMarkerLeft 193bb8a0c61SJames Wright - -x 194bb8a0c61SJames Wright - 4 195bb8a0c61SJames Wright::: 196bb8a0c61SJames Wright 197bb8a0c61SJames Wright:::{list-table} 2D Face ID Labels 198bb8a0c61SJames Wright:header-rows: 1 199bb8a0c61SJames Wright* - PETSc Face Name 200bb8a0c61SJames Wright - Cartesian direction 201bb8a0c61SJames Wright - Face ID 202bb8a0c61SJames Wright 203bb8a0c61SJames Wright* - faceMarkerBottom 204bb8a0c61SJames Wright - -z 205bb8a0c61SJames Wright - 1 206bb8a0c61SJames Wright 207bb8a0c61SJames Wright* - faceMarkerTop 208bb8a0c61SJames Wright - +z 209bb8a0c61SJames Wright - 2 210bb8a0c61SJames Wright 211bb8a0c61SJames Wright* - faceMarkerFront 212bb8a0c61SJames Wright - -y 213bb8a0c61SJames Wright - 3 214bb8a0c61SJames Wright 215bb8a0c61SJames Wright* - faceMarkerBack 216bb8a0c61SJames Wright - +y 217bb8a0c61SJames Wright - 4 218bb8a0c61SJames Wright 219bb8a0c61SJames Wright* - faceMarkerRight 220bb8a0c61SJames Wright - +x 221bb8a0c61SJames Wright - 5 222bb8a0c61SJames Wright 223bb8a0c61SJames Wright* - faceMarkerLeft 224bb8a0c61SJames Wright - -x 225bb8a0c61SJames Wright - 6 226bb8a0c61SJames Wright::: 227f4277be3SLeila Ghaffari 228c8c30d87SJed Brown### Boundary conditions 229c8c30d87SJed Brown 230c8c30d87SJed BrownBoundary conditions for compressible viscous flows are notoriously tricky. Here we offer some recommendations 231c8c30d87SJed Brown 232c8c30d87SJed Brown#### Inflow 233c8c30d87SJed Brown 234c8c30d87SJed BrownIf in a region where the flow velocity is known (e.g., away from viscous walls), use `bc_freestream`, which solves a Riemann problem and can handle inflow and outflow (simultaneously and dynamically). 235c8c30d87SJed BrownIt is stable and the least reflective boundary condition for acoustics. 236c8c30d87SJed Brown 237c8c30d87SJed BrownIf near a viscous wall, you may want a specified inflow profile. 238c8c30d87SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles. 239c8c30d87SJed BrownThese conditions may be either weak or strong, with the latter specifying velocity and temperature as essential boundary conditions and evaluating a boundary integral for the mass flux. 240c8c30d87SJed BrownThe strong approach gives sharper resolution of velocity structures. 241c8c30d87SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent. 242c8c30d87SJed Brown 243c8c30d87SJed Brown### Outflow 244c8c30d87SJed Brown 245c8c30d87SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures. 246c8c30d87SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections. 247c8c30d87SJed BrownThe default Riemann solver, HLLC, is sufficient in this regard while the simpler HLL converts thermal structures exiting the domain into grid-scale reflecting acoustics. 248c8c30d87SJed Brown 249c8c30d87SJed BrownIf acoustic reflections are not a concern and/or the flow is impacted by walls or interior structures that you wish to resolve to near the boundary, choose `bc_outflow`. This condition (with default `outflow_type: riemann`) is stable for both inflow and outflow, so can be used in areas that have recirculation and lateral boundaries in which the flow fluctuates. 250c8c30d87SJed Brown 251c8c30d87SJed BrownThe simpler `bc_outflow` variant, `outflow_type: pressure`, requires that the flow be a strict outflow (or the problem becomes ill-posed and the solver will diverge). 252c8c30d87SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow. 253c8c30d87SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use. 254c8c30d87SJed Brown 255c8c30d87SJed Brown### Periodicity 256c8c30d87SJed Brown 257c8c30d87SJed BrownPETSc provides two ways to specify periodicity: 258c8c30d87SJed Brown 259c8c30d87SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using: 260c8c30d87SJed Brown 261c8c30d87SJed Brown``` yaml 262c8c30d87SJed Browndm_plex: 263c8c30d87SJed Brown shape: box 264c8c30d87SJed Brown box_faces: 10,12,4 265c8c30d87SJed Brown box_bd: none,none,periodic 266c8c30d87SJed Brown``` 267c8c30d87SJed Brown 268c8c30d87SJed BrownThe coordinates for such cases are stored as a new field, and 269c8c30d87SJed Brown 270af8870a9STimothy Aiken### Advection 271af8870a9STimothy Aiken 272b46bfc5eSJeremy 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$. 273b46bfc5eSJeremy L ThompsonThese are available in 2D and 3D. 274af8870a9STimothy Aiken 275af8870a9STimothy Aiken#### 2D advection 276af8870a9STimothy Aiken 277575f8106SLeila GhaffariFor the 2D advection problem, the following additional command-line options are available: 278ea10196cSJeremy L Thompson 279575f8106SLeila Ghaffari:::{list-table} Advection2D Runtime Options 280575f8106SLeila Ghaffari:header-rows: 1 2818ef11c93SLeila Ghaffari 282575f8106SLeila Ghaffari* - Option 283575f8106SLeila Ghaffari - Description 284575f8106SLeila Ghaffari - Default value 285575f8106SLeila Ghaffari - Unit 2868ef11c93SLeila Ghaffari 287575f8106SLeila Ghaffari* - `-rc` 288575f8106SLeila Ghaffari - Characteristic radius of thermal bubble 289575f8106SLeila Ghaffari - `1000` 290575f8106SLeila Ghaffari - `m` 2918ef11c93SLeila Ghaffari 292575f8106SLeila Ghaffari* - `-units_meter` 293575f8106SLeila Ghaffari - 1 meter in scaled length units 294575f8106SLeila Ghaffari - `1E-2` 295575f8106SLeila Ghaffari - 2968ef11c93SLeila Ghaffari 297575f8106SLeila Ghaffari* - `-units_second` 298575f8106SLeila Ghaffari - 1 second in scaled time units 299575f8106SLeila Ghaffari - `1E-2` 300575f8106SLeila Ghaffari - 3018ef11c93SLeila Ghaffari 302575f8106SLeila Ghaffari* - `-units_kilogram` 303575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 304575f8106SLeila Ghaffari - `1E-6` 305575f8106SLeila Ghaffari - 306a515125bSLeila Ghaffari 307575f8106SLeila Ghaffari* - `-strong_form` 308575f8106SLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 309575f8106SLeila Ghaffari - `0` 310575f8106SLeila Ghaffari - 311a515125bSLeila Ghaffari 312575f8106SLeila Ghaffari* - `-stab` 313575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 314575f8106SLeila Ghaffari - `none` 315575f8106SLeila Ghaffari - 316a515125bSLeila Ghaffari 317575f8106SLeila Ghaffari* - `-CtauS` 318575f8106SLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 319575f8106SLeila Ghaffari - `0` 320575f8106SLeila Ghaffari - 321a515125bSLeila Ghaffari 322575f8106SLeila Ghaffari* - `-wind_type` 323575f8106SLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 324575f8106SLeila Ghaffari - `rotation` 325575f8106SLeila Ghaffari - 326a515125bSLeila Ghaffari 327575f8106SLeila Ghaffari* - `-wind_translation` 328575f8106SLeila Ghaffari - Constant wind vector when `-wind_type translation` 329575f8106SLeila Ghaffari - `1,0,0` 330575f8106SLeila Ghaffari - 3318ef11c93SLeila Ghaffari 332575f8106SLeila Ghaffari* - `-E_wind` 333575f8106SLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 334575f8106SLeila Ghaffari - `1E6` 335575f8106SLeila Ghaffari - `J` 336575f8106SLeila Ghaffari::: 337268c6924SLeila Ghaffari 338575f8106SLeila GhaffariAn example of the `rotation` mode can be run with: 339268c6924SLeila Ghaffari 340575f8106SLeila Ghaffari``` 341f4277be3SLeila 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 342575f8106SLeila Ghaffari``` 343268c6924SLeila Ghaffari 344575f8106SLeila Ghaffariand the `translation` mode with: 345268c6924SLeila Ghaffari 346575f8106SLeila Ghaffari``` 347f4277be3SLeila 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 348575f8106SLeila Ghaffari``` 349f4277be3SLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 350268c6924SLeila Ghaffari 351af8870a9STimothy Aiken#### 3D advection 352af8870a9STimothy Aiken 353575f8106SLeila GhaffariFor the 3D advection problem, the following additional command-line options are available: 354268c6924SLeila Ghaffari 355575f8106SLeila Ghaffari:::{list-table} Advection3D Runtime Options 356575f8106SLeila Ghaffari:header-rows: 1 357268c6924SLeila Ghaffari 358575f8106SLeila Ghaffari* - Option 359575f8106SLeila Ghaffari - Description 360575f8106SLeila Ghaffari - Default value 361575f8106SLeila Ghaffari - Unit 362268c6924SLeila Ghaffari 363575f8106SLeila Ghaffari* - `-rc` 364575f8106SLeila Ghaffari - Characteristic radius of thermal bubble 365575f8106SLeila Ghaffari - `1000` 366575f8106SLeila Ghaffari - `m` 367268c6924SLeila Ghaffari 368575f8106SLeila Ghaffari* - `-units_meter` 369575f8106SLeila Ghaffari - 1 meter in scaled length units 370575f8106SLeila Ghaffari - `1E-2` 371575f8106SLeila Ghaffari - 372268c6924SLeila Ghaffari 373575f8106SLeila Ghaffari* - `-units_second` 374575f8106SLeila Ghaffari - 1 second in scaled time units 375575f8106SLeila Ghaffari - `1E-2` 376575f8106SLeila Ghaffari - 377268c6924SLeila Ghaffari 378575f8106SLeila Ghaffari* - `-units_kilogram` 379575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 380575f8106SLeila Ghaffari - `1E-6` 381575f8106SLeila Ghaffari - 382268c6924SLeila Ghaffari 383575f8106SLeila Ghaffari* - `-strong_form` 384575f8106SLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 385575f8106SLeila Ghaffari - `0` 386575f8106SLeila Ghaffari - 387268c6924SLeila Ghaffari 388575f8106SLeila Ghaffari* - `-stab` 389575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 390575f8106SLeila Ghaffari - `none` 391575f8106SLeila Ghaffari - 392268c6924SLeila Ghaffari 393575f8106SLeila Ghaffari* - `-CtauS` 394575f8106SLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 395575f8106SLeila Ghaffari - `0` 396575f8106SLeila Ghaffari - 397268c6924SLeila Ghaffari 398575f8106SLeila Ghaffari* - `-wind_type` 399575f8106SLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 400575f8106SLeila Ghaffari - `rotation` 401575f8106SLeila Ghaffari - 402268c6924SLeila Ghaffari 403575f8106SLeila Ghaffari* - `-wind_translation` 404575f8106SLeila Ghaffari - Constant wind vector when `-wind_type translation` 405575f8106SLeila Ghaffari - `1,0,0` 406575f8106SLeila Ghaffari - 407268c6924SLeila Ghaffari 408575f8106SLeila Ghaffari* - `-E_wind` 409575f8106SLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 410575f8106SLeila Ghaffari - `1E6` 411575f8106SLeila Ghaffari - `J` 412268c6924SLeila Ghaffari 413575f8106SLeila Ghaffari* - `-bubble_type` 414575f8106SLeila Ghaffari - `sphere` (3D) or `cylinder` (2D) 415575f8106SLeila Ghaffari - `shpere` 416575f8106SLeila Ghaffari - 417268c6924SLeila Ghaffari 418575f8106SLeila Ghaffari* - `-bubble_continuity` 419575f8106SLeila Ghaffari - `smooth`, `back_sharp`, or `thick` 420575f8106SLeila Ghaffari - `smooth` 421575f8106SLeila Ghaffari - 422575f8106SLeila Ghaffari::: 423ea10196cSJeremy L Thompson 424575f8106SLeila GhaffariAn example of the `rotation` mode can be run with: 425ea10196cSJeremy L Thompson 426575f8106SLeila Ghaffari``` 427f4277be3SLeila 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 428575f8106SLeila Ghaffari``` 429ea10196cSJeremy L Thompson 430575f8106SLeila Ghaffariand the `translation` mode with: 431ea10196cSJeremy L Thompson 432575f8106SLeila Ghaffari``` 433f4277be3SLeila 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 434575f8106SLeila Ghaffari``` 435ea10196cSJeremy L Thompson 436af8870a9STimothy Aiken### Inviscid Ideal Gas 437af8870a9STimothy Aiken 438af8870a9STimothy Aiken#### Isentropic Euler vortex 439af8870a9STimothy Aiken 440575f8106SLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available: 441ea10196cSJeremy L Thompson 442575f8106SLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options 443575f8106SLeila Ghaffari:header-rows: 1 444ea10196cSJeremy L Thompson 445575f8106SLeila Ghaffari* - Option 446575f8106SLeila Ghaffari - Description 447575f8106SLeila Ghaffari - Default value 448575f8106SLeila Ghaffari - Unit 449ea10196cSJeremy L Thompson 450575f8106SLeila Ghaffari* - `-center` 451575f8106SLeila Ghaffari - Location of vortex center 452575f8106SLeila Ghaffari - `(lx,ly,lz)/2` 453575f8106SLeila Ghaffari - `(m,m,m)` 454ea10196cSJeremy L Thompson 455575f8106SLeila Ghaffari* - `-units_meter` 456575f8106SLeila Ghaffari - 1 meter in scaled length units 457575f8106SLeila Ghaffari - `1E-2` 458575f8106SLeila Ghaffari - 459ea10196cSJeremy L Thompson 460575f8106SLeila Ghaffari* - `-units_second` 461575f8106SLeila Ghaffari - 1 second in scaled time units 462575f8106SLeila Ghaffari - `1E-2` 463575f8106SLeila Ghaffari - 464ea10196cSJeremy L Thompson 465575f8106SLeila Ghaffari* - `-mean_velocity` 466575f8106SLeila Ghaffari - Background velocity vector 467575f8106SLeila Ghaffari - `(1,1,0)` 468575f8106SLeila Ghaffari - 469ea10196cSJeremy L Thompson 470575f8106SLeila Ghaffari* - `-vortex_strength` 471575f8106SLeila Ghaffari - Strength of vortex < 10 472575f8106SLeila Ghaffari - `5` 473575f8106SLeila Ghaffari - 474d8a22b9eSJed Brown 475d8a22b9eSJed Brown* - `-c_tau` 476d8a22b9eSJed Brown - Stabilization constant 477f821ee77SLeila Ghaffari - `0.5` 478d8a22b9eSJed Brown - 479575f8106SLeila Ghaffari::: 480ea10196cSJeremy L Thompson 481575f8106SLeila GhaffariThis problem can be run with: 482ea10196cSJeremy L Thompson 483575f8106SLeila Ghaffari``` 484f4277be3SLeila 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. 485575f8106SLeila Ghaffari``` 486ea10196cSJeremy L Thompson 487af8870a9STimothy Aiken#### Sod shock tube 488af8870a9STimothy Aiken 489af8870a9STimothy AikenFor the Shock Tube problem, the following additional command-line options are available: 490af8870a9STimothy Aiken 491af8870a9STimothy Aiken:::{list-table} Shock Tube Runtime Options 492af8870a9STimothy Aiken:header-rows: 1 493af8870a9STimothy Aiken 494af8870a9STimothy Aiken* - Option 495af8870a9STimothy Aiken - Description 496af8870a9STimothy Aiken - Default value 497af8870a9STimothy Aiken - Unit 498af8870a9STimothy Aiken 499af8870a9STimothy Aiken* - `-units_meter` 500af8870a9STimothy Aiken - 1 meter in scaled length units 501af8870a9STimothy Aiken - `1E-2` 502af8870a9STimothy Aiken - 503af8870a9STimothy Aiken 504af8870a9STimothy Aiken* - `-units_second` 505af8870a9STimothy Aiken - 1 second in scaled time units 506af8870a9STimothy Aiken - `1E-2` 507af8870a9STimothy Aiken - 508af8870a9STimothy Aiken 509af8870a9STimothy Aiken* - `-yzb` 510af8870a9STimothy Aiken - Use YZB discontinuity capturing 511af8870a9STimothy Aiken - `none` 512af8870a9STimothy Aiken - 513af8870a9STimothy Aiken 514af8870a9STimothy Aiken* - `-stab` 515af8870a9STimothy Aiken - Stabilization method (`none`, `su`, or `supg`) 516af8870a9STimothy Aiken - `none` 517af8870a9STimothy Aiken - 518af8870a9STimothy Aiken::: 519af8870a9STimothy Aiken 520af8870a9STimothy AikenThis problem can be run with: 521af8870a9STimothy Aiken 522af8870a9STimothy Aiken``` 523af8870a9STimothy 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 524af8870a9STimothy Aiken``` 525af8870a9STimothy Aiken 526af8870a9STimothy Aiken### Newtonian viscosity, Ideal Gas 527af8870a9STimothy Aiken 528bb8a0c61SJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available: 529ea10196cSJeremy L Thompson 530bb8a0c61SJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options 531575f8106SLeila Ghaffari:header-rows: 1 532ea10196cSJeremy L Thompson 533575f8106SLeila Ghaffari* - Option 534575f8106SLeila Ghaffari - Description 535575f8106SLeila Ghaffari - Default value 536575f8106SLeila Ghaffari - Unit 537ea10196cSJeremy L Thompson 538575f8106SLeila Ghaffari* - `-units_meter` 539575f8106SLeila Ghaffari - 1 meter in scaled length units 540bb8a0c61SJames Wright - `1` 541575f8106SLeila Ghaffari - 542ea10196cSJeremy L Thompson 543575f8106SLeila Ghaffari* - `-units_second` 544575f8106SLeila Ghaffari - 1 second in scaled time units 545bb8a0c61SJames Wright - `1` 546575f8106SLeila Ghaffari - 547ea10196cSJeremy L Thompson 548575f8106SLeila Ghaffari* - `-units_kilogram` 549575f8106SLeila Ghaffari - 1 kilogram in scaled mass units 550bb8a0c61SJames Wright - `1` 551575f8106SLeila Ghaffari - 552ea10196cSJeremy L Thompson 553575f8106SLeila Ghaffari* - `-units_Kelvin` 554575f8106SLeila Ghaffari - 1 Kelvin in scaled temperature units 555575f8106SLeila Ghaffari - `1` 556575f8106SLeila Ghaffari - 557ea10196cSJeremy L Thompson 558575f8106SLeila Ghaffari* - `-stab` 559575f8106SLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 560575f8106SLeila Ghaffari - `none` 561575f8106SLeila Ghaffari - 562ea10196cSJeremy L Thompson 563d8a22b9eSJed Brown* - `-c_tau` 564bb8a0c61SJames Wright - Stabilization constant, $c_\tau$ 565f821ee77SLeila Ghaffari - `0.5` 566d8a22b9eSJed Brown - 567d8a22b9eSJed Brown 568bb8a0c61SJames Wright* - `-Ctau_t` 569bb8a0c61SJames Wright - Stabilization time constant, $C_t$ 570bb8a0c61SJames Wright - `1.0` 571bb8a0c61SJames Wright - 572ea10196cSJeremy L Thompson 573bb8a0c61SJames Wright* - `-Ctau_v` 574bb8a0c61SJames Wright - Stabilization viscous constant, $C_v$ 575b5786772SLeila Ghaffari - `36, 60, 128 for degree = 1, 2, 3` 576bb8a0c61SJames Wright - 577ea10196cSJeremy L Thompson 578bb8a0c61SJames Wright* - `-Ctau_C` 579bb8a0c61SJames Wright - Stabilization continuity constant, $C_c$ 580bb8a0c61SJames Wright - `1.0` 581bb8a0c61SJames Wright - 582ea10196cSJeremy L Thompson 583bb8a0c61SJames Wright* - `-Ctau_M` 584bb8a0c61SJames Wright - Stabilization momentum constant, $C_m$ 585bb8a0c61SJames Wright - `1.0` 586bb8a0c61SJames Wright - 587bb8a0c61SJames Wright 588bb8a0c61SJames Wright* - `-Ctau_E` 589bb8a0c61SJames Wright - Stabilization energy constant, $C_E$ 590bb8a0c61SJames Wright - `1.0` 591bb8a0c61SJames Wright - 592ea10196cSJeremy L Thompson 593575f8106SLeila Ghaffari* - `-cv` 594575f8106SLeila Ghaffari - Heat capacity at constant volume 595575f8106SLeila Ghaffari - `717` 596575f8106SLeila Ghaffari - `J/(kg K)` 597ea10196cSJeremy L Thompson 598575f8106SLeila Ghaffari* - `-cp` 599575f8106SLeila Ghaffari - Heat capacity at constant pressure 600575f8106SLeila Ghaffari - `1004` 601575f8106SLeila Ghaffari - `J/(kg K)` 602ea10196cSJeremy L Thompson 603575f8106SLeila Ghaffari* - `-g` 604575f8106SLeila Ghaffari - Gravitational acceleration 605575f8106SLeila Ghaffari - `9.81` 606575f8106SLeila Ghaffari - `m/s^2` 607ea10196cSJeremy L Thompson 608575f8106SLeila Ghaffari* - `-lambda` 609575f8106SLeila Ghaffari - Stokes hypothesis second viscosity coefficient 610575f8106SLeila Ghaffari - `-2/3` 611575f8106SLeila Ghaffari - 612ea10196cSJeremy L Thompson 613575f8106SLeila Ghaffari* - `-mu` 614575f8106SLeila Ghaffari - Shear dynamic viscosity coefficient 615575f8106SLeila Ghaffari - `75` 616575f8106SLeila Ghaffari - `Pa s` 617a515125bSLeila Ghaffari 618575f8106SLeila Ghaffari* - `-k` 619575f8106SLeila Ghaffari - Thermal conductivity 620575f8106SLeila Ghaffari - `0.02638` 621575f8106SLeila Ghaffari - `W/(m K)` 622edd152dcSJed Brown 623edd152dcSJed Brown* - `-newtonian_unit_tests` 624edd152dcSJed Brown - Developer option to test properties 625edd152dcSJed Brown - `false` 626edd152dcSJed Brown - boolean 627aa61a79eSJames Wright 628ba952bfeSJames Wright* - `-state_var` 629ba952bfeSJames Wright - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$) 630ba952bfeSJames Wright - `conservative` 631ba952bfeSJames Wright - string 632575f8106SLeila Ghaffari::: 633a515125bSLeila Ghaffari 63479b17980SJames Wright#### Newtonian Wave 63579b17980SJames Wright 63683c686feSJames WrightThe newtonian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options: 63779b17980SJames Wright 638ff82278dSJames Wright:::{list-table} Newtonian Wave Runtime Options 63979b17980SJames Wright:header-rows: 1 64079b17980SJames Wright 64179b17980SJames Wright* - Option 64279b17980SJames Wright - Description 64379b17980SJames Wright - Default value 64479b17980SJames Wright - Unit 64579b17980SJames Wright 646edf614b5SJed Brown* - `-freestream_riemann` 647edf614b5SJed Brown - Riemann solver for boundaries (HLL or HLLC) 648edf614b5SJed Brown - `hllc` 649edf614b5SJed Brown - 650edf614b5SJed Brown 651edf614b5SJed Brown* - `-freestream_velocity` 65279b17980SJames Wright - Freestream velocity vector 65379b17980SJames Wright - `0,0,0` 65479b17980SJames Wright - `m/s` 65579b17980SJames Wright 656edf614b5SJed Brown* - `-freestream_temperature` 65779b17980SJames Wright - Freestream temperature 65879b17980SJames Wright - `288` 65979b17980SJames Wright - `K` 66079b17980SJames Wright 661edf614b5SJed Brown* - `-freestream_pressure` 662ff82278dSJames Wright - Freestream pressure 66379b17980SJames Wright - `1.01e5` 66479b17980SJames Wright - `Pa` 66579b17980SJames Wright 66679b17980SJames Wright* - `-epicenter` 66779b17980SJames Wright - Coordinates of center of perturbation 66879b17980SJames Wright - `0,0,0` 66979b17980SJames Wright - `m` 67079b17980SJames Wright 67179b17980SJames Wright* - `-amplitude` 67279b17980SJames Wright - Amplitude of the perturbation 67379b17980SJames Wright - `0.1` 67479b17980SJames Wright - 67579b17980SJames Wright 67679b17980SJames Wright* - `-width` 67779b17980SJames Wright - Width parameter of the perturbation 67879b17980SJames Wright - `0.002` 67979b17980SJames Wright - `m` 68079b17980SJames Wright 68179b17980SJames Wright::: 68279b17980SJames Wright 68379b17980SJames WrightThis problem can be run with the `newtonianwave.yaml` file via: 68479b17980SJames Wright 68579b17980SJames Wright``` 68679b17980SJames Wright./navierstokes -options_file newtonianwave.yaml 68779b17980SJames Wright``` 68879b17980SJames Wright 68979b17980SJames Wright```{literalinclude} ../../../../../examples/fluids/newtonianwave.yaml 69079b17980SJames Wright:language: yaml 69179b17980SJames Wright``` 692edd152dcSJed Brown 693b8fb7609SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder 694b8fb7609SAdeleke O. Bankole 695b8fb7609SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options: 696b8fb7609SAdeleke O. Bankole 697b8fb7609SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options 698b8fb7609SAdeleke O. Bankole:header-rows: 1 699b8fb7609SAdeleke O. Bankole 700b8fb7609SAdeleke O. Bankole* - Option 701b8fb7609SAdeleke O. Bankole - Description 702b8fb7609SAdeleke O. Bankole - Default value 703b8fb7609SAdeleke O. Bankole - Unit 704b8fb7609SAdeleke O. Bankole 705b8fb7609SAdeleke O. Bankole* - `-freestream_velocity` 706b8fb7609SAdeleke O. Bankole - Freestream velocity vector 707b8fb7609SAdeleke O. Bankole - `0,0,0` 708b8fb7609SAdeleke O. Bankole - `m/s` 709b8fb7609SAdeleke O. Bankole 710b8fb7609SAdeleke O. Bankole* - `-freestream_temperature` 711b8fb7609SAdeleke O. Bankole - Freestream temperature 712b8fb7609SAdeleke O. Bankole - `288` 713b8fb7609SAdeleke O. Bankole - `K` 714b8fb7609SAdeleke O. Bankole 715b8fb7609SAdeleke O. Bankole* - `-freestream_pressure` 716b8fb7609SAdeleke O. Bankole - Freestream pressure 717b8fb7609SAdeleke O. Bankole - `1.01e5` 718b8fb7609SAdeleke O. Bankole - `Pa` 719b8fb7609SAdeleke O. Bankole 720b8fb7609SAdeleke O. Bankole::: 721b8fb7609SAdeleke O. Bankole 722b8fb7609SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`. 723b8fb7609SAdeleke O. BankoleTo run this problem, first generate a mesh: 724b8fb7609SAdeleke O. Bankole 725b8fb7609SAdeleke O. Bankole```console 726b8fb7609SAdeleke O. Bankole$ make -C examples/fluids/meshes 727b8fb7609SAdeleke O. Bankole``` 728b8fb7609SAdeleke O. Bankole 729b8fb7609SAdeleke O. BankoleThen run by building the executable and running: 730b8fb7609SAdeleke O. Bankole 731b8fb7609SAdeleke O. Bankole```console 732b8fb7609SAdeleke O. Bankole$ make build/fluids-navierstokes 733b8fb7609SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file vortexshedding.yaml 734b8fb7609SAdeleke O. Bankole``` 735b8fb7609SAdeleke O. Bankole 736b8fb7609SAdeleke O. BankoleThe vortex shedding period is roughly 6 and this problem runs until time 100 (2000 time steps). 737b8fb7609SAdeleke O. Bankole 738b8fb7609SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml 739b8fb7609SAdeleke O. Bankole:language: yaml 740b8fb7609SAdeleke O. Bankole``` 741b8fb7609SAdeleke O. Bankole 742af8870a9STimothy Aiken#### Density current 743af8870a9STimothy Aiken 74483c686feSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options: 745bb8a0c61SJames Wright 746bb8a0c61SJames Wright:::{list-table} Density Current Runtime Options 747bb8a0c61SJames Wright:header-rows: 1 748bb8a0c61SJames Wright 749bb8a0c61SJames Wright* - Option 750bb8a0c61SJames Wright - Description 751bb8a0c61SJames Wright - Default value 752bb8a0c61SJames Wright - Unit 753bb8a0c61SJames Wright 754bb8a0c61SJames Wright* - `-center` 755bb8a0c61SJames Wright - Location of bubble center 756bb8a0c61SJames Wright - `(lx,ly,lz)/2` 757bb8a0c61SJames Wright - `(m,m,m)` 758bb8a0c61SJames Wright 759bb8a0c61SJames Wright* - `-dc_axis` 760bb8a0c61SJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 761bb8a0c61SJames Wright - `(0,0,0)` 762bb8a0c61SJames Wright - 763bb8a0c61SJames Wright 764bb8a0c61SJames Wright* - `-rc` 765bb8a0c61SJames Wright - Characteristic radius of thermal bubble 766bb8a0c61SJames Wright - `1000` 767bb8a0c61SJames Wright - `m` 768bb8a0c61SJames Wright 769bb8a0c61SJames Wright* - `-theta0` 770bb8a0c61SJames Wright - Reference potential temperature 771bb8a0c61SJames Wright - `300` 772bb8a0c61SJames Wright - `K` 773bb8a0c61SJames Wright 774bb8a0c61SJames Wright* - `-thetaC` 775bb8a0c61SJames Wright - Perturbation of potential temperature 776bb8a0c61SJames Wright - `-15` 777bb8a0c61SJames Wright - `K` 778bb8a0c61SJames Wright 779bb8a0c61SJames Wright* - `-P0` 780bb8a0c61SJames Wright - Atmospheric pressure 781bb8a0c61SJames Wright - `1E5` 782bb8a0c61SJames Wright - `Pa` 783bb8a0c61SJames Wright 784bb8a0c61SJames Wright* - `-N` 785bb8a0c61SJames Wright - Brunt-Vaisala frequency 786bb8a0c61SJames Wright - `0.01` 787bb8a0c61SJames Wright - `1/s` 788bb8a0c61SJames Wright::: 789bb8a0c61SJames Wright 790575f8106SLeila GhaffariThis problem can be run with: 791ea10196cSJeremy L Thompson 792575f8106SLeila Ghaffari``` 793bb8a0c61SJames 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 794bb8a0c61SJames Wright``` 795bb8a0c61SJames Wright 796af8870a9STimothy Aiken#### Channel flow 797af8870a9STimothy Aiken 79883c686feSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options: 799bb8a0c61SJames Wright 800bb8a0c61SJames Wright:::{list-table} Channel Runtime Options 801bb8a0c61SJames Wright:header-rows: 1 802bb8a0c61SJames Wright 803bb8a0c61SJames Wright* - Option 804bb8a0c61SJames Wright - Description 805bb8a0c61SJames Wright - Default value 806bb8a0c61SJames Wright - Unit 807bb8a0c61SJames Wright 808bb8a0c61SJames Wright* - `-umax` 809bb8a0c61SJames Wright - Maximum/centerline velocity of the flow 810bb8a0c61SJames Wright - `10` 811bb8a0c61SJames Wright - `m/s` 812bb8a0c61SJames Wright 813bb8a0c61SJames Wright* - `-theta0` 814bb8a0c61SJames Wright - Reference potential temperature 815bb8a0c61SJames Wright - `300` 816bb8a0c61SJames Wright - `K` 817bb8a0c61SJames Wright 818bb8a0c61SJames Wright* - `-P0` 819bb8a0c61SJames Wright - Atmospheric pressure 820bb8a0c61SJames Wright - `1E5` 821bb8a0c61SJames Wright - `Pa` 822edd152dcSJed Brown 823edd152dcSJed Brown* - `-body_force_scale` 824edd152dcSJed Brown - Multiplier for body force (`-1` for flow reversal) 825edd152dcSJed Brown - 1 826edd152dcSJed Brown - 827bb8a0c61SJames Wright::: 828bb8a0c61SJames Wright 829bb8a0c61SJames WrightThis problem can be run with the `channel.yaml` file via: 830bb8a0c61SJames Wright 831bb8a0c61SJames Wright``` 832bb8a0c61SJames Wright./navierstokes -options_file channel.yaml 833bb8a0c61SJames Wright``` 834bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml 835bb8a0c61SJames Wright:language: yaml 836bb8a0c61SJames Wright``` 837bb8a0c61SJames Wright 838c8c30d87SJed Brown(example-blasius)= 839c8c30d87SJed Brown 840af8870a9STimothy Aiken#### Blasius boundary layer 841af8870a9STimothy Aiken 84283c686feSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options: 843bb8a0c61SJames Wright 844bb8a0c61SJames Wright:::{list-table} Blasius Runtime Options 845bb8a0c61SJames Wright:header-rows: 1 846bb8a0c61SJames Wright 847bb8a0c61SJames Wright* - Option 848bb8a0c61SJames Wright - Description 849bb8a0c61SJames Wright - Default value 850bb8a0c61SJames Wright - Unit 851bb8a0c61SJames Wright 852aef1eb53SLeila Ghaffari* - `-velocity_infinity` 853bb8a0c61SJames Wright - Freestream velocity 854bb8a0c61SJames Wright - `40` 855bb8a0c61SJames Wright - `m/s` 856bb8a0c61SJames Wright 857aef1eb53SLeila Ghaffari* - `-temperature_infinity` 858aef1eb53SLeila Ghaffari - Freestream temperature 859bb8a0c61SJames Wright - `288` 860bb8a0c61SJames Wright - `K` 861bb8a0c61SJames Wright 862aef1eb53SLeila Ghaffari* - `-temperature_wall` 863aef1eb53SLeila Ghaffari - Wall temperature 8640d850f2eSLeila Ghaffari - `288` 865aef1eb53SLeila Ghaffari - `K` 866aef1eb53SLeila Ghaffari 867aef1eb53SLeila Ghaffari* - `-delta0` 868aef1eb53SLeila Ghaffari - Boundary layer height at the inflow 869aef1eb53SLeila Ghaffari - `4.2e-3` 870aef1eb53SLeila Ghaffari - `m` 871aef1eb53SLeila Ghaffari 872bb8a0c61SJames Wright* - `-P0` 873bb8a0c61SJames Wright - Atmospheric pressure 874bb8a0c61SJames Wright - `1.01E5` 875bb8a0c61SJames Wright - `Pa` 876bb8a0c61SJames Wright 87798b448e2SJames Wright* - `-platemesh_refine_height` 87898b448e2SJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 879bb8a0c61SJames Wright - `5.9E-4` 880bb8a0c61SJames Wright - `m` 881bb8a0c61SJames Wright 88298b448e2SJames Wright* - `-platemesh_Ndelta` 88398b448e2SJames Wright - Number of elements to keep below `-platemesh_refine_height` 884bb8a0c61SJames Wright - `45` 885bb8a0c61SJames Wright - 886bb8a0c61SJames Wright 88798b448e2SJames Wright* - `-platemesh_growth` 888bb8a0c61SJames Wright - Growth rate of the elements in the refinement region 889bb8a0c61SJames Wright - `1.08` 890bb8a0c61SJames Wright - 891bb8a0c61SJames Wright 89298b448e2SJames Wright* - `-platemesh_top_angle` 893bb8a0c61SJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 894bb8a0c61SJames Wright - `5` 895bb8a0c61SJames Wright - `degrees` 896493642f1SJames Wright 897493642f1SJames Wright* - `-stg_use` 898493642f1SJames Wright - Whether to use stg for the inflow conditions 899493642f1SJames Wright - `false` 900493642f1SJames Wright - 90198b448e2SJames Wright 90298b448e2SJames Wright* - `-platemesh_y_node_locs_path` 90398b448e2SJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 90498b448e2SJames Wright - `""` 90598b448e2SJames Wright - 906aef1eb53SLeila Ghaffari 9070d850f2eSLeila Ghaffari* - `-n_chebyshev` 908aef1eb53SLeila Ghaffari - Number of Chebyshev terms 909aef1eb53SLeila Ghaffari - `20` 910aef1eb53SLeila Ghaffari - 911aef1eb53SLeila Ghaffari 9120d850f2eSLeila Ghaffari* - `-chebyshev_` 9130d850f2eSLeila Ghaffari - Prefix for Chebyshev snes solve 9140d850f2eSLeila Ghaffari - 9150d850f2eSLeila Ghaffari - 9160d850f2eSLeila Ghaffari 917bb8a0c61SJames Wright::: 918bb8a0c61SJames Wright 919bb8a0c61SJames WrightThis problem can be run with the `blasius.yaml` file via: 920bb8a0c61SJames Wright 921bb8a0c61SJames Wright``` 922bb8a0c61SJames Wright./navierstokes -options_file blasius.yaml 923bb8a0c61SJames Wright``` 924bb8a0c61SJames Wright 925bb8a0c61SJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml 926bb8a0c61SJames Wright:language: yaml 927575f8106SLeila Ghaffari``` 928493642f1SJames Wright 929493642f1SJames Wright#### STG Inflow for Flat Plate 930493642f1SJames Wright 931b46bfc5eSJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options: 932493642f1SJames Wright 933493642f1SJames Wright:::{list-table} Blasius Runtime Options 934493642f1SJames Wright:header-rows: 1 935493642f1SJames Wright 936493642f1SJames Wright* - Option 937493642f1SJames Wright - Description 938493642f1SJames Wright - Default value 939493642f1SJames Wright - Unit 940493642f1SJames Wright 941493642f1SJames Wright* - `-stg_inflow_path` 942493642f1SJames Wright - Path to the STGInflow file 943493642f1SJames Wright - `./STGInflow.dat` 944493642f1SJames Wright - 945493642f1SJames Wright 946493642f1SJames Wright* - `-stg_rand_path` 947493642f1SJames Wright - Path to the STGRand file 948493642f1SJames Wright - `./STGRand.dat` 949493642f1SJames Wright - 950493642f1SJames Wright 951493642f1SJames Wright* - `-stg_alpha` 952493642f1SJames Wright - Growth rate of the wavemodes 953493642f1SJames Wright - `1.01` 954493642f1SJames Wright - 955493642f1SJames Wright 956493642f1SJames Wright* - `-stg_u0` 957493642f1SJames Wright - Convective velocity, $U_0$ 958493642f1SJames Wright - `0.0` 959493642f1SJames Wright - `m/s` 960493642f1SJames Wright 961493642f1SJames Wright* - `-stg_mean_only` 962493642f1SJames Wright - Only impose the mean velocity (no fluctutations) 963493642f1SJames Wright - `false` 964493642f1SJames Wright - 965493642f1SJames Wright 96629ea39e3SJames Wright* - `-stg_strong` 96729ea39e3SJames Wright - Strongly enforce the STG inflow boundary condition 96829ea39e3SJames Wright - `false` 96929ea39e3SJames Wright - 97029ea39e3SJames Wright 971d4e0f297SJames Wright* - `-stg_fluctuating_IC` 972d4e0f297SJames Wright - "Extrude" the fluctuations through the domain as an initial condition 973d4e0f297SJames Wright - `false` 974d4e0f297SJames Wright - 975d4e0f297SJames Wright 976493642f1SJames Wright::: 977493642f1SJames Wright 978493642f1SJames WrightThis problem can be run with the `blasius.yaml` file via: 979493642f1SJames Wright 980493642f1SJames Wright``` 981493642f1SJames Wright./navierstokes -options_file blasius.yaml -stg_use true 982493642f1SJames Wright``` 983493642f1SJames Wright 984b46bfc5eSJeremy L ThompsonNote the added `-stg_use true` flag 985b46bfc5eSJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow. 986