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