1ccaff030SJeremy L Thompson## libCEED: Navier-Stokes Example 2ccaff030SJeremy L Thompson 3ccaff030SJeremy L ThompsonThis page provides a description of the Navier-Stokes example for the libCEED library, based on PETSc. 4b8962995SJeremy L ThompsonPETSc v3.17 or a development version of PETSc at commit 0e95d842 or later is required. 5ccaff030SJeremy L Thompson 677841947SLeila GhaffariThe Navier-Stokes problem solves the compressible Navier-Stokes equations in three dimensions using an explicit time integration. 777841947SLeila GhaffariThe state variables are mass density, momentum density, and energy density. 8ccaff030SJeremy L Thompson 977841947SLeila GhaffariThe main Navier-Stokes solver for libCEED is defined in [`navierstokes.c`](navierstokes.c) with different problem definitions according to the application of interest. 10ccaff030SJeremy L Thompson 11bc7bbd5dSLeila GhaffariBuild by using: 12ccaff030SJeremy L Thompson 13ccaff030SJeremy L Thompson`make` 14ccaff030SJeremy L Thompson 15bc7bbd5dSLeila Ghaffariand run with: 16ccaff030SJeremy L Thompson 17bc7bbd5dSLeila Ghaffari``` 18bc7bbd5dSLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree] 19bc7bbd5dSLeila Ghaffari``` 20ccaff030SJeremy L Thompson 21bc7bbd5dSLeila Ghaffari## Runtime options 22ccaff030SJeremy L Thompson 23bc7bbd5dSLeila Ghaffari% inclusion-fluids-marker 24ccaff030SJeremy L Thompson 25bc7bbd5dSLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options. 26bc7bbd5dSLeila GhaffariThe following options are common among all problem types: 27ccaff030SJeremy L Thompson 28bc7bbd5dSLeila Ghaffari:::{list-table} Common Runtime Options 29bc7bbd5dSLeila Ghaffari:header-rows: 1 30ccaff030SJeremy L Thompson 31bc7bbd5dSLeila Ghaffari* - Option 32bc7bbd5dSLeila Ghaffari - Description 33bc7bbd5dSLeila Ghaffari - Default value 34ccaff030SJeremy L Thompson 35bc7bbd5dSLeila Ghaffari* - `-ceed` 36bc7bbd5dSLeila Ghaffari - CEED resource specifier 37bc7bbd5dSLeila Ghaffari - `/cpu/self/opt/blocked` 38ccaff030SJeremy L Thompson 39bc7bbd5dSLeila Ghaffari* - `-test` 40bc7bbd5dSLeila Ghaffari - Run in test mode 41bc7bbd5dSLeila Ghaffari - `false` 42ccaff030SJeremy L Thompson 43bc7bbd5dSLeila Ghaffari* - `-compare_final_state_atol` 44bc7bbd5dSLeila Ghaffari - Test absolute tolerance 45bc7bbd5dSLeila Ghaffari - `1E-11` 46ccaff030SJeremy L Thompson 47bc7bbd5dSLeila Ghaffari* - `-compare_final_state_filename` 48bc7bbd5dSLeila Ghaffari - Test filename 49bc7bbd5dSLeila Ghaffari - 50ccaff030SJeremy L Thompson 51bc7bbd5dSLeila Ghaffari* - `-problem` 52bc7bbd5dSLeila Ghaffari - Problem to solve (`advection`, `advection2d`, `density_current`, or `euler_vortex`) 53bc7bbd5dSLeila Ghaffari - `density_current` 54ccaff030SJeremy L Thompson 55bc7bbd5dSLeila Ghaffari* - `-implicit` 56bc7bbd5dSLeila Ghaffari - Use implicit time integartor formulation 57bc7bbd5dSLeila Ghaffari - 58ccaff030SJeremy L Thompson 59bc7bbd5dSLeila Ghaffari* - `-degree` 60bc7bbd5dSLeila Ghaffari - Polynomial degree of tensor product basis (must be >= 1) 61bc7bbd5dSLeila Ghaffari - `1` 62ccaff030SJeremy L Thompson 632288fb52SJeremy L Thompson* - `-q_extra` 64bc7bbd5dSLeila Ghaffari - Number of extra quadrature points 65fc14f3f6SLeila Ghaffari - `0` 66ccaff030SJeremy L Thompson 6737cbb16aSJed Brown* - `-ts_monitor_solution` 6837cbb16aSJed Brown - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`) 6937cbb16aSJed Brown - 70ccaff030SJeremy L Thompson 7137cbb16aSJed Brown* - `-ts_monitor_solution_interval` 7237cbb16aSJed Brown - Number of time steps between visualization output frames. 7337cbb16aSJed Brown - `1` 7437cbb16aSJed Brown 7537cbb16aSJed Brown* - `-viewer_cgns_batch_size` 7637cbb16aSJed Brown - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 7737cbb16aSJed Brown - `20` 7837cbb16aSJed Brown 7937cbb16aSJed Brown* - `-checkpoint_interval` 8037cbb16aSJed Brown - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only 81bc7bbd5dSLeila Ghaffari - `10` 82ccaff030SJeremy L Thompson 8337cbb16aSJed Brown* - `-checkpoint_vtk` 8437cbb16aSJed Brown - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead. 8537cbb16aSJed Brown - `false` 8637cbb16aSJed Brown 8737cbb16aSJed Brown* - `-viz_refine` 8837cbb16aSJed Brown - Use regular refinement for VTK visualization 8937cbb16aSJed Brown - `0` 9037cbb16aSJed Brown 91bc7bbd5dSLeila Ghaffari* - `-output_dir` 9237cbb16aSJed Brown - Output directory for binary checkpoints and VTK files (if enabled). 93bc7bbd5dSLeila Ghaffari - `.` 94ccaff030SJeremy L Thompson 9569293791SJames Wright* - `-output_add_stepnum2bin` 9669293791SJames Wright - Whether to add step numbers to output binary files 9769293791SJames Wright - `false` 9869293791SJames Wright 9969293791SJames Wright* - `-continue` 10069293791SJames Wright - Continue from previous solution (input is step number of previous solution) 10169293791SJames Wright - `0` 10269293791SJames Wright 10369293791SJames Wright* - `-continue_filename` 10469293791SJames Wright - Path to solution binary file from which to continue from 10569293791SJames Wright - `[output_dir]/ns-solution.bin` 10669293791SJames Wright 10769293791SJames Wright* - `-continue_time_filename` 1084de8550aSJed Brown - Path to time stamp binary file (only for legacy checkpoints) 10969293791SJames Wright - `[output_dir]/ns-time.bin` 11069293791SJames Wright 1114534a52eSLeila Ghaffari* - `-bc_wall` 1124534a52eSLeila Ghaffari - Use wall boundary conditions on this list of faces 1134534a52eSLeila Ghaffari - 1144534a52eSLeila Ghaffari 1154534a52eSLeila Ghaffari* - `-wall_comps` 1164534a52eSLeila Ghaffari - An array of constrained component numbers for wall BCs 1174534a52eSLeila Ghaffari - 1184534a52eSLeila Ghaffari 1194534a52eSLeila Ghaffari* - `-bc_slip_x` 1204534a52eSLeila Ghaffari - Use slip boundary conditions, for the x component, on this list of faces 1214534a52eSLeila Ghaffari - 1224534a52eSLeila Ghaffari 1234534a52eSLeila Ghaffari* - `-bc_slip_y` 1244534a52eSLeila Ghaffari - Use slip boundary conditions, for the y component, on this list of faces 1254534a52eSLeila Ghaffari - 1264534a52eSLeila Ghaffari 1274534a52eSLeila Ghaffari* - `-bc_slip_z` 1284534a52eSLeila Ghaffari - Use slip boundary conditions, for the z component, on this list of faces 1294534a52eSLeila Ghaffari - 1304534a52eSLeila Ghaffari 1314534a52eSLeila Ghaffari* - `-bc_inflow` 1324534a52eSLeila Ghaffari - Use inflow boundary conditions on this list of faces 1334534a52eSLeila Ghaffari - 1344534a52eSLeila Ghaffari 1354534a52eSLeila Ghaffari* - `-bc_outflow` 1364534a52eSLeila Ghaffari - Use outflow boundary conditions on this list of faces 1374534a52eSLeila Ghaffari - 13889d0f5c0SLeila Ghaffari 1397ec884f8SJames Wright* - `-bc_freestream` 1407ec884f8SJames Wright - Use freestream boundary conditions on this list of faces 1417ec884f8SJames Wright - 1427ec884f8SJames Wright 143bc7bbd5dSLeila Ghaffari* - `-snes_view` 144bc7bbd5dSLeila Ghaffari - View PETSc `SNES` nonlinear solver configuration 145bc7bbd5dSLeila Ghaffari - 14689d0f5c0SLeila Ghaffari 147bc7bbd5dSLeila Ghaffari* - `-log_view` 148bc7bbd5dSLeila Ghaffari - View PETSc performance log 149bc7bbd5dSLeila Ghaffari - 150ccaff030SJeremy L Thompson 151bc7bbd5dSLeila Ghaffari* - `-help` 152bc7bbd5dSLeila Ghaffari - View comprehensive information about run-time options 153bc7bbd5dSLeila Ghaffari - 154bc7bbd5dSLeila Ghaffari::: 155ccaff030SJeremy L Thompson 1567ec884f8SJames 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: 1574534a52eSLeila Ghaffari 15888626eedSJames Wright:::{list-table} 2D Face ID Labels 15988626eedSJames Wright:header-rows: 1 16088626eedSJames Wright* - PETSc Face Name 16188626eedSJames Wright - Cartesian direction 16288626eedSJames Wright - Face ID 16388626eedSJames Wright 16488626eedSJames Wright* - faceMarkerBottom 16588626eedSJames Wright - -z 16688626eedSJames Wright - 1 16788626eedSJames Wright 16888626eedSJames Wright* - faceMarkerRight 16988626eedSJames Wright - +x 17088626eedSJames Wright - 2 17188626eedSJames Wright 17288626eedSJames Wright* - faceMarkerTop 17388626eedSJames Wright - +z 17488626eedSJames Wright - 3 17588626eedSJames Wright 17688626eedSJames Wright* - faceMarkerLeft 17788626eedSJames Wright - -x 17888626eedSJames Wright - 4 17988626eedSJames Wright::: 18088626eedSJames Wright 18188626eedSJames Wright:::{list-table} 2D Face ID Labels 18288626eedSJames Wright:header-rows: 1 18388626eedSJames Wright* - PETSc Face Name 18488626eedSJames Wright - Cartesian direction 18588626eedSJames Wright - Face ID 18688626eedSJames Wright 18788626eedSJames Wright* - faceMarkerBottom 18888626eedSJames Wright - -z 18988626eedSJames Wright - 1 19088626eedSJames Wright 19188626eedSJames Wright* - faceMarkerTop 19288626eedSJames Wright - +z 19388626eedSJames Wright - 2 19488626eedSJames Wright 19588626eedSJames Wright* - faceMarkerFront 19688626eedSJames Wright - -y 19788626eedSJames Wright - 3 19888626eedSJames Wright 19988626eedSJames Wright* - faceMarkerBack 20088626eedSJames Wright - +y 20188626eedSJames Wright - 4 20288626eedSJames Wright 20388626eedSJames Wright* - faceMarkerRight 20488626eedSJames Wright - +x 20588626eedSJames Wright - 5 20688626eedSJames Wright 20788626eedSJames Wright* - faceMarkerLeft 20888626eedSJames Wright - -x 20988626eedSJames Wright - 6 21088626eedSJames Wright::: 2114534a52eSLeila Ghaffari 212*8a94a473SJed Brown### Boundary conditions 213*8a94a473SJed Brown 214*8a94a473SJed BrownBoundary conditions for compressible viscous flows are notoriously tricky. Here we offer some recommendations 215*8a94a473SJed Brown 216*8a94a473SJed Brown#### Inflow 217*8a94a473SJed Brown 218*8a94a473SJed 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). 219*8a94a473SJed BrownIt is stable and the least reflective boundary condition for acoustics. 220*8a94a473SJed Brown 221*8a94a473SJed BrownIf near a viscous wall, you may want a specified inflow profile. 222*8a94a473SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles. 223*8a94a473SJed 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. 224*8a94a473SJed BrownThe strong approach gives sharper resolution of velocity structures. 225*8a94a473SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent. 226*8a94a473SJed Brown 227*8a94a473SJed Brown### Outflow 228*8a94a473SJed Brown 229*8a94a473SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures. 230*8a94a473SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections. 231*8a94a473SJed 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. 232*8a94a473SJed Brown 233*8a94a473SJed 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. 234*8a94a473SJed Brown 235*8a94a473SJed 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). 236*8a94a473SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow. 237*8a94a473SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use. 238*8a94a473SJed Brown 239*8a94a473SJed Brown### Periodicity 240*8a94a473SJed Brown 241*8a94a473SJed BrownPETSc provides two ways to specify periodicity: 242*8a94a473SJed Brown 243*8a94a473SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using: 244*8a94a473SJed Brown 245*8a94a473SJed Brown``` yaml 246*8a94a473SJed Browndm_plex: 247*8a94a473SJed Brown shape: box 248*8a94a473SJed Brown box_faces: 10,12,4 249*8a94a473SJed Brown box_bd: none,none,periodic 250*8a94a473SJed Brown``` 251*8a94a473SJed Brown 252*8a94a473SJed BrownThe coordinates for such cases are stored as a new field, and 253*8a94a473SJed Brown 254019b7682STimothy Aiken### Advection 255019b7682STimothy Aiken 25617be3a41SJeremy 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$. 25717be3a41SJeremy L ThompsonThese are available in 2D and 3D. 258019b7682STimothy Aiken 259019b7682STimothy Aiken#### 2D advection 260019b7682STimothy Aiken 261bc7bbd5dSLeila GhaffariFor the 2D advection problem, the following additional command-line options are available: 262ccaff030SJeremy L Thompson 263bc7bbd5dSLeila Ghaffari:::{list-table} Advection2D Runtime Options 264bc7bbd5dSLeila Ghaffari:header-rows: 1 26589d0f5c0SLeila Ghaffari 266bc7bbd5dSLeila Ghaffari* - Option 267bc7bbd5dSLeila Ghaffari - Description 268bc7bbd5dSLeila Ghaffari - Default value 269bc7bbd5dSLeila Ghaffari - Unit 27089d0f5c0SLeila Ghaffari 271bc7bbd5dSLeila Ghaffari* - `-rc` 272bc7bbd5dSLeila Ghaffari - Characteristic radius of thermal bubble 273bc7bbd5dSLeila Ghaffari - `1000` 274bc7bbd5dSLeila Ghaffari - `m` 27589d0f5c0SLeila Ghaffari 276bc7bbd5dSLeila Ghaffari* - `-units_meter` 277bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 278bc7bbd5dSLeila Ghaffari - `1E-2` 279bc7bbd5dSLeila Ghaffari - 28089d0f5c0SLeila Ghaffari 281bc7bbd5dSLeila Ghaffari* - `-units_second` 282bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 283bc7bbd5dSLeila Ghaffari - `1E-2` 284bc7bbd5dSLeila Ghaffari - 28589d0f5c0SLeila Ghaffari 286bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 287bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 288bc7bbd5dSLeila Ghaffari - `1E-6` 289bc7bbd5dSLeila Ghaffari - 29077841947SLeila Ghaffari 291bc7bbd5dSLeila Ghaffari* - `-strong_form` 292bc7bbd5dSLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 293bc7bbd5dSLeila Ghaffari - `0` 294bc7bbd5dSLeila Ghaffari - 29577841947SLeila Ghaffari 296bc7bbd5dSLeila Ghaffari* - `-stab` 297bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 298bc7bbd5dSLeila Ghaffari - `none` 299bc7bbd5dSLeila Ghaffari - 30077841947SLeila Ghaffari 301bc7bbd5dSLeila Ghaffari* - `-CtauS` 302bc7bbd5dSLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 303bc7bbd5dSLeila Ghaffari - `0` 304bc7bbd5dSLeila Ghaffari - 30577841947SLeila Ghaffari 306bc7bbd5dSLeila Ghaffari* - `-wind_type` 307bc7bbd5dSLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 308bc7bbd5dSLeila Ghaffari - `rotation` 309bc7bbd5dSLeila Ghaffari - 31077841947SLeila Ghaffari 311bc7bbd5dSLeila Ghaffari* - `-wind_translation` 312bc7bbd5dSLeila Ghaffari - Constant wind vector when `-wind_type translation` 313bc7bbd5dSLeila Ghaffari - `1,0,0` 314bc7bbd5dSLeila Ghaffari - 31589d0f5c0SLeila Ghaffari 316bc7bbd5dSLeila Ghaffari* - `-E_wind` 317bc7bbd5dSLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 318bc7bbd5dSLeila Ghaffari - `1E6` 319bc7bbd5dSLeila Ghaffari - `J` 320bc7bbd5dSLeila Ghaffari::: 321e43605a5SLeila Ghaffari 322bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with: 323e43605a5SLeila Ghaffari 324bc7bbd5dSLeila Ghaffari``` 3254534a52eSLeila 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 326bc7bbd5dSLeila Ghaffari``` 327e43605a5SLeila Ghaffari 328bc7bbd5dSLeila Ghaffariand the `translation` mode with: 329e43605a5SLeila Ghaffari 330bc7bbd5dSLeila Ghaffari``` 3314534a52eSLeila 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 332bc7bbd5dSLeila Ghaffari``` 3334534a52eSLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 334e43605a5SLeila Ghaffari 335019b7682STimothy Aiken#### 3D advection 336019b7682STimothy Aiken 337bc7bbd5dSLeila GhaffariFor the 3D advection problem, the following additional command-line options are available: 338e43605a5SLeila Ghaffari 339bc7bbd5dSLeila Ghaffari:::{list-table} Advection3D Runtime Options 340bc7bbd5dSLeila Ghaffari:header-rows: 1 341e43605a5SLeila Ghaffari 342bc7bbd5dSLeila Ghaffari* - Option 343bc7bbd5dSLeila Ghaffari - Description 344bc7bbd5dSLeila Ghaffari - Default value 345bc7bbd5dSLeila Ghaffari - Unit 346e43605a5SLeila Ghaffari 347bc7bbd5dSLeila Ghaffari* - `-rc` 348bc7bbd5dSLeila Ghaffari - Characteristic radius of thermal bubble 349bc7bbd5dSLeila Ghaffari - `1000` 350bc7bbd5dSLeila Ghaffari - `m` 351e43605a5SLeila Ghaffari 352bc7bbd5dSLeila Ghaffari* - `-units_meter` 353bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 354bc7bbd5dSLeila Ghaffari - `1E-2` 355bc7bbd5dSLeila Ghaffari - 356e43605a5SLeila Ghaffari 357bc7bbd5dSLeila Ghaffari* - `-units_second` 358bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 359bc7bbd5dSLeila Ghaffari - `1E-2` 360bc7bbd5dSLeila Ghaffari - 361e43605a5SLeila Ghaffari 362bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 363bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 364bc7bbd5dSLeila Ghaffari - `1E-6` 365bc7bbd5dSLeila Ghaffari - 366e43605a5SLeila Ghaffari 367bc7bbd5dSLeila Ghaffari* - `-strong_form` 368bc7bbd5dSLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 369bc7bbd5dSLeila Ghaffari - `0` 370bc7bbd5dSLeila Ghaffari - 371e43605a5SLeila Ghaffari 372bc7bbd5dSLeila Ghaffari* - `-stab` 373bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 374bc7bbd5dSLeila Ghaffari - `none` 375bc7bbd5dSLeila Ghaffari - 376e43605a5SLeila Ghaffari 377bc7bbd5dSLeila Ghaffari* - `-CtauS` 378bc7bbd5dSLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 379bc7bbd5dSLeila Ghaffari - `0` 380bc7bbd5dSLeila Ghaffari - 381e43605a5SLeila Ghaffari 382bc7bbd5dSLeila Ghaffari* - `-wind_type` 383bc7bbd5dSLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 384bc7bbd5dSLeila Ghaffari - `rotation` 385bc7bbd5dSLeila Ghaffari - 386e43605a5SLeila Ghaffari 387bc7bbd5dSLeila Ghaffari* - `-wind_translation` 388bc7bbd5dSLeila Ghaffari - Constant wind vector when `-wind_type translation` 389bc7bbd5dSLeila Ghaffari - `1,0,0` 390bc7bbd5dSLeila Ghaffari - 391e43605a5SLeila Ghaffari 392bc7bbd5dSLeila Ghaffari* - `-E_wind` 393bc7bbd5dSLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 394bc7bbd5dSLeila Ghaffari - `1E6` 395bc7bbd5dSLeila Ghaffari - `J` 396e43605a5SLeila Ghaffari 397bc7bbd5dSLeila Ghaffari* - `-bubble_type` 398bc7bbd5dSLeila Ghaffari - `sphere` (3D) or `cylinder` (2D) 399bc7bbd5dSLeila Ghaffari - `shpere` 400bc7bbd5dSLeila Ghaffari - 401e43605a5SLeila Ghaffari 402bc7bbd5dSLeila Ghaffari* - `-bubble_continuity` 403bc7bbd5dSLeila Ghaffari - `smooth`, `back_sharp`, or `thick` 404bc7bbd5dSLeila Ghaffari - `smooth` 405bc7bbd5dSLeila Ghaffari - 406bc7bbd5dSLeila Ghaffari::: 407ccaff030SJeremy L Thompson 408bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with: 409ccaff030SJeremy L Thompson 410bc7bbd5dSLeila Ghaffari``` 4114534a52eSLeila 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 412bc7bbd5dSLeila Ghaffari``` 413ccaff030SJeremy L Thompson 414bc7bbd5dSLeila Ghaffariand the `translation` mode with: 415ccaff030SJeremy L Thompson 416bc7bbd5dSLeila Ghaffari``` 4174534a52eSLeila 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 418bc7bbd5dSLeila Ghaffari``` 419ccaff030SJeremy L Thompson 420019b7682STimothy Aiken### Inviscid Ideal Gas 421019b7682STimothy Aiken 422019b7682STimothy Aiken#### Isentropic Euler vortex 423019b7682STimothy Aiken 424bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available: 425ccaff030SJeremy L Thompson 426bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options 427bc7bbd5dSLeila Ghaffari:header-rows: 1 428ccaff030SJeremy L Thompson 429bc7bbd5dSLeila Ghaffari* - Option 430bc7bbd5dSLeila Ghaffari - Description 431bc7bbd5dSLeila Ghaffari - Default value 432bc7bbd5dSLeila Ghaffari - Unit 433ccaff030SJeremy L Thompson 434bc7bbd5dSLeila Ghaffari* - `-center` 435bc7bbd5dSLeila Ghaffari - Location of vortex center 436bc7bbd5dSLeila Ghaffari - `(lx,ly,lz)/2` 437bc7bbd5dSLeila Ghaffari - `(m,m,m)` 438ccaff030SJeremy L Thompson 439bc7bbd5dSLeila Ghaffari* - `-units_meter` 440bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 441bc7bbd5dSLeila Ghaffari - `1E-2` 442bc7bbd5dSLeila Ghaffari - 443ccaff030SJeremy L Thompson 444bc7bbd5dSLeila Ghaffari* - `-units_second` 445bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 446bc7bbd5dSLeila Ghaffari - `1E-2` 447bc7bbd5dSLeila Ghaffari - 448ccaff030SJeremy L Thompson 449bc7bbd5dSLeila Ghaffari* - `-mean_velocity` 450bc7bbd5dSLeila Ghaffari - Background velocity vector 451bc7bbd5dSLeila Ghaffari - `(1,1,0)` 452bc7bbd5dSLeila Ghaffari - 453ccaff030SJeremy L Thompson 454bc7bbd5dSLeila Ghaffari* - `-vortex_strength` 455bc7bbd5dSLeila Ghaffari - Strength of vortex < 10 456bc7bbd5dSLeila Ghaffari - `5` 457bc7bbd5dSLeila Ghaffari - 458932417b3SJed Brown 459932417b3SJed Brown* - `-c_tau` 460932417b3SJed Brown - Stabilization constant 461504dc8e0SLeila Ghaffari - `0.5` 462932417b3SJed Brown - 463bc7bbd5dSLeila Ghaffari::: 464ccaff030SJeremy L Thompson 465bc7bbd5dSLeila GhaffariThis problem can be run with: 466ccaff030SJeremy L Thompson 467bc7bbd5dSLeila Ghaffari``` 4684534a52eSLeila 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. 469bc7bbd5dSLeila Ghaffari``` 470ccaff030SJeremy L Thompson 471019b7682STimothy Aiken#### Sod shock tube 472019b7682STimothy Aiken 473019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available: 474019b7682STimothy Aiken 475019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options 476019b7682STimothy Aiken:header-rows: 1 477019b7682STimothy Aiken 478019b7682STimothy Aiken* - Option 479019b7682STimothy Aiken - Description 480019b7682STimothy Aiken - Default value 481019b7682STimothy Aiken - Unit 482019b7682STimothy Aiken 483019b7682STimothy Aiken* - `-units_meter` 484019b7682STimothy Aiken - 1 meter in scaled length units 485019b7682STimothy Aiken - `1E-2` 486019b7682STimothy Aiken - 487019b7682STimothy Aiken 488019b7682STimothy Aiken* - `-units_second` 489019b7682STimothy Aiken - 1 second in scaled time units 490019b7682STimothy Aiken - `1E-2` 491019b7682STimothy Aiken - 492019b7682STimothy Aiken 493019b7682STimothy Aiken* - `-yzb` 494019b7682STimothy Aiken - Use YZB discontinuity capturing 495019b7682STimothy Aiken - `none` 496019b7682STimothy Aiken - 497019b7682STimothy Aiken 498019b7682STimothy Aiken* - `-stab` 499019b7682STimothy Aiken - Stabilization method (`none`, `su`, or `supg`) 500019b7682STimothy Aiken - `none` 501019b7682STimothy Aiken - 502019b7682STimothy Aiken::: 503019b7682STimothy Aiken 504019b7682STimothy AikenThis problem can be run with: 505019b7682STimothy Aiken 506019b7682STimothy Aiken``` 507019b7682STimothy 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 508019b7682STimothy Aiken``` 509019b7682STimothy Aiken 510019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas 511019b7682STimothy Aiken 51288626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available: 513ccaff030SJeremy L Thompson 51488626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options 515bc7bbd5dSLeila Ghaffari:header-rows: 1 516ccaff030SJeremy L Thompson 517bc7bbd5dSLeila Ghaffari* - Option 518bc7bbd5dSLeila Ghaffari - Description 519bc7bbd5dSLeila Ghaffari - Default value 520bc7bbd5dSLeila Ghaffari - Unit 521ccaff030SJeremy L Thompson 522bc7bbd5dSLeila Ghaffari* - `-units_meter` 523bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 52488626eedSJames Wright - `1` 525bc7bbd5dSLeila Ghaffari - 526ccaff030SJeremy L Thompson 527bc7bbd5dSLeila Ghaffari* - `-units_second` 528bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 52988626eedSJames Wright - `1` 530bc7bbd5dSLeila Ghaffari - 531ccaff030SJeremy L Thompson 532bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 533bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 53488626eedSJames Wright - `1` 535bc7bbd5dSLeila Ghaffari - 536ccaff030SJeremy L Thompson 537bc7bbd5dSLeila Ghaffari* - `-units_Kelvin` 538bc7bbd5dSLeila Ghaffari - 1 Kelvin in scaled temperature units 539bc7bbd5dSLeila Ghaffari - `1` 540bc7bbd5dSLeila Ghaffari - 541ccaff030SJeremy L Thompson 542bc7bbd5dSLeila Ghaffari* - `-stab` 543bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 544bc7bbd5dSLeila Ghaffari - `none` 545bc7bbd5dSLeila Ghaffari - 546ccaff030SJeremy L Thompson 547932417b3SJed Brown* - `-c_tau` 54888626eedSJames Wright - Stabilization constant, $c_\tau$ 549504dc8e0SLeila Ghaffari - `0.5` 550932417b3SJed Brown - 551932417b3SJed Brown 55288626eedSJames Wright* - `-Ctau_t` 55388626eedSJames Wright - Stabilization time constant, $C_t$ 55488626eedSJames Wright - `1.0` 55588626eedSJames Wright - 556ccaff030SJeremy L Thompson 55788626eedSJames Wright* - `-Ctau_v` 55888626eedSJames Wright - Stabilization viscous constant, $C_v$ 55994c01735SLeila Ghaffari - `36, 60, 128 for degree = 1, 2, 3` 56088626eedSJames Wright - 561ccaff030SJeremy L Thompson 56288626eedSJames Wright* - `-Ctau_C` 56388626eedSJames Wright - Stabilization continuity constant, $C_c$ 56488626eedSJames Wright - `1.0` 56588626eedSJames Wright - 566ccaff030SJeremy L Thompson 56788626eedSJames Wright* - `-Ctau_M` 56888626eedSJames Wright - Stabilization momentum constant, $C_m$ 56988626eedSJames Wright - `1.0` 57088626eedSJames Wright - 57188626eedSJames Wright 57288626eedSJames Wright* - `-Ctau_E` 57388626eedSJames Wright - Stabilization energy constant, $C_E$ 57488626eedSJames Wright - `1.0` 57588626eedSJames Wright - 576ccaff030SJeremy L Thompson 577bc7bbd5dSLeila Ghaffari* - `-cv` 578bc7bbd5dSLeila Ghaffari - Heat capacity at constant volume 579bc7bbd5dSLeila Ghaffari - `717` 580bc7bbd5dSLeila Ghaffari - `J/(kg K)` 581ccaff030SJeremy L Thompson 582bc7bbd5dSLeila Ghaffari* - `-cp` 583bc7bbd5dSLeila Ghaffari - Heat capacity at constant pressure 584bc7bbd5dSLeila Ghaffari - `1004` 585bc7bbd5dSLeila Ghaffari - `J/(kg K)` 586ccaff030SJeremy L Thompson 587bc7bbd5dSLeila Ghaffari* - `-g` 588bc7bbd5dSLeila Ghaffari - Gravitational acceleration 589bc7bbd5dSLeila Ghaffari - `9.81` 590bc7bbd5dSLeila Ghaffari - `m/s^2` 591ccaff030SJeremy L Thompson 592bc7bbd5dSLeila Ghaffari* - `-lambda` 593bc7bbd5dSLeila Ghaffari - Stokes hypothesis second viscosity coefficient 594bc7bbd5dSLeila Ghaffari - `-2/3` 595bc7bbd5dSLeila Ghaffari - 596ccaff030SJeremy L Thompson 597bc7bbd5dSLeila Ghaffari* - `-mu` 598bc7bbd5dSLeila Ghaffari - Shear dynamic viscosity coefficient 599bc7bbd5dSLeila Ghaffari - `75` 600bc7bbd5dSLeila Ghaffari - `Pa s` 60177841947SLeila Ghaffari 602bc7bbd5dSLeila Ghaffari* - `-k` 603bc7bbd5dSLeila Ghaffari - Thermal conductivity 604bc7bbd5dSLeila Ghaffari - `0.02638` 605bc7bbd5dSLeila Ghaffari - `W/(m K)` 606a1df05f8SJed Brown 607a1df05f8SJed Brown* - `-newtonian_unit_tests` 608a1df05f8SJed Brown - Developer option to test properties 609a1df05f8SJed Brown - `false` 610a1df05f8SJed Brown - boolean 611de2fdd78SJames Wright 6125c0afad3SJames Wright* - `-state_var` 6135c0afad3SJames Wright - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$) 6145c0afad3SJames Wright - `conservative` 6155c0afad3SJames Wright - string 616bc7bbd5dSLeila Ghaffari::: 61777841947SLeila Ghaffari 6187ec884f8SJames Wright#### Newtonian Wave 6197ec884f8SJames Wright 620061ff11eSJames WrightThe newtonian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options: 6217ec884f8SJames Wright 62289e3cb53SJames Wright:::{list-table} Newtonian Wave Runtime Options 6237ec884f8SJames Wright:header-rows: 1 6247ec884f8SJames Wright 6257ec884f8SJames Wright* - Option 6267ec884f8SJames Wright - Description 6277ec884f8SJames Wright - Default value 6287ec884f8SJames Wright - Unit 6297ec884f8SJames Wright 630f1e435c9SJed Brown* - `-freestream_riemann` 631f1e435c9SJed Brown - Riemann solver for boundaries (HLL or HLLC) 632f1e435c9SJed Brown - `hllc` 633f1e435c9SJed Brown - 634f1e435c9SJed Brown 635f1e435c9SJed Brown* - `-freestream_velocity` 6367ec884f8SJames Wright - Freestream velocity vector 6377ec884f8SJames Wright - `0,0,0` 6387ec884f8SJames Wright - `m/s` 6397ec884f8SJames Wright 640f1e435c9SJed Brown* - `-freestream_temperature` 6417ec884f8SJames Wright - Freestream temperature 6427ec884f8SJames Wright - `288` 6437ec884f8SJames Wright - `K` 6447ec884f8SJames Wright 645f1e435c9SJed Brown* - `-freestream_pressure` 64689e3cb53SJames Wright - Freestream pressure 6477ec884f8SJames Wright - `1.01e5` 6487ec884f8SJames Wright - `Pa` 6497ec884f8SJames Wright 6507ec884f8SJames Wright* - `-epicenter` 6517ec884f8SJames Wright - Coordinates of center of perturbation 6527ec884f8SJames Wright - `0,0,0` 6537ec884f8SJames Wright - `m` 6547ec884f8SJames Wright 6557ec884f8SJames Wright* - `-amplitude` 6567ec884f8SJames Wright - Amplitude of the perturbation 6577ec884f8SJames Wright - `0.1` 6587ec884f8SJames Wright - 6597ec884f8SJames Wright 6607ec884f8SJames Wright* - `-width` 6617ec884f8SJames Wright - Width parameter of the perturbation 6627ec884f8SJames Wright - `0.002` 6637ec884f8SJames Wright - `m` 6647ec884f8SJames Wright 6657ec884f8SJames Wright::: 6667ec884f8SJames Wright 6677ec884f8SJames WrightThis problem can be run with the `newtonianwave.yaml` file via: 6687ec884f8SJames Wright 6697ec884f8SJames Wright``` 6707ec884f8SJames Wright./navierstokes -options_file newtonianwave.yaml 6717ec884f8SJames Wright``` 6727ec884f8SJames Wright 6737ec884f8SJames Wright```{literalinclude} ../../../../../examples/fluids/newtonianwave.yaml 6747ec884f8SJames Wright:language: yaml 6757ec884f8SJames Wright``` 676a1df05f8SJed Brown 677d310b3d3SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder 678d310b3d3SAdeleke O. Bankole 679d310b3d3SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options: 680d310b3d3SAdeleke O. Bankole 681d310b3d3SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options 682d310b3d3SAdeleke O. Bankole:header-rows: 1 683d310b3d3SAdeleke O. Bankole 684d310b3d3SAdeleke O. Bankole* - Option 685d310b3d3SAdeleke O. Bankole - Description 686d310b3d3SAdeleke O. Bankole - Default value 687d310b3d3SAdeleke O. Bankole - Unit 688d310b3d3SAdeleke O. Bankole 689d310b3d3SAdeleke O. Bankole* - `-freestream_velocity` 690d310b3d3SAdeleke O. Bankole - Freestream velocity vector 691d310b3d3SAdeleke O. Bankole - `0,0,0` 692d310b3d3SAdeleke O. Bankole - `m/s` 693d310b3d3SAdeleke O. Bankole 694d310b3d3SAdeleke O. Bankole* - `-freestream_temperature` 695d310b3d3SAdeleke O. Bankole - Freestream temperature 696d310b3d3SAdeleke O. Bankole - `288` 697d310b3d3SAdeleke O. Bankole - `K` 698d310b3d3SAdeleke O. Bankole 699d310b3d3SAdeleke O. Bankole* - `-freestream_pressure` 700d310b3d3SAdeleke O. Bankole - Freestream pressure 701d310b3d3SAdeleke O. Bankole - `1.01e5` 702d310b3d3SAdeleke O. Bankole - `Pa` 703d310b3d3SAdeleke O. Bankole 704d310b3d3SAdeleke O. Bankole::: 705d310b3d3SAdeleke O. Bankole 706d310b3d3SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`. 707d310b3d3SAdeleke O. BankoleTo run this problem, first generate a mesh: 708d310b3d3SAdeleke O. Bankole 709d310b3d3SAdeleke O. Bankole```console 710d310b3d3SAdeleke O. Bankole$ make -C examples/fluids/meshes 711d310b3d3SAdeleke O. Bankole``` 712d310b3d3SAdeleke O. Bankole 713d310b3d3SAdeleke O. BankoleThen run by building the executable and running: 714d310b3d3SAdeleke O. Bankole 715d310b3d3SAdeleke O. Bankole```console 716d310b3d3SAdeleke O. Bankole$ make build/fluids-navierstokes 717d310b3d3SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file vortexshedding.yaml 718d310b3d3SAdeleke O. Bankole``` 719d310b3d3SAdeleke O. Bankole 720d310b3d3SAdeleke O. BankoleThe vortex shedding period is roughly 6 and this problem runs until time 100 (2000 time steps). 721d310b3d3SAdeleke O. Bankole 722d310b3d3SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml 723d310b3d3SAdeleke O. Bankole:language: yaml 724d310b3d3SAdeleke O. Bankole``` 725d310b3d3SAdeleke O. Bankole 726019b7682STimothy Aiken#### Density current 727019b7682STimothy Aiken 728061ff11eSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options: 72988626eedSJames Wright 73088626eedSJames Wright:::{list-table} Density Current Runtime Options 73188626eedSJames Wright:header-rows: 1 73288626eedSJames Wright 73388626eedSJames Wright* - Option 73488626eedSJames Wright - Description 73588626eedSJames Wright - Default value 73688626eedSJames Wright - Unit 73788626eedSJames Wright 73888626eedSJames Wright* - `-center` 73988626eedSJames Wright - Location of bubble center 74088626eedSJames Wright - `(lx,ly,lz)/2` 74188626eedSJames Wright - `(m,m,m)` 74288626eedSJames Wright 74388626eedSJames Wright* - `-dc_axis` 74488626eedSJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 74588626eedSJames Wright - `(0,0,0)` 74688626eedSJames Wright - 74788626eedSJames Wright 74888626eedSJames Wright* - `-rc` 74988626eedSJames Wright - Characteristic radius of thermal bubble 75088626eedSJames Wright - `1000` 75188626eedSJames Wright - `m` 75288626eedSJames Wright 75388626eedSJames Wright* - `-theta0` 75488626eedSJames Wright - Reference potential temperature 75588626eedSJames Wright - `300` 75688626eedSJames Wright - `K` 75788626eedSJames Wright 75888626eedSJames Wright* - `-thetaC` 75988626eedSJames Wright - Perturbation of potential temperature 76088626eedSJames Wright - `-15` 76188626eedSJames Wright - `K` 76288626eedSJames Wright 76388626eedSJames Wright* - `-P0` 76488626eedSJames Wright - Atmospheric pressure 76588626eedSJames Wright - `1E5` 76688626eedSJames Wright - `Pa` 76788626eedSJames Wright 76888626eedSJames Wright* - `-N` 76988626eedSJames Wright - Brunt-Vaisala frequency 77088626eedSJames Wright - `0.01` 77188626eedSJames Wright - `1/s` 77288626eedSJames Wright::: 77388626eedSJames Wright 774bc7bbd5dSLeila GhaffariThis problem can be run with: 775ccaff030SJeremy L Thompson 776bc7bbd5dSLeila Ghaffari``` 77788626eedSJames 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 77888626eedSJames Wright``` 77988626eedSJames Wright 780019b7682STimothy Aiken#### Channel flow 781019b7682STimothy Aiken 782061ff11eSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options: 78388626eedSJames Wright 78488626eedSJames Wright:::{list-table} Channel Runtime Options 78588626eedSJames Wright:header-rows: 1 78688626eedSJames Wright 78788626eedSJames Wright* - Option 78888626eedSJames Wright - Description 78988626eedSJames Wright - Default value 79088626eedSJames Wright - Unit 79188626eedSJames Wright 79288626eedSJames Wright* - `-umax` 79388626eedSJames Wright - Maximum/centerline velocity of the flow 79488626eedSJames Wright - `10` 79588626eedSJames Wright - `m/s` 79688626eedSJames Wright 79788626eedSJames Wright* - `-theta0` 79888626eedSJames Wright - Reference potential temperature 79988626eedSJames Wright - `300` 80088626eedSJames Wright - `K` 80188626eedSJames Wright 80288626eedSJames Wright* - `-P0` 80388626eedSJames Wright - Atmospheric pressure 80488626eedSJames Wright - `1E5` 80588626eedSJames Wright - `Pa` 806a1df05f8SJed Brown 807a1df05f8SJed Brown* - `-body_force_scale` 808a1df05f8SJed Brown - Multiplier for body force (`-1` for flow reversal) 809a1df05f8SJed Brown - 1 810a1df05f8SJed Brown - 81188626eedSJames Wright::: 81288626eedSJames Wright 81388626eedSJames WrightThis problem can be run with the `channel.yaml` file via: 81488626eedSJames Wright 81588626eedSJames Wright``` 81688626eedSJames Wright./navierstokes -options_file channel.yaml 81788626eedSJames Wright``` 81888626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml 81988626eedSJames Wright:language: yaml 82088626eedSJames Wright``` 82188626eedSJames Wright 822*8a94a473SJed Brown(example-blasius)= 823*8a94a473SJed Brown 824019b7682STimothy Aiken#### Blasius boundary layer 825019b7682STimothy Aiken 826061ff11eSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options: 82788626eedSJames Wright 82888626eedSJames Wright:::{list-table} Blasius Runtime Options 82988626eedSJames Wright:header-rows: 1 83088626eedSJames Wright 83188626eedSJames Wright* - Option 83288626eedSJames Wright - Description 83388626eedSJames Wright - Default value 83488626eedSJames Wright - Unit 83588626eedSJames Wright 836fb455ff0SLeila Ghaffari* - `-velocity_infinity` 83788626eedSJames Wright - Freestream velocity 83888626eedSJames Wright - `40` 83988626eedSJames Wright - `m/s` 84088626eedSJames Wright 841fb455ff0SLeila Ghaffari* - `-temperature_infinity` 842fb455ff0SLeila Ghaffari - Freestream temperature 84388626eedSJames Wright - `288` 84488626eedSJames Wright - `K` 84588626eedSJames Wright 846fb455ff0SLeila Ghaffari* - `-temperature_wall` 847fb455ff0SLeila Ghaffari - Wall temperature 84807d14e58SLeila Ghaffari - `288` 849fb455ff0SLeila Ghaffari - `K` 850fb455ff0SLeila Ghaffari 851fb455ff0SLeila Ghaffari* - `-delta0` 852fb455ff0SLeila Ghaffari - Boundary layer height at the inflow 853fb455ff0SLeila Ghaffari - `4.2e-3` 854fb455ff0SLeila Ghaffari - `m` 855fb455ff0SLeila Ghaffari 85688626eedSJames Wright* - `-P0` 85788626eedSJames Wright - Atmospheric pressure 85888626eedSJames Wright - `1.01E5` 85988626eedSJames Wright - `Pa` 86088626eedSJames Wright 86191eaef80SJames Wright* - `-platemesh_refine_height` 86291eaef80SJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 86388626eedSJames Wright - `5.9E-4` 86488626eedSJames Wright - `m` 86588626eedSJames Wright 86691eaef80SJames Wright* - `-platemesh_Ndelta` 86791eaef80SJames Wright - Number of elements to keep below `-platemesh_refine_height` 86888626eedSJames Wright - `45` 86988626eedSJames Wright - 87088626eedSJames Wright 87191eaef80SJames Wright* - `-platemesh_growth` 87288626eedSJames Wright - Growth rate of the elements in the refinement region 87388626eedSJames Wright - `1.08` 87488626eedSJames Wright - 87588626eedSJames Wright 87691eaef80SJames Wright* - `-platemesh_top_angle` 87788626eedSJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 87888626eedSJames Wright - `5` 87988626eedSJames Wright - `degrees` 880ba6664aeSJames Wright 881ba6664aeSJames Wright* - `-stg_use` 882ba6664aeSJames Wright - Whether to use stg for the inflow conditions 883ba6664aeSJames Wright - `false` 884ba6664aeSJames Wright - 88591eaef80SJames Wright 88691eaef80SJames Wright* - `-platemesh_y_node_locs_path` 88791eaef80SJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 88891eaef80SJames Wright - `""` 88991eaef80SJames Wright - 890fb455ff0SLeila Ghaffari 89107d14e58SLeila Ghaffari* - `-n_chebyshev` 892fb455ff0SLeila Ghaffari - Number of Chebyshev terms 893fb455ff0SLeila Ghaffari - `20` 894fb455ff0SLeila Ghaffari - 895fb455ff0SLeila Ghaffari 89607d14e58SLeila Ghaffari* - `-chebyshev_` 89707d14e58SLeila Ghaffari - Prefix for Chebyshev snes solve 89807d14e58SLeila Ghaffari - 89907d14e58SLeila Ghaffari - 90007d14e58SLeila Ghaffari 90188626eedSJames Wright::: 90288626eedSJames Wright 90388626eedSJames WrightThis problem can be run with the `blasius.yaml` file via: 90488626eedSJames Wright 90588626eedSJames Wright``` 90688626eedSJames Wright./navierstokes -options_file blasius.yaml 90788626eedSJames Wright``` 90888626eedSJames Wright 90988626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml 91088626eedSJames Wright:language: yaml 911bc7bbd5dSLeila Ghaffari``` 912ba6664aeSJames Wright 913ba6664aeSJames Wright#### STG Inflow for Flat Plate 914ba6664aeSJames Wright 91517be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options: 916ba6664aeSJames Wright 917ba6664aeSJames Wright:::{list-table} Blasius Runtime Options 918ba6664aeSJames Wright:header-rows: 1 919ba6664aeSJames Wright 920ba6664aeSJames Wright* - Option 921ba6664aeSJames Wright - Description 922ba6664aeSJames Wright - Default value 923ba6664aeSJames Wright - Unit 924ba6664aeSJames Wright 925ba6664aeSJames Wright* - `-stg_inflow_path` 926ba6664aeSJames Wright - Path to the STGInflow file 927ba6664aeSJames Wright - `./STGInflow.dat` 928ba6664aeSJames Wright - 929ba6664aeSJames Wright 930ba6664aeSJames Wright* - `-stg_rand_path` 931ba6664aeSJames Wright - Path to the STGRand file 932ba6664aeSJames Wright - `./STGRand.dat` 933ba6664aeSJames Wright - 934ba6664aeSJames Wright 935ba6664aeSJames Wright* - `-stg_alpha` 936ba6664aeSJames Wright - Growth rate of the wavemodes 937ba6664aeSJames Wright - `1.01` 938ba6664aeSJames Wright - 939ba6664aeSJames Wright 940ba6664aeSJames Wright* - `-stg_u0` 941ba6664aeSJames Wright - Convective velocity, $U_0$ 942ba6664aeSJames Wright - `0.0` 943ba6664aeSJames Wright - `m/s` 944ba6664aeSJames Wright 945ba6664aeSJames Wright* - `-stg_mean_only` 946ba6664aeSJames Wright - Only impose the mean velocity (no fluctutations) 947ba6664aeSJames Wright - `false` 948ba6664aeSJames Wright - 949ba6664aeSJames Wright 95030af3636SJames Wright* - `-stg_strong` 95130af3636SJames Wright - Strongly enforce the STG inflow boundary condition 95230af3636SJames Wright - `false` 95330af3636SJames Wright - 95430af3636SJames Wright 95589060322SJames Wright* - `-stg_fluctuating_IC` 95689060322SJames Wright - "Extrude" the fluctuations through the domain as an initial condition 95789060322SJames Wright - `false` 95889060322SJames Wright - 95989060322SJames Wright 960ba6664aeSJames Wright::: 961ba6664aeSJames Wright 962ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via: 963ba6664aeSJames Wright 964ba6664aeSJames Wright``` 965ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true 966ba6664aeSJames Wright``` 967ba6664aeSJames Wright 96817be3a41SJeremy L ThompsonNote the added `-stg_use true` flag 96917be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow. 970