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 6*6d9fcd4bSJeremy L ThompsonHONEE, a more fully featured fluid dynamics solver, can be found on [GitLab](https://gitlab.com/phypid/honee). 7*6d9fcd4bSJeremy L Thompson 877841947SLeila GhaffariThe Navier-Stokes problem solves the compressible Navier-Stokes equations in three dimensions using an explicit time integration. 977841947SLeila GhaffariThe state variables are mass density, momentum density, and energy density. 10ccaff030SJeremy L Thompson 1177841947SLeila GhaffariThe main Navier-Stokes solver for libCEED is defined in [`navierstokes.c`](navierstokes.c) with different problem definitions according to the application of interest. 12ccaff030SJeremy L Thompson 133b219b86SJames Wright## Build instructions 143b219b86SJames Wright 15bc7bbd5dSLeila GhaffariBuild by using: 16ccaff030SJeremy L Thompson 17ccaff030SJeremy L Thompson`make` 18ccaff030SJeremy L Thompson 19bc7bbd5dSLeila Ghaffariand run with: 20ccaff030SJeremy L Thompson 21bc7bbd5dSLeila Ghaffari``` 22bc7bbd5dSLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree] 23bc7bbd5dSLeila Ghaffari``` 24ccaff030SJeremy L Thompson 253b219b86SJames WrightIf you want to do *in situ* machine-learning training, specify `SMARTREDIS_DIR` in the make command like: 263b219b86SJames Wright 273b219b86SJames Wright``` 283b219b86SJames Wrightmake SMARTREDIS_DIR=~/software/smartredis/install 293b219b86SJames Wright``` 303b219b86SJames Wright 31bc7bbd5dSLeila Ghaffari## Runtime options 32ccaff030SJeremy L Thompson 33bc7bbd5dSLeila Ghaffari% inclusion-fluids-marker 34ccaff030SJeremy L Thompson 35bc7bbd5dSLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options. 36bc7bbd5dSLeila GhaffariThe following options are common among all problem types: 37ccaff030SJeremy L Thompson 38bc7bbd5dSLeila Ghaffari:::{list-table} Common Runtime Options 39bc7bbd5dSLeila Ghaffari:header-rows: 1 40ccaff030SJeremy L Thompson 41bc7bbd5dSLeila Ghaffari* - Option 42bc7bbd5dSLeila Ghaffari - Description 43bc7bbd5dSLeila Ghaffari - Default value 44ccaff030SJeremy L Thompson 45bc7bbd5dSLeila Ghaffari* - `-ceed` 46bc7bbd5dSLeila Ghaffari - CEED resource specifier 47bc7bbd5dSLeila Ghaffari - `/cpu/self/opt/blocked` 48ccaff030SJeremy L Thompson 493866774cSJames Wright* - `-test_type` 503866774cSJames Wright - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified 513866774cSJames Wright - `none` 52ccaff030SJeremy L Thompson 53bc7bbd5dSLeila Ghaffari* - `-compare_final_state_atol` 54bc7bbd5dSLeila Ghaffari - Test absolute tolerance 55bc7bbd5dSLeila Ghaffari - `1E-11` 56ccaff030SJeremy L Thompson 57bc7bbd5dSLeila Ghaffari* - `-compare_final_state_filename` 58bc7bbd5dSLeila Ghaffari - Test filename 59bc7bbd5dSLeila Ghaffari - 60ccaff030SJeremy L Thompson 61bc7bbd5dSLeila Ghaffari* - `-problem` 629e529eadSJames Wright - Problem to solve (`advection`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`) 63bc7bbd5dSLeila Ghaffari - `density_current` 64ccaff030SJeremy L Thompson 65bc7bbd5dSLeila Ghaffari* - `-implicit` 669e576805SJames Wright - Use implicit time integrator formulation 67bc7bbd5dSLeila Ghaffari - 68ccaff030SJeremy L Thompson 69bc7bbd5dSLeila Ghaffari* - `-degree` 70bc7bbd5dSLeila Ghaffari - Polynomial degree of tensor product basis (must be >= 1) 71bc7bbd5dSLeila Ghaffari - `1` 72ccaff030SJeremy L Thompson 732288fb52SJeremy L Thompson* - `-q_extra` 74bc7bbd5dSLeila Ghaffari - Number of extra quadrature points 75fc14f3f6SLeila Ghaffari - `0` 76ccaff030SJeremy L Thompson 7737cbb16aSJed Brown* - `-ts_monitor_solution` 7837cbb16aSJed Brown - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`) 7937cbb16aSJed Brown - 80ccaff030SJeremy L Thompson 8137cbb16aSJed Brown* - `-ts_monitor_solution_interval` 8237cbb16aSJed Brown - Number of time steps between visualization output frames. 8337cbb16aSJed Brown - `1` 8437cbb16aSJed Brown 8537cbb16aSJed Brown* - `-viewer_cgns_batch_size` 8637cbb16aSJed Brown - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 8737cbb16aSJed Brown - `20` 8837cbb16aSJed Brown 8937cbb16aSJed Brown* - `-checkpoint_interval` 9037cbb16aSJed Brown - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only 91bc7bbd5dSLeila Ghaffari - `10` 92ccaff030SJeremy L Thompson 9337cbb16aSJed Brown* - `-checkpoint_vtk` 9437cbb16aSJed Brown - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead. 9537cbb16aSJed Brown - `false` 9637cbb16aSJed Brown 9737cbb16aSJed Brown* - `-viz_refine` 9837cbb16aSJed Brown - Use regular refinement for VTK visualization 9937cbb16aSJed Brown - `0` 10037cbb16aSJed Brown 101bc7bbd5dSLeila Ghaffari* - `-output_dir` 10237cbb16aSJed Brown - Output directory for binary checkpoints and VTK files (if enabled). 103bc7bbd5dSLeila Ghaffari - `.` 104ccaff030SJeremy L Thompson 10569293791SJames Wright* - `-output_add_stepnum2bin` 10669293791SJames Wright - Whether to add step numbers to output binary files 10769293791SJames Wright - `false` 10869293791SJames Wright 10969293791SJames Wright* - `-continue` 11069293791SJames Wright - Continue from previous solution (input is step number of previous solution) 11169293791SJames Wright - `0` 11269293791SJames Wright 11369293791SJames Wright* - `-continue_filename` 11469293791SJames Wright - Path to solution binary file from which to continue from 11569293791SJames Wright - `[output_dir]/ns-solution.bin` 11669293791SJames Wright 11769293791SJames Wright* - `-continue_time_filename` 1184de8550aSJed Brown - Path to time stamp binary file (only for legacy checkpoints) 11969293791SJames Wright - `[output_dir]/ns-time.bin` 12069293791SJames Wright 1214534a52eSLeila Ghaffari* - `-bc_wall` 1224534a52eSLeila Ghaffari - Use wall boundary conditions on this list of faces 1234534a52eSLeila Ghaffari - 1244534a52eSLeila Ghaffari 1254534a52eSLeila Ghaffari* - `-wall_comps` 1264534a52eSLeila Ghaffari - An array of constrained component numbers for wall BCs 1274534a52eSLeila Ghaffari - 1284534a52eSLeila Ghaffari 1299f844368SJames Wright* - `-bc_slip` 1309f844368SJames Wright - Use weak slip boundary condition on this list of faces 1319f844368SJames Wright - 1329f844368SJames Wright 1337c5bba50SJames Wright* - `-bc_symmetry_x` 1347c5bba50SJames Wright - Use symmetry boundary conditions, for the x component, on this list of faces 1354534a52eSLeila Ghaffari - 1364534a52eSLeila Ghaffari 1377c5bba50SJames Wright* - `-bc_symmetry_y` 1387c5bba50SJames Wright - Use symmetry boundary conditions, for the y component, on this list of faces 1394534a52eSLeila Ghaffari - 1404534a52eSLeila Ghaffari 1417c5bba50SJames Wright* - `-bc_symmetry_z` 1427c5bba50SJames Wright - Use symmetry boundary conditions, for the z component, on this list of faces 1434534a52eSLeila Ghaffari - 1444534a52eSLeila Ghaffari 1454534a52eSLeila Ghaffari* - `-bc_inflow` 1464534a52eSLeila Ghaffari - Use inflow boundary conditions on this list of faces 1474534a52eSLeila Ghaffari - 1484534a52eSLeila Ghaffari 1494534a52eSLeila Ghaffari* - `-bc_outflow` 1504534a52eSLeila Ghaffari - Use outflow boundary conditions on this list of faces 1514534a52eSLeila Ghaffari - 15289d0f5c0SLeila Ghaffari 1537ec884f8SJames Wright* - `-bc_freestream` 1547ec884f8SJames Wright - Use freestream boundary conditions on this list of faces 1557ec884f8SJames Wright - 1567ec884f8SJames Wright 157b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval` 158ee3de563SJames Wright - Number of timesteps between statistics collection 159ee3de563SJames Wright - `1` 160ee3de563SJames Wright 161b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer` 162b7d66439SJames 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. 1638ed52730SJames Wright - 1648ed52730SJames Wright 165b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval` 166ee3de563SJames Wright - Number of timesteps between statistics file writing (`-1` means only at end of run) 167ee3de563SJames Wright - `-1` 168ee3de563SJames Wright 169b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size` 1708ed52730SJames Wright - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 1718ed52730SJames Wright - `20` 1728ed52730SJames Wright 173ca69d878SAdeleke O. Bankole* - `-ts_monitor_wall_force` 174ca69d878SAdeleke O. Bankole - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file. 175ca69d878SAdeleke O. Bankole - 176ca69d878SAdeleke O. Bankole 1772526956eSJames Wright* - `-mesh_transform` 1782526956eSJames Wright - Transform the mesh, usually for an initial box mesh. 1792526956eSJames Wright - `none` 1802526956eSJames Wright 181bc7bbd5dSLeila Ghaffari* - `-snes_view` 182bc7bbd5dSLeila Ghaffari - View PETSc `SNES` nonlinear solver configuration 183bc7bbd5dSLeila Ghaffari - 18489d0f5c0SLeila Ghaffari 185bc7bbd5dSLeila Ghaffari* - `-log_view` 186bc7bbd5dSLeila Ghaffari - View PETSc performance log 187bc7bbd5dSLeila Ghaffari - 188ccaff030SJeremy L Thompson 189bc7bbd5dSLeila Ghaffari* - `-help` 190bc7bbd5dSLeila Ghaffari - View comprehensive information about run-time options 191bc7bbd5dSLeila Ghaffari - 192bc7bbd5dSLeila Ghaffari::: 193ccaff030SJeremy L Thompson 1947c5bba50SJames 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_symmetry_x`, `-bc_symmetry_y`, and `-bc_symmetry_z` are: 1954534a52eSLeila Ghaffari 19688626eedSJames Wright:::{list-table} 2D Face ID Labels 19788626eedSJames Wright:header-rows: 1 19888626eedSJames Wright* - PETSc Face Name 19988626eedSJames Wright - Cartesian direction 20088626eedSJames Wright - Face ID 20188626eedSJames Wright 20288626eedSJames Wright* - faceMarkerBottom 20388626eedSJames Wright - -z 20488626eedSJames Wright - 1 20588626eedSJames Wright 20688626eedSJames Wright* - faceMarkerRight 20788626eedSJames Wright - +x 20888626eedSJames Wright - 2 20988626eedSJames Wright 21088626eedSJames Wright* - faceMarkerTop 21188626eedSJames Wright - +z 21288626eedSJames Wright - 3 21388626eedSJames Wright 21488626eedSJames Wright* - faceMarkerLeft 21588626eedSJames Wright - -x 21688626eedSJames Wright - 4 21788626eedSJames Wright::: 21888626eedSJames Wright 219b5e826a6SLeila Ghaffari:::{list-table} 3D Face ID Labels 22088626eedSJames Wright:header-rows: 1 22188626eedSJames Wright* - PETSc Face Name 22288626eedSJames Wright - Cartesian direction 22388626eedSJames Wright - Face ID 22488626eedSJames Wright 22588626eedSJames Wright* - faceMarkerBottom 22688626eedSJames Wright - -z 22788626eedSJames Wright - 1 22888626eedSJames Wright 22988626eedSJames Wright* - faceMarkerTop 23088626eedSJames Wright - +z 23188626eedSJames Wright - 2 23288626eedSJames Wright 23388626eedSJames Wright* - faceMarkerFront 23488626eedSJames Wright - -y 23588626eedSJames Wright - 3 23688626eedSJames Wright 23788626eedSJames Wright* - faceMarkerBack 23888626eedSJames Wright - +y 23988626eedSJames Wright - 4 24088626eedSJames Wright 24188626eedSJames Wright* - faceMarkerRight 24288626eedSJames Wright - +x 24388626eedSJames Wright - 5 24488626eedSJames Wright 24588626eedSJames Wright* - faceMarkerLeft 24688626eedSJames Wright - -x 24788626eedSJames Wright - 6 24888626eedSJames Wright::: 2494534a52eSLeila Ghaffari 2508a94a473SJed Brown### Boundary conditions 2518a94a473SJed Brown 2523b219b86SJames WrightBoundary conditions for compressible viscous flows are notoriously tricky. 2533b219b86SJames WrightHere we offer some recommendations. 2548a94a473SJed Brown 2558a94a473SJed Brown#### Inflow 2568a94a473SJed Brown 2578a94a473SJed 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). 2588a94a473SJed BrownIt is stable and the least reflective boundary condition for acoustics. 2598a94a473SJed Brown 2608a94a473SJed BrownIf near a viscous wall, you may want a specified inflow profile. 2618a94a473SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles. 2628a94a473SJed 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. 2638a94a473SJed BrownThe strong approach gives sharper resolution of velocity structures. 2648a94a473SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent. 2658a94a473SJed Brown 266f3f66076SJames Wright#### Outflow 2678a94a473SJed Brown 2688a94a473SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures. 2698a94a473SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections. 2708a94a473SJed 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. 2718a94a473SJed Brown 2728a94a473SJed 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. 2738a94a473SJed Brown 2748a94a473SJed 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). 2758a94a473SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow. 2768a94a473SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use. 2778a94a473SJed Brown 278f3f66076SJames Wright#### Periodicity 2798a94a473SJed Brown 2808a94a473SJed BrownPETSc provides two ways to specify periodicity: 2818a94a473SJed Brown 2828a94a473SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using: 2838a94a473SJed Brown 2848a94a473SJed Brown```yaml 2858a94a473SJed Browndm_plex: 2868a94a473SJed Brown shape: box 2878a94a473SJed Brown box_faces: 10,12,4 2888a94a473SJed Brown box_bd: none,none,periodic 2898a94a473SJed Brown``` 2908a94a473SJed Brown 291ca69d878SAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary. 292ca69d878SAdeleke 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. 293ca69d878SAdeleke O. Bankole 294ca69d878SAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in: 295ca69d878SAdeleke O. Bankole 296ca69d878SAdeleke O. Bankole```yaml 297ca69d878SAdeleke O. Bankoledm_plex: 298ca69d878SAdeleke O. Bankole shape: zbox 299ca69d878SAdeleke O. Bankole box_faces: 10,12,4 300ca69d878SAdeleke O. Bankole box_bd: none,none,periodic 301ca69d878SAdeleke O. Bankole``` 302ca69d878SAdeleke O. Bankole 303ca69d878SAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use. 304ca69d878SAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity. 305ca69d878SAdeleke 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. 3068a94a473SJed Brown 307019b7682STimothy Aiken### Advection 308019b7682STimothy Aiken 30917be3a41SJeremy 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$. 3109e529eadSJames WrightThe advection problems can be run in both 2D and 3D, based on the DM defined for the problem. 31194a05c6fSJames WrightThe following additional command-line options are available: 312019b7682STimothy Aiken 31394a05c6fSJames Wright:::{list-table} Advection Runtime Options 314bc7bbd5dSLeila Ghaffari:header-rows: 1 315e43605a5SLeila Ghaffari 316bc7bbd5dSLeila Ghaffari* - Option 317bc7bbd5dSLeila Ghaffari - Description 318bc7bbd5dSLeila Ghaffari - Default value 319bc7bbd5dSLeila Ghaffari - Unit 320e43605a5SLeila Ghaffari 321bc7bbd5dSLeila Ghaffari* - `-rc` 322bc7bbd5dSLeila Ghaffari - Characteristic radius of thermal bubble 323bc7bbd5dSLeila Ghaffari - `1000` 324bc7bbd5dSLeila Ghaffari - `m` 325e43605a5SLeila Ghaffari 326bc7bbd5dSLeila Ghaffari* - `-units_meter` 327bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 328bc7bbd5dSLeila Ghaffari - `1E-2` 329bc7bbd5dSLeila Ghaffari - 330e43605a5SLeila Ghaffari 331bc7bbd5dSLeila Ghaffari* - `-units_second` 332bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 333bc7bbd5dSLeila Ghaffari - `1E-2` 334bc7bbd5dSLeila Ghaffari - 335e43605a5SLeila Ghaffari 336bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 337bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 338bc7bbd5dSLeila Ghaffari - `1E-6` 339bc7bbd5dSLeila Ghaffari - 340e43605a5SLeila Ghaffari 341bc7bbd5dSLeila Ghaffari* - `-strong_form` 342bc7bbd5dSLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 343bc7bbd5dSLeila Ghaffari - `0` 344bc7bbd5dSLeila Ghaffari - 345e43605a5SLeila Ghaffari 346bc7bbd5dSLeila Ghaffari* - `-stab` 347bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 348bc7bbd5dSLeila Ghaffari - `none` 349bc7bbd5dSLeila Ghaffari - 350e43605a5SLeila Ghaffari 35144e8f77dSJames Wright* - `-stab_tau` 35244e8f77dSJames Wright - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`) 35344e8f77dSJames Wright - `ctau` 35444e8f77dSJames Wright - 35544e8f77dSJames Wright 35644e8f77dSJames Wright* - `-Ctau_t` 35744e8f77dSJames Wright - Scaling factor on the temporal portion of the $\tau$ formulation 35844e8f77dSJames Wright - 0. 35944e8f77dSJames Wright - 36044e8f77dSJames Wright 36144e8f77dSJames Wright* - `-Ctau_a` 36244e8f77dSJames Wright - Scaling factor on the advection portion of the $\tau$ formulation 36344e8f77dSJames Wright - $P^2$ 36444e8f77dSJames Wright - 36544e8f77dSJames Wright 366bc7bbd5dSLeila Ghaffari* - `-CtauS` 367bc7bbd5dSLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 368bc7bbd5dSLeila Ghaffari - `0` 369bc7bbd5dSLeila Ghaffari - 370e43605a5SLeila Ghaffari 371bc7bbd5dSLeila Ghaffari* - `-wind_type` 372bc7bbd5dSLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 373bc7bbd5dSLeila Ghaffari - `rotation` 374bc7bbd5dSLeila Ghaffari - 375e43605a5SLeila Ghaffari 376bc7bbd5dSLeila Ghaffari* - `-wind_translation` 377bc7bbd5dSLeila Ghaffari - Constant wind vector when `-wind_type translation` 378bc7bbd5dSLeila Ghaffari - `1,0,0` 379bc7bbd5dSLeila Ghaffari - 380e43605a5SLeila Ghaffari 381d1d77723SJames Wright* - `-diffusion_coeff` 382d1d77723SJames Wright - Diffusion coefficient 383d1d77723SJames Wright - `0` 384d1d77723SJames Wright - 385d1d77723SJames Wright 386bc7bbd5dSLeila Ghaffari* - `-E_wind` 387bc7bbd5dSLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 388bc7bbd5dSLeila Ghaffari - `1E6` 389bc7bbd5dSLeila Ghaffari - `J` 390e43605a5SLeila Ghaffari 3917b77ddfdSJames Wright* - `-advection_ic_type` 3927b77ddfdSJames Wright - Initial condition type, from `sphere`, `cylinder`, `cosine_hill`, and `skew` 393f3f66076SJames Wright - `sphere` 394bc7bbd5dSLeila Ghaffari - 395e43605a5SLeila Ghaffari 396bc7bbd5dSLeila Ghaffari* - `-bubble_continuity` 3979e529eadSJames Wright - Different shapes for `sphere` and `cylinder` initial conditions, from `smooth`, `back_sharp`, `thick`, or `cosine` 398bc7bbd5dSLeila Ghaffari - `smooth` 399bc7bbd5dSLeila Ghaffari - 400bc7bbd5dSLeila Ghaffari::: 401ccaff030SJeremy L Thompson 40294a05c6fSJames WrightFor 3D advection, an example of the `rotation` mode can be run with: 403ccaff030SJeremy L Thompson 404bc7bbd5dSLeila Ghaffari``` 4054534a52eSLeila 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 406bc7bbd5dSLeila Ghaffari``` 407ccaff030SJeremy L Thompson 408bc7bbd5dSLeila Ghaffariand the `translation` mode with: 409ccaff030SJeremy L Thompson 410bc7bbd5dSLeila Ghaffari``` 4114534a52eSLeila 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 412bc7bbd5dSLeila Ghaffari``` 413ccaff030SJeremy L Thompson 41494a05c6fSJames WrightFor 2D advection, an example of the `rotation` mode can be run with: 41594a05c6fSJames Wright 41694a05c6fSJames Wright``` 4179e529eadSJames Wright./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 41894a05c6fSJames Wright``` 41994a05c6fSJames Wright 42094a05c6fSJames Wrightand the `translation` mode with: 42194a05c6fSJames Wright 42294a05c6fSJames Wright``` 4239e529eadSJames Wright./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 42494a05c6fSJames Wright``` 42594a05c6fSJames WrightNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 42694a05c6fSJames Wright 427019b7682STimothy Aiken### Inviscid Ideal Gas 428019b7682STimothy Aiken 429019b7682STimothy Aiken#### Isentropic Euler vortex 430019b7682STimothy Aiken 431bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available: 432ccaff030SJeremy L Thompson 433bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options 434bc7bbd5dSLeila Ghaffari:header-rows: 1 435ccaff030SJeremy L Thompson 436bc7bbd5dSLeila Ghaffari* - Option 437bc7bbd5dSLeila Ghaffari - Description 438bc7bbd5dSLeila Ghaffari - Default value 439bc7bbd5dSLeila Ghaffari - Unit 440ccaff030SJeremy L Thompson 441bc7bbd5dSLeila Ghaffari* - `-center` 442bc7bbd5dSLeila Ghaffari - Location of vortex center 443bc7bbd5dSLeila Ghaffari - `(lx,ly,lz)/2` 444bc7bbd5dSLeila Ghaffari - `(m,m,m)` 445ccaff030SJeremy L Thompson 446bc7bbd5dSLeila Ghaffari* - `-units_meter` 447bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 448bc7bbd5dSLeila Ghaffari - `1E-2` 449bc7bbd5dSLeila Ghaffari - 450ccaff030SJeremy L Thompson 451bc7bbd5dSLeila Ghaffari* - `-units_second` 452bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 453bc7bbd5dSLeila Ghaffari - `1E-2` 454bc7bbd5dSLeila Ghaffari - 455ccaff030SJeremy L Thompson 456bc7bbd5dSLeila Ghaffari* - `-mean_velocity` 457bc7bbd5dSLeila Ghaffari - Background velocity vector 458bc7bbd5dSLeila Ghaffari - `(1,1,0)` 459bc7bbd5dSLeila Ghaffari - 460ccaff030SJeremy L Thompson 461bc7bbd5dSLeila Ghaffari* - `-vortex_strength` 462bc7bbd5dSLeila Ghaffari - Strength of vortex < 10 463bc7bbd5dSLeila Ghaffari - `5` 464bc7bbd5dSLeila Ghaffari - 465932417b3SJed Brown 466932417b3SJed Brown* - `-c_tau` 467932417b3SJed Brown - Stabilization constant 468504dc8e0SLeila Ghaffari - `0.5` 469932417b3SJed Brown - 470bc7bbd5dSLeila Ghaffari::: 471ccaff030SJeremy L Thompson 472bc7bbd5dSLeila GhaffariThis problem can be run with: 473ccaff030SJeremy L Thompson 474bc7bbd5dSLeila Ghaffari``` 4757c5bba50SJames Wright./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. 476bc7bbd5dSLeila Ghaffari``` 477ccaff030SJeremy L Thompson 478019b7682STimothy Aiken#### Sod shock tube 479019b7682STimothy Aiken 480019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available: 481019b7682STimothy Aiken 482019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options 483019b7682STimothy Aiken:header-rows: 1 484019b7682STimothy Aiken 485019b7682STimothy Aiken* - Option 486019b7682STimothy Aiken - Description 487019b7682STimothy Aiken - Default value 488019b7682STimothy Aiken - Unit 489019b7682STimothy Aiken 490019b7682STimothy Aiken* - `-units_meter` 491019b7682STimothy Aiken - 1 meter in scaled length units 492019b7682STimothy Aiken - `1E-2` 493019b7682STimothy Aiken - 494019b7682STimothy Aiken 495019b7682STimothy Aiken* - `-units_second` 496019b7682STimothy Aiken - 1 second in scaled time units 497019b7682STimothy Aiken - `1E-2` 498019b7682STimothy Aiken - 499019b7682STimothy Aiken 500019b7682STimothy Aiken* - `-yzb` 501019b7682STimothy Aiken - Use YZB discontinuity capturing 502019b7682STimothy Aiken - `none` 503019b7682STimothy Aiken - 504019b7682STimothy Aiken 505019b7682STimothy Aiken* - `-stab` 506019b7682STimothy Aiken - Stabilization method (`none`, `su`, or `supg`) 507019b7682STimothy Aiken - `none` 508019b7682STimothy Aiken - 509019b7682STimothy Aiken::: 510019b7682STimothy Aiken 511019b7682STimothy AikenThis problem can be run with: 512019b7682STimothy Aiken 513019b7682STimothy Aiken``` 5147c5bba50SJames Wright./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 515019b7682STimothy Aiken``` 516019b7682STimothy Aiken 517019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas 518019b7682STimothy Aiken 51988626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available: 520ccaff030SJeremy L Thompson 52188626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options 522bc7bbd5dSLeila Ghaffari:header-rows: 1 523ccaff030SJeremy L Thompson 524bc7bbd5dSLeila Ghaffari* - Option 525bc7bbd5dSLeila Ghaffari - Description 526bc7bbd5dSLeila Ghaffari - Default value 527bc7bbd5dSLeila Ghaffari - Unit 528ccaff030SJeremy L Thompson 529bc7bbd5dSLeila Ghaffari* - `-units_meter` 530bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 53188626eedSJames Wright - `1` 532bc7bbd5dSLeila Ghaffari - 533ccaff030SJeremy L Thompson 534bc7bbd5dSLeila Ghaffari* - `-units_second` 535bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 53688626eedSJames Wright - `1` 537bc7bbd5dSLeila Ghaffari - 538ccaff030SJeremy L Thompson 539bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 540bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 54188626eedSJames Wright - `1` 542bc7bbd5dSLeila Ghaffari - 543ccaff030SJeremy L Thompson 544bc7bbd5dSLeila Ghaffari* - `-units_Kelvin` 545bc7bbd5dSLeila Ghaffari - 1 Kelvin in scaled temperature units 546bc7bbd5dSLeila Ghaffari - `1` 547bc7bbd5dSLeila Ghaffari - 548ccaff030SJeremy L Thompson 549bc7bbd5dSLeila Ghaffari* - `-stab` 550bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 551bc7bbd5dSLeila Ghaffari - `none` 552bc7bbd5dSLeila Ghaffari - 553ccaff030SJeremy L Thompson 554932417b3SJed Brown* - `-c_tau` 55588626eedSJames Wright - Stabilization constant, $c_\tau$ 556504dc8e0SLeila Ghaffari - `0.5` 557932417b3SJed Brown - 558932417b3SJed Brown 55988626eedSJames Wright* - `-Ctau_t` 56088626eedSJames Wright - Stabilization time constant, $C_t$ 56188626eedSJames Wright - `1.0` 56288626eedSJames Wright - 563ccaff030SJeremy L Thompson 56488626eedSJames Wright* - `-Ctau_v` 56588626eedSJames Wright - Stabilization viscous constant, $C_v$ 56694c01735SLeila Ghaffari - `36, 60, 128 for degree = 1, 2, 3` 56788626eedSJames Wright - 568ccaff030SJeremy L Thompson 56988626eedSJames Wright* - `-Ctau_C` 57088626eedSJames Wright - Stabilization continuity constant, $C_c$ 57188626eedSJames Wright - `1.0` 57288626eedSJames Wright - 573ccaff030SJeremy L Thompson 57488626eedSJames Wright* - `-Ctau_M` 57588626eedSJames Wright - Stabilization momentum constant, $C_m$ 57688626eedSJames Wright - `1.0` 57788626eedSJames Wright - 57888626eedSJames Wright 57988626eedSJames Wright* - `-Ctau_E` 58088626eedSJames Wright - Stabilization energy constant, $C_E$ 58188626eedSJames Wright - `1.0` 58288626eedSJames Wright - 583ccaff030SJeremy L Thompson 584bc7bbd5dSLeila Ghaffari* - `-cv` 585bc7bbd5dSLeila Ghaffari - Heat capacity at constant volume 586bc7bbd5dSLeila Ghaffari - `717` 587bc7bbd5dSLeila Ghaffari - `J/(kg K)` 588ccaff030SJeremy L Thompson 589bc7bbd5dSLeila Ghaffari* - `-cp` 590bc7bbd5dSLeila Ghaffari - Heat capacity at constant pressure 591bc7bbd5dSLeila Ghaffari - `1004` 592bc7bbd5dSLeila Ghaffari - `J/(kg K)` 593ccaff030SJeremy L Thompson 594a2726bdbSJames Wright* - `-gravity` 595a2726bdbSJames Wright - Gravitational acceleration vector 596a2726bdbSJames Wright - `0,0,0` 597bc7bbd5dSLeila Ghaffari - `m/s^2` 598ccaff030SJeremy L Thompson 599bc7bbd5dSLeila Ghaffari* - `-lambda` 600bc7bbd5dSLeila Ghaffari - Stokes hypothesis second viscosity coefficient 601bc7bbd5dSLeila Ghaffari - `-2/3` 602bc7bbd5dSLeila Ghaffari - 603ccaff030SJeremy L Thompson 604bc7bbd5dSLeila Ghaffari* - `-mu` 605bc7bbd5dSLeila Ghaffari - Shear dynamic viscosity coefficient 606a2726bdbSJames Wright - `1.8e-5` 607bc7bbd5dSLeila Ghaffari - `Pa s` 60877841947SLeila Ghaffari 609bc7bbd5dSLeila Ghaffari* - `-k` 610bc7bbd5dSLeila Ghaffari - Thermal conductivity 611bc7bbd5dSLeila Ghaffari - `0.02638` 612bc7bbd5dSLeila Ghaffari - `W/(m K)` 613a1df05f8SJed Brown 614a1df05f8SJed Brown* - `-newtonian_unit_tests` 615a1df05f8SJed Brown - Developer option to test properties 616a1df05f8SJed Brown - `false` 617a1df05f8SJed Brown - boolean 618de2fdd78SJames Wright 6195c0afad3SJames Wright* - `-state_var` 620a2d72b6fSJames Wright - 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})$ 6215c0afad3SJames Wright - `conservative` 6225c0afad3SJames Wright - string 623530ad8c4SKenneth E. Jansen 624530ad8c4SKenneth E. Jansen* - `-idl_decay_time` 625530ad8c4SKenneth E. Jansen - Characteristic timescale of the pressure deviance decay. The timestep is good starting point 626530ad8c4SKenneth E. Jansen - `-1` (disabled) 627530ad8c4SKenneth E. Jansen - `s` 628530ad8c4SKenneth E. Jansen 629530ad8c4SKenneth E. Jansen* - `-idl_start` 630530ad8c4SKenneth E. Jansen - Start of IDL in the x direction 631530ad8c4SKenneth E. Jansen - `0` 632530ad8c4SKenneth E. Jansen - `m` 633530ad8c4SKenneth E. Jansen 634530ad8c4SKenneth E. Jansen* - `-idl_length` 635530ad8c4SKenneth E. Jansen - Length of IDL in the positive x direction 636530ad8c4SKenneth E. Jansen - `0` 637530ad8c4SKenneth E. Jansen - `m` 638530ad8c4SKenneth E. Jansen 6392249ac91SJames Wright* - `-idl_pressure` 6402249ac91SJames Wright - Pressure used for IDL reference pressure 6412249ac91SJames Wright - `-reference_pressure` 6422249ac91SJames Wright - `Pa` 6432249ac91SJames Wright 644c79d6dc9SJames Wright* - `-sgs_model_type` 645c79d6dc9SJames Wright - Type of subgrid stress model to use. Currently only `data_driven` is available 646c79d6dc9SJames Wright - `none` 647c79d6dc9SJames Wright - string 648c79d6dc9SJames Wright 649c79d6dc9SJames Wright* - `-sgs_model_dd_leakyrelu_alpha` 650c79d6dc9SJames Wright - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU 651c79d6dc9SJames Wright - 0 652c79d6dc9SJames Wright - 653c79d6dc9SJames Wright 654c79d6dc9SJames Wright* - `-sgs_model_dd_parameter_dir` 655c79d6dc9SJames Wright - Path to directory with data-driven model parameters (weights, biases, etc.) 656c79d6dc9SJames Wright - `./dd_sgs_parameters` 657c79d6dc9SJames Wright - string 658c79d6dc9SJames Wright 659013a5551SJames Wright* - `-sgs_model_dd_model_implementation` 660013a5551SJames Wright - Which computational implementation to use for SGS DD model (`fused`, `sequential_ceed`, `sequential_torch`) 661013a5551SJames Wright - `fused` 662013a5551SJames Wright - string 663013a5551SJames Wright 664013a5551SJames Wright* - `-sgs_model_dd_torch_model_path` 665013a5551SJames Wright - Path to the PyTorch `*.pt` file containing the DD inference model 666013a5551SJames Wright - 667013a5551SJames Wright - string 668013a5551SJames Wright 669013a5551SJames Wright* - `-sgs_model_dd_torch_model_device` 670013a5551SJames Wright - What hardware to perform the model inference on (`cpu`, `cuda`, `hip`, `xpu`) 671013a5551SJames Wright - Default matches the libCEED backend 672013a5551SJames Wright - string 673cf90ec9bSJames Wright 6743f89fbfdSJames Wright* - `-diff_filter_monitor` 6753f89fbfdSJames Wright - Enable differential filter TSMonitor 6763f89fbfdSJames Wright - `false` 6773f89fbfdSJames Wright - boolean 6783f89fbfdSJames Wright 6793f89fbfdSJames Wright* - `-diff_filter_grid_based_width` 6803f89fbfdSJames Wright - Use filter width based on the grid size 6813f89fbfdSJames Wright - `false` 6823f89fbfdSJames Wright - boolean 6833f89fbfdSJames Wright 6843f89fbfdSJames Wright* - `-diff_filter_width_scaling` 6853f89fbfdSJames Wright - Anisotropic scaling for filter width in wall-aligned coordinates (snz) 6863f89fbfdSJames Wright - `1,1,1` 6873f89fbfdSJames Wright - `m` 6883f89fbfdSJames Wright 6893f89fbfdSJames Wright* - `-diff_filter_kernel_scaling` 6903f89fbfdSJames Wright - Scaling to make differential kernel size equivalent to other filter kernels 6913f89fbfdSJames Wright - `0.1` 6923f89fbfdSJames Wright - `m^2` 6933f89fbfdSJames Wright 6943f89fbfdSJames Wright* - `-diff_filter_wall_damping_function` 6953f89fbfdSJames Wright - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`) 6963f89fbfdSJames Wright - `none` 6973f89fbfdSJames Wright - string 6983f89fbfdSJames Wright 6993f89fbfdSJames Wright* - `-diff_filter_wall_damping_constant` 7009d9c52bbSJed Brown - Constant for the wall-damping function. $A^+$ for `van_driest` damping function. 7013f89fbfdSJames Wright - 25 7023f89fbfdSJames Wright - 7033f89fbfdSJames Wright 7043f89fbfdSJames Wright* - `-diff_filter_friction_length` 7053f89fbfdSJames Wright - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions 7063f89fbfdSJames Wright - 0 7073f89fbfdSJames Wright - `m` 7083f89fbfdSJames Wright 7093b219b86SJames Wright* - `-sgs_train_enable` 7103b219b86SJames Wright - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis. 7113b219b86SJames Wright - `false` 7123b219b86SJames Wright - boolean 7133b219b86SJames Wright 7143b219b86SJames Wright* - `-sgs_train_write_data_interval` 7153b219b86SJames Wright - Number of timesteps between writing training data into SmartRedis database 7163b219b86SJames Wright - `1` 7173b219b86SJames Wright - 7183b219b86SJames Wright 7193b219b86SJames Wright* - `-sgs_train_overwrite_data` 7203b219b86SJames Wright - Whether new training data should overwrite old data on database 7213b219b86SJames Wright - `true` 7223b219b86SJames Wright - boolean 7233b219b86SJames Wright 724c79b0730SJames Wright* - `-sgs_train_filter_widths` 725c79b0730SJames Wright - List of scalar values for different filter widths to calculate for training data 726c79b0730SJames Wright - 727c79b0730SJames Wright - `m` 728c79b0730SJames Wright 7293b219b86SJames Wright* - `-smartsim_collocated_num_ranks` 7303b219b86SJames Wright - Number of MPI ranks associated with each collocated database (i.e. ranks per node) 7313b219b86SJames Wright - `1` 7323b219b86SJames Wright - 733bc7bbd5dSLeila Ghaffari::: 73477841947SLeila Ghaffari 735530ad8c4SKenneth E. Jansen#### Gaussian Wave 7367ec884f8SJames Wright 737530ad8c4SKenneth E. JansenThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options: 7387ec884f8SJames Wright 739530ad8c4SKenneth E. Jansen:::{list-table} Gaussian Wave Runtime Options 7407ec884f8SJames Wright:header-rows: 1 7417ec884f8SJames Wright 7427ec884f8SJames Wright* - Option 7437ec884f8SJames Wright - Description 7447ec884f8SJames Wright - Default value 7457ec884f8SJames Wright - Unit 7467ec884f8SJames Wright 747f1e435c9SJed Brown* - `-freestream_riemann` 748f1e435c9SJed Brown - Riemann solver for boundaries (HLL or HLLC) 749f1e435c9SJed Brown - `hllc` 750f1e435c9SJed Brown - 751f1e435c9SJed Brown 752f1e435c9SJed Brown* - `-freestream_velocity` 7537ec884f8SJames Wright - Freestream velocity vector 7547ec884f8SJames Wright - `0,0,0` 7557ec884f8SJames Wright - `m/s` 7567ec884f8SJames Wright 757f1e435c9SJed Brown* - `-freestream_temperature` 7587ec884f8SJames Wright - Freestream temperature 7597ec884f8SJames Wright - `288` 7607ec884f8SJames Wright - `K` 7617ec884f8SJames Wright 762f1e435c9SJed Brown* - `-freestream_pressure` 76389e3cb53SJames Wright - Freestream pressure 7647ec884f8SJames Wright - `1.01e5` 7657ec884f8SJames Wright - `Pa` 7667ec884f8SJames Wright 7677ec884f8SJames Wright* - `-epicenter` 7687ec884f8SJames Wright - Coordinates of center of perturbation 7697ec884f8SJames Wright - `0,0,0` 7707ec884f8SJames Wright - `m` 7717ec884f8SJames Wright 7727ec884f8SJames Wright* - `-amplitude` 7737ec884f8SJames Wright - Amplitude of the perturbation 7747ec884f8SJames Wright - `0.1` 7757ec884f8SJames Wright - 7767ec884f8SJames Wright 7777ec884f8SJames Wright* - `-width` 7787ec884f8SJames Wright - Width parameter of the perturbation 7797ec884f8SJames Wright - `0.002` 7807ec884f8SJames Wright - `m` 7817ec884f8SJames Wright 7827ec884f8SJames Wright::: 7837ec884f8SJames Wright 784530ad8c4SKenneth E. JansenThis problem can be run with the `gaussianwave.yaml` file via: 7857ec884f8SJames Wright 7867ec884f8SJames Wright``` 787530ad8c4SKenneth E. Jansen./navierstokes -options_file gaussianwave.yaml 7887ec884f8SJames Wright``` 7897ec884f8SJames Wright 790530ad8c4SKenneth E. Jansen```{literalinclude} ../../../../../examples/fluids/gaussianwave.yaml 7917ec884f8SJames Wright:language: yaml 7927ec884f8SJames Wright``` 793a1df05f8SJed Brown 794d310b3d3SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder 795d310b3d3SAdeleke O. Bankole 796d310b3d3SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options: 797d310b3d3SAdeleke O. Bankole 798d310b3d3SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options 799d310b3d3SAdeleke O. Bankole:header-rows: 1 800d310b3d3SAdeleke O. Bankole 801d310b3d3SAdeleke O. Bankole* - Option 802d310b3d3SAdeleke O. Bankole - Description 803d310b3d3SAdeleke O. Bankole - Default value 804d310b3d3SAdeleke O. Bankole - Unit 805d310b3d3SAdeleke O. Bankole 806d310b3d3SAdeleke O. Bankole* - `-freestream_velocity` 807d310b3d3SAdeleke O. Bankole - Freestream velocity vector 808d310b3d3SAdeleke O. Bankole - `0,0,0` 809d310b3d3SAdeleke O. Bankole - `m/s` 810d310b3d3SAdeleke O. Bankole 811d310b3d3SAdeleke O. Bankole* - `-freestream_temperature` 812d310b3d3SAdeleke O. Bankole - Freestream temperature 813d310b3d3SAdeleke O. Bankole - `288` 814d310b3d3SAdeleke O. Bankole - `K` 815d310b3d3SAdeleke O. Bankole 816d310b3d3SAdeleke O. Bankole* - `-freestream_pressure` 817d310b3d3SAdeleke O. Bankole - Freestream pressure 818d310b3d3SAdeleke O. Bankole - `1.01e5` 819d310b3d3SAdeleke O. Bankole - `Pa` 820d310b3d3SAdeleke O. Bankole 821d310b3d3SAdeleke O. Bankole::: 822d310b3d3SAdeleke O. Bankole 823d310b3d3SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`. 824d310b3d3SAdeleke O. BankoleTo run this problem, first generate a mesh: 825d310b3d3SAdeleke O. Bankole 826d310b3d3SAdeleke O. Bankole```console 827d310b3d3SAdeleke O. Bankole$ make -C examples/fluids/meshes 828d310b3d3SAdeleke O. Bankole``` 829d310b3d3SAdeleke O. Bankole 830d310b3d3SAdeleke O. BankoleThen run by building the executable and running: 831d310b3d3SAdeleke O. Bankole 832d310b3d3SAdeleke O. Bankole```console 833d310b3d3SAdeleke O. Bankole$ make build/fluids-navierstokes 834ca69d878SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_ 835d310b3d3SAdeleke O. Bankole``` 836d310b3d3SAdeleke O. Bankole 837ca69d878SAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps). 838ca69d878SAdeleke 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. 839ca69d878SAdeleke O. Bankole 840ca69d878SAdeleke O. Bankole```console 841d6734f85SAdeleke O. Bankole$ python examples/fluids/postprocess/vortexshedding.py 842ca69d878SAdeleke O. Bankole``` 843d310b3d3SAdeleke O. Bankole 844d310b3d3SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml 845d310b3d3SAdeleke O. Bankole:language: yaml 846d310b3d3SAdeleke O. Bankole``` 847d310b3d3SAdeleke O. Bankole 848019b7682STimothy Aiken#### Density current 849019b7682STimothy Aiken 850061ff11eSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options: 85188626eedSJames Wright 85288626eedSJames Wright:::{list-table} Density Current Runtime Options 85388626eedSJames Wright:header-rows: 1 85488626eedSJames Wright 85588626eedSJames Wright* - Option 85688626eedSJames Wright - Description 85788626eedSJames Wright - Default value 85888626eedSJames Wright - Unit 85988626eedSJames Wright 86088626eedSJames Wright* - `-center` 86188626eedSJames Wright - Location of bubble center 86288626eedSJames Wright - `(lx,ly,lz)/2` 86388626eedSJames Wright - `(m,m,m)` 86488626eedSJames Wright 86588626eedSJames Wright* - `-dc_axis` 86688626eedSJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 86788626eedSJames Wright - `(0,0,0)` 86888626eedSJames Wright - 86988626eedSJames Wright 87088626eedSJames Wright* - `-rc` 87188626eedSJames Wright - Characteristic radius of thermal bubble 87288626eedSJames Wright - `1000` 87388626eedSJames Wright - `m` 87488626eedSJames Wright 87588626eedSJames Wright* - `-theta0` 87688626eedSJames Wright - Reference potential temperature 87788626eedSJames Wright - `300` 87888626eedSJames Wright - `K` 87988626eedSJames Wright 88088626eedSJames Wright* - `-thetaC` 88188626eedSJames Wright - Perturbation of potential temperature 88288626eedSJames Wright - `-15` 88388626eedSJames Wright - `K` 88488626eedSJames Wright 88588626eedSJames Wright* - `-P0` 88688626eedSJames Wright - Atmospheric pressure 88788626eedSJames Wright - `1E5` 88888626eedSJames Wright - `Pa` 88988626eedSJames Wright 89088626eedSJames Wright* - `-N` 89188626eedSJames Wright - Brunt-Vaisala frequency 89288626eedSJames Wright - `0.01` 89388626eedSJames Wright - `1/s` 89488626eedSJames Wright::: 89588626eedSJames Wright 896bc7bbd5dSLeila GhaffariThis problem can be run with: 897ccaff030SJeremy L Thompson 898bc7bbd5dSLeila Ghaffari``` 8997c5bba50SJames 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_symmetry_y 3,4 -mu 75 90088626eedSJames Wright``` 90188626eedSJames Wright 902019b7682STimothy Aiken#### Channel flow 903019b7682STimothy Aiken 904061ff11eSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options: 90588626eedSJames Wright 90688626eedSJames Wright:::{list-table} Channel Runtime Options 90788626eedSJames Wright:header-rows: 1 90888626eedSJames Wright 90988626eedSJames Wright* - Option 91088626eedSJames Wright - Description 91188626eedSJames Wright - Default value 91288626eedSJames Wright - Unit 91388626eedSJames Wright 91488626eedSJames Wright* - `-umax` 91588626eedSJames Wright - Maximum/centerline velocity of the flow 91688626eedSJames Wright - `10` 91788626eedSJames Wright - `m/s` 91888626eedSJames Wright 91988626eedSJames Wright* - `-theta0` 92088626eedSJames Wright - Reference potential temperature 92188626eedSJames Wright - `300` 92288626eedSJames Wright - `K` 92388626eedSJames Wright 92488626eedSJames Wright* - `-P0` 92588626eedSJames Wright - Atmospheric pressure 92688626eedSJames Wright - `1E5` 92788626eedSJames Wright - `Pa` 928a1df05f8SJed Brown 929a1df05f8SJed Brown* - `-body_force_scale` 930a1df05f8SJed Brown - Multiplier for body force (`-1` for flow reversal) 931a1df05f8SJed Brown - 1 932a1df05f8SJed Brown - 93388626eedSJames Wright::: 93488626eedSJames Wright 93588626eedSJames WrightThis problem can be run with the `channel.yaml` file via: 93688626eedSJames Wright 93788626eedSJames Wright``` 93888626eedSJames Wright./navierstokes -options_file channel.yaml 93988626eedSJames Wright``` 94088626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml 94188626eedSJames Wright:language: yaml 94288626eedSJames Wright``` 94388626eedSJames Wright 9448a94a473SJed Brown(example-blasius)= 9458a94a473SJed Brown 946019b7682STimothy Aiken#### Blasius boundary layer 947019b7682STimothy Aiken 948061ff11eSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options: 94988626eedSJames Wright 95088626eedSJames Wright:::{list-table} Blasius Runtime Options 95188626eedSJames Wright:header-rows: 1 95288626eedSJames Wright 95388626eedSJames Wright* - Option 95488626eedSJames Wright - Description 95588626eedSJames Wright - Default value 95688626eedSJames Wright - Unit 95788626eedSJames Wright 958fb455ff0SLeila Ghaffari* - `-velocity_infinity` 95988626eedSJames Wright - Freestream velocity 96088626eedSJames Wright - `40` 96188626eedSJames Wright - `m/s` 96288626eedSJames Wright 963fb455ff0SLeila Ghaffari* - `-temperature_infinity` 964fb455ff0SLeila Ghaffari - Freestream temperature 96588626eedSJames Wright - `288` 96688626eedSJames Wright - `K` 96788626eedSJames Wright 968ff9b3c0eSJames Wright* - `-pressure_infinity` 969ff9b3c0eSJames Wright - Atmospheric pressure, also sets IDL reference pressure 970ff9b3c0eSJames Wright - `1.01E5` 971ff9b3c0eSJames Wright - `Pa` 972ff9b3c0eSJames Wright 973fb455ff0SLeila Ghaffari* - `-temperature_wall` 974fb455ff0SLeila Ghaffari - Wall temperature 97507d14e58SLeila Ghaffari - `288` 976fb455ff0SLeila Ghaffari - `K` 977fb455ff0SLeila Ghaffari 978fb455ff0SLeila Ghaffari* - `-delta0` 979fb455ff0SLeila Ghaffari - Boundary layer height at the inflow 980fb455ff0SLeila Ghaffari - `4.2e-3` 981fb455ff0SLeila Ghaffari - `m` 982fb455ff0SLeila Ghaffari 9839309e21cSJames Wright* - `-platemesh_modify_mesh` 9849309e21cSJames Wright - Whether to modify the mesh using the given options below. 9859309e21cSJames Wright - `false` 9869309e21cSJames Wright - 9879309e21cSJames Wright 98891eaef80SJames Wright* - `-platemesh_refine_height` 98991eaef80SJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 99088626eedSJames Wright - `5.9E-4` 99188626eedSJames Wright - `m` 99288626eedSJames Wright 99391eaef80SJames Wright* - `-platemesh_Ndelta` 99491eaef80SJames Wright - Number of elements to keep below `-platemesh_refine_height` 99588626eedSJames Wright - `45` 99688626eedSJames Wright - 99788626eedSJames Wright 99891eaef80SJames Wright* - `-platemesh_growth` 99988626eedSJames Wright - Growth rate of the elements in the refinement region 100088626eedSJames Wright - `1.08` 100188626eedSJames Wright - 100288626eedSJames Wright 100391eaef80SJames Wright* - `-platemesh_top_angle` 100488626eedSJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 100588626eedSJames Wright - `5` 100688626eedSJames Wright - `degrees` 1007ba6664aeSJames Wright 100891eaef80SJames Wright* - `-platemesh_y_node_locs_path` 100991eaef80SJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 101091eaef80SJames Wright - `""` 101191eaef80SJames Wright - 1012fb455ff0SLeila Ghaffari 10139309e21cSJames Wright* - `-stg_use` 10149309e21cSJames Wright - Whether to use STG for the inflow conditions 10159309e21cSJames Wright - `false` 10169309e21cSJames Wright - 10179309e21cSJames Wright 101807d14e58SLeila Ghaffari* - `-n_chebyshev` 1019fb455ff0SLeila Ghaffari - Number of Chebyshev terms 1020fb455ff0SLeila Ghaffari - `20` 1021fb455ff0SLeila Ghaffari - 1022fb455ff0SLeila Ghaffari 102307d14e58SLeila Ghaffari* - `-chebyshev_` 102407d14e58SLeila Ghaffari - Prefix for Chebyshev snes solve 102507d14e58SLeila Ghaffari - 102607d14e58SLeila Ghaffari - 102707d14e58SLeila Ghaffari 102888626eedSJames Wright::: 102988626eedSJames Wright 103088626eedSJames WrightThis problem can be run with the `blasius.yaml` file via: 103188626eedSJames Wright 103288626eedSJames Wright``` 103388626eedSJames Wright./navierstokes -options_file blasius.yaml 103488626eedSJames Wright``` 103588626eedSJames Wright 103688626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml 103788626eedSJames Wright:language: yaml 1038bc7bbd5dSLeila Ghaffari``` 1039ba6664aeSJames Wright 1040ba6664aeSJames Wright#### STG Inflow for Flat Plate 1041ba6664aeSJames Wright 104217be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options: 1043ba6664aeSJames Wright 1044ba6664aeSJames Wright:::{list-table} Blasius Runtime Options 1045ba6664aeSJames Wright:header-rows: 1 1046ba6664aeSJames Wright 1047ba6664aeSJames Wright* - Option 1048ba6664aeSJames Wright - Description 1049ba6664aeSJames Wright - Default value 1050ba6664aeSJames Wright - Unit 1051ba6664aeSJames Wright 1052ba6664aeSJames Wright* - `-stg_inflow_path` 1053ba6664aeSJames Wright - Path to the STGInflow file 1054ba6664aeSJames Wright - `./STGInflow.dat` 1055ba6664aeSJames Wright - 1056ba6664aeSJames Wright 1057ba6664aeSJames Wright* - `-stg_rand_path` 1058ba6664aeSJames Wright - Path to the STGRand file 1059ba6664aeSJames Wright - `./STGRand.dat` 1060ba6664aeSJames Wright - 1061ba6664aeSJames Wright 1062ba6664aeSJames Wright* - `-stg_alpha` 1063ba6664aeSJames Wright - Growth rate of the wavemodes 1064ba6664aeSJames Wright - `1.01` 1065ba6664aeSJames Wright - 1066ba6664aeSJames Wright 1067ba6664aeSJames Wright* - `-stg_u0` 1068ba6664aeSJames Wright - Convective velocity, $U_0$ 1069ba6664aeSJames Wright - `0.0` 1070ba6664aeSJames Wright - `m/s` 1071ba6664aeSJames Wright 1072ba6664aeSJames Wright* - `-stg_mean_only` 1073ba6664aeSJames Wright - Only impose the mean velocity (no fluctutations) 1074ba6664aeSJames Wright - `false` 1075ba6664aeSJames Wright - 1076ba6664aeSJames Wright 107730af3636SJames Wright* - `-stg_strong` 107830af3636SJames Wright - Strongly enforce the STG inflow boundary condition 107930af3636SJames Wright - `false` 108030af3636SJames Wright - 108130af3636SJames Wright 108289060322SJames Wright* - `-stg_fluctuating_IC` 108389060322SJames Wright - "Extrude" the fluctuations through the domain as an initial condition 108489060322SJames Wright - `false` 108589060322SJames Wright - 108689060322SJames Wright 1087831dbe9eSJames Wright* - `-stg_dx` 1088831dbe9eSJames Wright - Set the element size in the x direction. Default is calculated for box meshes, assuming equispaced elements. 1089831dbe9eSJames Wright - 1090831dbe9eSJames Wright - `m` 1091831dbe9eSJames Wright 1092831dbe9eSJames Wright* - `-stg_h_scale_factor` 1093831dbe9eSJames Wright - Scale element size for cutoff frequency calculation 1094831dbe9eSJames Wright - $1/p$ 1095831dbe9eSJames Wright - 1096831dbe9eSJames Wright 1097ba6664aeSJames Wright::: 1098ba6664aeSJames Wright 1099ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via: 1100ba6664aeSJames Wright 1101ba6664aeSJames Wright``` 1102ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true 1103ba6664aeSJames Wright``` 1104ba6664aeSJames Wright 110517be3a41SJeremy L ThompsonNote the added `-stg_use true` flag 110617be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow. 1107