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 113b219b86SJames Wright## Build instructions 123b219b86SJames Wright 13bc7bbd5dSLeila GhaffariBuild by using: 14ccaff030SJeremy L Thompson 15ccaff030SJeremy L Thompson`make` 16ccaff030SJeremy L Thompson 17bc7bbd5dSLeila Ghaffariand run with: 18ccaff030SJeremy L Thompson 19bc7bbd5dSLeila Ghaffari``` 20bc7bbd5dSLeila Ghaffari./navierstokes -ceed [ceed] -problem [problem type] -degree [degree] 21bc7bbd5dSLeila Ghaffari``` 22ccaff030SJeremy L Thompson 233b219b86SJames WrightIf you want to do *in situ* machine-learning training, specify `SMARTREDIS_DIR` in the make command like: 243b219b86SJames Wright 253b219b86SJames Wright``` 263b219b86SJames Wrightmake SMARTREDIS_DIR=~/software/smartredis/install 273b219b86SJames Wright``` 283b219b86SJames Wright 29bc7bbd5dSLeila Ghaffari## Runtime options 30ccaff030SJeremy L Thompson 31bc7bbd5dSLeila Ghaffari% inclusion-fluids-marker 32ccaff030SJeremy L Thompson 33bc7bbd5dSLeila GhaffariThe Navier-Stokes mini-app is controlled via command-line options. 34bc7bbd5dSLeila GhaffariThe following options are common among all problem types: 35ccaff030SJeremy L Thompson 36bc7bbd5dSLeila Ghaffari:::{list-table} Common Runtime Options 37bc7bbd5dSLeila Ghaffari:header-rows: 1 38ccaff030SJeremy L Thompson 39bc7bbd5dSLeila Ghaffari* - Option 40bc7bbd5dSLeila Ghaffari - Description 41bc7bbd5dSLeila Ghaffari - Default value 42ccaff030SJeremy L Thompson 43bc7bbd5dSLeila Ghaffari* - `-ceed` 44bc7bbd5dSLeila Ghaffari - CEED resource specifier 45bc7bbd5dSLeila Ghaffari - `/cpu/self/opt/blocked` 46ccaff030SJeremy L Thompson 473866774cSJames Wright* - `-test_type` 483866774cSJames Wright - Run in test mode and specify whether solution (`solver`) or turbulent statistics (`turb_spanstats`) output should be verified 493866774cSJames Wright - `none` 50ccaff030SJeremy L Thompson 51bc7bbd5dSLeila Ghaffari* - `-compare_final_state_atol` 52bc7bbd5dSLeila Ghaffari - Test absolute tolerance 53bc7bbd5dSLeila Ghaffari - `1E-11` 54ccaff030SJeremy L Thompson 55bc7bbd5dSLeila Ghaffari* - `-compare_final_state_filename` 56bc7bbd5dSLeila Ghaffari - Test filename 57bc7bbd5dSLeila Ghaffari - 58ccaff030SJeremy L Thompson 59bc7bbd5dSLeila Ghaffari* - `-problem` 609e529eadSJames Wright - Problem to solve (`advection`, `density_current`, `euler_vortex`, `shocktube`, `blasius`, `channel`, `gaussian_wave`, and `taylor_green`) 61bc7bbd5dSLeila Ghaffari - `density_current` 62ccaff030SJeremy L Thompson 63bc7bbd5dSLeila Ghaffari* - `-implicit` 649e576805SJames Wright - Use implicit time integrator formulation 65bc7bbd5dSLeila Ghaffari - 66ccaff030SJeremy L Thompson 67bc7bbd5dSLeila Ghaffari* - `-degree` 68bc7bbd5dSLeila Ghaffari - Polynomial degree of tensor product basis (must be >= 1) 69bc7bbd5dSLeila Ghaffari - `1` 70ccaff030SJeremy L Thompson 712288fb52SJeremy L Thompson* - `-q_extra` 72bc7bbd5dSLeila Ghaffari - Number of extra quadrature points 73fc14f3f6SLeila Ghaffari - `0` 74ccaff030SJeremy L Thompson 7537cbb16aSJed Brown* - `-ts_monitor_solution` 7637cbb16aSJed Brown - PETSc output format, such as `cgns:output-%d.cgns` (requires PETSc `--download-cgns`) 7737cbb16aSJed Brown - 78ccaff030SJeremy L Thompson 7937cbb16aSJed Brown* - `-ts_monitor_solution_interval` 8037cbb16aSJed Brown - Number of time steps between visualization output frames. 8137cbb16aSJed Brown - `1` 8237cbb16aSJed Brown 8337cbb16aSJed Brown* - `-viewer_cgns_batch_size` 8437cbb16aSJed Brown - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 8537cbb16aSJed Brown - `20` 8637cbb16aSJed Brown 8737cbb16aSJed Brown* - `-checkpoint_interval` 8837cbb16aSJed Brown - Number of steps between writing binary checkpoints. `0` has no output, `-1` outputs final state only 89bc7bbd5dSLeila Ghaffari - `10` 90ccaff030SJeremy L Thompson 9137cbb16aSJed Brown* - `-checkpoint_vtk` 9237cbb16aSJed Brown - Checkpoints include VTK (`*.vtu`) files for visualization. Consider `-ts_monitor_solution`instead. 9337cbb16aSJed Brown - `false` 9437cbb16aSJed Brown 9537cbb16aSJed Brown* - `-viz_refine` 9637cbb16aSJed Brown - Use regular refinement for VTK visualization 9737cbb16aSJed Brown - `0` 9837cbb16aSJed Brown 99bc7bbd5dSLeila Ghaffari* - `-output_dir` 10037cbb16aSJed Brown - Output directory for binary checkpoints and VTK files (if enabled). 101bc7bbd5dSLeila Ghaffari - `.` 102ccaff030SJeremy L Thompson 10369293791SJames Wright* - `-output_add_stepnum2bin` 10469293791SJames Wright - Whether to add step numbers to output binary files 10569293791SJames Wright - `false` 10669293791SJames Wright 10769293791SJames Wright* - `-continue` 10869293791SJames Wright - Continue from previous solution (input is step number of previous solution) 10969293791SJames Wright - `0` 11069293791SJames Wright 11169293791SJames Wright* - `-continue_filename` 11269293791SJames Wright - Path to solution binary file from which to continue from 11369293791SJames Wright - `[output_dir]/ns-solution.bin` 11469293791SJames Wright 11569293791SJames Wright* - `-continue_time_filename` 1164de8550aSJed Brown - Path to time stamp binary file (only for legacy checkpoints) 11769293791SJames Wright - `[output_dir]/ns-time.bin` 11869293791SJames Wright 1194534a52eSLeila Ghaffari* - `-bc_wall` 1204534a52eSLeila Ghaffari - Use wall boundary conditions on this list of faces 1214534a52eSLeila Ghaffari - 1224534a52eSLeila Ghaffari 1234534a52eSLeila Ghaffari* - `-wall_comps` 1244534a52eSLeila Ghaffari - An array of constrained component numbers for wall BCs 1254534a52eSLeila Ghaffari - 1264534a52eSLeila Ghaffari 1279f844368SJames Wright* - `-bc_slip` 1289f844368SJames Wright - Use weak slip boundary condition on this list of faces 1299f844368SJames Wright - 1309f844368SJames Wright 1317c5bba50SJames Wright* - `-bc_symmetry_x` 1327c5bba50SJames Wright - Use symmetry boundary conditions, for the x component, on this list of faces 1334534a52eSLeila Ghaffari - 1344534a52eSLeila Ghaffari 1357c5bba50SJames Wright* - `-bc_symmetry_y` 1367c5bba50SJames Wright - Use symmetry boundary conditions, for the y component, on this list of faces 1374534a52eSLeila Ghaffari - 1384534a52eSLeila Ghaffari 1397c5bba50SJames Wright* - `-bc_symmetry_z` 1407c5bba50SJames Wright - Use symmetry boundary conditions, for the z component, on this list of faces 1414534a52eSLeila Ghaffari - 1424534a52eSLeila Ghaffari 1434534a52eSLeila Ghaffari* - `-bc_inflow` 1444534a52eSLeila Ghaffari - Use inflow boundary conditions on this list of faces 1454534a52eSLeila Ghaffari - 1464534a52eSLeila Ghaffari 1474534a52eSLeila Ghaffari* - `-bc_outflow` 1484534a52eSLeila Ghaffari - Use outflow boundary conditions on this list of faces 1494534a52eSLeila Ghaffari - 15089d0f5c0SLeila Ghaffari 1517ec884f8SJames Wright* - `-bc_freestream` 1527ec884f8SJames Wright - Use freestream boundary conditions on this list of faces 1537ec884f8SJames Wright - 1547ec884f8SJames Wright 155b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_collect_interval` 156ee3de563SJames Wright - Number of timesteps between statistics collection 157ee3de563SJames Wright - `1` 158ee3de563SJames Wright 159b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer` 160b7d66439SJames 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. 1618ed52730SJames Wright - 1628ed52730SJames Wright 163b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_interval` 164ee3de563SJames Wright - Number of timesteps between statistics file writing (`-1` means only at end of run) 165ee3de563SJames Wright - `-1` 166ee3de563SJames Wright 167b7d66439SJames Wright* - `-ts_monitor_turbulence_spanstats_viewer_cgns_batch_size` 1688ed52730SJames Wright - Number of frames written per CGNS file if the CGNS file name includes a format specifier (`%d`). 1698ed52730SJames Wright - `20` 1708ed52730SJames Wright 171ca69d878SAdeleke O. Bankole* - `-ts_monitor_wall_force` 172ca69d878SAdeleke O. Bankole - Viewer for the force on each no-slip wall, e.g., `ascii:force.csv:ascii_csv` to write a CSV file. 173ca69d878SAdeleke O. Bankole - 174ca69d878SAdeleke O. Bankole 1752526956eSJames Wright* - `-mesh_transform` 1762526956eSJames Wright - Transform the mesh, usually for an initial box mesh. 1772526956eSJames Wright - `none` 1782526956eSJames Wright 179bc7bbd5dSLeila Ghaffari* - `-snes_view` 180bc7bbd5dSLeila Ghaffari - View PETSc `SNES` nonlinear solver configuration 181bc7bbd5dSLeila Ghaffari - 18289d0f5c0SLeila Ghaffari 183bc7bbd5dSLeila Ghaffari* - `-log_view` 184bc7bbd5dSLeila Ghaffari - View PETSc performance log 185bc7bbd5dSLeila Ghaffari - 186ccaff030SJeremy L Thompson 187bc7bbd5dSLeila Ghaffari* - `-help` 188bc7bbd5dSLeila Ghaffari - View comprehensive information about run-time options 189bc7bbd5dSLeila Ghaffari - 190bc7bbd5dSLeila Ghaffari::: 191ccaff030SJeremy L Thompson 1927c5bba50SJames 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: 1934534a52eSLeila Ghaffari 19488626eedSJames Wright:::{list-table} 2D Face ID Labels 19588626eedSJames Wright:header-rows: 1 19688626eedSJames Wright* - PETSc Face Name 19788626eedSJames Wright - Cartesian direction 19888626eedSJames Wright - Face ID 19988626eedSJames Wright 20088626eedSJames Wright* - faceMarkerBottom 20188626eedSJames Wright - -z 20288626eedSJames Wright - 1 20388626eedSJames Wright 20488626eedSJames Wright* - faceMarkerRight 20588626eedSJames Wright - +x 20688626eedSJames Wright - 2 20788626eedSJames Wright 20888626eedSJames Wright* - faceMarkerTop 20988626eedSJames Wright - +z 21088626eedSJames Wright - 3 21188626eedSJames Wright 21288626eedSJames Wright* - faceMarkerLeft 21388626eedSJames Wright - -x 21488626eedSJames Wright - 4 21588626eedSJames Wright::: 21688626eedSJames Wright 217b5e826a6SLeila Ghaffari:::{list-table} 3D Face ID Labels 21888626eedSJames Wright:header-rows: 1 21988626eedSJames Wright* - PETSc Face Name 22088626eedSJames Wright - Cartesian direction 22188626eedSJames Wright - Face ID 22288626eedSJames Wright 22388626eedSJames Wright* - faceMarkerBottom 22488626eedSJames Wright - -z 22588626eedSJames Wright - 1 22688626eedSJames Wright 22788626eedSJames Wright* - faceMarkerTop 22888626eedSJames Wright - +z 22988626eedSJames Wright - 2 23088626eedSJames Wright 23188626eedSJames Wright* - faceMarkerFront 23288626eedSJames Wright - -y 23388626eedSJames Wright - 3 23488626eedSJames Wright 23588626eedSJames Wright* - faceMarkerBack 23688626eedSJames Wright - +y 23788626eedSJames Wright - 4 23888626eedSJames Wright 23988626eedSJames Wright* - faceMarkerRight 24088626eedSJames Wright - +x 24188626eedSJames Wright - 5 24288626eedSJames Wright 24388626eedSJames Wright* - faceMarkerLeft 24488626eedSJames Wright - -x 24588626eedSJames Wright - 6 24688626eedSJames Wright::: 2474534a52eSLeila Ghaffari 2488a94a473SJed Brown### Boundary conditions 2498a94a473SJed Brown 2503b219b86SJames WrightBoundary conditions for compressible viscous flows are notoriously tricky. 2513b219b86SJames WrightHere we offer some recommendations. 2528a94a473SJed Brown 2538a94a473SJed Brown#### Inflow 2548a94a473SJed Brown 2558a94a473SJed 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). 2568a94a473SJed BrownIt is stable and the least reflective boundary condition for acoustics. 2578a94a473SJed Brown 2588a94a473SJed BrownIf near a viscous wall, you may want a specified inflow profile. 2598a94a473SJed BrownUse `bc_inflow` and see {ref}`example-blasius` and discussion of synthetic turbulence generation for ways to analytically generate developed inflow profiles. 2608a94a473SJed 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. 2618a94a473SJed BrownThe strong approach gives sharper resolution of velocity structures. 2628a94a473SJed BrownWe have described the primitive variable formulation here; the conservative variants are similar, but not equivalent. 2638a94a473SJed Brown 264f3f66076SJames Wright#### Outflow 2658a94a473SJed Brown 2668a94a473SJed BrownIf you know the complete exterior state, `bc_freestream` is the least reflective boundary condition, but is disruptive to viscous flow structures. 2678a94a473SJed BrownIf thermal anomalies must exit the domain, the Riemann solver must resolve the contact wave to avoid reflections. 2688a94a473SJed 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. 2698a94a473SJed Brown 2708a94a473SJed 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. 2718a94a473SJed Brown 2728a94a473SJed 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). 2738a94a473SJed BrownIn our experience, `riemann` is slightly less reflective but produces similar flows in cases of strict outflow. 2748a94a473SJed BrownThe `pressure` variant is retained to facilitate comparison with other codes, such as PHASTA-C, but we recommend `riemann` for general use. 2758a94a473SJed Brown 276f3f66076SJames Wright#### Periodicity 2778a94a473SJed Brown 2788a94a473SJed BrownPETSc provides two ways to specify periodicity: 2798a94a473SJed Brown 2808a94a473SJed Brown1. Topological periodicity, in which the donor and receiver dofs are the same, obtained using: 2818a94a473SJed Brown 2828a94a473SJed Brown```yaml 2838a94a473SJed Browndm_plex: 2848a94a473SJed Brown shape: box 2858a94a473SJed Brown box_faces: 10,12,4 2868a94a473SJed Brown box_bd: none,none,periodic 2878a94a473SJed Brown``` 2888a94a473SJed Brown 289ca69d878SAdeleke O. BankoleThe coordinates for such cases are stored as a new field with special cell-based indexing to enable wrapping through the boundary. 290ca69d878SAdeleke 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. 291ca69d878SAdeleke O. Bankole 292ca69d878SAdeleke O. Bankole2. Isoperiodicity, in which the donor and receiver dofs are distinct in local vectors. This is obtained using `zbox`, as in: 293ca69d878SAdeleke O. Bankole 294ca69d878SAdeleke O. Bankole```yaml 295ca69d878SAdeleke O. Bankoledm_plex: 296ca69d878SAdeleke O. Bankole shape: zbox 297ca69d878SAdeleke O. Bankole box_faces: 10,12,4 298ca69d878SAdeleke O. Bankole box_bd: none,none,periodic 299ca69d878SAdeleke O. Bankole``` 300ca69d878SAdeleke O. Bankole 301ca69d878SAdeleke O. BankoleIsoperiodicity enables standard boundary integrals, and is recommended for general use. 302ca69d878SAdeleke O. BankoleAt the time of this writing, it only supports one direction of periodicity. 303ca69d878SAdeleke 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. 3048a94a473SJed Brown 305019b7682STimothy Aiken### Advection 306019b7682STimothy Aiken 30717be3a41SJeremy 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$. 3089e529eadSJames WrightThe advection problems can be run in both 2D and 3D, based on the DM defined for the problem. 30994a05c6fSJames WrightThe following additional command-line options are available: 310019b7682STimothy Aiken 31194a05c6fSJames Wright:::{list-table} Advection Runtime Options 312bc7bbd5dSLeila Ghaffari:header-rows: 1 313e43605a5SLeila Ghaffari 314bc7bbd5dSLeila Ghaffari* - Option 315bc7bbd5dSLeila Ghaffari - Description 316bc7bbd5dSLeila Ghaffari - Default value 317bc7bbd5dSLeila Ghaffari - Unit 318e43605a5SLeila Ghaffari 319bc7bbd5dSLeila Ghaffari* - `-rc` 320bc7bbd5dSLeila Ghaffari - Characteristic radius of thermal bubble 321bc7bbd5dSLeila Ghaffari - `1000` 322bc7bbd5dSLeila Ghaffari - `m` 323e43605a5SLeila Ghaffari 324bc7bbd5dSLeila Ghaffari* - `-units_meter` 325bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 326bc7bbd5dSLeila Ghaffari - `1E-2` 327bc7bbd5dSLeila Ghaffari - 328e43605a5SLeila Ghaffari 329bc7bbd5dSLeila Ghaffari* - `-units_second` 330bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 331bc7bbd5dSLeila Ghaffari - `1E-2` 332bc7bbd5dSLeila Ghaffari - 333e43605a5SLeila Ghaffari 334bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 335bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 336bc7bbd5dSLeila Ghaffari - `1E-6` 337bc7bbd5dSLeila Ghaffari - 338e43605a5SLeila Ghaffari 339bc7bbd5dSLeila Ghaffari* - `-strong_form` 340bc7bbd5dSLeila Ghaffari - Strong (1) or weak/integrated by parts (0) residual 341bc7bbd5dSLeila Ghaffari - `0` 342bc7bbd5dSLeila Ghaffari - 343e43605a5SLeila Ghaffari 344bc7bbd5dSLeila Ghaffari* - `-stab` 345bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 346bc7bbd5dSLeila Ghaffari - `none` 347bc7bbd5dSLeila Ghaffari - 348e43605a5SLeila Ghaffari 34944e8f77dSJames Wright* - `-stab_tau` 35044e8f77dSJames Wright - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`) 35144e8f77dSJames Wright - `ctau` 35244e8f77dSJames Wright - 35344e8f77dSJames Wright 35444e8f77dSJames Wright* - `-Ctau_t` 35544e8f77dSJames Wright - Scaling factor on the temporal portion of the $\tau$ formulation 35644e8f77dSJames Wright - 0. 35744e8f77dSJames Wright - 35844e8f77dSJames Wright 35944e8f77dSJames Wright* - `-Ctau_a` 36044e8f77dSJames Wright - Scaling factor on the advection portion of the $\tau$ formulation 36144e8f77dSJames Wright - $P^2$ 36244e8f77dSJames Wright - 36344e8f77dSJames Wright 364bc7bbd5dSLeila Ghaffari* - `-CtauS` 365bc7bbd5dSLeila Ghaffari - Scale coefficient for stabilization tau (nondimensional) 366bc7bbd5dSLeila Ghaffari - `0` 367bc7bbd5dSLeila Ghaffari - 368e43605a5SLeila Ghaffari 369bc7bbd5dSLeila Ghaffari* - `-wind_type` 370bc7bbd5dSLeila Ghaffari - Wind type in Advection (`rotation` or `translation`) 371bc7bbd5dSLeila Ghaffari - `rotation` 372bc7bbd5dSLeila Ghaffari - 373e43605a5SLeila Ghaffari 374bc7bbd5dSLeila Ghaffari* - `-wind_translation` 375bc7bbd5dSLeila Ghaffari - Constant wind vector when `-wind_type translation` 376bc7bbd5dSLeila Ghaffari - `1,0,0` 377bc7bbd5dSLeila Ghaffari - 378e43605a5SLeila Ghaffari 379d1d77723SJames Wright* - `-diffusion_coeff` 380d1d77723SJames Wright - Diffusion coefficient 381d1d77723SJames Wright - `0` 382d1d77723SJames Wright - 383d1d77723SJames Wright 384bc7bbd5dSLeila Ghaffari* - `-E_wind` 385bc7bbd5dSLeila Ghaffari - Total energy of inflow wind when `-wind_type translation` 386bc7bbd5dSLeila Ghaffari - `1E6` 387bc7bbd5dSLeila Ghaffari - `J` 388e43605a5SLeila Ghaffari 3897b77ddfdSJames Wright* - `-advection_ic_type` 3907b77ddfdSJames Wright - Initial condition type, from `sphere`, `cylinder`, `cosine_hill`, and `skew` 391f3f66076SJames Wright - `sphere` 392bc7bbd5dSLeila Ghaffari - 393e43605a5SLeila Ghaffari 394bc7bbd5dSLeila Ghaffari* - `-bubble_continuity` 3959e529eadSJames Wright - Different shapes for `sphere` and `cylinder` initial conditions, from `smooth`, `back_sharp`, `thick`, or `cosine` 396bc7bbd5dSLeila Ghaffari - `smooth` 397bc7bbd5dSLeila Ghaffari - 398bc7bbd5dSLeila Ghaffari::: 399ccaff030SJeremy L Thompson 40094a05c6fSJames WrightFor 3D advection, an example of the `rotation` mode can be run with: 401ccaff030SJeremy L Thompson 402bc7bbd5dSLeila Ghaffari``` 4034534a52eSLeila 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 404bc7bbd5dSLeila Ghaffari``` 405ccaff030SJeremy L Thompson 406bc7bbd5dSLeila Ghaffariand the `translation` mode with: 407ccaff030SJeremy L Thompson 408bc7bbd5dSLeila Ghaffari``` 4094534a52eSLeila 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 410bc7bbd5dSLeila Ghaffari``` 411ccaff030SJeremy L Thompson 41294a05c6fSJames WrightFor 2D advection, an example of the `rotation` mode can be run with: 41394a05c6fSJames Wright 41494a05c6fSJames Wright``` 4159e529eadSJames 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 41694a05c6fSJames Wright``` 41794a05c6fSJames Wright 41894a05c6fSJames Wrightand the `translation` mode with: 41994a05c6fSJames Wright 42094a05c6fSJames Wright``` 4219e529eadSJames 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 42294a05c6fSJames Wright``` 42394a05c6fSJames WrightNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 42494a05c6fSJames Wright 425019b7682STimothy Aiken### Inviscid Ideal Gas 426019b7682STimothy Aiken 427019b7682STimothy Aiken#### Isentropic Euler vortex 428019b7682STimothy Aiken 429bc7bbd5dSLeila GhaffariFor the Isentropic Vortex problem, the following additional command-line options are available: 430ccaff030SJeremy L Thompson 431bc7bbd5dSLeila Ghaffari:::{list-table} Isentropic Vortex Runtime Options 432bc7bbd5dSLeila Ghaffari:header-rows: 1 433ccaff030SJeremy L Thompson 434bc7bbd5dSLeila Ghaffari* - Option 435bc7bbd5dSLeila Ghaffari - Description 436bc7bbd5dSLeila Ghaffari - Default value 437bc7bbd5dSLeila Ghaffari - Unit 438ccaff030SJeremy L Thompson 439bc7bbd5dSLeila Ghaffari* - `-center` 440bc7bbd5dSLeila Ghaffari - Location of vortex center 441bc7bbd5dSLeila Ghaffari - `(lx,ly,lz)/2` 442bc7bbd5dSLeila Ghaffari - `(m,m,m)` 443ccaff030SJeremy L Thompson 444bc7bbd5dSLeila Ghaffari* - `-units_meter` 445bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 446bc7bbd5dSLeila Ghaffari - `1E-2` 447bc7bbd5dSLeila Ghaffari - 448ccaff030SJeremy L Thompson 449bc7bbd5dSLeila Ghaffari* - `-units_second` 450bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 451bc7bbd5dSLeila Ghaffari - `1E-2` 452bc7bbd5dSLeila Ghaffari - 453ccaff030SJeremy L Thompson 454bc7bbd5dSLeila Ghaffari* - `-mean_velocity` 455bc7bbd5dSLeila Ghaffari - Background velocity vector 456bc7bbd5dSLeila Ghaffari - `(1,1,0)` 457bc7bbd5dSLeila Ghaffari - 458ccaff030SJeremy L Thompson 459bc7bbd5dSLeila Ghaffari* - `-vortex_strength` 460bc7bbd5dSLeila Ghaffari - Strength of vortex < 10 461bc7bbd5dSLeila Ghaffari - `5` 462bc7bbd5dSLeila Ghaffari - 463932417b3SJed Brown 464932417b3SJed Brown* - `-c_tau` 465932417b3SJed Brown - Stabilization constant 466504dc8e0SLeila Ghaffari - `0.5` 467932417b3SJed Brown - 468bc7bbd5dSLeila Ghaffari::: 469ccaff030SJeremy L Thompson 470bc7bbd5dSLeila GhaffariThis problem can be run with: 471ccaff030SJeremy L Thompson 472bc7bbd5dSLeila Ghaffari``` 4737c5bba50SJames 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. 474bc7bbd5dSLeila Ghaffari``` 475ccaff030SJeremy L Thompson 476019b7682STimothy Aiken#### Sod shock tube 477019b7682STimothy Aiken 478019b7682STimothy AikenFor the Shock Tube problem, the following additional command-line options are available: 479019b7682STimothy Aiken 480019b7682STimothy Aiken:::{list-table} Shock Tube Runtime Options 481019b7682STimothy Aiken:header-rows: 1 482019b7682STimothy Aiken 483019b7682STimothy Aiken* - Option 484019b7682STimothy Aiken - Description 485019b7682STimothy Aiken - Default value 486019b7682STimothy Aiken - Unit 487019b7682STimothy Aiken 488019b7682STimothy Aiken* - `-units_meter` 489019b7682STimothy Aiken - 1 meter in scaled length units 490019b7682STimothy Aiken - `1E-2` 491019b7682STimothy Aiken - 492019b7682STimothy Aiken 493019b7682STimothy Aiken* - `-units_second` 494019b7682STimothy Aiken - 1 second in scaled time units 495019b7682STimothy Aiken - `1E-2` 496019b7682STimothy Aiken - 497019b7682STimothy Aiken 498019b7682STimothy Aiken* - `-yzb` 499019b7682STimothy Aiken - Use YZB discontinuity capturing 500019b7682STimothy Aiken - `none` 501019b7682STimothy Aiken - 502019b7682STimothy Aiken 503019b7682STimothy Aiken* - `-stab` 504019b7682STimothy Aiken - Stabilization method (`none`, `su`, or `supg`) 505019b7682STimothy Aiken - `none` 506019b7682STimothy Aiken - 507019b7682STimothy Aiken::: 508019b7682STimothy Aiken 509019b7682STimothy AikenThis problem can be run with: 510019b7682STimothy Aiken 511019b7682STimothy Aiken``` 5127c5bba50SJames 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 513019b7682STimothy Aiken``` 514019b7682STimothy Aiken 515019b7682STimothy Aiken### Newtonian viscosity, Ideal Gas 516019b7682STimothy Aiken 51788626eedSJames WrightFor the Density Current, Channel, and Blasius problems, the following common command-line options are available: 518ccaff030SJeremy L Thompson 51988626eedSJames Wright:::{list-table} Newtonian Ideal Gas problems Runtime Options 520bc7bbd5dSLeila Ghaffari:header-rows: 1 521ccaff030SJeremy L Thompson 522bc7bbd5dSLeila Ghaffari* - Option 523bc7bbd5dSLeila Ghaffari - Description 524bc7bbd5dSLeila Ghaffari - Default value 525bc7bbd5dSLeila Ghaffari - Unit 526ccaff030SJeremy L Thompson 527bc7bbd5dSLeila Ghaffari* - `-units_meter` 528bc7bbd5dSLeila Ghaffari - 1 meter in scaled length units 52988626eedSJames Wright - `1` 530bc7bbd5dSLeila Ghaffari - 531ccaff030SJeremy L Thompson 532bc7bbd5dSLeila Ghaffari* - `-units_second` 533bc7bbd5dSLeila Ghaffari - 1 second in scaled time units 53488626eedSJames Wright - `1` 535bc7bbd5dSLeila Ghaffari - 536ccaff030SJeremy L Thompson 537bc7bbd5dSLeila Ghaffari* - `-units_kilogram` 538bc7bbd5dSLeila Ghaffari - 1 kilogram in scaled mass units 53988626eedSJames Wright - `1` 540bc7bbd5dSLeila Ghaffari - 541ccaff030SJeremy L Thompson 542bc7bbd5dSLeila Ghaffari* - `-units_Kelvin` 543bc7bbd5dSLeila Ghaffari - 1 Kelvin in scaled temperature units 544bc7bbd5dSLeila Ghaffari - `1` 545bc7bbd5dSLeila Ghaffari - 546ccaff030SJeremy L Thompson 547bc7bbd5dSLeila Ghaffari* - `-stab` 548bc7bbd5dSLeila Ghaffari - Stabilization method (`none`, `su`, or `supg`) 549bc7bbd5dSLeila Ghaffari - `none` 550bc7bbd5dSLeila Ghaffari - 551ccaff030SJeremy L Thompson 552932417b3SJed Brown* - `-c_tau` 55388626eedSJames Wright - Stabilization constant, $c_\tau$ 554504dc8e0SLeila Ghaffari - `0.5` 555932417b3SJed Brown - 556932417b3SJed Brown 55788626eedSJames Wright* - `-Ctau_t` 55888626eedSJames Wright - Stabilization time constant, $C_t$ 55988626eedSJames Wright - `1.0` 56088626eedSJames Wright - 561ccaff030SJeremy L Thompson 56288626eedSJames Wright* - `-Ctau_v` 56388626eedSJames Wright - Stabilization viscous constant, $C_v$ 56494c01735SLeila Ghaffari - `36, 60, 128 for degree = 1, 2, 3` 56588626eedSJames Wright - 566ccaff030SJeremy L Thompson 56788626eedSJames Wright* - `-Ctau_C` 56888626eedSJames Wright - Stabilization continuity constant, $C_c$ 56988626eedSJames Wright - `1.0` 57088626eedSJames Wright - 571ccaff030SJeremy L Thompson 57288626eedSJames Wright* - `-Ctau_M` 57388626eedSJames Wright - Stabilization momentum constant, $C_m$ 57488626eedSJames Wright - `1.0` 57588626eedSJames Wright - 57688626eedSJames Wright 57788626eedSJames Wright* - `-Ctau_E` 57888626eedSJames Wright - Stabilization energy constant, $C_E$ 57988626eedSJames Wright - `1.0` 58088626eedSJames Wright - 581ccaff030SJeremy L Thompson 582bc7bbd5dSLeila Ghaffari* - `-cv` 583bc7bbd5dSLeila Ghaffari - Heat capacity at constant volume 584bc7bbd5dSLeila Ghaffari - `717` 585bc7bbd5dSLeila Ghaffari - `J/(kg K)` 586ccaff030SJeremy L Thompson 587bc7bbd5dSLeila Ghaffari* - `-cp` 588bc7bbd5dSLeila Ghaffari - Heat capacity at constant pressure 589bc7bbd5dSLeila Ghaffari - `1004` 590bc7bbd5dSLeila Ghaffari - `J/(kg K)` 591ccaff030SJeremy L Thompson 592a2726bdbSJames Wright* - `-gravity` 593a2726bdbSJames Wright - Gravitational acceleration vector 594a2726bdbSJames Wright - `0,0,0` 595bc7bbd5dSLeila Ghaffari - `m/s^2` 596ccaff030SJeremy L Thompson 597bc7bbd5dSLeila Ghaffari* - `-lambda` 598bc7bbd5dSLeila Ghaffari - Stokes hypothesis second viscosity coefficient 599bc7bbd5dSLeila Ghaffari - `-2/3` 600bc7bbd5dSLeila Ghaffari - 601ccaff030SJeremy L Thompson 602bc7bbd5dSLeila Ghaffari* - `-mu` 603bc7bbd5dSLeila Ghaffari - Shear dynamic viscosity coefficient 604a2726bdbSJames Wright - `1.8e-5` 605bc7bbd5dSLeila Ghaffari - `Pa s` 60677841947SLeila Ghaffari 607bc7bbd5dSLeila Ghaffari* - `-k` 608bc7bbd5dSLeila Ghaffari - Thermal conductivity 609bc7bbd5dSLeila Ghaffari - `0.02638` 610bc7bbd5dSLeila Ghaffari - `W/(m K)` 611a1df05f8SJed Brown 612a1df05f8SJed Brown* - `-newtonian_unit_tests` 613a1df05f8SJed Brown - Developer option to test properties 614a1df05f8SJed Brown - `false` 615a1df05f8SJed Brown - boolean 616de2fdd78SJames Wright 6175c0afad3SJames Wright* - `-state_var` 6185c0afad3SJames Wright - State variables to solve solution with. `conservative` ($\rho, \rho \bm{u}, \rho e$) or `primitive` ($P, \bm{u}, T$) 6195c0afad3SJames Wright - `conservative` 6205c0afad3SJames Wright - string 621530ad8c4SKenneth E. Jansen 622530ad8c4SKenneth E. Jansen* - `-idl_decay_time` 623530ad8c4SKenneth E. Jansen - Characteristic timescale of the pressure deviance decay. The timestep is good starting point 624530ad8c4SKenneth E. Jansen - `-1` (disabled) 625530ad8c4SKenneth E. Jansen - `s` 626530ad8c4SKenneth E. Jansen 627530ad8c4SKenneth E. Jansen* - `-idl_start` 628530ad8c4SKenneth E. Jansen - Start of IDL in the x direction 629530ad8c4SKenneth E. Jansen - `0` 630530ad8c4SKenneth E. Jansen - `m` 631530ad8c4SKenneth E. Jansen 632530ad8c4SKenneth E. Jansen* - `-idl_length` 633530ad8c4SKenneth E. Jansen - Length of IDL in the positive x direction 634530ad8c4SKenneth E. Jansen - `0` 635530ad8c4SKenneth E. Jansen - `m` 636530ad8c4SKenneth E. Jansen 637c79d6dc9SJames Wright* - `-sgs_model_type` 638c79d6dc9SJames Wright - Type of subgrid stress model to use. Currently only `data_driven` is available 639c79d6dc9SJames Wright - `none` 640c79d6dc9SJames Wright - string 641c79d6dc9SJames Wright 642c79d6dc9SJames Wright* - `-sgs_model_dd_leakyrelu_alpha` 643c79d6dc9SJames Wright - Slope parameter for Leaky ReLU activation function. `0` corresponds to normal ReLU 644c79d6dc9SJames Wright - 0 645c79d6dc9SJames Wright - 646c79d6dc9SJames Wright 647c79d6dc9SJames Wright* - `-sgs_model_dd_parameter_dir` 648c79d6dc9SJames Wright - Path to directory with data-driven model parameters (weights, biases, etc.) 649c79d6dc9SJames Wright - `./dd_sgs_parameters` 650c79d6dc9SJames Wright - string 651c79d6dc9SJames Wright 652cf90ec9bSJames Wright* - `-sgs_model_dd_use_fused` 653cf90ec9bSJames Wright - Whether to use "fused" mode for data-driven model evaluation 654cf90ec9bSJames Wright - `true` 655cf90ec9bSJames Wright - boolean 656cf90ec9bSJames Wright 6573f89fbfdSJames Wright* - `-diff_filter_monitor` 6583f89fbfdSJames Wright - Enable differential filter TSMonitor 6593f89fbfdSJames Wright - `false` 6603f89fbfdSJames Wright - boolean 6613f89fbfdSJames Wright 6623f89fbfdSJames Wright* - `-diff_filter_grid_based_width` 6633f89fbfdSJames Wright - Use filter width based on the grid size 6643f89fbfdSJames Wright - `false` 6653f89fbfdSJames Wright - boolean 6663f89fbfdSJames Wright 6673f89fbfdSJames Wright* - `-diff_filter_width_scaling` 6683f89fbfdSJames Wright - Anisotropic scaling for filter width in wall-aligned coordinates (snz) 6693f89fbfdSJames Wright - `1,1,1` 6703f89fbfdSJames Wright - `m` 6713f89fbfdSJames Wright 6723f89fbfdSJames Wright* - `-diff_filter_kernel_scaling` 6733f89fbfdSJames Wright - Scaling to make differential kernel size equivalent to other filter kernels 6743f89fbfdSJames Wright - `0.1` 6753f89fbfdSJames Wright - `m^2` 6763f89fbfdSJames Wright 6773f89fbfdSJames Wright* - `-diff_filter_wall_damping_function` 6783f89fbfdSJames Wright - Damping function to use at the wall for anisotropic filtering (`none`, `van_driest`) 6793f89fbfdSJames Wright - `none` 6803f89fbfdSJames Wright - string 6813f89fbfdSJames Wright 6823f89fbfdSJames Wright* - `-diff_filter_wall_damping_constant` 6839d9c52bbSJed Brown - Constant for the wall-damping function. $A^+$ for `van_driest` damping function. 6843f89fbfdSJames Wright - 25 6853f89fbfdSJames Wright - 6863f89fbfdSJames Wright 6873f89fbfdSJames Wright* - `-diff_filter_friction_length` 6883f89fbfdSJames Wright - Friction length associated with the flow, $\delta_\nu$. Used in wall-damping functions 6893f89fbfdSJames Wright - 0 6903f89fbfdSJames Wright - `m` 6913f89fbfdSJames Wright 6923b219b86SJames Wright* - `-sgs_train_enable` 6933b219b86SJames Wright - Whether to enable *in situ* training of data-driven SGS model. Require building with SmartRedis. 6943b219b86SJames Wright - `false` 6953b219b86SJames Wright - boolean 6963b219b86SJames Wright 6973b219b86SJames Wright* - `-sgs_train_write_data_interval` 6983b219b86SJames Wright - Number of timesteps between writing training data into SmartRedis database 6993b219b86SJames Wright - `1` 7003b219b86SJames Wright - 7013b219b86SJames Wright 7023b219b86SJames Wright* - `-sgs_train_overwrite_data` 7033b219b86SJames Wright - Whether new training data should overwrite old data on database 7043b219b86SJames Wright - `true` 7053b219b86SJames Wright - boolean 7063b219b86SJames Wright 707c79b0730SJames Wright* - `-sgs_train_filter_widths` 708c79b0730SJames Wright - List of scalar values for different filter widths to calculate for training data 709c79b0730SJames Wright - 710c79b0730SJames Wright - `m` 711c79b0730SJames Wright 7123b219b86SJames Wright* - `-smartsim_collocated_num_ranks` 7133b219b86SJames Wright - Number of MPI ranks associated with each collocated database (i.e. ranks per node) 7143b219b86SJames Wright - `1` 7153b219b86SJames Wright - 716bc7bbd5dSLeila Ghaffari::: 71777841947SLeila Ghaffari 718530ad8c4SKenneth E. Jansen#### Gaussian Wave 7197ec884f8SJames Wright 720530ad8c4SKenneth E. JansenThe Gaussian wave problem has the following command-line options in addition to the Newtonian Ideal Gas options: 7217ec884f8SJames Wright 722530ad8c4SKenneth E. Jansen:::{list-table} Gaussian Wave Runtime Options 7237ec884f8SJames Wright:header-rows: 1 7247ec884f8SJames Wright 7257ec884f8SJames Wright* - Option 7267ec884f8SJames Wright - Description 7277ec884f8SJames Wright - Default value 7287ec884f8SJames Wright - Unit 7297ec884f8SJames Wright 730f1e435c9SJed Brown* - `-freestream_riemann` 731f1e435c9SJed Brown - Riemann solver for boundaries (HLL or HLLC) 732f1e435c9SJed Brown - `hllc` 733f1e435c9SJed Brown - 734f1e435c9SJed Brown 735f1e435c9SJed Brown* - `-freestream_velocity` 7367ec884f8SJames Wright - Freestream velocity vector 7377ec884f8SJames Wright - `0,0,0` 7387ec884f8SJames Wright - `m/s` 7397ec884f8SJames Wright 740f1e435c9SJed Brown* - `-freestream_temperature` 7417ec884f8SJames Wright - Freestream temperature 7427ec884f8SJames Wright - `288` 7437ec884f8SJames Wright - `K` 7447ec884f8SJames Wright 745f1e435c9SJed Brown* - `-freestream_pressure` 74689e3cb53SJames Wright - Freestream pressure 7477ec884f8SJames Wright - `1.01e5` 7487ec884f8SJames Wright - `Pa` 7497ec884f8SJames Wright 7507ec884f8SJames Wright* - `-epicenter` 7517ec884f8SJames Wright - Coordinates of center of perturbation 7527ec884f8SJames Wright - `0,0,0` 7537ec884f8SJames Wright - `m` 7547ec884f8SJames Wright 7557ec884f8SJames Wright* - `-amplitude` 7567ec884f8SJames Wright - Amplitude of the perturbation 7577ec884f8SJames Wright - `0.1` 7587ec884f8SJames Wright - 7597ec884f8SJames Wright 7607ec884f8SJames Wright* - `-width` 7617ec884f8SJames Wright - Width parameter of the perturbation 7627ec884f8SJames Wright - `0.002` 7637ec884f8SJames Wright - `m` 7647ec884f8SJames Wright 7657ec884f8SJames Wright::: 7667ec884f8SJames Wright 767530ad8c4SKenneth E. JansenThis problem can be run with the `gaussianwave.yaml` file via: 7687ec884f8SJames Wright 7697ec884f8SJames Wright``` 770530ad8c4SKenneth E. Jansen./navierstokes -options_file gaussianwave.yaml 7717ec884f8SJames Wright``` 7727ec884f8SJames Wright 773530ad8c4SKenneth E. Jansen```{literalinclude} ../../../../../examples/fluids/gaussianwave.yaml 7747ec884f8SJames Wright:language: yaml 7757ec884f8SJames Wright``` 776a1df05f8SJed Brown 777d310b3d3SAdeleke O. Bankole#### Vortex Shedding - Flow past Cylinder 778d310b3d3SAdeleke O. Bankole 779d310b3d3SAdeleke O. BankoleThe vortex shedding, flow past cylinder problem has the following command-line options in addition to the Newtonian Ideal Gas options: 780d310b3d3SAdeleke O. Bankole 781d310b3d3SAdeleke O. Bankole:::{list-table} Vortex Shedding Runtime Options 782d310b3d3SAdeleke O. Bankole:header-rows: 1 783d310b3d3SAdeleke O. Bankole 784d310b3d3SAdeleke O. Bankole* - Option 785d310b3d3SAdeleke O. Bankole - Description 786d310b3d3SAdeleke O. Bankole - Default value 787d310b3d3SAdeleke O. Bankole - Unit 788d310b3d3SAdeleke O. Bankole 789d310b3d3SAdeleke O. Bankole* - `-freestream_velocity` 790d310b3d3SAdeleke O. Bankole - Freestream velocity vector 791d310b3d3SAdeleke O. Bankole - `0,0,0` 792d310b3d3SAdeleke O. Bankole - `m/s` 793d310b3d3SAdeleke O. Bankole 794d310b3d3SAdeleke O. Bankole* - `-freestream_temperature` 795d310b3d3SAdeleke O. Bankole - Freestream temperature 796d310b3d3SAdeleke O. Bankole - `288` 797d310b3d3SAdeleke O. Bankole - `K` 798d310b3d3SAdeleke O. Bankole 799d310b3d3SAdeleke O. Bankole* - `-freestream_pressure` 800d310b3d3SAdeleke O. Bankole - Freestream pressure 801d310b3d3SAdeleke O. Bankole - `1.01e5` 802d310b3d3SAdeleke O. Bankole - `Pa` 803d310b3d3SAdeleke O. Bankole 804d310b3d3SAdeleke O. Bankole::: 805d310b3d3SAdeleke O. Bankole 806d310b3d3SAdeleke O. BankoleThe initial condition is taken from `-reference_temperature` and `-reference_pressure`. 807d310b3d3SAdeleke O. BankoleTo run this problem, first generate a mesh: 808d310b3d3SAdeleke O. Bankole 809d310b3d3SAdeleke O. Bankole```console 810d310b3d3SAdeleke O. Bankole$ make -C examples/fluids/meshes 811d310b3d3SAdeleke O. Bankole``` 812d310b3d3SAdeleke O. Bankole 813d310b3d3SAdeleke O. BankoleThen run by building the executable and running: 814d310b3d3SAdeleke O. Bankole 815d310b3d3SAdeleke O. Bankole```console 816d310b3d3SAdeleke O. Bankole$ make build/fluids-navierstokes 817ca69d878SAdeleke O. Bankole$ mpiexec -n 6 build/fluids-navierstokes -options_file examples/fluids/vortexshedding.yaml -{ts,snes}_monitor_ 818d310b3d3SAdeleke O. Bankole``` 819d310b3d3SAdeleke O. Bankole 820ca69d878SAdeleke O. BankoleThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps). 821ca69d878SAdeleke 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. 822ca69d878SAdeleke O. Bankole 823ca69d878SAdeleke O. Bankole```console 824d6734f85SAdeleke O. Bankole$ python examples/fluids/postprocess/vortexshedding.py 825ca69d878SAdeleke O. Bankole``` 826d310b3d3SAdeleke O. Bankole 827d310b3d3SAdeleke O. Bankole```{literalinclude} ../../../../../examples/fluids/vortexshedding.yaml 828d310b3d3SAdeleke O. Bankole:language: yaml 829d310b3d3SAdeleke O. Bankole``` 830d310b3d3SAdeleke O. Bankole 831019b7682STimothy Aiken#### Density current 832019b7682STimothy Aiken 833061ff11eSJames WrightThe Density Current problem has the following command-line options in addition to the Newtonian Ideal Gas options: 83488626eedSJames Wright 83588626eedSJames Wright:::{list-table} Density Current Runtime Options 83688626eedSJames Wright:header-rows: 1 83788626eedSJames Wright 83888626eedSJames Wright* - Option 83988626eedSJames Wright - Description 84088626eedSJames Wright - Default value 84188626eedSJames Wright - Unit 84288626eedSJames Wright 84388626eedSJames Wright* - `-center` 84488626eedSJames Wright - Location of bubble center 84588626eedSJames Wright - `(lx,ly,lz)/2` 84688626eedSJames Wright - `(m,m,m)` 84788626eedSJames Wright 84888626eedSJames Wright* - `-dc_axis` 84988626eedSJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 85088626eedSJames Wright - `(0,0,0)` 85188626eedSJames Wright - 85288626eedSJames Wright 85388626eedSJames Wright* - `-rc` 85488626eedSJames Wright - Characteristic radius of thermal bubble 85588626eedSJames Wright - `1000` 85688626eedSJames Wright - `m` 85788626eedSJames Wright 85888626eedSJames Wright* - `-theta0` 85988626eedSJames Wright - Reference potential temperature 86088626eedSJames Wright - `300` 86188626eedSJames Wright - `K` 86288626eedSJames Wright 86388626eedSJames Wright* - `-thetaC` 86488626eedSJames Wright - Perturbation of potential temperature 86588626eedSJames Wright - `-15` 86688626eedSJames Wright - `K` 86788626eedSJames Wright 86888626eedSJames Wright* - `-P0` 86988626eedSJames Wright - Atmospheric pressure 87088626eedSJames Wright - `1E5` 87188626eedSJames Wright - `Pa` 87288626eedSJames Wright 87388626eedSJames Wright* - `-N` 87488626eedSJames Wright - Brunt-Vaisala frequency 87588626eedSJames Wright - `0.01` 87688626eedSJames Wright - `1/s` 87788626eedSJames Wright::: 87888626eedSJames Wright 879bc7bbd5dSLeila GhaffariThis problem can be run with: 880ccaff030SJeremy L Thompson 881bc7bbd5dSLeila Ghaffari``` 8827c5bba50SJames 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 88388626eedSJames Wright``` 88488626eedSJames Wright 885019b7682STimothy Aiken#### Channel flow 886019b7682STimothy Aiken 887061ff11eSJames WrightThe Channel problem has the following command-line options in addition to the Newtonian Ideal Gas options: 88888626eedSJames Wright 88988626eedSJames Wright:::{list-table} Channel Runtime Options 89088626eedSJames Wright:header-rows: 1 89188626eedSJames Wright 89288626eedSJames Wright* - Option 89388626eedSJames Wright - Description 89488626eedSJames Wright - Default value 89588626eedSJames Wright - Unit 89688626eedSJames Wright 89788626eedSJames Wright* - `-umax` 89888626eedSJames Wright - Maximum/centerline velocity of the flow 89988626eedSJames Wright - `10` 90088626eedSJames Wright - `m/s` 90188626eedSJames Wright 90288626eedSJames Wright* - `-theta0` 90388626eedSJames Wright - Reference potential temperature 90488626eedSJames Wright - `300` 90588626eedSJames Wright - `K` 90688626eedSJames Wright 90788626eedSJames Wright* - `-P0` 90888626eedSJames Wright - Atmospheric pressure 90988626eedSJames Wright - `1E5` 91088626eedSJames Wright - `Pa` 911a1df05f8SJed Brown 912a1df05f8SJed Brown* - `-body_force_scale` 913a1df05f8SJed Brown - Multiplier for body force (`-1` for flow reversal) 914a1df05f8SJed Brown - 1 915a1df05f8SJed Brown - 91688626eedSJames Wright::: 91788626eedSJames Wright 91888626eedSJames WrightThis problem can be run with the `channel.yaml` file via: 91988626eedSJames Wright 92088626eedSJames Wright``` 92188626eedSJames Wright./navierstokes -options_file channel.yaml 92288626eedSJames Wright``` 92388626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/channel.yaml 92488626eedSJames Wright:language: yaml 92588626eedSJames Wright``` 92688626eedSJames Wright 9278a94a473SJed Brown(example-blasius)= 9288a94a473SJed Brown 929019b7682STimothy Aiken#### Blasius boundary layer 930019b7682STimothy Aiken 931061ff11eSJames WrightThe Blasius problem has the following command-line options in addition to the Newtonian Ideal Gas options: 93288626eedSJames Wright 93388626eedSJames Wright:::{list-table} Blasius Runtime Options 93488626eedSJames Wright:header-rows: 1 93588626eedSJames Wright 93688626eedSJames Wright* - Option 93788626eedSJames Wright - Description 93888626eedSJames Wright - Default value 93988626eedSJames Wright - Unit 94088626eedSJames Wright 941fb455ff0SLeila Ghaffari* - `-velocity_infinity` 94288626eedSJames Wright - Freestream velocity 94388626eedSJames Wright - `40` 94488626eedSJames Wright - `m/s` 94588626eedSJames Wright 946fb455ff0SLeila Ghaffari* - `-temperature_infinity` 947fb455ff0SLeila Ghaffari - Freestream temperature 94888626eedSJames Wright - `288` 94988626eedSJames Wright - `K` 95088626eedSJames Wright 951*ff9b3c0eSJames Wright* - `-pressure_infinity` 952*ff9b3c0eSJames Wright - Atmospheric pressure, also sets IDL reference pressure 953*ff9b3c0eSJames Wright - `1.01E5` 954*ff9b3c0eSJames Wright - `Pa` 955*ff9b3c0eSJames Wright 956fb455ff0SLeila Ghaffari* - `-temperature_wall` 957fb455ff0SLeila Ghaffari - Wall temperature 95807d14e58SLeila Ghaffari - `288` 959fb455ff0SLeila Ghaffari - `K` 960fb455ff0SLeila Ghaffari 961fb455ff0SLeila Ghaffari* - `-delta0` 962fb455ff0SLeila Ghaffari - Boundary layer height at the inflow 963fb455ff0SLeila Ghaffari - `4.2e-3` 964fb455ff0SLeila Ghaffari - `m` 965fb455ff0SLeila Ghaffari 9669309e21cSJames Wright* - `-platemesh_modify_mesh` 9679309e21cSJames Wright - Whether to modify the mesh using the given options below. 9689309e21cSJames Wright - `false` 9699309e21cSJames Wright - 9709309e21cSJames Wright 97191eaef80SJames Wright* - `-platemesh_refine_height` 97291eaef80SJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 97388626eedSJames Wright - `5.9E-4` 97488626eedSJames Wright - `m` 97588626eedSJames Wright 97691eaef80SJames Wright* - `-platemesh_Ndelta` 97791eaef80SJames Wright - Number of elements to keep below `-platemesh_refine_height` 97888626eedSJames Wright - `45` 97988626eedSJames Wright - 98088626eedSJames Wright 98191eaef80SJames Wright* - `-platemesh_growth` 98288626eedSJames Wright - Growth rate of the elements in the refinement region 98388626eedSJames Wright - `1.08` 98488626eedSJames Wright - 98588626eedSJames Wright 98691eaef80SJames Wright* - `-platemesh_top_angle` 98788626eedSJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 98888626eedSJames Wright - `5` 98988626eedSJames Wright - `degrees` 990ba6664aeSJames Wright 99191eaef80SJames Wright* - `-platemesh_y_node_locs_path` 99291eaef80SJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 99391eaef80SJames Wright - `""` 99491eaef80SJames Wright - 995fb455ff0SLeila Ghaffari 9969309e21cSJames Wright* - `-stg_use` 9979309e21cSJames Wright - Whether to use STG for the inflow conditions 9989309e21cSJames Wright - `false` 9999309e21cSJames Wright - 10009309e21cSJames Wright 100107d14e58SLeila Ghaffari* - `-n_chebyshev` 1002fb455ff0SLeila Ghaffari - Number of Chebyshev terms 1003fb455ff0SLeila Ghaffari - `20` 1004fb455ff0SLeila Ghaffari - 1005fb455ff0SLeila Ghaffari 100607d14e58SLeila Ghaffari* - `-chebyshev_` 100707d14e58SLeila Ghaffari - Prefix for Chebyshev snes solve 100807d14e58SLeila Ghaffari - 100907d14e58SLeila Ghaffari - 101007d14e58SLeila Ghaffari 101188626eedSJames Wright::: 101288626eedSJames Wright 101388626eedSJames WrightThis problem can be run with the `blasius.yaml` file via: 101488626eedSJames Wright 101588626eedSJames Wright``` 101688626eedSJames Wright./navierstokes -options_file blasius.yaml 101788626eedSJames Wright``` 101888626eedSJames Wright 101988626eedSJames Wright```{literalinclude} ../../../../../examples/fluids/blasius.yaml 102088626eedSJames Wright:language: yaml 1021bc7bbd5dSLeila Ghaffari``` 1022ba6664aeSJames Wright 1023ba6664aeSJames Wright#### STG Inflow for Flat Plate 1024ba6664aeSJames Wright 102517be3a41SJeremy L ThompsonUsing the STG Inflow for the blasius problem adds the following command-line options: 1026ba6664aeSJames Wright 1027ba6664aeSJames Wright:::{list-table} Blasius Runtime Options 1028ba6664aeSJames Wright:header-rows: 1 1029ba6664aeSJames Wright 1030ba6664aeSJames Wright* - Option 1031ba6664aeSJames Wright - Description 1032ba6664aeSJames Wright - Default value 1033ba6664aeSJames Wright - Unit 1034ba6664aeSJames Wright 1035ba6664aeSJames Wright* - `-stg_inflow_path` 1036ba6664aeSJames Wright - Path to the STGInflow file 1037ba6664aeSJames Wright - `./STGInflow.dat` 1038ba6664aeSJames Wright - 1039ba6664aeSJames Wright 1040ba6664aeSJames Wright* - `-stg_rand_path` 1041ba6664aeSJames Wright - Path to the STGRand file 1042ba6664aeSJames Wright - `./STGRand.dat` 1043ba6664aeSJames Wright - 1044ba6664aeSJames Wright 1045ba6664aeSJames Wright* - `-stg_alpha` 1046ba6664aeSJames Wright - Growth rate of the wavemodes 1047ba6664aeSJames Wright - `1.01` 1048ba6664aeSJames Wright - 1049ba6664aeSJames Wright 1050ba6664aeSJames Wright* - `-stg_u0` 1051ba6664aeSJames Wright - Convective velocity, $U_0$ 1052ba6664aeSJames Wright - `0.0` 1053ba6664aeSJames Wright - `m/s` 1054ba6664aeSJames Wright 1055ba6664aeSJames Wright* - `-stg_mean_only` 1056ba6664aeSJames Wright - Only impose the mean velocity (no fluctutations) 1057ba6664aeSJames Wright - `false` 1058ba6664aeSJames Wright - 1059ba6664aeSJames Wright 106030af3636SJames Wright* - `-stg_strong` 106130af3636SJames Wright - Strongly enforce the STG inflow boundary condition 106230af3636SJames Wright - `false` 106330af3636SJames Wright - 106430af3636SJames Wright 106589060322SJames Wright* - `-stg_fluctuating_IC` 106689060322SJames Wright - "Extrude" the fluctuations through the domain as an initial condition 106789060322SJames Wright - `false` 106889060322SJames Wright - 106989060322SJames Wright 1070ba6664aeSJames Wright::: 1071ba6664aeSJames Wright 1072ba6664aeSJames WrightThis problem can be run with the `blasius.yaml` file via: 1073ba6664aeSJames Wright 1074ba6664aeSJames Wright``` 1075ba6664aeSJames Wright./navierstokes -options_file blasius.yaml -stg_use true 1076ba6664aeSJames Wright``` 1077ba6664aeSJames Wright 107817be3a41SJeremy L ThompsonNote the added `-stg_use true` flag 107917be3a41SJeremy L ThompsonThis overrides the `stg: use: false` setting in the `blasius.yaml` file, enabling the use of the STG inflow. 1080