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