277 | 277 | }}} |
278 | 278 | that is calculated at interior grid points next to the outlet at the preceding time step for each velocity component. If the transport velocity, calculated by means of the equation for the transport velocity, is outside the range ''0 ≤ U,,ui,, ≤ '''Δ'''/Δt'', it is set to the respective threshold value that is exceeded. Because this local determination of ''U,,ui,,'' can show high variations in case of complex turbulent flows, it is averaged laterally to the direction of the outflow, so that it varies only in the vertical direction. Alternatively, the transport velocity can be set to the upper threshold value (''U,,ui,, = '''Δ'''/Δt'') for the entire outlet. Both equations mentioned in this section are discretized using an upstream method following [#miller1981 Miller and Thorpe (1981)]. As the radiation boundary condition does not ensure conservation of mass, a mass flux correction can be applied at the outlet (see [wiki:/doc/tec/noncyclic#Massfluxcorrection mass flux correction]). For more information about the outflow boundary see Sect. [wiki:/doc/tec/noncyclic#Outflowboundary outflow boundary]. |
| 279 | |
| 280 | |
| 281 | == Synthetic Turbulence Generator == |
| 282 | Since r2259 a synthetic turbulence generator is implemented in PALM to generate a turbulent inflow condition. The method is based on the work of [#xie2008 Xie and Castro (2008)] and [#kim2013 Kim et al. (2013)]. Unscaled turbulent motions ''u,,*i,,'' are calculated via a statistical method based on length scales along each direction and scaled with an amplitude tensor ''a,,ij,,'' based on a prescribed Reynolds stress tensor. The calculated turbulence is then added to a fixed mean profile ''U,,i,,'' at the inflow boundary: |
| 283 | {{{ |
| 284 | #!Latex |
| 285 | \begin{equation*} |
| 286 | u_i = U_i + a_{ij} u_{*j}. |
| 287 | \end{equation*} |
| 288 | }}} |
| 289 | |
| 290 | The amplitude tensor ''a,,ij,,'' depends on the Reynolds stress tensor ''R,,ij,,'' and is calculated using a Cholesky decomposition as suggested by [#lund1998 Lund et al. (1998)]. The unscaled turbulent motions ''u,,*i,,'', which are calculated on the 2D inflow plane, depend on the prescribed time scales ''T'' and length scales ''L'': |
| 291 | {{{ |
| 292 | #!Latex |
| 293 | \begin{equation*} |
| 294 | u_{*i}(t+\Delta t) = u_{*i}(t) \exp\left(-\dfrac{C\Delta t}{T}\right) + \Psi_i(t,L)\left[1-\exp\left(-\dfrac{2C\Delta t}{T}\right)\right]^{0.5}, |
| 295 | \end{equation*} |
| 296 | }}} |
| 297 | where ''Ψ'' denotes a part of the generated 2D signal which is correlated in space using ''L'' along the vertical and spanwise direction. Correlation along streamwise direction is assured via the time scale ''T'' which is estimated by ''L'' along streamwise direction and ''U''. |
| 298 | |
| 299 | After adding the turbulence to the mean inflow profiles, a mass flux correction suggested by [#kim2013 Kim et al. (2013)] is performed: |
| 300 | {{{ |
| 301 | #!Latex |
| 302 | \begin{equation*} |
| 303 | u_{i,corrected} = \dfrac{U_{b,prescribed}}{U_b} u_i, |
| 304 | \end{equation*} |
| 305 | }}} |
| 306 | where |
| 307 | {{{ |
| 308 | #!Latex |
| 309 | \begin{equation*} |
| 310 | U_{b} = \dfrac{\int_S dS u_n}{S}, |
| 311 | \end{equation*} |
| 312 | }}} |
| 313 | where ''u,,i,corrected,,'' is the corrected wind velocity at the inflow boundary, ''U,,b,,'' and ''U,,b,prescribed,,'' the instantaneous and prescribed bulk velocity at the inflow boundary, ''S'' the surface area of the inflow boundary, and ''u,,n,,'' the component of ''u,,i,,'' normal to the inflow boundary. |
| 314 | |
| 315 | Although the method does provide correlated turbulence, it only generates statistical correlation. Large coherent structures like a hexagonal pattern produced by convection cannot be covered by this method. So far, turbulence is only added to the three wind components. No perturbations are added to the subgrid-scale turbulent-kinetic energy and potential temperature. |
| 316 | |
| 317 | To use the method, an input file containing all necessary profiles needs to be provided (see[attachment:stg_iprf example file]) as well as setting the namelist parameter ''use_synthetic_turbulence_generator'' to ''True'' within namelist ''stg_par''. Be sure that the input file is added to the list of input files in your ''.palm.iofiles'' like so: |
| 318 | {{{ |
| 319 | VERTICAL_PROF in:locopt d3#:d3r $base_data/$fname/INPUT _iprf |
| 320 | }}} |
| 321 | and named with the suffix ''_iprf'' in your ''INPUT'' directory. |