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