1*0fb1909eSJames Wright# Examples 2*0fb1909eSJames Wright 3*0fb1909eSJames Wright## Compressible Navier-Stokes Equations 4*0fb1909eSJames Wright 5*0fb1909eSJames Wright### Gaussian Wave 6*0fb1909eSJames 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. 7*0fb1909eSJames Wright 8*0fb1909eSJames WrightThe problem has a perturbed initial condition and lets it evolve in time. The initial condition contains a Gaussian perturbation in the pressure field: 9*0fb1909eSJames Wright 10*0fb1909eSJames Wright$$ 11*0fb1909eSJames Wright\begin{aligned} 12*0fb1909eSJames Wright\rho &= \rho_\infty\left(1+A\exp\left(\frac{-(\bar{x}^2 + \bar{y}^2)}{2\sigma^2}\right)\right) \\ 13*0fb1909eSJames Wright\bm{U} &= \bm U_\infty \\ 14*0fb1909eSJames 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}, 15*0fb1909eSJames Wright\end{aligned} 16*0fb1909eSJames Wright$$ 17*0fb1909eSJames Wright 18*0fb1909eSJames 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)$. 19*0fb1909eSJames WrightThe simulation produces a strong acoustic wave and leaves behind a cold thermal bubble that advects at the fluid velocity. 20*0fb1909eSJames Wright 21*0fb1909eSJames 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. 22*0fb1909eSJames 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. 23*0fb1909eSJames Wright 24*0fb1909eSJames Wright#### Running 25*0fb1909eSJames Wright:::{list-table} Gaussian Wave Runtime Options 26*0fb1909eSJames Wright:header-rows: 1 27*0fb1909eSJames Wright 28*0fb1909eSJames Wright* - Option 29*0fb1909eSJames Wright - Description 30*0fb1909eSJames Wright - Default value 31*0fb1909eSJames Wright - Unit 32*0fb1909eSJames Wright 33*0fb1909eSJames Wright* - `-epicenter` 34*0fb1909eSJames Wright - Coordinates of center of perturbation 35*0fb1909eSJames Wright - `0,0,0` 36*0fb1909eSJames Wright - `m` 37*0fb1909eSJames Wright 38*0fb1909eSJames Wright* - `-amplitude` 39*0fb1909eSJames Wright - Amplitude of the perturbation 40*0fb1909eSJames Wright - `0.1` 41*0fb1909eSJames Wright - 42*0fb1909eSJames Wright 43*0fb1909eSJames Wright* - `-width` 44*0fb1909eSJames Wright - Width parameter of the perturbation 45*0fb1909eSJames Wright - `0.002` 46*0fb1909eSJames Wright - `m` 47*0fb1909eSJames Wright 48*0fb1909eSJames Wright::: 49*0fb1909eSJames Wright 50*0fb1909eSJames WrightThis problem can be run with the `examples/gaussianwave.yaml` file via: 51*0fb1909eSJames Wright 52*0fb1909eSJames Wright``` 53*0fb1909eSJames Wright./build/navierstokes -options_file examples/gaussianwave.yaml 54*0fb1909eSJames Wright``` 55*0fb1909eSJames Wright 56*0fb1909eSJames Wright`examples/gaussianwave.yaml`: 57*0fb1909eSJames Wright```{literalinclude} ../examples/gaussianwave.yaml 58*0fb1909eSJames Wright:language: yaml 59*0fb1909eSJames Wright``` 60*0fb1909eSJames Wright 61*0fb1909eSJames Wright### Vortex Shedding - Flow past Cylinder 62*0fb1909eSJames WrightThis test case, based on {cite}`shakib1991femcfd`, is an example of using an externally provided mesh from Gmsh. 63*0fb1909eSJames 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$. 64*0fb1909eSJames WrightWe solve this as a 3D problem with (default) one element in the $z$ direction. 65*0fb1909eSJames WrightThe domain is filled with an ideal gas at rest (zero velocity) with temperature 24.92 and pressure 7143. 66*0fb1909eSJames WrightThe viscosity is 0.01 and thermal conductivity is 14.34 to maintain a Prandtl number of 0.71, which is typical for air. 67*0fb1909eSJames 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$. 68*0fb1909eSJames 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). 69*0fb1909eSJames WrightThe cylinder wall is an adiabatic (no heat flux) no-slip boundary condition. 70*0fb1909eSJames 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. 71*0fb1909eSJames Wright 72*0fb1909eSJames WrightThe Gmsh input file, `examples/meshes/cylinder.geo` is parametrized to facilitate experimenting with similar configurations. 73*0fb1909eSJames WrightThe Strouhal number (nondimensional shedding frequency) is sensitive to the size of the computational domain and boundary conditions. 74*0fb1909eSJames Wright 75*0fb1909eSJames WrightForces on the cylinder walls are computed using the "reaction force" method, which is variationally consistent with the volume operator. 76*0fb1909eSJames 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 77*0fb1909eSJames Wright 78*0fb1909eSJames Wright$$ 79*0fb1909eSJames Wright\begin{aligned} 80*0fb1909eSJames WrightC_L &= \frac{2 F_y}{\rho_\infty u_\infty^2 S} \\ 81*0fb1909eSJames WrightC_D &= \frac{2 F_x}{\rho_\infty u_\infty^2 S} \\ 82*0fb1909eSJames Wright\end{aligned} 83*0fb1909eSJames Wright$$ 84*0fb1909eSJames Wright 85*0fb1909eSJames Wrightwhere $\rho_\infty, u_\infty$ are the freestream (inflow) density and velocity respectively. 86*0fb1909eSJames Wright 87*0fb1909eSJames Wright#### Running 88*0fb1909eSJames Wright 89*0fb1909eSJames WrightThe initial condition is taken from `-reference_temperature` and `-reference_pressure`. 90*0fb1909eSJames WrightTo run this problem, first generate a mesh: 91*0fb1909eSJames Wright 92*0fb1909eSJames Wright```console 93*0fb1909eSJames Wright$ make -C examples/meshes 94*0fb1909eSJames Wright``` 95*0fb1909eSJames Wright 96*0fb1909eSJames WrightThen run by building the executable and running: 97*0fb1909eSJames Wright 98*0fb1909eSJames Wright```console 99*0fb1909eSJames Wright$ make -j 100*0fb1909eSJames Wright$ mpiexec -n 6 build/navierstokes -options_file examples/vortexshedding.yaml 101*0fb1909eSJames Wright``` 102*0fb1909eSJames Wright 103*0fb1909eSJames WrightThe vortex shedding period is roughly 5.6 and this problem runs until time 100 (2000 time steps). 104*0fb1909eSJames 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. 105*0fb1909eSJames Wright 106*0fb1909eSJames Wright```console 107*0fb1909eSJames Wright$ python postprocess/vortexshedding.py 108*0fb1909eSJames Wright``` 109*0fb1909eSJames Wright 110*0fb1909eSJames Wright`examples/vortexshedding.yaml`: 111*0fb1909eSJames Wright```{literalinclude} ../examples/vortexshedding.yaml 112*0fb1909eSJames Wright:language: yaml 113*0fb1909eSJames Wright``` 114*0fb1909eSJames Wright 115*0fb1909eSJames Wright(example-density-current)= 116*0fb1909eSJames Wright### Density Current 117*0fb1909eSJames Wright 118*0fb1909eSJames 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. 119*0fb1909eSJames 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 120*0fb1909eSJames Wright 121*0fb1909eSJames Wright$$ 122*0fb1909eSJames 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} 123*0fb1909eSJames Wright$$ 124*0fb1909eSJames Wright 125*0fb1909eSJames Wrightwhere $P_0$ is the atmospheric pressure. 126*0fb1909eSJames WrightFor this problem, we have used no-slip and non-penetration boundary conditions for $\bm{u}$, and no-flux for mass and energy densities. 127*0fb1909eSJames Wright 128*0fb1909eSJames Wright#### Running 129*0fb1909eSJames Wright 130*0fb1909eSJames Wright:::{list-table} Density Current Runtime Options 131*0fb1909eSJames Wright:header-rows: 1 132*0fb1909eSJames Wright 133*0fb1909eSJames Wright* - Option 134*0fb1909eSJames Wright - Description 135*0fb1909eSJames Wright - Default value 136*0fb1909eSJames Wright - Unit 137*0fb1909eSJames Wright 138*0fb1909eSJames Wright* - `-center` 139*0fb1909eSJames Wright - Location of bubble center 140*0fb1909eSJames Wright - `(lx,ly,lz)/2` 141*0fb1909eSJames Wright - `(m,m,m)` 142*0fb1909eSJames Wright 143*0fb1909eSJames Wright* - `-dc_axis` 144*0fb1909eSJames Wright - Axis of density current cylindrical anomaly, or `(0,0,0)` for spherically symmetric 145*0fb1909eSJames Wright - `(0,0,0)` 146*0fb1909eSJames Wright - 147*0fb1909eSJames Wright 148*0fb1909eSJames Wright* - `-rc` 149*0fb1909eSJames Wright - Characteristic radius of thermal bubble 150*0fb1909eSJames Wright - `1000` 151*0fb1909eSJames Wright - `m` 152*0fb1909eSJames Wright 153*0fb1909eSJames Wright* - `-theta0` 154*0fb1909eSJames Wright - Reference potential temperature 155*0fb1909eSJames Wright - `300` 156*0fb1909eSJames Wright - `K` 157*0fb1909eSJames Wright 158*0fb1909eSJames Wright* - `-thetaC` 159*0fb1909eSJames Wright - Perturbation of potential temperature 160*0fb1909eSJames Wright - `-15` 161*0fb1909eSJames Wright - `K` 162*0fb1909eSJames Wright 163*0fb1909eSJames Wright* - `-P0` 164*0fb1909eSJames Wright - Atmospheric pressure 165*0fb1909eSJames Wright - `1E5` 166*0fb1909eSJames Wright - `Pa` 167*0fb1909eSJames Wright 168*0fb1909eSJames Wright* - `-N` 169*0fb1909eSJames Wright - Brunt-Vaisala frequency 170*0fb1909eSJames Wright - `0.01` 171*0fb1909eSJames Wright - `1/s` 172*0fb1909eSJames Wright::: 173*0fb1909eSJames Wright 174*0fb1909eSJames WrightThis example can be run with: 175*0fb1909eSJames Wright 176*0fb1909eSJames Wright``` 177*0fb1909eSJames 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 178*0fb1909eSJames Wright``` 179*0fb1909eSJames Wright 180*0fb1909eSJames Wright### Channel 181*0fb1909eSJames Wright 182*0fb1909eSJames WrightA compressible channel flow. Analytical solution given in 183*0fb1909eSJames Wright{cite}`whitingStabilizedFEM1999`: 184*0fb1909eSJames Wright 185*0fb1909eSJames Wright$$ u_1 = u_{\max} \left [ 1 - \left ( \frac{x_2}{H}\right)^2 \right] \quad \quad u_2 = u_3 = 0$$ 186*0fb1909eSJames Wright$$T = T_w \left [ 1 + \frac{Pr \hat{E}c}{3} \left \{1 - \left(\frac{x_2}{H}\right)^4 \right \} \right]$$ 187*0fb1909eSJames Wright$$p = p_0 - \frac{2\rho_0 u_{\max}^2 x_1}{Re_H H}$$ 188*0fb1909eSJames Wright 189*0fb1909eSJames 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. 190*0fb1909eSJames Wright 191*0fb1909eSJames WrightBoundary conditions are periodic in the streamwise direction, and no-slip and non-penetration boundary conditions at the walls. 192*0fb1909eSJames WrightThe flow is driven by a body force determined analytically from the fluid properties and setup parameters $H$ and $u_{\max}$. 193*0fb1909eSJames Wright 194*0fb1909eSJames Wright#### Running 195*0fb1909eSJames Wright 196*0fb1909eSJames Wright:::{list-table} Channel Runtime Options 197*0fb1909eSJames Wright:header-rows: 1 198*0fb1909eSJames Wright 199*0fb1909eSJames Wright* - Option 200*0fb1909eSJames Wright - Description 201*0fb1909eSJames Wright - Default value 202*0fb1909eSJames Wright - Unit 203*0fb1909eSJames Wright 204*0fb1909eSJames Wright* - `-umax` 205*0fb1909eSJames Wright - Maximum/centerline velocity of the flow 206*0fb1909eSJames Wright - `10` 207*0fb1909eSJames Wright - `m/s` 208*0fb1909eSJames Wright 209*0fb1909eSJames Wright* - `-theta0` 210*0fb1909eSJames Wright - Reference potential temperature 211*0fb1909eSJames Wright - `300` 212*0fb1909eSJames Wright - `K` 213*0fb1909eSJames Wright 214*0fb1909eSJames Wright* - `-P0` 215*0fb1909eSJames Wright - Atmospheric pressure 216*0fb1909eSJames Wright - `1E5` 217*0fb1909eSJames Wright - `Pa` 218*0fb1909eSJames Wright 219*0fb1909eSJames Wright* - `-body_force_scale` 220*0fb1909eSJames Wright - Multiplier for body force (`-1` for flow reversal) 221*0fb1909eSJames Wright - 1 222*0fb1909eSJames Wright - 223*0fb1909eSJames Wright::: 224*0fb1909eSJames Wright 225*0fb1909eSJames WrightThis problem can be run with the `examples/channel.yaml` file via: 226*0fb1909eSJames Wright 227*0fb1909eSJames Wright``` 228*0fb1909eSJames Wright./build/navierstokes -options_file examples/channel.yaml 229*0fb1909eSJames Wright``` 230*0fb1909eSJames Wright`examples/channel.yaml:` 231*0fb1909eSJames Wright```{literalinclude} ../examples/channel.yaml 232*0fb1909eSJames Wright:language: yaml 233*0fb1909eSJames Wright``` 234*0fb1909eSJames Wright 235*0fb1909eSJames Wright### Flat Plate Boundary Layer 236*0fb1909eSJames Wright 237*0fb1909eSJames Wright#### Meshing 238*0fb1909eSJames Wright 239*0fb1909eSJames WrightThe flat plate boundary layer example has custom meshing features to better resolve the flow when using a generated box mesh. 240*0fb1909eSJames WrightThese meshing features modify the nodal layout of the default, equispaced box mesh and are enabled via `-mesh_transform platemesh`. 241*0fb1909eSJames WrightOne of those is tilting the top of the domain, allowing for it to be a outflow boundary condition. 242*0fb1909eSJames WrightThe angle of this tilt is controlled by `-platemesh_top_angle`. 243*0fb1909eSJames Wright 244*0fb1909eSJames WrightThe primary meshing feature is the ability to grade the mesh, providing better resolution near the wall. 245*0fb1909eSJames WrightThere are two methods to do this; algorithmically, or specifying the node locations via a file. 246*0fb1909eSJames 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. 247*0fb1909eSJames WrightNodes are placed such that `-platemesh_Ndelta` elements are within `-platemesh_refine_height` of the wall. 248*0fb1909eSJames WrightThey are placed such that the element height matches a geometric growth ratio defined by `-platemesh_growth`. 249*0fb1909eSJames WrightThe remaining elements are then distributed from `-platemesh_refine_height` to the top of the domain linearly in logarithmic space. 250*0fb1909eSJames Wright 251*0fb1909eSJames WrightAlternatively, a file may be specified containing the locations of each node. 252*0fb1909eSJames WrightThe file should be newline delimited, with the first line specifying the number of points and the rest being the locations of the nodes. 253*0fb1909eSJames WrightThe node locations used exactly at the inlet (assumed to be $\min(x)$) and linearly stretched/squeezed to match the slanted top boundary condition. 254*0fb1909eSJames WrightThe file is specified via `-platemesh_y_node_locs_path`. 255*0fb1909eSJames WrightIf this flag is given an empty string, then the algorithmic approach will be performed. 256*0fb1909eSJames Wright 257*0fb1909eSJames Wright:::{list-table} Boundary Layer Meshing Runtime Options 258*0fb1909eSJames Wright:header-rows: 1 259*0fb1909eSJames Wright 260*0fb1909eSJames Wright* - Option 261*0fb1909eSJames Wright - Description 262*0fb1909eSJames Wright - Default value 263*0fb1909eSJames Wright - Unit 264*0fb1909eSJames Wright 265*0fb1909eSJames Wright* - `-platemesh_modify_mesh` 266*0fb1909eSJames Wright - Whether to modify the mesh using the given options below. 267*0fb1909eSJames Wright - `false` 268*0fb1909eSJames Wright - 269*0fb1909eSJames Wright 270*0fb1909eSJames Wright* - `-platemesh_refine_height` 271*0fb1909eSJames Wright - Height at which `-platemesh_Ndelta` number of elements should refined into 272*0fb1909eSJames Wright - `5.9E-4` 273*0fb1909eSJames Wright - `m` 274*0fb1909eSJames Wright 275*0fb1909eSJames Wright* - `-platemesh_Ndelta` 276*0fb1909eSJames Wright - Number of elements to keep below `-platemesh_refine_height` 277*0fb1909eSJames Wright - `45` 278*0fb1909eSJames Wright - 279*0fb1909eSJames Wright 280*0fb1909eSJames Wright* - `-platemesh_growth` 281*0fb1909eSJames Wright - Growth rate of the elements in the refinement region 282*0fb1909eSJames Wright - `1.08` 283*0fb1909eSJames Wright - 284*0fb1909eSJames Wright 285*0fb1909eSJames Wright* - `-platemesh_top_angle` 286*0fb1909eSJames Wright - Downward angle of the top face of the domain. This face serves as an outlet. 287*0fb1909eSJames Wright - `5` 288*0fb1909eSJames Wright - `degrees` 289*0fb1909eSJames Wright 290*0fb1909eSJames Wright* - `-platemesh_y_node_locs_path` 291*0fb1909eSJames Wright - Path to file with y node locations. If empty, will use mesh warping instead. 292*0fb1909eSJames Wright - `""` 293*0fb1909eSJames Wright - 294*0fb1909eSJames Wright::: 295*0fb1909eSJames Wright 296*0fb1909eSJames Wright(example-blasius)= 297*0fb1909eSJames Wright#### Laminar Boundary Layer - Blasius 298*0fb1909eSJames Wright 299*0fb1909eSJames 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). 300*0fb1909eSJames WrightAt the inflow, the velocity is prescribed by the Blasius soution profile, density is set constant, and temperature is allowed to float. 301*0fb1909eSJames WrightUsing `weakT: true`, density is allowed to float and temperature is set constant. 302*0fb1909eSJames 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). 303*0fb1909eSJames WrightThe wall is a no-slip, no-penetration, no-heat flux condition. 304*0fb1909eSJames 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. 305*0fb1909eSJames Wright 306*0fb1909eSJames Wright#### Running 307*0fb1909eSJames Wright:::{list-table} Blasius Runtime Options 308*0fb1909eSJames Wright:header-rows: 1 309*0fb1909eSJames Wright 310*0fb1909eSJames Wright* - Option 311*0fb1909eSJames Wright - Description 312*0fb1909eSJames Wright - Default value 313*0fb1909eSJames Wright - Unit 314*0fb1909eSJames Wright 315*0fb1909eSJames Wright* - `-velocity_infinity` 316*0fb1909eSJames Wright - Freestream velocity 317*0fb1909eSJames Wright - `40` 318*0fb1909eSJames Wright - `m/s` 319*0fb1909eSJames Wright 320*0fb1909eSJames Wright* - `-temperature_infinity` 321*0fb1909eSJames Wright - Freestream temperature 322*0fb1909eSJames Wright - `288` 323*0fb1909eSJames Wright - `K` 324*0fb1909eSJames Wright 325*0fb1909eSJames Wright* - `-pressure_infinity` 326*0fb1909eSJames Wright - Atmospheric pressure, also sets IDL reference pressure 327*0fb1909eSJames Wright - `1.01E5` 328*0fb1909eSJames Wright - `Pa` 329*0fb1909eSJames Wright 330*0fb1909eSJames Wright* - `-temperature_wall` 331*0fb1909eSJames Wright - Wall temperature 332*0fb1909eSJames Wright - `288` 333*0fb1909eSJames Wright - `K` 334*0fb1909eSJames Wright 335*0fb1909eSJames Wright* - `-delta0` 336*0fb1909eSJames Wright - Boundary layer height at the inflow 337*0fb1909eSJames Wright - `4.2e-3` 338*0fb1909eSJames Wright - `m` 339*0fb1909eSJames Wright 340*0fb1909eSJames Wright* - `-n_chebyshev` 341*0fb1909eSJames Wright - Number of Chebyshev terms 342*0fb1909eSJames Wright - `20` 343*0fb1909eSJames Wright - 344*0fb1909eSJames Wright 345*0fb1909eSJames Wright* - `-chebyshev_` 346*0fb1909eSJames Wright - Prefix for Chebyshev snes solve 347*0fb1909eSJames Wright - 348*0fb1909eSJames Wright - 349*0fb1909eSJames Wright::: 350*0fb1909eSJames Wright 351*0fb1909eSJames WrightThis problem can be run with the `examples/blasius.yaml` file via: 352*0fb1909eSJames Wright 353*0fb1909eSJames Wright``` 354*0fb1909eSJames Wright./build/navierstokes -options_file examples/blasius.yaml 355*0fb1909eSJames Wright``` 356*0fb1909eSJames Wright 357*0fb1909eSJames Wright`examples/blasius.yaml`: 358*0fb1909eSJames Wright```{literalinclude} ../examples/blasius.yaml 359*0fb1909eSJames Wright:language: yaml 360*0fb1909eSJames Wright``` 361*0fb1909eSJames Wright 362*0fb1909eSJames Wright#### Turbulent Boundary Layer 363*0fb1909eSJames Wright 364*0fb1909eSJames WrightSimulating a turbulent boundary layer without modeling the turbulence requires resolving the turbulent flow structures. 365*0fb1909eSJames 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. 366*0fb1909eSJames WrightThe latter approach has been taken here, specifically using a *synthetic turbulence generation* (STG) method. 367*0fb1909eSJames WrightSee {ref}`bc-stg` for details on STG. 368*0fb1909eSJames Wright 369*0fb1909eSJames Wright#### Running 370*0fb1909eSJames WrightThis problem can be run with the `examples/blasius.yaml` file via: 371*0fb1909eSJames Wright 372*0fb1909eSJames Wright``` 373*0fb1909eSJames Wright./build/navierstokes -options_file examples/blasius.yaml -stg_use true 374*0fb1909eSJames Wright``` 375*0fb1909eSJames Wright 376*0fb1909eSJames WrightNote the added `-stg_use true` flag 377*0fb1909eSJames WrightThis overrides the `stg: use: false` setting in the `examples/blasius.yaml` file, enabling the use of the STG inflow. 378*0fb1909eSJames Wright 379*0fb1909eSJames Wright### Taylor-Green Vortex 380*0fb1909eSJames Wright 381*0fb1909eSJames WrightThis problem is really just an initial condition, the [Taylor-Green Vortex](https://en.wikipedia.org/wiki/Taylor%E2%80%93Green_vortex): 382*0fb1909eSJames Wright 383*0fb1909eSJames Wright$$ 384*0fb1909eSJames Wright\begin{aligned} 385*0fb1909eSJames Wrightu &= V_0 \sin(\hat x) \cos(\hat y) \sin(\hat z) \\ 386*0fb1909eSJames Wrightv &= -V_0 \cos(\hat x) \sin(\hat y) \sin(\hat z) \\ 387*0fb1909eSJames Wrightw &= 0 \\ 388*0fb1909eSJames 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) \\ 389*0fb1909eSJames Wright\rho &= \frac{p}{R T_0} \\ 390*0fb1909eSJames Wright\end{aligned} 391*0fb1909eSJames Wright$$ 392*0fb1909eSJames Wright 393*0fb1909eSJames Wrightwhere $\hat x = 2 \pi x / L$ for $L$ the length of the domain in that specific direction. 394*0fb1909eSJames WrightThis coordinate modification is done to transform a given grid onto a domain of $x,y,z \in [0, 2\pi)$. 395*0fb1909eSJames Wright 396*0fb1909eSJames WrightThis initial condition is traditionally given for the incompressible Navier-Stokes equations. 397*0fb1909eSJames WrightThe reference state is selected using the `-reference_{velocity,pressure,temperature}` flags (Euclidean norm of `-reference_velocity` is used for $V_0$). 398*0fb1909eSJames Wright 399*0fb1909eSJames Wright## Compressible Euler Equations 400*0fb1909eSJames Wright 401*0fb1909eSJames Wright(problem-euler-vortex)= 402*0fb1909eSJames Wright 403*0fb1909eSJames Wright### Isentropic Vortex 404*0fb1909eSJames Wright 405*0fb1909eSJames 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 406*0fb1909eSJames Wright 407*0fb1909eSJames Wright$$ 408*0fb1909eSJames Wright\begin{aligned} 409*0fb1909eSJames Wright\frac{\partial \rho}{\partial t} + \nabla \cdot \bm{U} &= 0 \\ 410*0fb1909eSJames Wright\frac{\partial \bm{U}}{\partial t} + \nabla \cdot \left( \frac{\bm{U} \otimes \bm{U}}{\rho} + P \bm{I}_3 \right) &= 0 \\ 411*0fb1909eSJames Wright\frac{\partial E}{\partial t} + \nabla \cdot \left( \frac{(E + P)\bm{U}}{\rho} \right) &= 0 \, , \\ 412*0fb1909eSJames Wright\end{aligned} 413*0fb1909eSJames Wright$$ (eq-euler) 414*0fb1909eSJames Wright 415*0fb1909eSJames 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 416*0fb1909eSJames Wright 417*0fb1909eSJames Wright$$ 418*0fb1909eSJames 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} 419*0fb1909eSJames Wright$$ 420*0fb1909eSJames Wright 421*0fb1909eSJames 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). 422*0fb1909eSJames WrightThere is no perturbation in the entropy $S=P/\rho^\gamma$ ($\delta S=0)$. 423*0fb1909eSJames Wright 424*0fb1909eSJames Wright#### Running 425*0fb1909eSJames Wright:::{list-table} Isentropic Vortex Runtime Options 426*0fb1909eSJames Wright:header-rows: 1 427*0fb1909eSJames Wright 428*0fb1909eSJames Wright* - Option 429*0fb1909eSJames Wright - Description 430*0fb1909eSJames Wright - Default value 431*0fb1909eSJames Wright - Unit 432*0fb1909eSJames Wright 433*0fb1909eSJames Wright* - `-center` 434*0fb1909eSJames Wright - Location of vortex center 435*0fb1909eSJames Wright - `(lx,ly,lz)/2` 436*0fb1909eSJames Wright - `(m,m,m)` 437*0fb1909eSJames Wright 438*0fb1909eSJames Wright* - `-mean_velocity` 439*0fb1909eSJames Wright - Background velocity vector 440*0fb1909eSJames Wright - `(1,1,0)` 441*0fb1909eSJames Wright - 442*0fb1909eSJames Wright 443*0fb1909eSJames Wright* - `-vortex_strength` 444*0fb1909eSJames Wright - Strength of vortex < 10 445*0fb1909eSJames Wright - `5` 446*0fb1909eSJames Wright - 447*0fb1909eSJames Wright 448*0fb1909eSJames Wright* - `-c_tau` 449*0fb1909eSJames Wright - Stabilization constant 450*0fb1909eSJames Wright - `0.5` 451*0fb1909eSJames Wright - 452*0fb1909eSJames Wright::: 453*0fb1909eSJames Wright 454*0fb1909eSJames WrightThis problem can be run with: 455*0fb1909eSJames Wright 456*0fb1909eSJames Wright``` 457*0fb1909eSJames 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. 458*0fb1909eSJames Wright``` 459*0fb1909eSJames Wright 460*0fb1909eSJames Wright(problem-shock-tube)= 461*0fb1909eSJames Wright### Shock Tube 462*0fb1909eSJames Wright 463*0fb1909eSJames 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. 464*0fb1909eSJames Wright 465*0fb1909eSJames 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 466*0fb1909eSJames Wright 467*0fb1909eSJames Wright$$ 468*0fb1909eSJames Wright\int_{\Omega} \nu_{SHOCK} \nabla \bm v \!:\! \nabla \bm q dV 469*0fb1909eSJames Wright$$ 470*0fb1909eSJames Wright 471*0fb1909eSJames 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 472*0fb1909eSJames Wright 473*0fb1909eSJames Wright$$ 474*0fb1909eSJames Wright\nu_{SHOCK} = \tau_{SHOCK} u_{cha}^2 475*0fb1909eSJames Wright$$ 476*0fb1909eSJames Wright 477*0fb1909eSJames Wrightwhere, 478*0fb1909eSJames Wright 479*0fb1909eSJames Wright$$ 480*0fb1909eSJames Wright\tau_{SHOCK} = \frac{h_{SHOCK}}{2u_{cha}} \left( \frac{ \,|\, \nabla \rho \,|\, h_{SHOCK}}{\rho_{ref}} \right)^{\beta} 481*0fb1909eSJames Wright$$ 482*0fb1909eSJames Wright 483*0fb1909eSJames 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 484*0fb1909eSJames Wright 485*0fb1909eSJames Wright$$ 486*0fb1909eSJames Wrighth_{SHOCK} = 2 \left( C_{YZB} \,|\, \bm p \,|\, \right)^{-1} 487*0fb1909eSJames Wright$$ 488*0fb1909eSJames Wright 489*0fb1909eSJames Wrightwhere 490*0fb1909eSJames Wright 491*0fb1909eSJames Wright$$ 492*0fb1909eSJames Wrightp_k = \hat{j}_i \frac{\partial \xi_i}{x_k} 493*0fb1909eSJames Wright$$ 494*0fb1909eSJames Wright 495*0fb1909eSJames 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. 496*0fb1909eSJames Wright 497*0fb1909eSJames Wright#### Running 498*0fb1909eSJames Wright:::{list-table} Shock Tube Runtime Options 499*0fb1909eSJames Wright:header-rows: 1 500*0fb1909eSJames Wright 501*0fb1909eSJames Wright* - Option 502*0fb1909eSJames Wright - Description 503*0fb1909eSJames Wright - Default value 504*0fb1909eSJames Wright - Unit 505*0fb1909eSJames Wright 506*0fb1909eSJames Wright* - `-yzb` 507*0fb1909eSJames Wright - Use YZB discontinuity capturing 508*0fb1909eSJames Wright - `none` 509*0fb1909eSJames Wright - 510*0fb1909eSJames Wright 511*0fb1909eSJames Wright* - `-stab` 512*0fb1909eSJames Wright - Stabilization method (`none`, `su`, or `supg`) 513*0fb1909eSJames Wright - `none` 514*0fb1909eSJames Wright - 515*0fb1909eSJames Wright::: 516*0fb1909eSJames Wright 517*0fb1909eSJames WrightThis problem can be run with: 518*0fb1909eSJames Wright 519*0fb1909eSJames Wright``` 520*0fb1909eSJames 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 521*0fb1909eSJames Wright``` 522*0fb1909eSJames Wright 523*0fb1909eSJames Wright(problem-advection)= 524*0fb1909eSJames Wright## Advection-Diffusion 525*0fb1909eSJames Wright 526*0fb1909eSJames 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$. 527*0fb1909eSJames WrightThis reduced mode is given by 528*0fb1909eSJames Wright 529*0fb1909eSJames Wright$$ 530*0fb1909eSJames Wright\frac{\partial E}{\partial t} + \nabla \cdot (\bm{u} E ) - \kappa \nabla E = 0 \, , 531*0fb1909eSJames Wright$$ (eq-advection) 532*0fb1909eSJames Wright 533*0fb1909eSJames Wrightwith $\bm{u}$ the vector velocity field and $\kappa$ the diffusion coefficient. 534*0fb1909eSJames Wright 535*0fb1909eSJames Wright### Advection Field Options 536*0fb1909eSJames WrightThere are three different definitions for $\bm{u}$: 537*0fb1909eSJames Wright 538*0fb1909eSJames Wright- **Rotation** 539*0fb1909eSJames Wright 540*0fb1909eSJames Wright A uniform circular velocity field transports the blob of total energy. 541*0fb1909eSJames Wright We have solved {eq}`eq-advection` applying zero energy density $E$, and no-flux for $\bm{u}$ on the boundaries. 542*0fb1909eSJames Wright 543*0fb1909eSJames Wright- **Translation** 544*0fb1909eSJames Wright 545*0fb1909eSJames 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. 546*0fb1909eSJames Wright 547*0fb1909eSJames Wright- **Boundary Layer** 548*0fb1909eSJames Wright 549*0fb1909eSJames Wright This case has a linear velocity profile with only the y component set: $u_y = y / L_y$. 550*0fb1909eSJames Wright It starts at 0 for $y=0$ and then increases to 1 at the top of the domain. 551*0fb1909eSJames Wright 552*0fb1909eSJames Wright### Initial Condition options 553*0fb1909eSJames WrightThere are also several different definitions for initial conditions. 554*0fb1909eSJames WrightSome require specific advection profiles, other's can be used with multiple. 555*0fb1909eSJames Wright- **Bubble (Sphere and Cylinder)** 556*0fb1909eSJames Wright 557*0fb1909eSJames Wright These are simple initial conditions with a controllable radius and center point. 558*0fb1909eSJames 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. 559*0fb1909eSJames 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. 560*0fb1909eSJames Wright 561*0fb1909eSJames Wright- **Cosine Hill** 562*0fb1909eSJames Wright 563*0fb1909eSJames 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). 564*0fb1909eSJames Wright 565*0fb1909eSJames Wright- **Skew** 566*0fb1909eSJames Wright 567*0fb1909eSJames Wright This IC is meant for for the translation advection profile only. 568*0fb1909eSJames 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 569*0fb1909eSJames Wright The solution is either 0 or 1 on either side of the discontinuity. 570*0fb1909eSJames Wright 571*0fb1909eSJames Wright- **Wave** 572*0fb1909eSJames Wright 573*0fb1909eSJames Wright This IC is meant for for the translation advection profile only. 574*0fb1909eSJames Wright This either a sine or square wave that oscillates in the direction of advection velocity. 575*0fb1909eSJames Wright The frequency and phase of the wave is controllable. 576*0fb1909eSJames Wright 577*0fb1909eSJames Wright- **Boundary Layer** 578*0fb1909eSJames Wright 579*0fb1909eSJames Wright This IC is meant to be paired with the boundary layer advection profile. 580*0fb1909eSJames Wright This initial condition features a linear profile in the y direction up to a height set by the user. 581*0fb1909eSJames Wright 582*0fb1909eSJames 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 583*0fb1909eSJames Wright 584*0fb1909eSJames Wright$$ 585*0fb1909eSJames 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 \, , 586*0fb1909eSJames Wright$$ 587*0fb1909eSJames Wright 588*0fb1909eSJames 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. 589*0fb1909eSJames WrightThe weak form boundary integral in {eq}`eq-weak-vector-ns` for outflow boundary conditions is defined as 590*0fb1909eSJames Wright 591*0fb1909eSJames Wright$$ 592*0fb1909eSJames 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 \, , 593*0fb1909eSJames Wright$$ 594*0fb1909eSJames Wright 595*0fb1909eSJames WrightThe advection problems can be run in both 2D and 3D, based on the DM defined for the problem. 596*0fb1909eSJames WrightThe following additional command-line options are available: 597*0fb1909eSJames Wright 598*0fb1909eSJames Wright### Running 599*0fb1909eSJames Wright 600*0fb1909eSJames Wright:::{list-table} Advection Runtime Options 601*0fb1909eSJames Wright:header-rows: 1 602*0fb1909eSJames Wright 603*0fb1909eSJames Wright* - Option 604*0fb1909eSJames Wright - Description 605*0fb1909eSJames Wright - Default value 606*0fb1909eSJames Wright - Unit 607*0fb1909eSJames Wright 608*0fb1909eSJames Wright* - `-strong_form` 609*0fb1909eSJames Wright - Strong (1) or weak/integrated by parts (0) advection term of the residual 610*0fb1909eSJames Wright - `0` 611*0fb1909eSJames Wright - 612*0fb1909eSJames Wright 613*0fb1909eSJames Wright* - `-stab` 614*0fb1909eSJames Wright - Stabilization method (`none`, `su`, or `supg`) 615*0fb1909eSJames Wright - `none` 616*0fb1909eSJames Wright - 617*0fb1909eSJames Wright 618*0fb1909eSJames Wright* - `-stab_tau` 619*0fb1909eSJames Wright - Formulation for $\tau$ in stabilization (`ctau`, `advdiff_shakib`) 620*0fb1909eSJames Wright - `ctau` 621*0fb1909eSJames Wright - 622*0fb1909eSJames Wright 623*0fb1909eSJames Wright* - `-Ctau_t` 624*0fb1909eSJames Wright - Scaling factor on the temporal portion of the $\tau$ formulation 625*0fb1909eSJames Wright - 0. 626*0fb1909eSJames Wright - 627*0fb1909eSJames Wright 628*0fb1909eSJames Wright* - `-Ctau_a` 629*0fb1909eSJames Wright - Scaling factor on the advection portion of the $\tau$ formulation 630*0fb1909eSJames Wright - $P^2$ 631*0fb1909eSJames Wright - 632*0fb1909eSJames Wright 633*0fb1909eSJames Wright* - `-Ctau_d` 634*0fb1909eSJames Wright - Scaling factor on the diffusion portion of the $\tau$ formulation 635*0fb1909eSJames Wright - $P^4$ 636*0fb1909eSJames Wright - 637*0fb1909eSJames Wright 638*0fb1909eSJames Wright* - `-CtauS` 639*0fb1909eSJames Wright - Scale coefficient for stabilization tau (nondimensional) 640*0fb1909eSJames Wright - `0` 641*0fb1909eSJames Wright - 642*0fb1909eSJames Wright 643*0fb1909eSJames Wright* - `-diffusion_coeff` 644*0fb1909eSJames Wright - Diffusion coefficient 645*0fb1909eSJames Wright - `0` 646*0fb1909eSJames Wright - 647*0fb1909eSJames Wright 648*0fb1909eSJames Wright* - `-wind_type` 649*0fb1909eSJames Wright - Wind type in Advection (`rotation`, `translation`, `boundary_layer`) 650*0fb1909eSJames Wright - `rotation` 651*0fb1909eSJames Wright - 652*0fb1909eSJames Wright 653*0fb1909eSJames Wright* - `-wind_translation` 654*0fb1909eSJames Wright - Constant wind vector when `-wind_type translation` 655*0fb1909eSJames Wright - `1,0,0` 656*0fb1909eSJames Wright - 657*0fb1909eSJames Wright 658*0fb1909eSJames Wright* - `-E_wind` 659*0fb1909eSJames Wright - Total energy of inflow wind when `-wind_type translation` 660*0fb1909eSJames Wright - `1E6` 661*0fb1909eSJames Wright - `J` 662*0fb1909eSJames Wright 663*0fb1909eSJames Wright* - `-advection_ic_type` 664*0fb1909eSJames Wright - Initial condition type, (`sphere`, `cylinder`, `cosine_hill`, `skew`, `wave`, `boundary_layer`) 665*0fb1909eSJames Wright - `sphere` 666*0fb1909eSJames Wright - 667*0fb1909eSJames Wright 668*0fb1909eSJames Wright* - `-advection_ic_bubble_rc` 669*0fb1909eSJames Wright - For `sphere` or `cylinder` IC, characteristic radius of thermal bubble 670*0fb1909eSJames Wright - `1000` 671*0fb1909eSJames Wright - `m` 672*0fb1909eSJames Wright 673*0fb1909eSJames Wright* - `-advection_ic_bubble_continuity` 674*0fb1909eSJames Wright - For `sphere` or `cylinder` IC, different shapes of bubble, (`smooth`, `back_sharp`, `thick`, `cosine`) 675*0fb1909eSJames Wright - `smooth` 676*0fb1909eSJames Wright - 677*0fb1909eSJames Wright 678*0fb1909eSJames Wright* - `-advection_ic_wave_type` 679*0fb1909eSJames Wright - For `wave` IC, the wave form used for `-advection_ic_type wave` (`sine`, `square`) 680*0fb1909eSJames Wright - `sine` 681*0fb1909eSJames Wright - 682*0fb1909eSJames Wright 683*0fb1909eSJames Wright* - `-advection_ic_wave_frequency` 684*0fb1909eSJames Wright - For `wave` IC, frequency of the wave 685*0fb1909eSJames Wright - $2\pi$ 686*0fb1909eSJames Wright - `1/s` 687*0fb1909eSJames Wright 688*0fb1909eSJames Wright* - `-advection_ic_wave_phase` 689*0fb1909eSJames Wright - For `wave` IC, phase angle of the wave 690*0fb1909eSJames Wright - 0 691*0fb1909eSJames Wright - 692*0fb1909eSJames Wright 693*0fb1909eSJames Wright* - `-advection_ic_bl_height_factor` 694*0fb1909eSJames Wright - For `boundary_layer` IC, sets the height of the linear boundary layer initial condition in proportion to the domain height 695*0fb1909eSJames Wright - 1 696*0fb1909eSJames Wright - 697*0fb1909eSJames Wright::: 698*0fb1909eSJames Wright 699*0fb1909eSJames WrightFor 3D advection, an example of the `rotation` mode can be run with: 700*0fb1909eSJames Wright 701*0fb1909eSJames Wright``` 702*0fb1909eSJames 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 703*0fb1909eSJames Wright``` 704*0fb1909eSJames Wright 705*0fb1909eSJames Wrightand the `translation` mode with: 706*0fb1909eSJames Wright 707*0fb1909eSJames Wright``` 708*0fb1909eSJames 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 709*0fb1909eSJames Wright``` 710*0fb1909eSJames Wright 711*0fb1909eSJames WrightFor 2D advection, an example of the `rotation` mode can be run with: 712*0fb1909eSJames Wright 713*0fb1909eSJames Wright``` 714*0fb1909eSJames 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 715*0fb1909eSJames Wright``` 716*0fb1909eSJames Wright 717*0fb1909eSJames Wrightand the `translation` mode with: 718*0fb1909eSJames Wright 719*0fb1909eSJames Wright``` 720*0fb1909eSJames 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 721*0fb1909eSJames Wright``` 722*0fb1909eSJames WrightNote the lengths in `-dm_plex_box_upper` are given in meters, and will be nondimensionalized according to `-units_meter`. 723*0fb1909eSJames Wright 724*0fb1909eSJames Wright 725*0fb1909eSJames WrightThe boundary layer problem can be run with: 726*0fb1909eSJames Wright 727*0fb1909eSJames Wright``` 728*0fb1909eSJames Wright./build/navierstokes -options_file examples/advection_bl.yaml 729*0fb1909eSJames Wright``` 730*0fb1909eSJames Wright 731*0fb1909eSJames Wright`examples/advection_bl.yaml`: 732*0fb1909eSJames Wright```{literalinclude} ../examples/advection_bl.yaml 733*0fb1909eSJames Wright:language: yaml 734*0fb1909eSJames Wright``` 735*0fb1909eSJames Wright 736*0fb1909eSJames WrightThe wave advection problem can be run with: 737*0fb1909eSJames Wright 738*0fb1909eSJames Wright``` 739*0fb1909eSJames Wright./build/navierstokes -options_file examples/advection_wave.yaml 740*0fb1909eSJames Wright``` 741*0fb1909eSJames Wright 742*0fb1909eSJames Wright`examples/advection_wave.yaml`: 743*0fb1909eSJames Wright```{literalinclude} ../examples/advection_wave.yaml 744*0fb1909eSJames Wright:language: yaml 745*0fb1909eSJames Wright``` 746*0fb1909eSJames WrightNote that the wave frequency, velocity direction, and domain size are set specifically to allow bi-periodic boundary conditions. 747