1# Runtime options 2 3## Common Options 4The Navier-Stokes HONEE app is controlled via command-line options. 5The following options are common among all problem types: 6 7:::{list-table} Common Runtime Options 8:header-rows: 1 9 10* - Option 11 - Description 12 - Default value 13 14* - `-ceed` 15 - CEED resource specifier 16 - `/cpu/self/opt/blocked` 17 18* - `-problem` 19 - Problem to solve (`advection`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`) 20 - `density_current` 21 22* - `-implicit` 23 - Use implicit time integrator formulation 24 - 25 26* - `-degree` 27 - Polynomial degree of tensor product basis (must be >= 1) 28 - `1` 29 30* - `-q_extra` 31 - Number of extra quadrature points 32 - `0` 33 34* - `-ts_monitor_solution` 35 - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`) 36 - 37 38* - `-ts_monitor_solution_interval` 39 - Number of time steps between visualization output frames. 40 - `1` 41 42* - `-viewer_cgns_batch_size` 43 - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 44 - `20` 45 46* - `-checkpoint_interval` 47 - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only 48 - `10` 49 50* - `-checkpoint_vtk` 51 - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead. 52 - `false` 53 54* - `-viz_refine` 55 - Use regular refinement for VTK visualization 56 - `0` 57 58* - `-output_dir` 59 - Output directory for binary checkpoints and VTK files (if enabled). 60 - `.` 61 62* - `-output_add_stepnum2bin` 63 - Whether to add step numbers to output binary files 64 - `false` 65 66* - `-continue` 67 - Continue from previous solution (input is step number of previous solution) 68 - `0` 69 70* - `-continue_filename` 71 - Path to solution binary file from which to continue from 72 - `[output_dir]/ns-solution.bin` 73 74* - `-continue_time_filename` 75 - Path to time stamp binary file (only for legacy checkpoints) 76 - `[output_dir]/ns-time.bin` 77 78* - `-bc_wall` 79 - Use wall boundary conditions on this list of faces 80 - 81 82* - `-wall_comps` 83 - An array of constrained component numbers for wall BCs 84 - 85 86* - `-bc_slip` 87 - Use weak slip boundary condition on this list of faces 88 - 89 90* - `-bc_symmetry_x` 91 - Use symmetry boundary conditions, for the x component, on this list of faces 92 - 93 94* - `-bc_symmetry_y` 95 - Use symmetry boundary conditions, for the y component, on this list of faces 96 - 97 98* - `-bc_symmetry_z` 99 - Use symmetry boundary conditions, for the z component, on this list of faces 100 - 101 102* - `-bc_inflow` 103 - Use inflow boundary conditions on this list of faces 104 - 105 106* - `-bc_outflow` 107 - Use outflow boundary conditions on this list of faces 108 - 109 110* - `-bc_freestream` 111 - Use freestream boundary conditions on this list of faces 112 - 113 114* - `-ts_monitor_turbulence_spanstats_collect_interval` 115 - Number of timesteps between statistics collection 116 - `1` 117 118* - `-ts_monitor_turbulence_spanstats_viewer` 119 - Sets the PetscViewer for the statistics file writing, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`). Also turns the statistics collection on. 120 - 121 122* - `-ts_monitor_turbulence_spanstats_viewer_interval` 123 - Number of timesteps between statistics file writing (`-1` means only at end of run) 124 - `-1` 125 126* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size` 127 - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 128 - `20` 129 130* - `-ts_monitor_wall_force` 131 - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file. 132 - 133 134* - `-mesh_transform` 135 - Transform the mesh, usually for an initial box mesh. 136 - `none` 137 138* - `-snes_view` 139 - View PETSc `SNES` nonlinear solver configuration 140 - 141 142* - `-log_view` 143 - View PETSc performance log 144 - 145 146* - `-help` 147 - View comprehensive information about run-time options 148 - 149 150* - `-test_type` 151 - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified 152 - `none` 153 154* - `-compare_final_state_atol` 155 - Test absolute tolerance 156 - `1E-11` 157 158* - `-compare_final_state_filename` 159 - Test filename 160 - 161 162::: 163 164For 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_symmetry_x`, `-bc_symmetry_y`, and `-bc_symmetry_z` are: 165 166:::{list-table} 2D Face ID Labels 167:header-rows: 1 168* - PETSc Face Name 169 - Cartesian direction 170 - Face ID 171 172* - faceMarkerBottom 173 - -z 174 - 1 175 176* - faceMarkerRight 177 - +x 178 - 2 179 180* - faceMarkerTop 181 - +z 182 - 3 183 184* - faceMarkerLeft 185 - -x 186 - 4 187::: 188 189:::{list-table} 3D Face ID Labels 190:header-rows: 1 191* - PETSc Face Name 192 - Cartesian direction 193 - Face ID 194 195* - faceMarkerBottom 196 - -z 197 - 1 198 199* - faceMarkerTop 200 - +z 201 - 2 202 203* - faceMarkerFront 204 - -y 205 - 3 206 207* - faceMarkerBack 208 - +y 209 - 4 210 211* - faceMarkerRight 212 - +x 213 - 5 214 215* - faceMarkerLeft 216 - -x 217 - 6 218::: 219 220## Boundary conditions 221 222Boundary conditions for compressible viscous flows are notoriously tricky. 223Here we offer some recommendations. 224 225### Inflow 226 227If 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). 228It is stable and the least reflective boundary condition for acoustics. 229 230If near a viscous wall, you may want a specified inflow profile. 231Use `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles. 232These 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. 233The strong approach gives sharper resolution of velocity structures. 234We have described the primitive variable formulation here; the conservative variants are similar, but not equivalent. 235 236### Outflow 237 238If you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures. 239If thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections. 240The default Riemann solver, HLLC, is sufficient in this regard while the simpler HLL converts thermal structures exiting the domain into grid-scale reflecting acoustics. 241 242If 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. 243 244The 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). 245In our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow. 246The `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use. 247 248### Periodicity 249 250PETSc provides two ways to specify periodicity: 251 2521. Topological periodicity, in which the donor and receiver dofs are the same, obtained using: 253 254```yaml 255dm_plex: 256 shape: box 257 box_faces: 10,12,4 258 box_bd: none,none,periodic 259``` 260 261The coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary. 262This choice of coordinates prevents evaluating boundary integrals that cross the periodicity, such as for the outflow Riemann problem in the presence of spanwise periodicity. 263 2642. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in: 265 266```yaml 267dm_plex: 268 shape: zbox 269 box_faces: 10,12,4 270 box_bd: none,none,periodic 271``` 272 273Isoperiodicity enables standard boundary integrals, and is recommended for general use. 274At the time of this writing, it only supports one direction of periodicity. 275The `zbox` method uses [Z-ordering](https://en.wikipedia.org/wiki/Z-order_curve) to construct the mesh in parallel and provide an adequate initial partition, which makes it higher performance and avoids needing a partitioning package. 276 277## Advection 278 279For 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$. 280The advection problems can be run in both 2D and 3D, based on the DM defined for the problem. 281The following additional command-line options are available: 282 283:::{list-table} Advection Runtime Options 284:header-rows: 1 285 286* - Option 287 - Description 288 - Default value 289 - Unit 290 291* - `-rc` 292 - Characteristic radius of thermal bubble 293 - `1000` 294 - `m` 295 296* - `-units_meter` 297 - 1 meter in scaled length units 298 - `1E-2` 299 - 300 301* - `-units_second` 302 - 1 second in scaled time units 303 - `1E-2` 304 - 305 306* - `-units_kilogram` 307 - 1 kilogram in scaled mass units 308 - `1E-6` 309 - 310 311* - `-strong_form` 312 - Strong (1) or weak/integrated by parts (0) residual 313 - `0` 314 - 315 316* - `-stab` 317 - Stabilization method (`none`, `su`, or `supg`) 318 - `none` 319 - 320 321* - `-stab_tau` 322 - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`) 323 - `ctau` 324 - 325 326* - `-Ctau_t` 327 - Scaling factor on the temporal portion of the $\tau$ formulation 328 - 0. 329 - 330 331* - `-Ctau_a` 332 - Scaling factor on the advection portion of the $\tau$ formulation 333 - $P^2$ 334 - 335 336* - `-CtauS` 337 - Scale coefficient for stabilization tau (nondimensional) 338 - `0` 339 - 340 341* - `-wind_type` 342 - Wind type in Advection (`rotation` or `translation`) 343 - `rotation` 344 - 345 346* - `-wind_translation` 347 - Constant wind vector when `-wind_type translation` 348 - `1,0,0` 349 - 350 351* - `-diffusion_coeff` 352 - Diffusion coefficient 353 - `0` 354 - 355 356* - `-E_wind` 357 - Total energy of inflow wind when `-wind_type translation` 358 - `1E6` 359 - `J` 360 361* - `-advection_ic_type` 362 - Initial condition type, from `sphere`, `cylinder`, `cosine_hill`, and `skew` 363 - `sphere` 364 - 365 366* - `-bubble_continuity` 367 - Different shapes for `sphere` and `cylinder` initial conditions, from `smooth`, `back_sharp`, `thick`, or `cosine` 368 - `smooth` 369 - 370::: 371 372For 3D advection, an example of the `rotation` mode can be run with: 373 374``` 375./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 376``` 377 378and the `translation` mode with: 379 380``` 381./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 382``` 383 384For 2D advection, an example of the `rotation` mode can be run with: 385 386``` 387./navierstokes -problem advection -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 388``` 389 390and the `translation` mode with: 391 392``` 393./navierstokes -problem advection -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 394``` 395Note the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 396 397## Inviscid Ideal Gas 398 399### Isentropic Euler vortex 400 401For the Isentropic Vortex problem, the following additional command-line options are available: 402 403:::{list-table} Isentropic Vortex Runtime Options 404:header-rows: 1 405 406* - Option 407 - Description 408 - Default value 409 - Unit 410 411* - `-center` 412 - Location of vortex center 413 - `(lx,ly,lz)/2` 414 - `(m,m,m)` 415 416* - `-units_meter` 417 - 1 meter in scaled length units 418 - `1E-2` 419 - 420 421* - `-units_second` 422 - 1 second in scaled time units 423 - `1E-2` 424 - 425 426* - `-mean_velocity` 427 - Background velocity vector 428 - `(1,1,0)` 429 - 430 431* - `-vortex_strength` 432 - Strength of vortex < 10 433 - `5` 434 - 435 436* - `-c_tau` 437 - Stabilization constant 438 - `0.5` 439 - 440::: 441 442This problem can be run with: 443 444``` 445./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_symmetry_z 1,2 -mean_velocity .5,-.8,0. 446``` 447 448### Sod shock tube 449 450For the Shock Tube problem, the following additional command-line options are available: 451 452:::{list-table} Shock Tube Runtime Options 453:header-rows: 1 454 455* - Option 456 - Description 457 - Default value 458 - Unit 459 460* - `-units_meter` 461 - 1 meter in scaled length units 462 - `1E-2` 463 - 464 465* - `-units_second` 466 - 1 second in scaled time units 467 - `1E-2` 468 - 469 470* - `-yzb` 471 - Use YZB discontinuity capturing 472 - `none` 473 - 474 475* - `-stab` 476 - Stabilization method (`none`, `su`, or `supg`) 477 - `none` 478 - 479::: 480 481This problem can be run with: 482 483``` 484./navierstokes -problem shocktube -yzb -stab su -bc_symmetry_z 3,4 -bc_symmetry_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 485``` 486 487## Newtonian viscosity, Ideal Gas 488 489For the Density Current, Channel, and Blasius problems, the following common command-line options are available: 490 491:::{list-table} Newtonian Ideal Gas problems Runtime Options 492:header-rows: 1 493 494* - Option 495 - Description 496 - Default value 497 - Unit 498 499* - `-units_meter` 500 - 1 meter in scaled length units 501 - `1` 502 - 503 504* - `-units_second` 505 - 1 second in scaled time units 506 - `1` 507 - 508 509* - `-units_kilogram` 510 - 1 kilogram in scaled mass units 511 - `1` 512 - 513 514* - `-units_Kelvin` 515 - 1 Kelvin in scaled temperature units 516 - `1` 517 - 518 519* - `-stab` 520 - Stabilization method (`none`, `su`, or `supg`) 521 - `none` 522 - 523 524* - `-c_tau` 525 - Stabilization constant, $c_\tau$ 526 - `0.5` 527 - 528 529* - `-Ctau_t` 530 - Stabilization time constant, $C_t$ 531 - `1.0` 532 - 533 534* - `-Ctau_v` 535 - Stabilization viscous constant, $C_v$ 536 - `36, 60, 128 for degree = 1, 2, 3` 537 - 538 539* - `-Ctau_C` 540 - Stabilization continuity constant, $C_c$ 541 - `1.0` 542 - 543 544* - `-Ctau_M` 545 - Stabilization momentum constant, $C_m$ 546 - `1.0` 547 - 548 549* - `-Ctau_E` 550 - Stabilization energy constant, $C_E$ 551 - `1.0` 552 - 553 554* - `-cv` 555 - Heat capacity at constant volume 556 - `717` 557 - `J/(kg K)` 558 559* - `-cp` 560 - Heat capacity at constant pressure 561 - `1004` 562 - `J/(kg K)` 563 564* - `-gravity` 565 - Gravitational acceleration vector 566 - `0,0,0` 567 - `m/s^2` 568 569* - `-lambda` 570 - Stokes hypothesis second viscosity coefficient 571 - `-2/3` 572 - 573 574* - `-mu` 575 - Shear dynamic viscosity coefficient 576 - `1.8e-5` 577 - `Pa s` 578 579* - `-k` 580 - Thermal conductivity 581 - `0.02638` 582 - `W/(m K)` 583 584* - `-newtonian_unit_tests` 585 - Developer option to test properties 586 - `false` 587 - boolean 588 589* - `-state_var` 590 - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$), `primitive` ($P, \bm{u}, T$), or `entropy` ($\frac{\gamma - s}{\gamma - 1} - \frac{\rho}{P} (e - c_v T),\ \frac{\rho}{P} \bm{u},\ -\frac{\rho}{P}$) where $s = \ln(P\rho^{-\gamma})$ 591 - `conservative` 592 - string 593 594* - `-idl_decay_time` 595 - Characteristic timescale of the pressure deviance decay. The timestep is good starting point 596 - `-1` (disabled) 597 - `s` 598 599* - `-idl_start` 600 - Start of IDL in the x direction 601 - `0` 602 - `m` 603 604* - `-idl_length` 605 - Length of IDL in the positive x direction 606 - `0` 607 - `m` 608 609* - `-idl_pressure` 610 - Pressure used for IDL reference pressure 611 - `-reference_pressure` 612 - `Pa` 613 614* - `-sgs_model_type` 615 - Type of subgrid stress model to use. Currently only `data_driven` is available 616 - `none` 617 - string 618 619* - `-sgs_model_dd_leakyrelu_alpha` 620 - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU 621 - 0 622 - 623 624* - `-sgs_model_dd_parameter_dir` 625 - Path to directory with data-driven model parameters (weights, biases, etc.) 626 - `./dd_sgs_parameters` 627 - string 628 629* - `-sgs_model_dd_model_implementation` 630 - Which computational implementation to use for SGS DD model (`fused`, `sequential_ceed`, `sequential_torch`) 631 - `fused` 632 - string 633 634* - `-sgs_model_dd_torch_model_path` 635 - Path to the PyTorch `*.pt` file containing the DD inference model 636 - 637 - string 638 639* - `-sgs_model_dd_torch_model_device` 640 - What hardware to perform the model inference on (`cpu`, `cuda`, `hip`, `xpu`) 641 - Default matches the libCEED backend 642 - string 643 644* - `-diff_filter_monitor` 645 - Enable differential filter TSMonitor 646 - `false` 647 - boolean 648 649* - `-diff_filter_grid_based_width` 650 - Use filter width based on the grid size 651 - `false` 652 - boolean 653 654* - `-diff_filter_width_scaling` 655 - Anisotropic scaling for filter width in wall-aligned coordinates (snz) 656 - `1,1,1` 657 - `m` 658 659* - `-diff_filter_kernel_scaling` 660 - Scaling to make differential kernel size equivalent to other filter kernels 661 - `0.1` 662 - `m^2` 663 664* - `-diff_filter_wall_damping_function` 665 - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`) 666 - `none` 667 - string 668 669* - `-diff_filter_wall_damping_constant` 670 - Constant for the wall-damping function. $A^+$ for `van_driest` damping function. 671 - 25 672 - 673 674* - `-diff_filter_friction_length` 675 - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions 676 - 0 677 - `m` 678 679* - `-sgs_train_enable` 680 - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis. 681 - `false` 682 - boolean 683 684* - `-sgs_train_write_data_interval` 685 - Number of timesteps between writing training data into SmartRedis database 686 - `1` 687 - 688 689* - `-sgs_train_overwrite_data` 690 - Whether new training data should overwrite old data on database 691 - `true` 692 - boolean 693 694* - `-sgs_train_filter_widths` 695 - List of scalar values for different filter widths to calculate for training data 696 - 697 - `m` 698 699* - `-smartsim_collocated_num_ranks` 700 - Number of MPI ranks associated with each collocated database (i.e. ranks per node) 701 - `1` 702 - 703::: 704 705### Gaussian Wave 706 707The Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options: 708 709:::{list-table} Gaussian Wave Runtime Options 710:header-rows: 1 711 712* - Option 713 - Description 714 - Default value 715 - Unit 716 717* - `-freestream_riemann` 718 - Riemann solver for boundaries (HLL or HLLC) 719 - `hllc` 720 - 721 722* - `-freestream_velocity` 723 - Freestream velocity vector 724 - `0,0,0` 725 - `m/s` 726 727* - `-freestream_temperature` 728 - Freestream temperature 729 - `288` 730 - `K` 731 732* - `-freestream_pressure` 733 - Freestream pressure 734 - `1.01e5` 735 - `Pa` 736 737* - `-epicenter` 738 - Coordinates of center of perturbation 739 - `0,0,0` 740 - `m` 741 742* - `-amplitude` 743 - Amplitude of the perturbation 744 - `0.1` 745 - 746 747* - `-width` 748 - Width parameter of the perturbation 749 - `0.002` 750 - `m` 751 752::: 753 754This problem can be run with the `gaussianwave.yaml` file via: 755 756``` 757./navierstokes -options_file gaussianwave.yaml 758``` 759 760```{literalinclude} ../gaussianwave.yaml 761:language: yaml 762``` 763 764### Vortex Shedding - Flow past Cylinder 765 766The vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options: 767 768:::{list-table} Vortex Shedding Runtime Options 769:header-rows: 1 770 771* - Option 772 - Description 773 - Default value 774 - Unit 775 776* - `-freestream_velocity` 777 - Freestream velocity vector 778 - `0,0,0` 779 - `m/s` 780 781* - `-freestream_temperature` 782 - Freestream temperature 783 - `288` 784 - `K` 785 786* - `-freestream_pressure` 787 - Freestream pressure 788 - `1.01e5` 789 - `Pa` 790 791::: 792 793The initial condition is taken from `-reference_temperature` and `-reference_pressure`. 794To run this problem, first generate a mesh: 795 796```console 797$ make -C /meshes 798``` 799 800Then run by building the executable and running: 801 802```console 803$ make build/fluids-navierstokes 804$ mpiexec -n 6 build/fluids-navierstokes -options_file vortexshedding.yaml -{ts,snes}_monitor_ 805``` 806 807The vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps). 808The above run writes a file named `force.csv` (see `ts_monitor_wall_force` in `vortexshedding.yaml`), which can be postprocessed by running to create a figure showing lift and drag coefficients over time. 809 810```console 811$ python postprocess/vortexshedding.py 812``` 813 814```{literalinclude} ../vortexshedding.yaml 815:language: yaml 816``` 817 818### Density current 819 820The Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options: 821 822:::{list-table} Density Current Runtime Options 823:header-rows: 1 824 825* - Option 826 - Description 827 - Default value 828 - Unit 829 830* - `-center` 831 - Location of bubble center 832 - `(lx,ly,lz)/2` 833 - `(m,m,m)` 834 835* - `-dc_axis` 836 - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 837 - `(0,0,0)` 838 - 839 840* - `-rc` 841 - Characteristic radius of thermal bubble 842 - `1000` 843 - `m` 844 845* - `-theta0` 846 - Reference potential temperature 847 - `300` 848 - `K` 849 850* - `-thetaC` 851 - Perturbation of potential temperature 852 - `-15` 853 - `K` 854 855* - `-P0` 856 - Atmospheric pressure 857 - `1E5` 858 - `Pa` 859 860* - `-N` 861 - Brunt-Vaisala frequency 862 - `0.01` 863 - `1/s` 864::: 865 866This problem can be run with: 867 868``` 869./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_symmetry_y 3,4 -mu 75 870``` 871 872### Channel flow 873 874The Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options: 875 876:::{list-table} Channel Runtime Options 877:header-rows: 1 878 879* - Option 880 - Description 881 - Default value 882 - Unit 883 884* - `-umax` 885 - Maximum/centerline velocity of the flow 886 - `10` 887 - `m/s` 888 889* - `-theta0` 890 - Reference potential temperature 891 - `300` 892 - `K` 893 894* - `-P0` 895 - Atmospheric pressure 896 - `1E5` 897 - `Pa` 898 899* - `-body_force_scale` 900 - Multiplier for body force (`-1` for flow reversal) 901 - 1 902 - 903::: 904 905This problem can be run with the `channel.yaml` file via: 906 907``` 908./navierstokes -options_file channel.yaml 909``` 910```{literalinclude} ../channel.yaml 911:language: yaml 912``` 913 914(example-blasius)= 915 916### Blasius boundary layer 917 918The Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options: 919 920:::{list-table} Blasius Runtime Options 921:header-rows: 1 922 923* - Option 924 - Description 925 - Default value 926 - Unit 927 928* - `-velocity_infinity` 929 - Freestream velocity 930 - `40` 931 - `m/s` 932 933* - `-temperature_infinity` 934 - Freestream temperature 935 - `288` 936 - `K` 937 938* - `-pressure_infinity` 939 - Atmospheric pressure, also sets IDL reference pressure 940 - `1.01E5` 941 - `Pa` 942 943* - `-temperature_wall` 944 - Wall temperature 945 - `288` 946 - `K` 947 948* - `-delta0` 949 - Boundary layer height at the inflow 950 - `4.2e-3` 951 - `m` 952 953* - `-platemesh_modify_mesh` 954 - Whether to modify the mesh using the given options below. 955 - `false` 956 - 957 958* - `-platemesh_refine_height` 959 - Height at which `-platemesh_Ndelta` number of elements should refined into 960 - `5.9E-4` 961 - `m` 962 963* - `-platemesh_Ndelta` 964 - Number of elements to keep below `-platemesh_refine_height` 965 - `45` 966 - 967 968* - `-platemesh_growth` 969 - Growth rate of the elements in the refinement region 970 - `1.08` 971 - 972 973* - `-platemesh_top_angle` 974 - Downward angle of the top face of the domain. This face serves as an outlet. 975 - `5` 976 - `degrees` 977 978* - `-platemesh_y_node_locs_path` 979 - Path to file with y node locations. If empty, will use mesh warping instead. 980 - `""` 981 - 982 983* - `-stg_use` 984 - Whether to use STG for the inflow conditions 985 - `false` 986 - 987 988* - `-n_chebyshev` 989 - Number of Chebyshev terms 990 - `20` 991 - 992 993* - `-chebyshev_` 994 - Prefix for Chebyshev snes solve 995 - 996 - 997 998::: 999 1000This problem can be run with the `blasius.yaml` file via: 1001 1002``` 1003./navierstokes -options_file blasius.yaml 1004``` 1005 1006```{literalinclude} ../blasius.yaml 1007:language: yaml 1008``` 1009 1010### STG Inflow for Flat Plate 1011 1012Using the STG Inflow for the blasius problem adds the following command-line options: 1013 1014:::{list-table} Blasius Runtime Options 1015:header-rows: 1 1016 1017* - Option 1018 - Description 1019 - Default value 1020 - Unit 1021 1022* - `-stg_inflow_path` 1023 - Path to the STGInflow file 1024 - `./STGInflow.dat` 1025 - 1026 1027* - `-stg_rand_path` 1028 - Path to the STGRand file 1029 - `./STGRand.dat` 1030 - 1031 1032* - `-stg_alpha` 1033 - Growth rate of the wavemodes 1034 - `1.01` 1035 - 1036 1037* - `-stg_u0` 1038 - Convective velocity, $U_0$ 1039 - `0.0` 1040 - `m/s` 1041 1042* - `-stg_mean_only` 1043 - Only impose the mean velocity (no fluctutations) 1044 - `false` 1045 - 1046 1047* - `-stg_strong` 1048 - Strongly enforce the STG inflow boundary condition 1049 - `false` 1050 - 1051 1052* - `-stg_fluctuating_IC` 1053 - "Extrude" the fluctuations through the domain as an initial condition 1054 - `false` 1055 - 1056 1057* - `-stg_dx` 1058 - Set the element size in the x direction. Default is calculated for box meshes, assuming equispaced elements. 1059 - 1060 - `m` 1061 1062* - `-stg_h_scale_factor` 1063 - Scale element size for cutoff frequency calculation 1064 - $1/p$ 1065 - 1066 1067::: 1068 1069This problem can be run with the `blasius.yaml` file via: 1070 1071``` 1072./navierstokes -options_file blasius.yaml -stg_use true 1073``` 1074 1075Note the added `-stg_use true` flag 1076This overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow. 1077