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