10fb1909eSJames Wright# Examples 20fb1909eSJames Wright 30fb1909eSJames Wright## Compressible Navier-Stokes Equations 40fb1909eSJames Wright 50fb1909eSJames Wright### Gaussian Wave 60fb1909eSJames WrightThis test case is taken/inspired by that presented in {cite}`mengaldoCompressibleBC2014`. It is intended to test non-reflecting/Riemann boundary conditions. It's primarily intended for Euler equations, but has been implemented for the Navier-Stokes equations here for flexibility. 70fb1909eSJames Wright 80fb1909eSJames WrightThe problem has a perturbed initial condition and lets it evolve in time. The initial condition contains a Gaussian perturbation in the pressure field: 90fb1909eSJames Wright 100fb1909eSJames Wright$$ 110fb1909eSJames Wright\begin{aligned} 120fb1909eSJames Wright\rho &= \rho_\infty\left(1+A\exp\left(\frac{-(\bar{x}^2 + \bar{y}^2)}{2\sigma^2}\right)\right) \\ 130fb1909eSJames Wright\bm{U} &= \bm U_\infty \\ 140fb1909eSJames WrightE &= \frac{p_\infty}{\gamma -1}\left(1+A\exp\left(\frac{-(\bar{x}^2 + \bar{y}^2)}{2\sigma^2}\right)\right) + \frac{\bm U_\infty \cdot \bm U_\infty}{2\rho_\infty}, 150fb1909eSJames Wright\end{aligned} 160fb1909eSJames Wright$$ 170fb1909eSJames Wright 180fb1909eSJames Wrightwhere $A$ and $\sigma$ are the amplitude and width of the perturbation, respectively, and $(\bar{x}, \bar{y}) = (x-x_e, y-y_e)$ is the distance to the epicenter of the perturbation, $(x_e, y_e)$. 190fb1909eSJames WrightThe simulation produces a strong acoustic wave and leaves behind a cold thermal bubble that advects at the fluid velocity. 200fb1909eSJames Wright 210fb1909eSJames WrightThe boundary conditions are freestream in the x and y directions. When using an HLL (Harten, Lax, van Leer) Riemann solver {cite}`toro2009` (option `-freestream_riemann hll`), the acoustic waves exit the domain cleanly, but when the thermal bubble reaches the boundary, it produces strong thermal oscillations that become acoustic waves reflecting into the domain. 220fb1909eSJames WrightThis problem can be fixed using a more sophisticated Riemann solver such as HLLC {cite}`toro2009` (option `-freestream_riemann hllc`, which is default), which is a linear constant-pressure wave that transports temperature and transverse momentum at the fluid velocity. 230fb1909eSJames Wright 240fb1909eSJames Wright#### Running 250fb1909eSJames Wright:::{list-table} Gaussian Wave Runtime Options 260fb1909eSJames Wright:header-rows: 1 270fb1909eSJames Wright 280fb1909eSJames Wright* - Option 290fb1909eSJames Wright - Description 300fb1909eSJames Wright - Default value 310fb1909eSJames Wright - Unit 320fb1909eSJames Wright 330fb1909eSJames Wright* - `-epicenter` 340fb1909eSJames Wright - Coordinates of center of perturbation 350fb1909eSJames Wright - `0,0,0` 360fb1909eSJames Wright - `m` 370fb1909eSJames Wright 380fb1909eSJames Wright* - `-amplitude` 390fb1909eSJames Wright - Amplitude of the perturbation 400fb1909eSJames Wright - `0.1` 410fb1909eSJames Wright - 420fb1909eSJames Wright 430fb1909eSJames Wright* - `-width` 440fb1909eSJames Wright - Width parameter of the perturbation 450fb1909eSJames Wright - `0.002` 460fb1909eSJames Wright - `m` 470fb1909eSJames Wright 480fb1909eSJames Wright::: 490fb1909eSJames Wright 500fb1909eSJames WrightThis problem can be run with the `examples/gaussianwave.yaml` file via: 510fb1909eSJames Wright 520fb1909eSJames Wright``` 530fb1909eSJames Wright./build/navierstokes -options_file examples/gaussianwave.yaml 540fb1909eSJames Wright``` 550fb1909eSJames Wright 560fb1909eSJames Wright`examples/gaussianwave.yaml`: 570fb1909eSJames Wright```{literalinclude} ../examples/gaussianwave.yaml 580fb1909eSJames Wright:language: yaml 590fb1909eSJames Wright``` 600fb1909eSJames Wright 610fb1909eSJames Wright### Vortex Shedding - Flow past Cylinder 620fb1909eSJames WrightThis test case, based on {cite}`shakib1991femcfd`, is an example of using an externally provided mesh from Gmsh. 630fb1909eSJames WrightA cylinder with diameter $D=1$ is centered at $(0,0)$ in a computational domain $-4.5 \leq x \leq 15.5$, $-4.5 \leq y \leq 4.5$. 640fb1909eSJames WrightWe solve this as a 3D problem with (default) one element in the $z$ direction. 650fb1909eSJames WrightThe domain is filled with an ideal gas at rest (zero velocity) with temperature 24.92 and pressure 7143. 660fb1909eSJames WrightThe viscosity is 0.01 and thermal conductivity is 14.34 to maintain a Prandtl number of 0.71, which is typical for air. 670fb1909eSJames WrightAt time $t=0$, this domain is subjected to freestream boundary conditions at the inflow (left) and Riemann-type outflow on the right, with exterior reference state at velocity $(1, 0, 0)$ giving Reynolds number $100$ and Mach number $0.01$. 680fb1909eSJames WrightA symmetry (adiabatic free slip) condition is imposed at the top and bottom boundaries $(y = \pm 4.5)$ (zero normal velocity component, zero heat-flux). 690fb1909eSJames WrightThe cylinder wall is an adiabatic (no heat flux) no-slip boundary condition. 700fb1909eSJames WrightAs we evolve in time, eddies appear past the cylinder leading to a vortex shedding known as the vortex street, with shedding period of about 6. 710fb1909eSJames Wright 720fb1909eSJames WrightThe Gmsh input file, `examples/meshes/cylinder.geo` is parametrized to facilitate experimenting with similar configurations. 730fb1909eSJames WrightThe Strouhal number (nondimensional shedding frequency) is sensitive to the size of the computational domain and boundary conditions. 740fb1909eSJames Wright 750fb1909eSJames WrightForces on the cylinder walls are computed using the "reaction force" method, which is variationally consistent with the volume operator. 760fb1909eSJames WrightGiven the force components $\bm F = (F_x, F_y, F_z)$ and surface area $S = \pi D L_z$ where $L_z$ is the spanwise extent of the domain, we define the coefficients of lift and drag as 770fb1909eSJames Wright 780fb1909eSJames Wright$$ 790fb1909eSJames Wright\begin{aligned} 800fb1909eSJames WrightC_L &= \frac{2 F_y}{\rho_\infty u_\infty^2 S} \\ 810fb1909eSJames WrightC_D &= \frac{2 F_x}{\rho_\infty u_\infty^2 S} \\ 820fb1909eSJames Wright\end{aligned} 830fb1909eSJames Wright$$ 840fb1909eSJames Wright 850fb1909eSJames Wrightwhere $\rho_\infty, u_\infty$ are the freestream (inflow) density and velocity respectively. 860fb1909eSJames Wright 870fb1909eSJames Wright#### Running 880fb1909eSJames Wright 890fb1909eSJames WrightThe initial condition is taken from `-reference_temperature` and `-reference_pressure`. 900fb1909eSJames WrightTo run this problem, first generate a mesh: 910fb1909eSJames Wright 920fb1909eSJames Wright```console 930fb1909eSJames Wright$ make -C examples/meshes 940fb1909eSJames Wright``` 950fb1909eSJames Wright 960fb1909eSJames WrightThen run by building the executable and running: 970fb1909eSJames Wright 980fb1909eSJames Wright```console 990fb1909eSJames Wright$ make -j 1000fb1909eSJames Wright$ mpiexec -n 6 build/navierstokes -options_file examples/vortexshedding.yaml 1010fb1909eSJames Wright``` 1020fb1909eSJames Wright 1030fb1909eSJames WrightThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps). 1040fb1909eSJames WrightThe above run writes a file named `force.csv` (see `ts_monitor_wall_force` in `examples/vortexshedding.yaml`), which can be postprocessed by running to create a figure showing lift and drag coefficients over time. 1050fb1909eSJames Wright 1060fb1909eSJames Wright```console 1070fb1909eSJames Wright$ python postprocess/vortexshedding.py 1080fb1909eSJames Wright``` 1090fb1909eSJames Wright 1100fb1909eSJames Wright`examples/vortexshedding.yaml`: 1110fb1909eSJames Wright```{literalinclude} ../examples/vortexshedding.yaml 1120fb1909eSJames Wright:language: yaml 1130fb1909eSJames Wright``` 1140fb1909eSJames Wright 1150fb1909eSJames Wright(example-density-current)= 1160fb1909eSJames Wright### Density Current 1170fb1909eSJames Wright 1180fb1909eSJames WrightFor this test problem (from {cite}`straka1993numerical`), we solve the full Navier-Stokes equations {eq}`eq-ns`, for which a cold air bubble (of radius $r_c$) drops by convection in a neutrally stratified atmosphere. 1190fb1909eSJames WrightIts initial condition is defined in terms of the Exner pressure, $\pi(\bm{x},t)$, and potential temperature, $\theta(\bm{x},t)$, that relate to the state variables via 1200fb1909eSJames Wright 1210fb1909eSJames Wright$$ 1220fb1909eSJames Wright\begin{aligned} \rho &= \frac{P_0}{( c_p - c_v)\theta(\bm{x},t)} \pi(\bm{x},t)^{\frac{c_v}{ c_p - c_v}} \, , \\ e &= c_v \theta(\bm{x},t) \pi(\bm{x},t) + \bm{u}\cdot \bm{u} /2 + g z \, , \end{aligned} 1230fb1909eSJames Wright$$ 1240fb1909eSJames Wright 1250fb1909eSJames Wrightwhere $P_0$ is the atmospheric pressure. 1260fb1909eSJames WrightFor this problem, we have used no-slip and non-penetration boundary conditions for $\bm{u}$, and no-flux for mass and energy densities. 1270fb1909eSJames Wright 1280fb1909eSJames Wright#### Running 1290fb1909eSJames Wright 1300fb1909eSJames Wright:::{list-table} Density Current Runtime Options 1310fb1909eSJames Wright:header-rows: 1 1320fb1909eSJames Wright 1330fb1909eSJames Wright* - Option 1340fb1909eSJames Wright - Description 1350fb1909eSJames Wright - Default value 1360fb1909eSJames Wright - Unit 1370fb1909eSJames Wright 1380fb1909eSJames Wright* - `-center` 1390fb1909eSJames Wright - Location of bubble center 1400fb1909eSJames Wright - `(lx,ly,lz)/2` 1410fb1909eSJames Wright - `(m,m,m)` 1420fb1909eSJames Wright 1430fb1909eSJames Wright* - `-dc_axis` 1440fb1909eSJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 1450fb1909eSJames Wright - `(0,0,0)` 1460fb1909eSJames Wright - 1470fb1909eSJames Wright 1480fb1909eSJames Wright* - `-rc` 1490fb1909eSJames Wright - Characteristic radius of thermal bubble 1500fb1909eSJames Wright - `1000` 1510fb1909eSJames Wright - `m` 1520fb1909eSJames Wright 1530fb1909eSJames Wright* - `-theta0` 1540fb1909eSJames Wright - Reference potential temperature 1550fb1909eSJames Wright - `300` 1560fb1909eSJames Wright - `K` 1570fb1909eSJames Wright 1580fb1909eSJames Wright* - `-thetaC` 1590fb1909eSJames Wright - Perturbation of potential temperature 1600fb1909eSJames Wright - `-15` 1610fb1909eSJames Wright - `K` 1620fb1909eSJames Wright 1630fb1909eSJames Wright* - `-P0` 1640fb1909eSJames Wright - Atmospheric pressure 1650fb1909eSJames Wright - `1E5` 1660fb1909eSJames Wright - `Pa` 1670fb1909eSJames Wright 1680fb1909eSJames Wright* - `-N` 1690fb1909eSJames Wright - Brunt-Vaisala frequency 1700fb1909eSJames Wright - `0.01` 1710fb1909eSJames Wright - `1/s` 1720fb1909eSJames Wright::: 1730fb1909eSJames Wright 1740fb1909eSJames WrightThis example can be run with: 1750fb1909eSJames Wright 1760fb1909eSJames Wright``` 1770fb1909eSJames 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 1780fb1909eSJames Wright``` 1790fb1909eSJames Wright 1800fb1909eSJames Wright### Channel 1810fb1909eSJames Wright 1820fb1909eSJames WrightA compressible channel flow. Analytical solution given in 1830fb1909eSJames Wright{cite}`whitingStabilizedFEM1999`: 1840fb1909eSJames Wright 1850fb1909eSJames Wright$$ u_1 = u_{\max} \left [ 1 - \left ( \frac{x_2}{H}\right)^2 \right] \quad \quad u_2 = u_3 = 0$$ 1860fb1909eSJames Wright$$T = T_w \left [ 1 + \frac{Pr \hat{E}c}{3} \left \{1 - \left(\frac{x_2}{H}\right)^4 \right \} \right]$$ 1870fb1909eSJames Wright$$p = p_0 - \frac{2\rho_0 u_{\max}^2 x_1}{Re_H H}$$ 1880fb1909eSJames Wright 1890fb1909eSJames Wrightwhere $H$ is the channel half-height, $u_{\max}$ is the center velocity, $T_w$ is the temperature at the wall, $Pr=\frac{\mu}{c_p \kappa}$ is the Prandlt number, $\hat E_c = \frac{u_{\max}^2}{c_p T_w}$ is the modified Eckert number, and $Re_h = \frac{u_{\max}H}{\nu}$ is the Reynolds number. 1900fb1909eSJames Wright 1910fb1909eSJames WrightBoundary conditions are periodic in the streamwise direction, and no-slip and non-penetration boundary conditions at the walls. 1920fb1909eSJames WrightThe flow is driven by a body force determined analytically from the fluid properties and setup parameters $H$ and $u_{\max}$. 1930fb1909eSJames Wright 1940fb1909eSJames Wright#### Running 1950fb1909eSJames Wright 1960fb1909eSJames Wright:::{list-table} Channel Runtime Options 1970fb1909eSJames Wright:header-rows: 1 1980fb1909eSJames Wright 1990fb1909eSJames Wright* - Option 2000fb1909eSJames Wright - Description 2010fb1909eSJames Wright - Default value 2020fb1909eSJames Wright - Unit 2030fb1909eSJames Wright 2040fb1909eSJames Wright* - `-umax` 2050fb1909eSJames Wright - Maximum/centerline velocity of the flow 2060fb1909eSJames Wright - `10` 2070fb1909eSJames Wright - `m/s` 2080fb1909eSJames Wright 2090fb1909eSJames Wright* - `-theta0` 2100fb1909eSJames Wright - Reference potential temperature 2110fb1909eSJames Wright - `300` 2120fb1909eSJames Wright - `K` 2130fb1909eSJames Wright 2140fb1909eSJames Wright* - `-P0` 2150fb1909eSJames Wright - Atmospheric pressure 2160fb1909eSJames Wright - `1E5` 2170fb1909eSJames Wright - `Pa` 2180fb1909eSJames Wright 2190fb1909eSJames Wright* - `-body_force_scale` 2200fb1909eSJames Wright - Multiplier for body force (`-1` for flow reversal) 2210fb1909eSJames Wright - 1 2220fb1909eSJames Wright - 2230fb1909eSJames Wright::: 2240fb1909eSJames Wright 2250fb1909eSJames WrightThis problem can be run with the `examples/channel.yaml` file via: 2260fb1909eSJames Wright 2270fb1909eSJames Wright``` 2280fb1909eSJames Wright./build/navierstokes -options_file examples/channel.yaml 2290fb1909eSJames Wright``` 2300fb1909eSJames Wright`examples/channel.yaml:` 2310fb1909eSJames Wright```{literalinclude} ../examples/channel.yaml 2320fb1909eSJames Wright:language: yaml 2330fb1909eSJames Wright``` 2340fb1909eSJames Wright 2350fb1909eSJames Wright### Flat Plate Boundary Layer 2360fb1909eSJames Wright 2370fb1909eSJames Wright#### Meshing 2380fb1909eSJames Wright 2390fb1909eSJames WrightThe flat plate boundary layer example has custom meshing features to better resolve the flow when using a generated box mesh. 2400fb1909eSJames WrightThese meshing features modify the nodal layout of the default, equispaced box mesh and are enabled via `-mesh_transform platemesh`. 2410fb1909eSJames WrightOne of those is tilting the top of the domain, allowing for it to be a outflow boundary condition. 2420fb1909eSJames WrightThe angle of this tilt is controlled by `-platemesh_top_angle`. 2430fb1909eSJames Wright 2440fb1909eSJames WrightThe primary meshing feature is the ability to grade the mesh, providing better resolution near the wall. 2450fb1909eSJames WrightThere are two methods to do this; algorithmically, or specifying the node locations via a file. 2460fb1909eSJames WrightAlgorithmically, a base node distribution is defined at the inlet (assumed to be $\min(x)$) and then linearly stretched/squeezed to match the slanted top boundary condition. 2470fb1909eSJames WrightNodes are placed such that `-platemesh_Ndelta` elements are within `-platemesh_refine_height` of the wall. 2480fb1909eSJames WrightThey are placed such that the element height matches a geometric growth ratio defined by `-platemesh_growth`. 2490fb1909eSJames WrightThe remaining elements are then distributed from `-platemesh_refine_height` to the top of the domain linearly in logarithmic space. 2500fb1909eSJames Wright 2510fb1909eSJames WrightAlternatively, a file may be specified containing the locations of each node. 2520fb1909eSJames WrightThe file should be newline delimited, with the first line specifying the number of points and the rest being the locations of the nodes. 2530fb1909eSJames WrightThe node locations used exactly at the inlet (assumed to be $\min(x)$) and linearly stretched/squeezed to match the slanted top boundary condition. 2540fb1909eSJames WrightThe file is specified via `-platemesh_y_node_locs_path`. 2550fb1909eSJames WrightIf this flag is given an empty string, then the algorithmic approach will be performed. 2560fb1909eSJames Wright 2570fb1909eSJames Wright:::{list-table} Boundary Layer Meshing Runtime Options 2580fb1909eSJames Wright:header-rows: 1 2590fb1909eSJames Wright 2600fb1909eSJames Wright* - Option 2610fb1909eSJames Wright - Description 2620fb1909eSJames Wright - Default value 2630fb1909eSJames Wright - Unit 2640fb1909eSJames Wright 2650fb1909eSJames Wright* - `-platemesh_modify_mesh` 2660fb1909eSJames Wright - Whether to modify the mesh using the given options below. 2670fb1909eSJames Wright - `false` 2680fb1909eSJames Wright - 2690fb1909eSJames Wright 2700fb1909eSJames Wright* - `-platemesh_refine_height` 2710fb1909eSJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 2720fb1909eSJames Wright - `5.9E-4` 2730fb1909eSJames Wright - `m` 2740fb1909eSJames Wright 2750fb1909eSJames Wright* - `-platemesh_Ndelta` 2760fb1909eSJames Wright - Number of elements to keep below `-platemesh_refine_height` 2770fb1909eSJames Wright - `45` 2780fb1909eSJames Wright - 2790fb1909eSJames Wright 2800fb1909eSJames Wright* - `-platemesh_growth` 2810fb1909eSJames Wright - Growth rate of the elements in the refinement region 2820fb1909eSJames Wright - `1.08` 2830fb1909eSJames Wright - 2840fb1909eSJames Wright 2850fb1909eSJames Wright* - `-platemesh_top_angle` 2860fb1909eSJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 2870fb1909eSJames Wright - `5` 2880fb1909eSJames Wright - `degrees` 2890fb1909eSJames Wright 2900fb1909eSJames Wright* - `-platemesh_y_node_locs_path` 2910fb1909eSJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 2920fb1909eSJames Wright - `""` 2930fb1909eSJames Wright - 2940fb1909eSJames Wright::: 2950fb1909eSJames Wright 2960fb1909eSJames Wright(example-blasius)= 2970fb1909eSJames Wright#### Laminar Boundary Layer - Blasius 2980fb1909eSJames Wright 2990fb1909eSJames WrightSimulation of a laminar boundary layer flow, with the inflow being prescribed by a [Blasius similarity solution](https://en.wikipedia.org/wiki/Blasius_boundary_layer). 3000fb1909eSJames WrightAt the inflow, the velocity is prescribed by the Blasius soution profile, density is set constant, and temperature is allowed to float. 3010fb1909eSJames WrightUsing `weakT: true`, density is allowed to float and temperature is set constant. 3020fb1909eSJames WrightAt the outlet, a user-set pressure is used for pressure in the inviscid flux terms (all other inviscid flux terms use interior solution values). 3030fb1909eSJames WrightThe wall is a no-slip, no-penetration, no-heat flux condition. 3040fb1909eSJames WrightThe top of the domain is treated as an outflow and is tilted at a downward angle to ensure that flow is always exiting it. 3050fb1909eSJames Wright 3060fb1909eSJames Wright#### Running 3070fb1909eSJames Wright:::{list-table} Blasius Runtime Options 3080fb1909eSJames Wright:header-rows: 1 3090fb1909eSJames Wright 3100fb1909eSJames Wright* - Option 3110fb1909eSJames Wright - Description 3120fb1909eSJames Wright - Default value 3130fb1909eSJames Wright - Unit 3140fb1909eSJames Wright 3150fb1909eSJames Wright* - `-velocity_infinity` 3160fb1909eSJames Wright - Freestream velocity 3170fb1909eSJames Wright - `40` 3180fb1909eSJames Wright - `m/s` 3190fb1909eSJames Wright 3200fb1909eSJames Wright* - `-temperature_infinity` 3210fb1909eSJames Wright - Freestream temperature 3220fb1909eSJames Wright - `288` 3230fb1909eSJames Wright - `K` 3240fb1909eSJames Wright 3250fb1909eSJames Wright* - `-pressure_infinity` 3260fb1909eSJames Wright - Atmospheric pressure, also sets IDL reference pressure 3270fb1909eSJames Wright - `1.01E5` 3280fb1909eSJames Wright - `Pa` 3290fb1909eSJames Wright 3300fb1909eSJames Wright* - `-temperature_wall` 3310fb1909eSJames Wright - Wall temperature 3320fb1909eSJames Wright - `288` 3330fb1909eSJames Wright - `K` 3340fb1909eSJames Wright 3350fb1909eSJames Wright* - `-delta0` 3360fb1909eSJames Wright - Boundary layer height at the inflow 3370fb1909eSJames Wright - `4.2e-3` 3380fb1909eSJames Wright - `m` 3390fb1909eSJames Wright 3400fb1909eSJames Wright* - `-n_chebyshev` 3410fb1909eSJames Wright - Number of Chebyshev terms 3420fb1909eSJames Wright - `20` 3430fb1909eSJames Wright - 3440fb1909eSJames Wright 3450fb1909eSJames Wright* - `-chebyshev_` 3460fb1909eSJames Wright - Prefix for Chebyshev snes solve 3470fb1909eSJames Wright - 3480fb1909eSJames Wright - 3490fb1909eSJames Wright::: 3500fb1909eSJames Wright 3510fb1909eSJames WrightThis problem can be run with the `examples/blasius.yaml` file via: 3520fb1909eSJames Wright 3530fb1909eSJames Wright``` 3540fb1909eSJames Wright./build/navierstokes -options_file examples/blasius.yaml 3550fb1909eSJames Wright``` 3560fb1909eSJames Wright 3570fb1909eSJames Wright`examples/blasius.yaml`: 3580fb1909eSJames Wright```{literalinclude} ../examples/blasius.yaml 3590fb1909eSJames Wright:language: yaml 3600fb1909eSJames Wright``` 3610fb1909eSJames Wright 3620fb1909eSJames Wright#### Turbulent Boundary Layer 3630fb1909eSJames Wright 3640fb1909eSJames WrightSimulating a turbulent boundary layer without modeling the turbulence requires resolving the turbulent flow structures. 3650fb1909eSJames WrightThese structures may be introduced into the simulations either by allowing a laminar boundary layer naturally transition to turbulence, or imposing turbulent structures at the inflow. 3660fb1909eSJames WrightThe latter approach has been taken here, specifically using a *synthetic turbulence generation* (STG) method. 3670fb1909eSJames WrightSee {ref}`bc-stg` for details on STG. 3680fb1909eSJames Wright 3690fb1909eSJames Wright#### Running 3700fb1909eSJames WrightThis problem can be run with the `examples/blasius.yaml` file via: 3710fb1909eSJames Wright 3720fb1909eSJames Wright``` 3730fb1909eSJames Wright./build/navierstokes -options_file examples/blasius.yaml -stg_use true 3740fb1909eSJames Wright``` 3750fb1909eSJames Wright 3760fb1909eSJames WrightNote the added `-stg_use true` flag 3770fb1909eSJames WrightThis overrides the `stg: use: false` setting in the `examples/blasius.yaml` file, enabling the use of the STG inflow. 3780fb1909eSJames Wright 3790fb1909eSJames Wright### Taylor-Green Vortex 3800fb1909eSJames Wright 3810fb1909eSJames WrightThis problem is really just an initial condition, the [Taylor-Green Vortex](https://en.wikipedia.org/wiki/Taylor%E2%80%93Green_vortex): 3820fb1909eSJames Wright 3830fb1909eSJames Wright$$ 3840fb1909eSJames Wright\begin{aligned} 385d9f57b1cSJames Wrightu &= V'_x + V \sin(\hat x) \cos(\hat y) \sin(\hat z) \\ 386d9f57b1cSJames Wrightv &= V'_y - V \cos(\hat x) \sin(\hat y) \sin(\hat z) \\ 387d9f57b1cSJames Wrightw &= V'_z\\ 3880fb1909eSJames Wrightp &= p_0 + \frac{\rho_0 V_0^2}{16} \left ( \cos(2 \hat x) + \cos(2 \hat y)\right) \left( \cos(2 \hat z) + 2 \right) \\ 3890fb1909eSJames Wright\rho &= \frac{p}{R T_0} \\ 3900fb1909eSJames Wright\end{aligned} 3910fb1909eSJames Wright$$ 3920fb1909eSJames Wright 393d9f57b1cSJames Wrightwhere $\hat x = 2 \pi x / L$ for $L$ the length of the domain in that specific direction, $V$ is the magnitude of the vortex velocity, and $V'_i$ is the background velocity that (optionally) advects the initial condition. 394d9f57b1cSJames WrightThe coordinate modification is done to transform a given grid onto a domain of $x,y,z \in [0, 2\pi)$. 3950fb1909eSJames Wright 3960fb1909eSJames WrightThis initial condition is traditionally given for the incompressible Navier-Stokes equations. 397d9f57b1cSJames WrightThe reference state is selected using the `-reference_{velocity,pressure,temperature}` flags (Euclidean norm of `-reference_velocity` is used for $V$). 398d9f57b1cSJames Wright 399d9f57b1cSJames Wright:::{list-table} Taylor-Green Vortex Runtime Options 400d9f57b1cSJames Wright:header-rows: 1 401d9f57b1cSJames Wright 402d9f57b1cSJames Wright* - Option 403d9f57b1cSJames Wright - Description 404d9f57b1cSJames Wright - Default value 405d9f57b1cSJames Wright - Unit 406d9f57b1cSJames Wright 407d9f57b1cSJames Wright* - `-taylorgreen_background_velocity` 408d9f57b1cSJames Wright - Background velocity added to Taylor-Green initial condition 409d9f57b1cSJames Wright - `0,0,0` 410d9f57b1cSJames Wright - `m/s` 411d9f57b1cSJames Wright::: 4120fb1909eSJames Wright 4130fb1909eSJames Wright## Compressible Euler Equations 4140fb1909eSJames Wright 4150fb1909eSJames Wright(problem-euler-vortex)= 4160fb1909eSJames Wright 4170fb1909eSJames Wright### Isentropic Vortex 4180fb1909eSJames Wright 4190fb1909eSJames WrightThree-dimensional Euler equations, which are simplified and nondimensionalized version of system {eq}`eq-ns` and account only for the convective fluxes, are given by 4200fb1909eSJames Wright 4210fb1909eSJames Wright$$ 4220fb1909eSJames Wright\begin{aligned} 4230fb1909eSJames Wright\frac{\partial \rho}{\partial t} + \nabla \cdot \bm{U} &= 0 \\ 4240fb1909eSJames Wright\frac{\partial \bm{U}}{\partial t} + \nabla \cdot \left( \frac{\bm{U} \otimes \bm{U}}{\rho} + P \bm{I}_3 \right) &= 0 \\ 4250fb1909eSJames Wright\frac{\partial E}{\partial t} + \nabla \cdot \left( \frac{(E + P)\bm{U}}{\rho} \right) &= 0 \, , \\ 4260fb1909eSJames Wright\end{aligned} 4270fb1909eSJames Wright$$ (eq-euler) 4280fb1909eSJames Wright 4290fb1909eSJames WrightFollowing the setup given in {cite}`zhang2011verification`, the mean flow for this problem is $\rho=1$, $P=1$, $T=P/\rho= 1$ (Specific Gas Constant, $R$, is 1), and $\bm{u}=(u_1,u_2,0)$ while the perturbation $\delta \bm{u}$, and $\delta T$ are defined as 4300fb1909eSJames Wright 4310fb1909eSJames Wright$$ 4320fb1909eSJames Wright\begin{aligned} (\delta u_1, \, \delta u_2) &= \frac{\epsilon}{2 \pi} \, e^{0.5(1-r^2)} \, (-\bar{y}, \, \bar{x}) \, , \\ \delta T &= - \frac{(\gamma-1) \, \epsilon^2}{8 \, \gamma \, \pi^2} \, e^{1-r^2} \, , \\ \end{aligned} 4330fb1909eSJames Wright$$ 4340fb1909eSJames Wright 4350fb1909eSJames Wrightwhere $(\bar{x}, \, \bar{y}) = (x-x_c, \, y-y_c)$, $(x_c, \, y_c)$ represents the center of the domain, $r^2=\bar{x}^2 + \bar{y}^2$, and $\epsilon$ is the vortex strength ($\epsilon$ < 10). 4360fb1909eSJames WrightThere is no perturbation in the entropy $S=P/\rho^\gamma$ ($\delta S=0)$. 4370fb1909eSJames Wright 4380fb1909eSJames Wright#### Running 4390fb1909eSJames Wright:::{list-table} Isentropic Vortex Runtime Options 4400fb1909eSJames Wright:header-rows: 1 4410fb1909eSJames Wright 4420fb1909eSJames Wright* - Option 4430fb1909eSJames Wright - Description 4440fb1909eSJames Wright - Default value 4450fb1909eSJames Wright - Unit 4460fb1909eSJames Wright 4470fb1909eSJames Wright* - `-center` 4480fb1909eSJames Wright - Location of vortex center 4490fb1909eSJames Wright - `(lx,ly,lz)/2` 4500fb1909eSJames Wright - `(m,m,m)` 4510fb1909eSJames Wright 4520fb1909eSJames Wright* - `-mean_velocity` 4530fb1909eSJames Wright - Background velocity vector 4540fb1909eSJames Wright - `(1,1,0)` 4550fb1909eSJames Wright - 4560fb1909eSJames Wright 4570fb1909eSJames Wright* - `-vortex_strength` 4580fb1909eSJames Wright - Strength of vortex < 10 4590fb1909eSJames Wright - `5` 4600fb1909eSJames Wright - 4610fb1909eSJames Wright 4620fb1909eSJames Wright* - `-c_tau` 4630fb1909eSJames Wright - Stabilization constant 4640fb1909eSJames Wright - `0.5` 4650fb1909eSJames Wright - 4660fb1909eSJames Wright::: 4670fb1909eSJames Wright 4680fb1909eSJames WrightThis problem can be run with: 4690fb1909eSJames Wright 4700fb1909eSJames Wright``` 4710fb1909eSJames 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. 4720fb1909eSJames Wright``` 4730fb1909eSJames Wright 4740fb1909eSJames Wright(problem-shock-tube)= 4750fb1909eSJames Wright### Shock Tube 4760fb1909eSJames Wright 4770fb1909eSJames WrightThis test problem is based on Sod's Shock Tube (from{cite}`sodshocktubewiki`), a canonical test case for discontinuity capturing in one dimension. For this problem, the three-dimensional Euler equations are formulated exactly as in the Isentropic Vortex problem. The default initial conditions are $P=1$, $\rho=1$ for the driver section and $P=0.1$, $\rho=0.125$ for the driven section. The initial velocity is zero in both sections. Symmetry boundary conditions are applied to the side walls and wall boundary conditions are applied at the end walls. 4780fb1909eSJames Wright 4790fb1909eSJames WrightSU upwinding and discontinuity capturing have been implemented into the explicit timestepping operator for this problem. Discontinuity capturing is accomplished using a modified version of the $YZ\beta$ operator described in {cite}`tezduyar2007yzb`. This discontinuity capturing scheme involves the introduction of a dissipation term of the form 4800fb1909eSJames Wright 4810fb1909eSJames Wright$$ 4820fb1909eSJames Wright\int_{\Omega} \nu_{SHOCK} \nabla \bm v \!:\! \nabla \bm q dV 4830fb1909eSJames Wright$$ 4840fb1909eSJames Wright 4850fb1909eSJames WrightThe shock capturing viscosity is implemented following the first formulation described in {cite}`tezduyar2007yzb`. The characteristic velocity $u_{cha}$ is taken to be the acoustic speed while the reference density $\rho_{ref}$ is just the local density. Shock capturing viscosity is defined by the following 4860fb1909eSJames Wright 4870fb1909eSJames Wright$$ 4880fb1909eSJames Wright\nu_{SHOCK} = \tau_{SHOCK} u_{cha}^2 4890fb1909eSJames Wright$$ 4900fb1909eSJames Wright 4910fb1909eSJames Wrightwhere, 4920fb1909eSJames Wright 4930fb1909eSJames Wright$$ 4940fb1909eSJames Wright\tau_{SHOCK} = \frac{h_{SHOCK}}{2u_{cha}} \left( \frac{ \,|\, \nabla \rho \,|\, h_{SHOCK}}{\rho_{ref}} \right)^{\beta} 4950fb1909eSJames Wright$$ 4960fb1909eSJames Wright 497*43f5052dSJames Wright$\beta$ is a tuning parameter set between 1 (smoother shocks) and 2 (sharper shocks). The parameter $h_{SHOCK}$ is a length scale that is proportional to the element length in the direction of the density gradient unit vector. This density gradient unit vector is defined as $\hat{\bm j} = \frac{\nabla \rho}{|\nabla \rho|}$. The original formulation of Tezduyar and Senga relies on the shape function gradient to define the element length scale, but this gradient is not available to qFunctions in libCEED. To avoid this problem, $h_{SHOCK}$ is defined in the current implementation as 4980fb1909eSJames Wright 4990fb1909eSJames Wright$$ 5000fb1909eSJames Wrighth_{SHOCK} = 2 \left( C_{YZB} \,|\, \bm p \,|\, \right)^{-1} 5010fb1909eSJames Wright$$ 5020fb1909eSJames Wright 5030fb1909eSJames Wrightwhere 5040fb1909eSJames Wright 5050fb1909eSJames Wright$$ 5060fb1909eSJames Wrightp_k = \hat{j}_i \frac{\partial \xi_i}{x_k} 5070fb1909eSJames Wright$$ 5080fb1909eSJames Wright 5090fb1909eSJames WrightThe constant $C_{YZB}$ is set to 0.1 for piecewise linear elements in the current implementation. Larger values approaching unity are expected with more robust stabilization and implicit timestepping. 5100fb1909eSJames Wright 5110fb1909eSJames Wright#### Running 5120fb1909eSJames Wright:::{list-table} Shock Tube Runtime Options 5130fb1909eSJames Wright:header-rows: 1 5140fb1909eSJames Wright 5150fb1909eSJames Wright* - Option 5160fb1909eSJames Wright - Description 5170fb1909eSJames Wright - Default value 5180fb1909eSJames Wright - Unit 5190fb1909eSJames Wright 5200fb1909eSJames Wright* - `-yzb` 5210fb1909eSJames Wright - Use YZB discontinuity capturing 5220fb1909eSJames Wright - `none` 5230fb1909eSJames Wright - 5240fb1909eSJames Wright 5250fb1909eSJames Wright* - `-stab` 5260fb1909eSJames Wright - Stabilization method (`none`, `su`, or `supg`) 5270fb1909eSJames Wright - `none` 5280fb1909eSJames Wright - 5290fb1909eSJames Wright::: 5300fb1909eSJames Wright 5310fb1909eSJames WrightThis problem can be run with: 5320fb1909eSJames Wright 5330fb1909eSJames Wright``` 5340fb1909eSJames 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 5350fb1909eSJames Wright``` 5360fb1909eSJames Wright 5370fb1909eSJames Wright(problem-advection)= 5380fb1909eSJames Wright## Advection-Diffusion 5390fb1909eSJames Wright 5400fb1909eSJames WrightThere is a reduced mode in HONEE for pure advection-diffusion, which holds density $\rho$ and momentum density $\rho \bm u$ constant while advecting "total energy density" $E$. 5410fb1909eSJames WrightThis reduced mode is given by 5420fb1909eSJames Wright 5430fb1909eSJames Wright$$ 5440fb1909eSJames Wright\frac{\partial E}{\partial t} + \nabla \cdot (\bm{u} E ) - \kappa \nabla E = 0 \, , 5450fb1909eSJames Wright$$ (eq-advection) 5460fb1909eSJames Wright 5470fb1909eSJames Wrightwith $\bm{u}$ the vector velocity field and $\kappa$ the diffusion coefficient. 5480fb1909eSJames Wright 5490fb1909eSJames Wright### Advection Field Options 5500fb1909eSJames WrightThere are three different definitions for $\bm{u}$: 5510fb1909eSJames Wright 5520fb1909eSJames Wright- **Rotation** 5530fb1909eSJames Wright 5540fb1909eSJames Wright A uniform circular velocity field transports the blob of total energy. 5550fb1909eSJames Wright We have solved {eq}`eq-advection` applying zero energy density $E$, and no-flux for $\bm{u}$ on the boundaries. 5560fb1909eSJames Wright 5570fb1909eSJames Wright- **Translation** 5580fb1909eSJames Wright 5590fb1909eSJames Wright In this case, a background wind with a constant rectilinear velocity field, enters the domain and transports the blob of total energy out of the domain. 5600fb1909eSJames Wright 5610fb1909eSJames Wright- **Boundary Layer** 5620fb1909eSJames Wright 5630fb1909eSJames Wright This case has a linear velocity profile with only the y component set: $u_y = y / L_y$. 5640fb1909eSJames Wright It starts at 0 for $y=0$ and then increases to 1 at the top of the domain. 5650fb1909eSJames Wright 5660fb1909eSJames Wright### Initial Condition options 5670fb1909eSJames WrightThere are also several different definitions for initial conditions. 5680fb1909eSJames WrightSome require specific advection profiles, other's can be used with multiple. 5690fb1909eSJames Wright- **Bubble (Sphere and Cylinder)** 5700fb1909eSJames Wright 5710fb1909eSJames Wright These are simple initial conditions with a controllable radius and center point. 5720fb1909eSJames Wright They use an magnitude of one within the bubble and zero outside and have different smoothing options for the boundary of the bubble with the rest of the domain. 5730fb1909eSJames Wright The difference between sphere and cylinder is whether the radius is applied in all 3 dimensions (sphere) or just in the x and y directions. 5740fb1909eSJames Wright 5750fb1909eSJames Wright- **Cosine Hill** 5760fb1909eSJames Wright 5770fb1909eSJames Wright This is similar to the bubble ICs, but uses a cosine wave to define the bubble and it's radius is set to half the width of the domain (so the bubble fills the entire domain). 5780fb1909eSJames Wright 5790fb1909eSJames Wright- **Skew** 5800fb1909eSJames Wright 5810fb1909eSJames Wright This IC is meant for for the translation advection profile only. 5820fb1909eSJames Wright This IC features a line discontinuity intersecting the midpoint of the lower edge of the box and in the same direction as the advection velocity 5830fb1909eSJames Wright The solution is either 0 or 1 on either side of the discontinuity. 5840fb1909eSJames Wright 5850fb1909eSJames Wright- **Wave** 5860fb1909eSJames Wright 5870fb1909eSJames Wright This IC is meant for for the translation advection profile only. 5880fb1909eSJames Wright This either a sine or square wave that oscillates in the direction of advection velocity. 5890fb1909eSJames Wright The frequency and phase of the wave is controllable. 5900fb1909eSJames Wright 5910fb1909eSJames Wright- **Boundary Layer** 5920fb1909eSJames Wright 5930fb1909eSJames Wright This IC is meant to be paired with the boundary layer advection profile. 5940fb1909eSJames Wright This initial condition features a linear profile in the y direction up to a height set by the user. 5950fb1909eSJames Wright 5960fb1909eSJames WrightFor the inflow boundary conditions, a prescribed $E_{wind}$ is applied weakly on the inflow boundaries such that the weak form boundary integral in {eq}`eq-weak-vector-ns` is defined as 5970fb1909eSJames Wright 5980fb1909eSJames Wright$$ 5990fb1909eSJames Wright\int_{\partial \Omega_{inflow}} \bm v \cdot \bm{F}(\bm q_N) \cdot \widehat{\bm{n}} \,dS = \int_{\partial \Omega_{inflow}} \bm v \, E_{wind} \, \bm u \cdot \widehat{\bm{n}} \,dS \, , 6000fb1909eSJames Wright$$ 6010fb1909eSJames Wright 6020fb1909eSJames WrightFor the outflow boundary conditions, we have used the current values of $E$, following {cite}`papanastasiou1992outflow` which extends the validity of the weak form of the governing equations to the outflow instead of replacing them with unknown essential or natural boundary conditions. 6030fb1909eSJames WrightThe weak form boundary integral in {eq}`eq-weak-vector-ns` for outflow boundary conditions is defined as 6040fb1909eSJames Wright 6050fb1909eSJames Wright$$ 6060fb1909eSJames Wright\int_{\partial \Omega_{outflow}} \bm v \cdot \bm{F}(\bm q_N) \cdot \widehat{\bm{n}} \,dS = \int_{\partial \Omega_{outflow}} \bm v \, E \, \bm u \cdot \widehat{\bm{n}} \,dS \, , 6070fb1909eSJames Wright$$ 6080fb1909eSJames Wright 6090fb1909eSJames WrightThe advection problems can be run in both 2D and 3D, based on the DM defined for the problem. 6100fb1909eSJames WrightThe following additional command-line options are available: 6110fb1909eSJames Wright 6120fb1909eSJames Wright### Running 6130fb1909eSJames Wright 6140fb1909eSJames Wright:::{list-table} Advection Runtime Options 6150fb1909eSJames Wright:header-rows: 1 6160fb1909eSJames Wright 6170fb1909eSJames Wright* - Option 6180fb1909eSJames Wright - Description 6190fb1909eSJames Wright - Default value 6200fb1909eSJames Wright - Unit 6210fb1909eSJames Wright 6220fb1909eSJames Wright* - `-strong_form` 6230fb1909eSJames Wright - Strong (1) or weak/integrated by parts (0) advection term of the residual 6240fb1909eSJames Wright - `0` 6250fb1909eSJames Wright - 6260fb1909eSJames Wright 6270fb1909eSJames Wright* - `-stab` 6280fb1909eSJames Wright - Stabilization method (`none`, `su`, or `supg`) 6290fb1909eSJames Wright - `none` 6300fb1909eSJames Wright - 6310fb1909eSJames Wright 6320fb1909eSJames Wright* - `-stab_tau` 6330fb1909eSJames Wright - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`) 6340fb1909eSJames Wright - `ctau` 6350fb1909eSJames Wright - 6360fb1909eSJames Wright 6370fb1909eSJames Wright* - `-Ctau_t` 6380fb1909eSJames Wright - Scaling factor on the temporal portion of the $\tau$ formulation 6390fb1909eSJames Wright - 0. 6400fb1909eSJames Wright - 6410fb1909eSJames Wright 6420fb1909eSJames Wright* - `-Ctau_a` 6430fb1909eSJames Wright - Scaling factor on the advection portion of the $\tau$ formulation 6440fb1909eSJames Wright - $P^2$ 6450fb1909eSJames Wright - 6460fb1909eSJames Wright 6470fb1909eSJames Wright* - `-Ctau_d` 6480fb1909eSJames Wright - Scaling factor on the diffusion portion of the $\tau$ formulation 6490fb1909eSJames Wright - $P^4$ 6500fb1909eSJames Wright - 6510fb1909eSJames Wright 6520fb1909eSJames Wright* - `-CtauS` 6530fb1909eSJames Wright - Scale coefficient for stabilization tau (nondimensional) 6540fb1909eSJames Wright - `0` 6550fb1909eSJames Wright - 6560fb1909eSJames Wright 6570fb1909eSJames Wright* - `-diffusion_coeff` 6580fb1909eSJames Wright - Diffusion coefficient 6590fb1909eSJames Wright - `0` 6600fb1909eSJames Wright - 6610fb1909eSJames Wright 6620fb1909eSJames Wright* - `-wind_type` 6630fb1909eSJames Wright - Wind type in Advection (`rotation`, `translation`, `boundary_layer`) 6640fb1909eSJames Wright - `rotation` 6650fb1909eSJames Wright - 6660fb1909eSJames Wright 6670fb1909eSJames Wright* - `-wind_translation` 6680fb1909eSJames Wright - Constant wind vector when `-wind_type translation` 6690fb1909eSJames Wright - `1,0,0` 6700fb1909eSJames Wright - 6710fb1909eSJames Wright 6720fb1909eSJames Wright* - `-E_wind` 6730fb1909eSJames Wright - Total energy of inflow wind when `-wind_type translation` 6740fb1909eSJames Wright - `1E6` 6750fb1909eSJames Wright - `J` 6760fb1909eSJames Wright 6770fb1909eSJames Wright* - `-advection_ic_type` 6780fb1909eSJames Wright - Initial condition type, (`sphere`, `cylinder`, `cosine_hill`, `skew`, `wave`, `boundary_layer`) 6790fb1909eSJames Wright - `sphere` 6800fb1909eSJames Wright - 6810fb1909eSJames Wright 6820fb1909eSJames Wright* - `-advection_ic_bubble_rc` 6830fb1909eSJames Wright - For `sphere` or `cylinder` IC, characteristic radius of thermal bubble 6840fb1909eSJames Wright - `1000` 6850fb1909eSJames Wright - `m` 6860fb1909eSJames Wright 6870fb1909eSJames Wright* - `-advection_ic_bubble_continuity` 6880fb1909eSJames Wright - For `sphere` or `cylinder` IC, different shapes of bubble, (`smooth`, `back_sharp`, `thick`, `cosine`) 6890fb1909eSJames Wright - `smooth` 6900fb1909eSJames Wright - 6910fb1909eSJames Wright 6920fb1909eSJames Wright* - `-advection_ic_wave_type` 6930fb1909eSJames Wright - For `wave` IC, the wave form used for `-advection_ic_type wave` (`sine`, `square`) 6940fb1909eSJames Wright - `sine` 6950fb1909eSJames Wright - 6960fb1909eSJames Wright 6970fb1909eSJames Wright* - `-advection_ic_wave_frequency` 6980fb1909eSJames Wright - For `wave` IC, frequency of the wave 6990fb1909eSJames Wright - $2\pi$ 7000fb1909eSJames Wright - `1/s` 7010fb1909eSJames Wright 7020fb1909eSJames Wright* - `-advection_ic_wave_phase` 7030fb1909eSJames Wright - For `wave` IC, phase angle of the wave 7040fb1909eSJames Wright - 0 7050fb1909eSJames Wright - 7060fb1909eSJames Wright 7070fb1909eSJames Wright* - `-advection_ic_bl_height_factor` 7080fb1909eSJames Wright - For `boundary_layer` IC, sets the height of the linear boundary layer initial condition in proportion to the domain height 7090fb1909eSJames Wright - 1 7100fb1909eSJames Wright - 7110fb1909eSJames Wright::: 7120fb1909eSJames Wright 7130fb1909eSJames WrightFor 3D advection, an example of the `rotation` mode can be run with: 7140fb1909eSJames Wright 7150fb1909eSJames Wright``` 7160fb1909eSJames Wright./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 7170fb1909eSJames Wright``` 7180fb1909eSJames Wright 7190fb1909eSJames Wrightand the `translation` mode with: 7200fb1909eSJames Wright 7210fb1909eSJames Wright``` 7220fb1909eSJames Wright./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 7230fb1909eSJames Wright``` 7240fb1909eSJames Wright 7250fb1909eSJames WrightFor 2D advection, an example of the `rotation` mode can be run with: 7260fb1909eSJames Wright 7270fb1909eSJames Wright``` 7280fb1909eSJames 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 7290fb1909eSJames Wright``` 7300fb1909eSJames Wright 7310fb1909eSJames Wrightand the `translation` mode with: 7320fb1909eSJames Wright 7330fb1909eSJames Wright``` 7340fb1909eSJames 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 7350fb1909eSJames Wright``` 7360fb1909eSJames WrightNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 7370fb1909eSJames Wright 7380fb1909eSJames Wright 7390fb1909eSJames WrightThe boundary layer problem can be run with: 7400fb1909eSJames Wright 7410fb1909eSJames Wright``` 7420fb1909eSJames Wright./build/navierstokes -options_file examples/advection_bl.yaml 7430fb1909eSJames Wright``` 7440fb1909eSJames Wright 7450fb1909eSJames Wright`examples/advection_bl.yaml`: 7460fb1909eSJames Wright```{literalinclude} ../examples/advection_bl.yaml 7470fb1909eSJames Wright:language: yaml 7480fb1909eSJames Wright``` 7490fb1909eSJames Wright 7500fb1909eSJames WrightThe wave advection problem can be run with: 7510fb1909eSJames Wright 7520fb1909eSJames Wright``` 7530fb1909eSJames Wright./build/navierstokes -options_file examples/advection_wave.yaml 7540fb1909eSJames Wright``` 7550fb1909eSJames Wright 7560fb1909eSJames Wright`examples/advection_wave.yaml`: 7570fb1909eSJames Wright```{literalinclude} ../examples/advection_wave.yaml 7580fb1909eSJames Wright:language: yaml 7590fb1909eSJames Wright``` 7600fb1909eSJames WrightNote that the wave frequency, velocity direction, and domain size are set specifically to allow bi-periodic boundary conditions. 761