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