1ccaff030SJeremy L Thompson## libCEED: Navier-Stokes Example 2ccaff030SJeremy L Thompson 3ccaff030SJeremy L ThompsonThis page provides a description of the Navier-Stokes example for the libCEED library, based on PETSc. 4b8962995SJeremy L ThompsonPETSc v3.17 or a development version of PETSc at commit 0e95d842 or later is required. 5ccaff030SJeremy L Thompson 677841947SLeila GhaffariThe Navier-Stokes problem solves the compressible Navier-Stokes equations in three dimensions using an explicit time integration. 777841947SLeila GhaffariThe state variables are mass density, momentum density, and energy density. 8ccaff030SJeremy L Thompson 977841947SLeila GhaffariThe main Navier-Stokes solver for libCEED is defined in [`navierstokes.c`](navierstokes.c) with different problem definitions according to the application of interest. 10ccaff030SJeremy L Thompson 11bc7bbd5dSLeila GhaffariBuild by using: 12ccaff030SJeremy L Thompson 13ccaff030SJeremy L Thompson`make` 14ccaff030SJeremy L Thompson 15bc7bbd5dSLeila Ghaffariand run with: 16ccaff030SJeremy L Thompson 17bc7bbd5dSLeila Ghaffari``` 18bc7bbd5dSLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree] 19bc7bbd5dSLeila Ghaffari``` 20ccaff030SJeremy L Thompson 21bc7bbd5dSLeila Ghaffari## Runtime options 22ccaff030SJeremy L Thompson 23bc7bbd5dSLeila Ghaffari% inclusion-fluids-marker 24ccaff030SJeremy L Thompson 25bc7bbd5dSLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options. 26bc7bbd5dSLeila GhaffariThe following options are common among all problem types: 27ccaff030SJeremy L Thompson 28bc7bbd5dSLeila Ghaffari:::{list-table} Common Runtime Options 29bc7bbd5dSLeila Ghaffari:header-rows: 1 30ccaff030SJeremy L Thompson 31bc7bbd5dSLeila Ghaffari* - Option 32bc7bbd5dSLeila Ghaffari - Description 33bc7bbd5dSLeila Ghaffari - Default value 34ccaff030SJeremy L Thompson 35bc7bbd5dSLeila Ghaffari* - `-ceed` 36bc7bbd5dSLeila Ghaffari - CEED resource specifier 37bc7bbd5dSLeila Ghaffari - `/cpu/self/opt/blocked` 38ccaff030SJeremy L Thompson 393866774cSJames Wright* - `-test_type` 403866774cSJames Wright - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified 413866774cSJames Wright - `none` 42ccaff030SJeremy L Thompson 43bc7bbd5dSLeila Ghaffari* - `-compare_final_state_atol` 44bc7bbd5dSLeila Ghaffari - Test absolute tolerance 45bc7bbd5dSLeila Ghaffari - `1E-11` 46ccaff030SJeremy L Thompson 47bc7bbd5dSLeila Ghaffari* - `-compare_final_state_filename` 48bc7bbd5dSLeila Ghaffari - Test filename 49bc7bbd5dSLeila Ghaffari - 50ccaff030SJeremy L Thompson 51bc7bbd5dSLeila Ghaffari* - `-problem` 52*9e576805SJames Wright - Problem to solve (`advection`, `advection2d`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`) 53bc7bbd5dSLeila Ghaffari - `density_current` 54ccaff030SJeremy L Thompson 55bc7bbd5dSLeila Ghaffari* - `-implicit` 56*9e576805SJames Wright - Use implicit time integrator formulation 57bc7bbd5dSLeila Ghaffari - 58ccaff030SJeremy L Thompson 59bc7bbd5dSLeila Ghaffari* - `-degree` 60bc7bbd5dSLeila Ghaffari - Polynomial degree of tensor product basis (must be >= 1) 61bc7bbd5dSLeila Ghaffari - `1` 62ccaff030SJeremy L Thompson 632288fb52SJeremy L Thompson* - `-q_extra` 64bc7bbd5dSLeila Ghaffari - Number of extra quadrature points 65fc14f3f6SLeila Ghaffari - `0` 66ccaff030SJeremy L Thompson 6737cbb16aSJed Brown* - `-ts_monitor_solution` 6837cbb16aSJed Brown - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`) 6937cbb16aSJed Brown - 70ccaff030SJeremy L Thompson 7137cbb16aSJed Brown* - `-ts_monitor_solution_interval` 7237cbb16aSJed Brown - Number of time steps between visualization output frames. 7337cbb16aSJed Brown - `1` 7437cbb16aSJed Brown 7537cbb16aSJed Brown* - `-viewer_cgns_batch_size` 7637cbb16aSJed Brown - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 7737cbb16aSJed Brown - `20` 7837cbb16aSJed Brown 7937cbb16aSJed Brown* - `-checkpoint_interval` 8037cbb16aSJed Brown - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only 81bc7bbd5dSLeila Ghaffari - `10` 82ccaff030SJeremy L Thompson 8337cbb16aSJed Brown* - `-checkpoint_vtk` 8437cbb16aSJed Brown - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead. 8537cbb16aSJed Brown - `false` 8637cbb16aSJed Brown 8737cbb16aSJed Brown* - `-viz_refine` 8837cbb16aSJed Brown - Use regular refinement for VTK visualization 8937cbb16aSJed Brown - `0` 9037cbb16aSJed Brown 91bc7bbd5dSLeila Ghaffari* - `-output_dir` 9237cbb16aSJed Brown - Output directory for binary checkpoints and VTK files (if enabled). 93bc7bbd5dSLeila Ghaffari - `.` 94ccaff030SJeremy L Thompson 9569293791SJames Wright* - `-output_add_stepnum2bin` 9669293791SJames Wright - Whether to add step numbers to output binary files 9769293791SJames Wright - `false` 9869293791SJames Wright 9969293791SJames Wright* - `-continue` 10069293791SJames Wright - Continue from previous solution (input is step number of previous solution) 10169293791SJames Wright - `0` 10269293791SJames Wright 10369293791SJames Wright* - `-continue_filename` 10469293791SJames Wright - Path to solution binary file from which to continue from 10569293791SJames Wright - `[output_dir]/ns-solution.bin` 10669293791SJames Wright 10769293791SJames Wright* - `-continue_time_filename` 1084de8550aSJed Brown - Path to time stamp binary file (only for legacy checkpoints) 10969293791SJames Wright - `[output_dir]/ns-time.bin` 11069293791SJames Wright 1114534a52eSLeila Ghaffari* - `-bc_wall` 1124534a52eSLeila Ghaffari - Use wall boundary conditions on this list of faces 1134534a52eSLeila Ghaffari - 1144534a52eSLeila Ghaffari 1154534a52eSLeila Ghaffari* - `-wall_comps` 1164534a52eSLeila Ghaffari - An array of constrained component numbers for wall BCs 1174534a52eSLeila Ghaffari - 1184534a52eSLeila Ghaffari 1194534a52eSLeila Ghaffari* - `-bc_slip_x` 1204534a52eSLeila Ghaffari - Use slip boundary conditions, for the x component, on this list of faces 1214534a52eSLeila Ghaffari - 1224534a52eSLeila Ghaffari 1234534a52eSLeila Ghaffari* - `-bc_slip_y` 1244534a52eSLeila Ghaffari - Use slip boundary conditions, for the y component, on this list of faces 1254534a52eSLeila Ghaffari - 1264534a52eSLeila Ghaffari 1274534a52eSLeila Ghaffari* - `-bc_slip_z` 1284534a52eSLeila Ghaffari - Use slip boundary conditions, for the z component, on this list of faces 1294534a52eSLeila Ghaffari - 1304534a52eSLeila Ghaffari 1314534a52eSLeila Ghaffari* - `-bc_inflow` 1324534a52eSLeila Ghaffari - Use inflow boundary conditions on this list of faces 1334534a52eSLeila Ghaffari - 1344534a52eSLeila Ghaffari 1354534a52eSLeila Ghaffari* - `-bc_outflow` 1364534a52eSLeila Ghaffari - Use outflow boundary conditions on this list of faces 1374534a52eSLeila Ghaffari - 13889d0f5c0SLeila Ghaffari 1397ec884f8SJames Wright* - `-bc_freestream` 1407ec884f8SJames Wright - Use freestream boundary conditions on this list of faces 1417ec884f8SJames Wright - 1427ec884f8SJames Wright 143b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval` 144ee3de563SJames Wright - Number of timesteps between statistics collection 145ee3de563SJames Wright - `1` 146ee3de563SJames Wright 147b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer` 148b7d66439SJames Wright - Sets the PetscViewer for the statistics file writing, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`). Also turns the statistics collection on. 1498ed52730SJames Wright - 1508ed52730SJames Wright 151b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval` 152ee3de563SJames Wright - Number of timesteps between statistics file writing (`-1` means only at end of run) 153ee3de563SJames Wright - `-1` 154ee3de563SJames Wright 155b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size` 1568ed52730SJames Wright - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 1578ed52730SJames Wright - `20` 1588ed52730SJames Wright 159ca69d878SAdeleke O. Bankole* - `-ts_monitor_wall_force` 160ca69d878SAdeleke O. Bankole - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file. 161ca69d878SAdeleke O. Bankole - 162ca69d878SAdeleke O. Bankole 1632526956eSJames Wright* - `-mesh_transform` 1642526956eSJames Wright - Transform the mesh, usually for an initial box mesh. 1652526956eSJames Wright - `none` 1662526956eSJames Wright 167bc7bbd5dSLeila Ghaffari* - `-snes_view` 168bc7bbd5dSLeila Ghaffari - View PETSc `SNES` nonlinear solver configuration 169bc7bbd5dSLeila Ghaffari - 17089d0f5c0SLeila Ghaffari 171bc7bbd5dSLeila Ghaffari* - `-log_view` 172bc7bbd5dSLeila Ghaffari - View PETSc performance log 173bc7bbd5dSLeila Ghaffari - 174ccaff030SJeremy L Thompson 175bc7bbd5dSLeila Ghaffari* - `-help` 176bc7bbd5dSLeila Ghaffari - View comprehensive information about run-time options 177bc7bbd5dSLeila Ghaffari - 178bc7bbd5dSLeila Ghaffari::: 179ccaff030SJeremy L Thompson 1807ec884f8SJames WrightFor 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: 1814534a52eSLeila Ghaffari 18288626eedSJames Wright:::{list-table} 2D Face ID Labels 18388626eedSJames Wright:header-rows: 1 18488626eedSJames Wright* - PETSc Face Name 18588626eedSJames Wright - Cartesian direction 18688626eedSJames Wright - Face ID 18788626eedSJames Wright 18888626eedSJames Wright* - faceMarkerBottom 18988626eedSJames Wright - -z 19088626eedSJames Wright - 1 19188626eedSJames Wright 19288626eedSJames Wright* - faceMarkerRight 19388626eedSJames Wright - +x 19488626eedSJames Wright - 2 19588626eedSJames Wright 19688626eedSJames Wright* - faceMarkerTop 19788626eedSJames Wright - +z 19888626eedSJames Wright - 3 19988626eedSJames Wright 20088626eedSJames Wright* - faceMarkerLeft 20188626eedSJames Wright - -x 20288626eedSJames Wright - 4 20388626eedSJames Wright::: 20488626eedSJames Wright 205b5e826a6SLeila Ghaffari:::{list-table} 3D Face ID Labels 20688626eedSJames Wright:header-rows: 1 20788626eedSJames Wright* - PETSc Face Name 20888626eedSJames Wright - Cartesian direction 20988626eedSJames Wright - Face ID 21088626eedSJames Wright 21188626eedSJames Wright* - faceMarkerBottom 21288626eedSJames Wright - -z 21388626eedSJames Wright - 1 21488626eedSJames Wright 21588626eedSJames Wright* - faceMarkerTop 21688626eedSJames Wright - +z 21788626eedSJames Wright - 2 21888626eedSJames Wright 21988626eedSJames Wright* - faceMarkerFront 22088626eedSJames Wright - -y 22188626eedSJames Wright - 3 22288626eedSJames Wright 22388626eedSJames Wright* - faceMarkerBack 22488626eedSJames Wright - +y 22588626eedSJames Wright - 4 22688626eedSJames Wright 22788626eedSJames Wright* - faceMarkerRight 22888626eedSJames Wright - +x 22988626eedSJames Wright - 5 23088626eedSJames Wright 23188626eedSJames Wright* - faceMarkerLeft 23288626eedSJames Wright - -x 23388626eedSJames Wright - 6 23488626eedSJames Wright::: 2354534a52eSLeila Ghaffari 2368a94a473SJed Brown### Boundary conditions 2378a94a473SJed Brown 2388a94a473SJed BrownBoundary conditions for compressible viscous flows are notoriously tricky. Here we offer some recommendations 2398a94a473SJed Brown 2408a94a473SJed Brown#### Inflow 2418a94a473SJed Brown 2428a94a473SJed BrownIf 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). 2438a94a473SJed BrownIt is stable and the least reflective boundary condition for acoustics. 2448a94a473SJed Brown 2458a94a473SJed BrownIf near a viscous wall, you may want a specified inflow profile. 2468a94a473SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles. 2478a94a473SJed BrownThese 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. 2488a94a473SJed BrownThe strong approach gives sharper resolution of velocity structures. 2498a94a473SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent. 2508a94a473SJed Brown 251f3f66076SJames Wright#### Outflow 2528a94a473SJed Brown 2538a94a473SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures. 2548a94a473SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections. 2558a94a473SJed BrownThe default Riemann solver, HLLC, is sufficient in this regard while the simpler HLL converts thermal structures exiting the domain into grid-scale reflecting acoustics. 2568a94a473SJed Brown 2578a94a473SJed BrownIf 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. 2588a94a473SJed Brown 2598a94a473SJed BrownThe 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). 2608a94a473SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow. 2618a94a473SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use. 2628a94a473SJed Brown 263f3f66076SJames Wright#### Periodicity 2648a94a473SJed Brown 2658a94a473SJed BrownPETSc provides two ways to specify periodicity: 2668a94a473SJed Brown 2678a94a473SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using: 2688a94a473SJed Brown 2698a94a473SJed Brown```yaml 2708a94a473SJed Browndm_plex: 2718a94a473SJed Brown shape: box 2728a94a473SJed Brown box_faces: 10,12,4 2738a94a473SJed Brown box_bd: none,none,periodic 2748a94a473SJed Brown``` 2758a94a473SJed Brown 276ca69d878SAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary. 277ca69d878SAdeleke O. BankoleThis choice of coordinates prevents evaluating boundary integrals that cross the periodicity, such as for the outflow Riemann problem in the presence of spanwise periodicity. 278ca69d878SAdeleke O. Bankole 279ca69d878SAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in: 280ca69d878SAdeleke O. Bankole 281ca69d878SAdeleke O. Bankole```yaml 282ca69d878SAdeleke O. Bankoledm_plex: 283ca69d878SAdeleke O. Bankole shape: zbox 284ca69d878SAdeleke O. Bankole box_faces: 10,12,4 285ca69d878SAdeleke O. Bankole box_bd: none,none,periodic 286ca69d878SAdeleke O. Bankole``` 287ca69d878SAdeleke O. Bankole 288ca69d878SAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use. 289ca69d878SAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity. 290ca69d878SAdeleke O. BankoleThe `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. 2918a94a473SJed Brown 292019b7682STimothy Aiken### Advection 293019b7682STimothy Aiken 29417be3a41SJeremy L ThompsonFor 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$. 29517be3a41SJeremy L ThompsonThese are available in 2D and 3D. 296019b7682STimothy Aiken 297019b7682STimothy Aiken#### 2D advection 298019b7682STimothy Aiken 299bc7bbd5dSLeila GhaffariFor the 2D advection problem, the following additional command-line options are available: 300ccaff030SJeremy L Thompson 301bc7bbd5dSLeila Ghaffari:::{list-table} Advection2D Runtime Options 302bc7bbd5dSLeila Ghaffari:header-rows: 1 30389d0f5c0SLeila Ghaffari 304bc7bbd5dSLeila Ghaffari* - Option 305bc7bbd5dSLeila Ghaffari - Description 306bc7bbd5dSLeila Ghaffari - Default value 307bc7bbd5dSLeila Ghaffari - Unit 30889d0f5c0SLeila Ghaffari 309bc7bbd5dSLeila Ghaffari* - `-rc` 310bc7bbd5dSLeila Ghaffari - Characteristic radius of thermal bubble 311bc7bbd5dSLeila Ghaffari - `1000` 312bc7bbd5dSLeila Ghaffari - `m` 31389d0f5c0SLeila Ghaffari 314bc7bbd5dSLeila Ghaffari* - `-units_meter` 315bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 316bc7bbd5dSLeila Ghaffari - `1E-2` 317bc7bbd5dSLeila Ghaffari - 31889d0f5c0SLeila Ghaffari 319bc7bbd5dSLeila Ghaffari* - `-units_second` 320bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 321bc7bbd5dSLeila Ghaffari - `1E-2` 322bc7bbd5dSLeila Ghaffari - 32389d0f5c0SLeila Ghaffari 324bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 325bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 326bc7bbd5dSLeila Ghaffari - `1E-6` 327bc7bbd5dSLeila Ghaffari - 32877841947SLeila Ghaffari 329bc7bbd5dSLeila Ghaffari* - `-strong_form` 330bc7bbd5dSLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 331bc7bbd5dSLeila Ghaffari - `0` 332bc7bbd5dSLeila Ghaffari - 33377841947SLeila Ghaffari 334bc7bbd5dSLeila Ghaffari* - `-stab` 335bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 336bc7bbd5dSLeila Ghaffari - `none` 337bc7bbd5dSLeila Ghaffari - 33877841947SLeila Ghaffari 339bc7bbd5dSLeila Ghaffari* - `-CtauS` 340bc7bbd5dSLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 341bc7bbd5dSLeila Ghaffari - `0` 342bc7bbd5dSLeila Ghaffari - 34377841947SLeila Ghaffari 344bc7bbd5dSLeila Ghaffari* - `-wind_type` 345bc7bbd5dSLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 346bc7bbd5dSLeila Ghaffari - `rotation` 347bc7bbd5dSLeila Ghaffari - 34877841947SLeila Ghaffari 349bc7bbd5dSLeila Ghaffari* - `-wind_translation` 350bc7bbd5dSLeila Ghaffari - Constant wind vector when `-wind_type translation` 351bc7bbd5dSLeila Ghaffari - `1,0,0` 352bc7bbd5dSLeila Ghaffari - 35389d0f5c0SLeila Ghaffari 354bc7bbd5dSLeila Ghaffari* - `-E_wind` 355bc7bbd5dSLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 356bc7bbd5dSLeila Ghaffari - `1E6` 357bc7bbd5dSLeila Ghaffari - `J` 358bc7bbd5dSLeila Ghaffari::: 359e43605a5SLeila Ghaffari 360bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with: 361e43605a5SLeila Ghaffari 362bc7bbd5dSLeila Ghaffari``` 3634534a52eSLeila Ghaffari./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 364bc7bbd5dSLeila Ghaffari``` 365e43605a5SLeila Ghaffari 366bc7bbd5dSLeila Ghaffariand the `translation` mode with: 367e43605a5SLeila Ghaffari 368bc7bbd5dSLeila Ghaffari``` 3694534a52eSLeila Ghaffari./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 370bc7bbd5dSLeila Ghaffari``` 3714534a52eSLeila GhaffariNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 372e43605a5SLeila Ghaffari 373019b7682STimothy Aiken#### 3D advection 374019b7682STimothy Aiken 375bc7bbd5dSLeila GhaffariFor the 3D advection problem, the following additional command-line options are available: 376e43605a5SLeila Ghaffari 377bc7bbd5dSLeila Ghaffari:::{list-table} Advection3D Runtime Options 378bc7bbd5dSLeila Ghaffari:header-rows: 1 379e43605a5SLeila Ghaffari 380bc7bbd5dSLeila Ghaffari* - Option 381bc7bbd5dSLeila Ghaffari - Description 382bc7bbd5dSLeila Ghaffari - Default value 383bc7bbd5dSLeila Ghaffari - Unit 384e43605a5SLeila Ghaffari 385bc7bbd5dSLeila Ghaffari* - `-rc` 386bc7bbd5dSLeila Ghaffari - Characteristic radius of thermal bubble 387bc7bbd5dSLeila Ghaffari - `1000` 388bc7bbd5dSLeila Ghaffari - `m` 389e43605a5SLeila Ghaffari 390bc7bbd5dSLeila Ghaffari* - `-units_meter` 391bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 392bc7bbd5dSLeila Ghaffari - `1E-2` 393bc7bbd5dSLeila Ghaffari - 394e43605a5SLeila Ghaffari 395bc7bbd5dSLeila Ghaffari* - `-units_second` 396bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 397bc7bbd5dSLeila Ghaffari - `1E-2` 398bc7bbd5dSLeila Ghaffari - 399e43605a5SLeila Ghaffari 400bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 401bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 402bc7bbd5dSLeila Ghaffari - `1E-6` 403bc7bbd5dSLeila Ghaffari - 404e43605a5SLeila Ghaffari 405bc7bbd5dSLeila Ghaffari* - `-strong_form` 406bc7bbd5dSLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 407bc7bbd5dSLeila Ghaffari - `0` 408bc7bbd5dSLeila Ghaffari - 409e43605a5SLeila Ghaffari 410bc7bbd5dSLeila Ghaffari* - `-stab` 411bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 412bc7bbd5dSLeila Ghaffari - `none` 413bc7bbd5dSLeila Ghaffari - 414e43605a5SLeila Ghaffari 415bc7bbd5dSLeila Ghaffari* - `-CtauS` 416bc7bbd5dSLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 417bc7bbd5dSLeila Ghaffari - `0` 418bc7bbd5dSLeila Ghaffari - 419e43605a5SLeila Ghaffari 420bc7bbd5dSLeila Ghaffari* - `-wind_type` 421bc7bbd5dSLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 422bc7bbd5dSLeila Ghaffari - `rotation` 423bc7bbd5dSLeila Ghaffari - 424e43605a5SLeila Ghaffari 425bc7bbd5dSLeila Ghaffari* - `-wind_translation` 426bc7bbd5dSLeila Ghaffari - Constant wind vector when `-wind_type translation` 427bc7bbd5dSLeila Ghaffari - `1,0,0` 428bc7bbd5dSLeila Ghaffari - 429e43605a5SLeila Ghaffari 430bc7bbd5dSLeila Ghaffari* - `-E_wind` 431bc7bbd5dSLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 432bc7bbd5dSLeila Ghaffari - `1E6` 433bc7bbd5dSLeila Ghaffari - `J` 434e43605a5SLeila Ghaffari 435bc7bbd5dSLeila Ghaffari* - `-bubble_type` 436bc7bbd5dSLeila Ghaffari - `sphere` (3D) or `cylinder` (2D) 437f3f66076SJames Wright - `sphere` 438bc7bbd5dSLeila Ghaffari - 439e43605a5SLeila Ghaffari 440bc7bbd5dSLeila Ghaffari* - `-bubble_continuity` 441bc7bbd5dSLeila Ghaffari - `smooth`, `back_sharp`, or `thick` 442bc7bbd5dSLeila Ghaffari - `smooth` 443bc7bbd5dSLeila Ghaffari - 444bc7bbd5dSLeila Ghaffari::: 445ccaff030SJeremy L Thompson 446bc7bbd5dSLeila GhaffariAn example of the `rotation` mode can be run with: 447ccaff030SJeremy L Thompson 448bc7bbd5dSLeila Ghaffari``` 4494534a52eSLeila Ghaffari./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 450bc7bbd5dSLeila Ghaffari``` 451ccaff030SJeremy L Thompson 452bc7bbd5dSLeila Ghaffariand the `translation` mode with: 453ccaff030SJeremy L Thompson 454bc7bbd5dSLeila Ghaffari``` 4554534a52eSLeila Ghaffari./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 456bc7bbd5dSLeila Ghaffari``` 457ccaff030SJeremy L Thompson 458019b7682STimothy Aiken### Inviscid Ideal Gas 459019b7682STimothy Aiken 460019b7682STimothy Aiken#### Isentropic Euler vortex 461019b7682STimothy Aiken 462bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available: 463ccaff030SJeremy L Thompson 464bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options 465bc7bbd5dSLeila Ghaffari:header-rows: 1 466ccaff030SJeremy L Thompson 467bc7bbd5dSLeila Ghaffari* - Option 468bc7bbd5dSLeila Ghaffari - Description 469bc7bbd5dSLeila Ghaffari - Default value 470bc7bbd5dSLeila Ghaffari - Unit 471ccaff030SJeremy L Thompson 472bc7bbd5dSLeila Ghaffari* - `-center` 473bc7bbd5dSLeila Ghaffari - Location of vortex center 474bc7bbd5dSLeila Ghaffari - `(lx,ly,lz)/2` 475bc7bbd5dSLeila Ghaffari - `(m,m,m)` 476ccaff030SJeremy L Thompson 477bc7bbd5dSLeila Ghaffari* - `-units_meter` 478bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 479bc7bbd5dSLeila Ghaffari - `1E-2` 480bc7bbd5dSLeila Ghaffari - 481ccaff030SJeremy L Thompson 482bc7bbd5dSLeila Ghaffari* - `-units_second` 483bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 484bc7bbd5dSLeila Ghaffari - `1E-2` 485bc7bbd5dSLeila Ghaffari - 486ccaff030SJeremy L Thompson 487bc7bbd5dSLeila Ghaffari* - `-mean_velocity` 488bc7bbd5dSLeila Ghaffari - Background velocity vector 489bc7bbd5dSLeila Ghaffari - `(1,1,0)` 490bc7bbd5dSLeila Ghaffari - 491ccaff030SJeremy L Thompson 492bc7bbd5dSLeila Ghaffari* - `-vortex_strength` 493bc7bbd5dSLeila Ghaffari - Strength of vortex < 10 494bc7bbd5dSLeila Ghaffari - `5` 495bc7bbd5dSLeila Ghaffari - 496932417b3SJed Brown 497932417b3SJed Brown* - `-c_tau` 498932417b3SJed Brown - Stabilization constant 499504dc8e0SLeila Ghaffari - `0.5` 500932417b3SJed Brown - 501bc7bbd5dSLeila Ghaffari::: 502ccaff030SJeremy L Thompson 503bc7bbd5dSLeila GhaffariThis problem can be run with: 504ccaff030SJeremy L Thompson 505bc7bbd5dSLeila Ghaffari``` 5064534a52eSLeila Ghaffari./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. 507bc7bbd5dSLeila Ghaffari``` 508ccaff030SJeremy L Thompson 509019b7682STimothy Aiken#### Sod shock tube 510019b7682STimothy Aiken 511019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available: 512019b7682STimothy Aiken 513019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options 514019b7682STimothy Aiken:header-rows: 1 515019b7682STimothy Aiken 516019b7682STimothy Aiken* - Option 517019b7682STimothy Aiken - Description 518019b7682STimothy Aiken - Default value 519019b7682STimothy Aiken - Unit 520019b7682STimothy Aiken 521019b7682STimothy Aiken* - `-units_meter` 522019b7682STimothy Aiken - 1 meter in scaled length units 523019b7682STimothy Aiken - `1E-2` 524019b7682STimothy Aiken - 525019b7682STimothy Aiken 526019b7682STimothy Aiken* - `-units_second` 527019b7682STimothy Aiken - 1 second in scaled time units 528019b7682STimothy Aiken - `1E-2` 529019b7682STimothy Aiken - 530019b7682STimothy Aiken 531019b7682STimothy Aiken* - `-yzb` 532019b7682STimothy Aiken - Use YZB discontinuity capturing 533019b7682STimothy Aiken - `none` 534019b7682STimothy Aiken - 535019b7682STimothy Aiken 536019b7682STimothy Aiken* - `-stab` 537019b7682STimothy Aiken - Stabilization method (`none`, `su`, or `supg`) 538019b7682STimothy Aiken - `none` 539019b7682STimothy Aiken - 540019b7682STimothy Aiken::: 541019b7682STimothy Aiken 542019b7682STimothy AikenThis problem can be run with: 543019b7682STimothy Aiken 544019b7682STimothy Aiken``` 545019b7682STimothy Aiken./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 546019b7682STimothy Aiken``` 547019b7682STimothy Aiken 548019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas 549019b7682STimothy Aiken 55088626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available: 551ccaff030SJeremy L Thompson 55288626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options 553bc7bbd5dSLeila Ghaffari:header-rows: 1 554ccaff030SJeremy L Thompson 555bc7bbd5dSLeila Ghaffari* - Option 556bc7bbd5dSLeila Ghaffari - Description 557bc7bbd5dSLeila Ghaffari - Default value 558bc7bbd5dSLeila Ghaffari - Unit 559ccaff030SJeremy L Thompson 560bc7bbd5dSLeila Ghaffari* - `-units_meter` 561bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 56288626eedSJames Wright - `1` 563bc7bbd5dSLeila Ghaffari - 564ccaff030SJeremy L Thompson 565bc7bbd5dSLeila Ghaffari* - `-units_second` 566bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 56788626eedSJames Wright - `1` 568bc7bbd5dSLeila Ghaffari - 569ccaff030SJeremy L Thompson 570bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 571bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 57288626eedSJames Wright - `1` 573bc7bbd5dSLeila Ghaffari - 574ccaff030SJeremy L Thompson 575bc7bbd5dSLeila Ghaffari* - `-units_Kelvin` 576bc7bbd5dSLeila Ghaffari - 1 Kelvin in scaled temperature units 577bc7bbd5dSLeila Ghaffari - `1` 578bc7bbd5dSLeila Ghaffari - 579ccaff030SJeremy L Thompson 580bc7bbd5dSLeila Ghaffari* - `-stab` 581bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 582bc7bbd5dSLeila Ghaffari - `none` 583bc7bbd5dSLeila Ghaffari - 584ccaff030SJeremy L Thompson 585932417b3SJed Brown* - `-c_tau` 58688626eedSJames Wright - Stabilization constant, $c_\tau$ 587504dc8e0SLeila Ghaffari - `0.5` 588932417b3SJed Brown - 589932417b3SJed Brown 59088626eedSJames Wright* - `-Ctau_t` 59188626eedSJames Wright - Stabilization time constant, $C_t$ 59288626eedSJames Wright - `1.0` 59388626eedSJames Wright - 594ccaff030SJeremy L Thompson 59588626eedSJames Wright* - `-Ctau_v` 59688626eedSJames Wright - Stabilization viscous constant, $C_v$ 59794c01735SLeila Ghaffari - `36, 60, 128 for degree = 1, 2, 3` 59888626eedSJames Wright - 599ccaff030SJeremy L Thompson 60088626eedSJames Wright* - `-Ctau_C` 60188626eedSJames Wright - Stabilization continuity constant, $C_c$ 60288626eedSJames Wright - `1.0` 60388626eedSJames Wright - 604ccaff030SJeremy L Thompson 60588626eedSJames Wright* - `-Ctau_M` 60688626eedSJames Wright - Stabilization momentum constant, $C_m$ 60788626eedSJames Wright - `1.0` 60888626eedSJames Wright - 60988626eedSJames Wright 61088626eedSJames Wright* - `-Ctau_E` 61188626eedSJames Wright - Stabilization energy constant, $C_E$ 61288626eedSJames Wright - `1.0` 61388626eedSJames Wright - 614ccaff030SJeremy L Thompson 615bc7bbd5dSLeila Ghaffari* - `-cv` 616bc7bbd5dSLeila Ghaffari - Heat capacity at constant volume 617bc7bbd5dSLeila Ghaffari - `717` 618bc7bbd5dSLeila Ghaffari - `J/(kg K)` 619ccaff030SJeremy L Thompson 620bc7bbd5dSLeila Ghaffari* - `-cp` 621bc7bbd5dSLeila Ghaffari - Heat capacity at constant pressure 622bc7bbd5dSLeila Ghaffari - `1004` 623bc7bbd5dSLeila Ghaffari - `J/(kg K)` 624ccaff030SJeremy L Thompson 625a2726bdbSJames Wright* - `-gravity` 626a2726bdbSJames Wright - Gravitational acceleration vector 627a2726bdbSJames Wright - `0,0,0` 628bc7bbd5dSLeila Ghaffari - `m/s^2` 629ccaff030SJeremy L Thompson 630bc7bbd5dSLeila Ghaffari* - `-lambda` 631bc7bbd5dSLeila Ghaffari - Stokes hypothesis second viscosity coefficient 632bc7bbd5dSLeila Ghaffari - `-2/3` 633bc7bbd5dSLeila Ghaffari - 634ccaff030SJeremy L Thompson 635bc7bbd5dSLeila Ghaffari* - `-mu` 636bc7bbd5dSLeila Ghaffari - Shear dynamic viscosity coefficient 637a2726bdbSJames Wright - `1.8e-5` 638bc7bbd5dSLeila Ghaffari - `Pa s` 63977841947SLeila Ghaffari 640bc7bbd5dSLeila Ghaffari* - `-k` 641bc7bbd5dSLeila Ghaffari - Thermal conductivity 642bc7bbd5dSLeila Ghaffari - `0.02638` 643bc7bbd5dSLeila Ghaffari - `W/(m K)` 644a1df05f8SJed Brown 645a1df05f8SJed Brown* - `-newtonian_unit_tests` 646a1df05f8SJed Brown - Developer option to test properties 647a1df05f8SJed Brown - `false` 648a1df05f8SJed Brown - boolean 649de2fdd78SJames Wright 6505c0afad3SJames Wright* - `-state_var` 6515c0afad3SJames Wright - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$) 6525c0afad3SJames Wright - `conservative` 6535c0afad3SJames Wright - string 654530ad8c4SKenneth E. Jansen 655530ad8c4SKenneth E. Jansen* - `-idl_decay_time` 656530ad8c4SKenneth E. Jansen - Characteristic timescale of the pressure deviance decay. The timestep is good starting point 657530ad8c4SKenneth E. Jansen - `-1` (disabled) 658530ad8c4SKenneth E. Jansen - `s` 659530ad8c4SKenneth E. Jansen 660530ad8c4SKenneth E. Jansen* - `-idl_start` 661530ad8c4SKenneth E. Jansen - Start of IDL in the x direction 662530ad8c4SKenneth E. Jansen - `0` 663530ad8c4SKenneth E. Jansen - `m` 664530ad8c4SKenneth E. Jansen 665530ad8c4SKenneth E. Jansen* - `-idl_length` 666530ad8c4SKenneth E. Jansen - Length of IDL in the positive x direction 667530ad8c4SKenneth E. Jansen - `0` 668530ad8c4SKenneth E. Jansen - `m` 669530ad8c4SKenneth E. Jansen 670c79d6dc9SJames Wright* - `-sgs_model_type` 671c79d6dc9SJames Wright - Type of subgrid stress model to use. Currently only `data_driven` is available 672c79d6dc9SJames Wright - `none` 673c79d6dc9SJames Wright - string 674c79d6dc9SJames Wright 675c79d6dc9SJames Wright* - `-sgs_model_dd_leakyrelu_alpha` 676c79d6dc9SJames Wright - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU 677c79d6dc9SJames Wright - 0 678c79d6dc9SJames Wright - 679c79d6dc9SJames Wright 680c79d6dc9SJames Wright* - `-sgs_model_dd_parameter_dir` 681c79d6dc9SJames Wright - Path to directory with data-driven model parameters (weights, biases, etc.) 682c79d6dc9SJames Wright - `./dd_sgs_parameters` 683c79d6dc9SJames Wright - string 684c79d6dc9SJames Wright 6853f89fbfdSJames Wright* - `-diff_filter_monitor` 6863f89fbfdSJames Wright - Enable differential filter TSMonitor 6873f89fbfdSJames Wright - `false` 6883f89fbfdSJames Wright - boolean 6893f89fbfdSJames Wright 6903f89fbfdSJames Wright* - `-diff_filter_grid_based_width` 6913f89fbfdSJames Wright - Use filter width based on the grid size 6923f89fbfdSJames Wright - `false` 6933f89fbfdSJames Wright - boolean 6943f89fbfdSJames Wright 6953f89fbfdSJames Wright* - `-diff_filter_width_scaling` 6963f89fbfdSJames Wright - Anisotropic scaling for filter width in wall-aligned coordinates (snz) 6973f89fbfdSJames Wright - `1,1,1` 6983f89fbfdSJames Wright - `m` 6993f89fbfdSJames Wright 7003f89fbfdSJames Wright* - `-diff_filter_kernel_scaling` 7013f89fbfdSJames Wright - Scaling to make differential kernel size equivalent to other filter kernels 7023f89fbfdSJames Wright - `0.1` 7033f89fbfdSJames Wright - `m^2` 7043f89fbfdSJames Wright 7053f89fbfdSJames Wright* - `-diff_filter_wall_damping_function` 7063f89fbfdSJames Wright - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`) 7073f89fbfdSJames Wright - `none` 7083f89fbfdSJames Wright - string 7093f89fbfdSJames Wright 7103f89fbfdSJames Wright* - `-diff_filter_wall_damping_constant` 7119d9c52bbSJed Brown - Constant for the wall-damping function. $A^+$ for `van_driest` damping function. 7123f89fbfdSJames Wright - 25 7133f89fbfdSJames Wright - 7143f89fbfdSJames Wright 7153f89fbfdSJames Wright* - `-diff_filter_friction_length` 7163f89fbfdSJames Wright - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions 7173f89fbfdSJames Wright - 0 7183f89fbfdSJames Wright - `m` 7193f89fbfdSJames Wright 720bc7bbd5dSLeila Ghaffari::: 72177841947SLeila Ghaffari 722530ad8c4SKenneth E. Jansen#### Gaussian Wave 7237ec884f8SJames Wright 724530ad8c4SKenneth E. JansenThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options: 7257ec884f8SJames Wright 726530ad8c4SKenneth E. Jansen:::{list-table} Gaussian Wave Runtime Options 7277ec884f8SJames Wright:header-rows: 1 7287ec884f8SJames Wright 7297ec884f8SJames Wright* - Option 7307ec884f8SJames Wright - Description 7317ec884f8SJames Wright - Default value 7327ec884f8SJames Wright - Unit 7337ec884f8SJames Wright 734f1e435c9SJed Brown* - `-freestream_riemann` 735f1e435c9SJed Brown - Riemann solver for boundaries (HLL or HLLC) 736f1e435c9SJed Brown - `hllc` 737f1e435c9SJed Brown - 738f1e435c9SJed Brown 739f1e435c9SJed Brown* - `-freestream_velocity` 7407ec884f8SJames Wright - Freestream velocity vector 7417ec884f8SJames Wright - `0,0,0` 7427ec884f8SJames Wright - `m/s` 7437ec884f8SJames Wright 744f1e435c9SJed Brown* - `-freestream_temperature` 7457ec884f8SJames Wright - Freestream temperature 7467ec884f8SJames Wright - `288` 7477ec884f8SJames Wright - `K` 7487ec884f8SJames Wright 749f1e435c9SJed Brown* - `-freestream_pressure` 75089e3cb53SJames Wright - Freestream pressure 7517ec884f8SJames Wright - `1.01e5` 7527ec884f8SJames Wright - `Pa` 7537ec884f8SJames Wright 7547ec884f8SJames Wright* - `-epicenter` 7557ec884f8SJames Wright - Coordinates of center of perturbation 7567ec884f8SJames Wright - `0,0,0` 7577ec884f8SJames Wright - `m` 7587ec884f8SJames Wright 7597ec884f8SJames Wright* - `-amplitude` 7607ec884f8SJames Wright - Amplitude of the perturbation 7617ec884f8SJames Wright - `0.1` 7627ec884f8SJames Wright - 7637ec884f8SJames Wright 7647ec884f8SJames Wright* - `-width` 7657ec884f8SJames Wright - Width parameter of the perturbation 7667ec884f8SJames Wright - `0.002` 7677ec884f8SJames Wright - `m` 7687ec884f8SJames Wright 7697ec884f8SJames Wright::: 7707ec884f8SJames Wright 771530ad8c4SKenneth E. JansenThis problem can be run with the `gaussianwave.yaml` file via: 7727ec884f8SJames Wright 7737ec884f8SJames Wright``` 774530ad8c4SKenneth E. Jansen./navierstokes -options_file gaussianwave.yaml 7757ec884f8SJames Wright``` 7767ec884f8SJames Wright 777530ad8c4SKenneth E. Jansen```{literalinclude} ../../../../../examples/fluids/gaussianwave.yaml 7787ec884f8SJames Wright:language: yaml 7797ec884f8SJames Wright``` 780a1df05f8SJed Brown 781d310b3d3SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder 782d310b3d3SAdeleke O. Bankole 783d310b3d3SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options: 784d310b3d3SAdeleke O. Bankole 785d310b3d3SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options 786d310b3d3SAdeleke O. Bankole:header-rows: 1 787d310b3d3SAdeleke O. Bankole 788d310b3d3SAdeleke O. Bankole* - Option 789d310b3d3SAdeleke O. Bankole - Description 790d310b3d3SAdeleke O. Bankole - Default value 791d310b3d3SAdeleke O. Bankole - Unit 792d310b3d3SAdeleke O. Bankole 793d310b3d3SAdeleke O. Bankole* - `-freestream_velocity` 794d310b3d3SAdeleke O. Bankole - Freestream velocity vector 795d310b3d3SAdeleke O. Bankole - `0,0,0` 796d310b3d3SAdeleke O. Bankole - `m/s` 797d310b3d3SAdeleke O. Bankole 798d310b3d3SAdeleke O. Bankole* - `-freestream_temperature` 799d310b3d3SAdeleke O. Bankole - Freestream temperature 800d310b3d3SAdeleke O. Bankole - `288` 801d310b3d3SAdeleke O. Bankole - `K` 802d310b3d3SAdeleke O. Bankole 803d310b3d3SAdeleke O. Bankole* - `-freestream_pressure` 804d310b3d3SAdeleke O. Bankole - Freestream pressure 805d310b3d3SAdeleke O. Bankole - `1.01e5` 806d310b3d3SAdeleke O. Bankole - `Pa` 807d310b3d3SAdeleke O. Bankole 808d310b3d3SAdeleke O. Bankole::: 809d310b3d3SAdeleke O. Bankole 810d310b3d3SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`. 811d310b3d3SAdeleke O. BankoleTo run this problem, first generate a mesh: 812d310b3d3SAdeleke O. Bankole 813d310b3d3SAdeleke O. Bankole```console 814d310b3d3SAdeleke O. Bankole$ make -C examples/fluids/meshes 815d310b3d3SAdeleke O. Bankole``` 816d310b3d3SAdeleke O. Bankole 817d310b3d3SAdeleke O. BankoleThen run by building the executable and running: 818d310b3d3SAdeleke O. Bankole 819d310b3d3SAdeleke O. Bankole```console 820d310b3d3SAdeleke O. Bankole$ make build/fluids-navierstokes 821ca69d878SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_ 822d310b3d3SAdeleke O. Bankole``` 823d310b3d3SAdeleke O. Bankole 824ca69d878SAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps). 825ca69d878SAdeleke O. BankoleThe 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. 826ca69d878SAdeleke O. Bankole 827ca69d878SAdeleke O. Bankole```console 828d6734f85SAdeleke O. Bankole$ python examples/fluids/postprocess/vortexshedding.py 829ca69d878SAdeleke O. Bankole``` 830d310b3d3SAdeleke O. Bankole 831d310b3d3SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml 832d310b3d3SAdeleke O. Bankole:language: yaml 833d310b3d3SAdeleke O. Bankole``` 834d310b3d3SAdeleke O. Bankole 835019b7682STimothy Aiken#### Density current 836019b7682STimothy Aiken 837061ff11eSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options: 83888626eedSJames Wright 83988626eedSJames Wright:::{list-table} Density Current Runtime Options 84088626eedSJames Wright:header-rows: 1 84188626eedSJames Wright 84288626eedSJames Wright* - Option 84388626eedSJames Wright - Description 84488626eedSJames Wright - Default value 84588626eedSJames Wright - Unit 84688626eedSJames Wright 84788626eedSJames Wright* - `-center` 84888626eedSJames Wright - Location of bubble center 84988626eedSJames Wright - `(lx,ly,lz)/2` 85088626eedSJames Wright - `(m,m,m)` 85188626eedSJames Wright 85288626eedSJames Wright* - `-dc_axis` 85388626eedSJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 85488626eedSJames Wright - `(0,0,0)` 85588626eedSJames Wright - 85688626eedSJames Wright 85788626eedSJames Wright* - `-rc` 85888626eedSJames Wright - Characteristic radius of thermal bubble 85988626eedSJames Wright - `1000` 86088626eedSJames Wright - `m` 86188626eedSJames Wright 86288626eedSJames Wright* - `-theta0` 86388626eedSJames Wright - Reference potential temperature 86488626eedSJames Wright - `300` 86588626eedSJames Wright - `K` 86688626eedSJames Wright 86788626eedSJames Wright* - `-thetaC` 86888626eedSJames Wright - Perturbation of potential temperature 86988626eedSJames Wright - `-15` 87088626eedSJames Wright - `K` 87188626eedSJames Wright 87288626eedSJames Wright* - `-P0` 87388626eedSJames Wright - Atmospheric pressure 87488626eedSJames Wright - `1E5` 87588626eedSJames Wright - `Pa` 87688626eedSJames Wright 87788626eedSJames Wright* - `-N` 87888626eedSJames Wright - Brunt-Vaisala frequency 87988626eedSJames Wright - `0.01` 88088626eedSJames Wright - `1/s` 88188626eedSJames Wright::: 88288626eedSJames Wright 883bc7bbd5dSLeila GhaffariThis problem can be run with: 884ccaff030SJeremy L Thompson 885bc7bbd5dSLeila Ghaffari``` 88688626eedSJames Wright./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 88788626eedSJames Wright``` 88888626eedSJames Wright 889019b7682STimothy Aiken#### Channel flow 890019b7682STimothy Aiken 891061ff11eSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options: 89288626eedSJames Wright 89388626eedSJames Wright:::{list-table} Channel Runtime Options 89488626eedSJames Wright:header-rows: 1 89588626eedSJames Wright 89688626eedSJames Wright* - Option 89788626eedSJames Wright - Description 89888626eedSJames Wright - Default value 89988626eedSJames Wright - Unit 90088626eedSJames Wright 90188626eedSJames Wright* - `-umax` 90288626eedSJames Wright - Maximum/centerline velocity of the flow 90388626eedSJames Wright - `10` 90488626eedSJames Wright - `m/s` 90588626eedSJames Wright 90688626eedSJames Wright* - `-theta0` 90788626eedSJames Wright - Reference potential temperature 90888626eedSJames Wright - `300` 90988626eedSJames Wright - `K` 91088626eedSJames Wright 91188626eedSJames Wright* - `-P0` 91288626eedSJames Wright - Atmospheric pressure 91388626eedSJames Wright - `1E5` 91488626eedSJames Wright - `Pa` 915a1df05f8SJed Brown 916a1df05f8SJed Brown* - `-body_force_scale` 917a1df05f8SJed Brown - Multiplier for body force (`-1` for flow reversal) 918a1df05f8SJed Brown - 1 919a1df05f8SJed Brown - 92088626eedSJames Wright::: 92188626eedSJames Wright 92288626eedSJames WrightThis problem can be run with the `channel.yaml` file via: 92388626eedSJames Wright 92488626eedSJames Wright``` 92588626eedSJames Wright./navierstokes -options_file channel.yaml 92688626eedSJames Wright``` 92788626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml 92888626eedSJames Wright:language: yaml 92988626eedSJames Wright``` 93088626eedSJames Wright 9318a94a473SJed Brown(example-blasius)= 9328a94a473SJed Brown 933019b7682STimothy Aiken#### Blasius boundary layer 934019b7682STimothy Aiken 935061ff11eSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options: 93688626eedSJames Wright 93788626eedSJames Wright:::{list-table} Blasius Runtime Options 93888626eedSJames Wright:header-rows: 1 93988626eedSJames Wright 94088626eedSJames Wright* - Option 94188626eedSJames Wright - Description 94288626eedSJames Wright - Default value 94388626eedSJames Wright - Unit 94488626eedSJames Wright 945fb455ff0SLeila Ghaffari* - `-velocity_infinity` 94688626eedSJames Wright - Freestream velocity 94788626eedSJames Wright - `40` 94888626eedSJames Wright - `m/s` 94988626eedSJames Wright 950fb455ff0SLeila Ghaffari* - `-temperature_infinity` 951fb455ff0SLeila Ghaffari - Freestream temperature 95288626eedSJames Wright - `288` 95388626eedSJames Wright - `K` 95488626eedSJames Wright 955fb455ff0SLeila Ghaffari* - `-temperature_wall` 956fb455ff0SLeila Ghaffari - Wall temperature 95707d14e58SLeila Ghaffari - `288` 958fb455ff0SLeila Ghaffari - `K` 959fb455ff0SLeila Ghaffari 960fb455ff0SLeila Ghaffari* - `-delta0` 961fb455ff0SLeila Ghaffari - Boundary layer height at the inflow 962fb455ff0SLeila Ghaffari - `4.2e-3` 963fb455ff0SLeila Ghaffari - `m` 964fb455ff0SLeila Ghaffari 96588626eedSJames Wright* - `-P0` 96688626eedSJames Wright - Atmospheric pressure 96788626eedSJames Wright - `1.01E5` 96888626eedSJames Wright - `Pa` 96988626eedSJames Wright 9709309e21cSJames Wright* - `-platemesh_modify_mesh` 9719309e21cSJames Wright - Whether to modify the mesh using the given options below. 9729309e21cSJames Wright - `false` 9739309e21cSJames Wright - 9749309e21cSJames Wright 97591eaef80SJames Wright* - `-platemesh_refine_height` 97691eaef80SJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 97788626eedSJames Wright - `5.9E-4` 97888626eedSJames Wright - `m` 97988626eedSJames Wright 98091eaef80SJames Wright* - `-platemesh_Ndelta` 98191eaef80SJames Wright - Number of elements to keep below `-platemesh_refine_height` 98288626eedSJames Wright - `45` 98388626eedSJames Wright - 98488626eedSJames Wright 98591eaef80SJames Wright* - `-platemesh_growth` 98688626eedSJames Wright - Growth rate of the elements in the refinement region 98788626eedSJames Wright - `1.08` 98888626eedSJames Wright - 98988626eedSJames Wright 99091eaef80SJames Wright* - `-platemesh_top_angle` 99188626eedSJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 99288626eedSJames Wright - `5` 99388626eedSJames Wright - `degrees` 994ba6664aeSJames Wright 99591eaef80SJames Wright* - `-platemesh_y_node_locs_path` 99691eaef80SJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 99791eaef80SJames Wright - `""` 99891eaef80SJames Wright - 999fb455ff0SLeila Ghaffari 10009309e21cSJames Wright* - `-stg_use` 10019309e21cSJames Wright - Whether to use STG for the inflow conditions 10029309e21cSJames Wright - `false` 10039309e21cSJames Wright - 10049309e21cSJames Wright 100507d14e58SLeila Ghaffari* - `-n_chebyshev` 1006fb455ff0SLeila Ghaffari - Number of Chebyshev terms 1007fb455ff0SLeila Ghaffari - `20` 1008fb455ff0SLeila Ghaffari - 1009fb455ff0SLeila Ghaffari 101007d14e58SLeila Ghaffari* - `-chebyshev_` 101107d14e58SLeila Ghaffari - Prefix for Chebyshev snes solve 101207d14e58SLeila Ghaffari - 101307d14e58SLeila Ghaffari - 101407d14e58SLeila Ghaffari 101588626eedSJames Wright::: 101688626eedSJames Wright 101788626eedSJames WrightThis problem can be run with the `blasius.yaml` file via: 101888626eedSJames Wright 101988626eedSJames Wright``` 102088626eedSJames Wright./navierstokes -options_file blasius.yaml 102188626eedSJames Wright``` 102288626eedSJames Wright 102388626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml 102488626eedSJames Wright:language: yaml 1025bc7bbd5dSLeila Ghaffari``` 1026ba6664aeSJames Wright 1027ba6664aeSJames Wright#### STG Inflow for Flat Plate 1028ba6664aeSJames Wright 102917be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options: 1030ba6664aeSJames Wright 1031ba6664aeSJames Wright:::{list-table} Blasius Runtime Options 1032ba6664aeSJames Wright:header-rows: 1 1033ba6664aeSJames Wright 1034ba6664aeSJames Wright* - Option 1035ba6664aeSJames Wright - Description 1036ba6664aeSJames Wright - Default value 1037ba6664aeSJames Wright - Unit 1038ba6664aeSJames Wright 1039ba6664aeSJames Wright* - `-stg_inflow_path` 1040ba6664aeSJames Wright - Path to the STGInflow file 1041ba6664aeSJames Wright - `./STGInflow.dat` 1042ba6664aeSJames Wright - 1043ba6664aeSJames Wright 1044ba6664aeSJames Wright* - `-stg_rand_path` 1045ba6664aeSJames Wright - Path to the STGRand file 1046ba6664aeSJames Wright - `./STGRand.dat` 1047ba6664aeSJames Wright - 1048ba6664aeSJames Wright 1049ba6664aeSJames Wright* - `-stg_alpha` 1050ba6664aeSJames Wright - Growth rate of the wavemodes 1051ba6664aeSJames Wright - `1.01` 1052ba6664aeSJames Wright - 1053ba6664aeSJames Wright 1054ba6664aeSJames Wright* - `-stg_u0` 1055ba6664aeSJames Wright - Convective velocity, $U_0$ 1056ba6664aeSJames Wright - `0.0` 1057ba6664aeSJames Wright - `m/s` 1058ba6664aeSJames Wright 1059ba6664aeSJames Wright* - `-stg_mean_only` 1060ba6664aeSJames Wright - Only impose the mean velocity (no fluctutations) 1061ba6664aeSJames Wright - `false` 1062ba6664aeSJames Wright - 1063ba6664aeSJames Wright 106430af3636SJames Wright* - `-stg_strong` 106530af3636SJames Wright - Strongly enforce the STG inflow boundary condition 106630af3636SJames Wright - `false` 106730af3636SJames Wright - 106830af3636SJames Wright 106989060322SJames Wright* - `-stg_fluctuating_IC` 107089060322SJames Wright - "Extrude" the fluctuations through the domain as an initial condition 107189060322SJames Wright - `false` 107289060322SJames Wright - 107389060322SJames Wright 1074ba6664aeSJames Wright::: 1075ba6664aeSJames Wright 1076ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via: 1077ba6664aeSJames Wright 1078ba6664aeSJames Wright``` 1079ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true 1080ba6664aeSJames Wright``` 1081ba6664aeSJames Wright 108217be3a41SJeremy L ThompsonNote the added `-stg_use true` flag 108317be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow. 1084