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-Diffusion 278 279There 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* - `-Ctau_d` 337 - Scaling factor on the diffusion portion of the $\tau$ formulation 338 - $P^4$ 339 - 340 341* - `-CtauS` 342 - Scale coefficient for stabilization tau (nondimensional) 343 - `0` 344 - 345 346* - `-wind_type` 347 - Wind type in Advection (`rotation`, `translation`, `boundary_layer`) 348 - `rotation` 349 - 350 351* - `-wind_translation` 352 - Constant wind vector when `-wind_type translation` 353 - `1,0,0` 354 - 355 356* - `-diffusion_coeff` 357 - Diffusion coefficient 358 - `0` 359 - 360 361* - `-E_wind` 362 - Total energy of inflow wind when `-wind_type translation` 363 - `1E6` 364 - `J` 365 366* - `-advection_ic_type` 367 - Initial condition type, (`sphere`, `cylinder`, `cosine_hill`, `skew`, `wave`, `boundary_layer`) 368 - `sphere` 369 - 370 371* - `-bubble_continuity` 372 - Different shapes for `sphere` and `cylinder` initial conditions, from `smooth`, `back_sharp`, `thick`, or `cosine` 373 - `smooth` 374 - 375 376* - `-wave_type` 377 - The wave form used for `-advection_ic_type wave` (`sine`, `square`) 378 - `sine` 379 - 380 381* - `-wave_frequency` 382 - Frequency of the wave 383 - $2\pi$ 384 - `1/s` 385 386* - `-wave_phase` 387 - Phase angle of the wave 388 - $2\pi$ 389 - 390::: 391 392For 3D advection, an example of the `rotation` mode can be run with: 393 394``` 395./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 396``` 397 398and the `translation` mode with: 399 400``` 401./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 402``` 403 404For 2D advection, an example of the `rotation` mode can be run with: 405 406``` 407./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 408``` 409 410and the `translation` mode with: 411 412``` 413./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 414``` 415Note the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 416 417## Inviscid Ideal Gas 418 419### Isentropic Euler vortex 420 421For the Isentropic Vortex problem, the following additional command-line options are available: 422 423:::{list-table} Isentropic Vortex Runtime Options 424:header-rows: 1 425 426* - Option 427 - Description 428 - Default value 429 - Unit 430 431* - `-center` 432 - Location of vortex center 433 - `(lx,ly,lz)/2` 434 - `(m,m,m)` 435 436* - `-units_meter` 437 - 1 meter in scaled length units 438 - `1E-2` 439 - 440 441* - `-units_second` 442 - 1 second in scaled time units 443 - `1E-2` 444 - 445 446* - `-mean_velocity` 447 - Background velocity vector 448 - `(1,1,0)` 449 - 450 451* - `-vortex_strength` 452 - Strength of vortex < 10 453 - `5` 454 - 455 456* - `-c_tau` 457 - Stabilization constant 458 - `0.5` 459 - 460::: 461 462This problem can be run with: 463 464``` 465./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. 466``` 467 468### Sod shock tube 469 470For the Shock Tube problem, the following additional command-line options are available: 471 472:::{list-table} Shock Tube Runtime Options 473:header-rows: 1 474 475* - Option 476 - Description 477 - Default value 478 - Unit 479 480* - `-units_meter` 481 - 1 meter in scaled length units 482 - `1E-2` 483 - 484 485* - `-units_second` 486 - 1 second in scaled time units 487 - `1E-2` 488 - 489 490* - `-yzb` 491 - Use YZB discontinuity capturing 492 - `none` 493 - 494 495* - `-stab` 496 - Stabilization method (`none`, `su`, or `supg`) 497 - `none` 498 - 499::: 500 501This problem can be run with: 502 503``` 504./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 505``` 506 507## Newtonian viscosity, Ideal Gas 508 509For the Density Current, Channel, and Blasius problems, the following common command-line options are available: 510 511:::{list-table} Newtonian Ideal Gas problems Runtime Options 512:header-rows: 1 513 514* - Option 515 - Description 516 - Default value 517 - Unit 518 519* - `-units_meter` 520 - 1 meter in scaled length units 521 - `1` 522 - 523 524* - `-units_second` 525 - 1 second in scaled time units 526 - `1` 527 - 528 529* - `-units_kilogram` 530 - 1 kilogram in scaled mass units 531 - `1` 532 - 533 534* - `-units_Kelvin` 535 - 1 Kelvin in scaled temperature units 536 - `1` 537 - 538 539* - `-stab` 540 - Stabilization method (`none`, `su`, or `supg`) 541 - `none` 542 - 543 544* - `-c_tau` 545 - Stabilization constant, $c_\tau$ 546 - `0.5` 547 - 548 549* - `-Ctau_t` 550 - Stabilization time constant, $C_t$ 551 - `1.0` 552 - 553 554* - `-Ctau_v` 555 - Stabilization viscous constant, $C_v$ 556 - `36, 60, 128 for degree = 1, 2, 3` 557 - 558 559* - `-Ctau_C` 560 - Stabilization continuity constant, $C_c$ 561 - `1.0` 562 - 563 564* - `-Ctau_M` 565 - Stabilization momentum constant, $C_m$ 566 - `1.0` 567 - 568 569* - `-Ctau_E` 570 - Stabilization energy constant, $C_E$ 571 - `1.0` 572 - 573 574* - `-div_diff_flux_projection_method` 575 - Method used to calculate divergence of diffusive flux projection (`none`, `direct`, or `indirect`) 576 - `none` 577 - 578 579* - `-div_diff_flux_projection_ksp*` 580 - Control the KSP object for the projection of the divergence of diffusive flux 581 - N/A 582 - 583 584* - `-cv` 585 - Heat capacity at constant volume 586 - `717` 587 - `J/(kg K)` 588 589* - `-cp` 590 - Heat capacity at constant pressure 591 - `1004` 592 - `J/(kg K)` 593 594* - `-gravity` 595 - Gravitational acceleration vector 596 - `0,0,0` 597 - `m/s^2` 598 599* - `-lambda` 600 - Stokes hypothesis second viscosity coefficient 601 - `-2/3` 602 - 603 604* - `-mu` 605 - Shear dynamic viscosity coefficient 606 - `1.8e-5` 607 - `Pa s` 608 609* - `-k` 610 - Thermal conductivity 611 - `0.02638` 612 - `W/(m K)` 613 614* - `-newtonian_unit_tests` 615 - Developer option to test properties 616 - `false` 617 - boolean 618 619* - `-state_var` 620 - 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})$ 621 - `conservative` 622 - string 623 624* - `-idl_decay_time` 625 - Characteristic timescale of the pressure deviance decay. The timestep is good starting point 626 - `-1` (disabled) 627 - `s` 628 629* - `-idl_start` 630 - Start of IDL in the x direction 631 - `0` 632 - `m` 633 634* - `-idl_length` 635 - Length of IDL in the positive x direction 636 - `0` 637 - `m` 638 639* - `-idl_pressure` 640 - Pressure used for IDL reference pressure 641 - `-reference_pressure` 642 - `Pa` 643 644* - `-sgs_model_type` 645 - Type of subgrid stress model to use. Currently only `data_driven` is available 646 - `none` 647 - string 648 649* - `-sgs_model_dd_leakyrelu_alpha` 650 - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU 651 - 0 652 - 653 654* - `-sgs_model_dd_parameter_dir` 655 - Path to directory with data-driven model parameters (weights, biases, etc.) 656 - `./dd_sgs_parameters` 657 - string 658 659* - `-sgs_model_dd_model_implementation` 660 - Which computational implementation to use for SGS DD model (`fused`, `sequential_ceed`, `sequential_torch`) 661 - `fused` 662 - string 663 664* - `-sgs_model_dd_torch_model_path` 665 - Path to the PyTorch `*.pt` file containing the DD inference model 666 - 667 - string 668 669* - `-sgs_model_dd_torch_model_device` 670 - What hardware to perform the model inference on (`cpu`, `cuda`, `hip`, `xpu`) 671 - Default matches the libCEED backend 672 - string 673 674* - `-diff_filter_monitor` 675 - Enable differential filter TSMonitor 676 - `false` 677 - boolean 678 679* - `-diff_filter_grid_based_width` 680 - Use filter width based on the grid size 681 - `false` 682 - boolean 683 684* - `-diff_filter_width_scaling` 685 - Anisotropic scaling for filter width in wall-aligned coordinates (snz) 686 - `1,1,1` 687 - `m` 688 689* - `-diff_filter_kernel_scaling` 690 - Scaling to make differential kernel size equivalent to other filter kernels 691 - `0.1` 692 - `m^2` 693 694* - `-diff_filter_wall_damping_function` 695 - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`) 696 - `none` 697 - string 698 699* - `-diff_filter_wall_damping_constant` 700 - Constant for the wall-damping function. $A^+$ for `van_driest` damping function. 701 - 25 702 - 703 704* - `-diff_filter_friction_length` 705 - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions 706 - 0 707 - `m` 708 709* - `-sgs_train_enable` 710 - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis. 711 - `false` 712 - boolean 713 714* - `-sgs_train_write_data_interval` 715 - Number of timesteps between writing training data into SmartRedis database 716 - `1` 717 - 718 719* - `-sgs_train_overwrite_data` 720 - Whether new training data should overwrite old data on database 721 - `true` 722 - boolean 723 724* - `-sgs_train_filter_widths` 725 - List of scalar values for different filter widths to calculate for training data 726 - 727 - `m` 728 729* - `-smartsim_collocated_num_ranks` 730 - Number of MPI ranks associated with each collocated database (i.e. ranks per node) 731 - `1` 732 - 733::: 734 735### Gaussian Wave 736 737The Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options: 738 739:::{list-table} Gaussian Wave Runtime Options 740:header-rows: 1 741 742* - Option 743 - Description 744 - Default value 745 - Unit 746 747* - `-freestream_riemann` 748 - Riemann solver for boundaries (HLL or HLLC) 749 - `hllc` 750 - 751 752* - `-freestream_velocity` 753 - Freestream velocity vector 754 - `0,0,0` 755 - `m/s` 756 757* - `-freestream_temperature` 758 - Freestream temperature 759 - `288` 760 - `K` 761 762* - `-freestream_pressure` 763 - Freestream pressure 764 - `1.01e5` 765 - `Pa` 766 767* - `-epicenter` 768 - Coordinates of center of perturbation 769 - `0,0,0` 770 - `m` 771 772* - `-amplitude` 773 - Amplitude of the perturbation 774 - `0.1` 775 - 776 777* - `-width` 778 - Width parameter of the perturbation 779 - `0.002` 780 - `m` 781 782::: 783 784This problem can be run with the `examples/gaussianwave.yaml` file via: 785 786``` 787./build/navierstokes -options_file examples/gaussianwave.yaml 788``` 789 790```{literalinclude} ../examples/gaussianwave.yaml 791:language: yaml 792``` 793 794### Vortex Shedding - Flow past Cylinder 795 796The vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options: 797 798:::{list-table} Vortex Shedding Runtime Options 799:header-rows: 1 800 801* - Option 802 - Description 803 - Default value 804 - Unit 805 806* - `-freestream_velocity` 807 - Freestream velocity vector 808 - `0,0,0` 809 - `m/s` 810 811* - `-freestream_temperature` 812 - Freestream temperature 813 - `288` 814 - `K` 815 816* - `-freestream_pressure` 817 - Freestream pressure 818 - `1.01e5` 819 - `Pa` 820 821::: 822 823The initial condition is taken from `-reference_temperature` and `-reference_pressure`. 824To run this problem, first generate a mesh: 825 826```console 827$ make -C examples/meshes 828``` 829 830Then run by building the executable and running: 831 832```console 833$ make -j 834$ mpiexec -n 6 build/navierstokes -options_file examples/vortexshedding.yaml -{ts,snes}_monitor_ 835``` 836 837The vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps). 838The 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. 839 840```console 841$ python postprocess/vortexshedding.py 842``` 843 844```{literalinclude} ../examples/vortexshedding.yaml 845:language: yaml 846``` 847 848### Density current 849 850The Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options: 851 852:::{list-table} Density Current Runtime Options 853:header-rows: 1 854 855* - Option 856 - Description 857 - Default value 858 - Unit 859 860* - `-center` 861 - Location of bubble center 862 - `(lx,ly,lz)/2` 863 - `(m,m,m)` 864 865* - `-dc_axis` 866 - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 867 - `(0,0,0)` 868 - 869 870* - `-rc` 871 - Characteristic radius of thermal bubble 872 - `1000` 873 - `m` 874 875* - `-theta0` 876 - Reference potential temperature 877 - `300` 878 - `K` 879 880* - `-thetaC` 881 - Perturbation of potential temperature 882 - `-15` 883 - `K` 884 885* - `-P0` 886 - Atmospheric pressure 887 - `1E5` 888 - `Pa` 889 890* - `-N` 891 - Brunt-Vaisala frequency 892 - `0.01` 893 - `1/s` 894::: 895 896This problem can be run with: 897 898``` 899./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 900``` 901 902### Channel flow 903 904The Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options: 905 906:::{list-table} Channel Runtime Options 907:header-rows: 1 908 909* - Option 910 - Description 911 - Default value 912 - Unit 913 914* - `-umax` 915 - Maximum/centerline velocity of the flow 916 - `10` 917 - `m/s` 918 919* - `-theta0` 920 - Reference potential temperature 921 - `300` 922 - `K` 923 924* - `-P0` 925 - Atmospheric pressure 926 - `1E5` 927 - `Pa` 928 929* - `-body_force_scale` 930 - Multiplier for body force (`-1` for flow reversal) 931 - 1 932 - 933::: 934 935This problem can be run with the `examples/channel.yaml` file via: 936 937``` 938./build/navierstokes -options_file examples/channel.yaml 939``` 940```{literalinclude} ../examples/channel.yaml 941:language: yaml 942``` 943 944(example-blasius)= 945 946### Blasius boundary layer 947 948The Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options: 949 950:::{list-table} Blasius Runtime Options 951:header-rows: 1 952 953* - Option 954 - Description 955 - Default value 956 - Unit 957 958* - `-velocity_infinity` 959 - Freestream velocity 960 - `40` 961 - `m/s` 962 963* - `-temperature_infinity` 964 - Freestream temperature 965 - `288` 966 - `K` 967 968* - `-pressure_infinity` 969 - Atmospheric pressure, also sets IDL reference pressure 970 - `1.01E5` 971 - `Pa` 972 973* - `-temperature_wall` 974 - Wall temperature 975 - `288` 976 - `K` 977 978* - `-delta0` 979 - Boundary layer height at the inflow 980 - `4.2e-3` 981 - `m` 982 983* - `-platemesh_modify_mesh` 984 - Whether to modify the mesh using the given options below. 985 - `false` 986 - 987 988* - `-platemesh_refine_height` 989 - Height at which `-platemesh_Ndelta` number of elements should refined into 990 - `5.9E-4` 991 - `m` 992 993* - `-platemesh_Ndelta` 994 - Number of elements to keep below `-platemesh_refine_height` 995 - `45` 996 - 997 998* - `-platemesh_growth` 999 - Growth rate of the elements in the refinement region 1000 - `1.08` 1001 - 1002 1003* - `-platemesh_top_angle` 1004 - Downward angle of the top face of the domain. This face serves as an outlet. 1005 - `5` 1006 - `degrees` 1007 1008* - `-platemesh_y_node_locs_path` 1009 - Path to file with y node locations. If empty, will use mesh warping instead. 1010 - `""` 1011 - 1012 1013* - `-stg_use` 1014 - Whether to use STG for the inflow conditions 1015 - `false` 1016 - 1017 1018* - `-n_chebyshev` 1019 - Number of Chebyshev terms 1020 - `20` 1021 - 1022 1023* - `-chebyshev_` 1024 - Prefix for Chebyshev snes solve 1025 - 1026 - 1027 1028::: 1029 1030This problem can be run with the `examples/blasius.yaml` file via: 1031 1032``` 1033./build/navierstokes -options_file examples/blasius.yaml 1034``` 1035 1036```{literalinclude} ../examples/blasius.yaml 1037:language: yaml 1038``` 1039 1040### STG Inflow for Flat Plate 1041 1042Using the STG Inflow for the blasius problem adds the following command-line options: 1043 1044:::{list-table} Blasius Runtime Options 1045:header-rows: 1 1046 1047* - Option 1048 - Description 1049 - Default value 1050 - Unit 1051 1052* - `-stg_inflow_path` 1053 - Path to the STGInflow file 1054 - `./STGInflow.dat` 1055 - 1056 1057* - `-stg_rand_path` 1058 - Path to the STGRand file 1059 - `./STGRand.dat` 1060 - 1061 1062* - `-stg_alpha` 1063 - Growth rate of the wavemodes 1064 - `1.01` 1065 - 1066 1067* - `-stg_u0` 1068 - Convective velocity, $U_0$ 1069 - `0.0` 1070 - `m/s` 1071 1072* - `-stg_mean_only` 1073 - Only impose the mean velocity (no fluctutations) 1074 - `false` 1075 - 1076 1077* - `-stg_strong` 1078 - Strongly enforce the STG inflow boundary condition 1079 - `false` 1080 - 1081 1082* - `-stg_fluctuating_IC` 1083 - "Extrude" the fluctuations through the domain as an initial condition 1084 - `false` 1085 - 1086 1087* - `-stg_dx` 1088 - Set the element size in the x direction. Default is calculated for box meshes, assuming equispaced elements. 1089 - 1090 - `m` 1091 1092* - `-stg_h_scale_factor` 1093 - Scale element size for cutoff frequency calculation 1094 - $1/p$ 1095 - 1096 1097::: 1098 1099This problem can be run with the `examples/blasius.yaml` file via: 1100 1101``` 1102./build/navierstokes -options_file examples/blasius.yaml -stg_use true 1103``` 1104 1105Note the added `-stg_use true` flag 1106This overrides the `stg: use: false` setting in the `examples/blasius.yaml` file, enabling the use of the STG inflow. 1107