(theory_inflow)= # Turbulent inflow A turbulence-resolving simulation is only as trustworthy as the flow it is fed. For an attached internal flow the inlet can often be a quiet, uniform stream, but for the bluff-body and atmospheric-boundary-layer (ABL) problems Nassu targets the inflow itself carries the turbulence that drives the answer, and reproducing it faithfully is the first physical problem to solve, before any geometry is meshed. This chapter collects the inlet-turbulence methods Nassu provides and the precursor machinery that feeds them. The plain, non-turbulent velocity inlet lives instead with the other lattice-Boltzmann boundary conditions (see {ref}`bc_inlet`). (inflow_turbulence_problem)= ## The inlet turbulence problem In computational wind engineering the inlet is rarely a quiet, uniform stream. A building, a bridge or a stadium sits inside the atmospheric boundary layer (ABL), the lowest part of the atmosphere where friction with the ground shears the wind into a velocity profile that grows with height and is laced with turbulence. Wind loads, pedestrian comfort and pollutant dispersion all depend on that turbulence, so the simulation is only as trustworthy as the wind it is fed. Getting the inlet right is therefore the first physical problem to solve, before any geometry is meshed. What makes it hard is that a realistic ABL inflow has to satisfy several statistical targets at once: - the **mean velocity profile** $\bar{u}\left(z\right)$, which over flat homogeneous terrain follows a logarithmic law set by the friction velocity and the aerodynamic roughness length $z_{0}$ {footcite:t}`asmuth2021wall`; - the **turbulence intensity** profile $I_{\alpha}\left(z\right)=\sigma_{\alpha}/\bar{u}$, which measures how strong the fluctuations are relative to the mean and which decreases with height; - the **integral length scales** $L_{\alpha}\left(z\right)$, the typical size of the energy-carrying eddies, which control the gust structure that drives dynamic wind loads; - the **spectra**, that is how the fluctuation energy is distributed across frequencies, classically described for the ABL by the von Karman spectral form (after the isotropic-turbulence theory of {footcite:t}`vonkarman1948progress`) and the Kaimal surface-layer spectrum {footcite:t}`kaimal1972spectral`. These targets are coupled, and meeting all of them simultaneously is the heart of the difficulty. A second, equally important, difficulty is *persistence*. Simply adding random noise to a mean profile does not work: uncorrelated noise carries no coherent eddies, so it dissipates within a short distance and the flow re-laminarises long before it reaches the model {footcite:t}`jarrin2006synthetic`. Realistic inflow turbulence must be spatially and temporally correlated so that it survives the journey from the inlet to the region of interest. (inflow_terrain_roughness)= ## Terrain roughness and the ground boundary condition For an atmospheric boundary layer the mean part of the inflow is not free to be anything. Over flat, homogeneous terrain the mean wind follows the logarithmic law of the wall, $$ \bar{u}\left(z\right) = \frac{u^{*}}{\kappa}\ln\left(\frac{z}{z_{0}}\right), $$ set by the friction velocity $u^{*}$, the von Karman constant $\kappa$, and the aerodynamic roughness length $z_{0}$ {footcite:t}`asmuth2021wall`. The roughness length is the single number that encodes the terrain: it is the height at which the extrapolated profile reaches zero mean velocity, growing from the order of $10^{-3}\,\mathrm{m}$ over open sea, through open farmland, to the order of $1\,\mathrm{m}$ over suburban and dense urban terrain. Wind-engineering standards group terrains into categories, each with a representative $z_{0}$ {footcite:t}`en2005eurocode,kozmar2012physical`. The same $z_{0}$ also sets the shape of the turbulence-intensity and length-scale profiles, so choosing a terrain category fixes the whole statistical target the inflow must reproduce. ```{figure} /_static/img/theory/inflow/abl_log_profiles.svg --- align: center width: 70 % --- The logarithmic ABL mean profile for increasing terrain roughness. The roughness length $z_{0}$ is the single number that encodes the terrain category, from open sea to dense urban; it sets the height at which the extrapolated profile reaches zero and fixes the whole statistical target the inflow must reproduce. ``` The point that is easy to miss is that the inlet is only half of the boundary condition. An ABL is sustained by the shear the ground exerts on the flow, and in the simulation that shear is supplied by the wall model on the floor, parametrised by the very same roughness length $z_{0}$ (see the {ref}`log-law wall function ` and the broader {ref}`wall model `). The inlet prescribes the profile; the ground regenerates it at every step downstream. If the two disagree, the boundary layer is not in equilibrium with its floor and the profile drifts over the fetch, so the flow that arrives at the model is no longer the terrain category that was specified. ```{admonition} The inlet and the ground are one boundary condition --- class: important --- An ABL inflow is a *pair*: the mean profile, turbulence intensity and length scales prescribed at the inlet, and the wall stress imposed at the ground by the log-law wall model. Both are governed by the same roughness length $z_{0}$, so a terrain category must be set consistently on both. Match them and the logarithmic profile is in equilibrium and self-sustains across the domain; mismatch them and the boundary layer re-adjusts to the floor, drifting away from the target profile before it reaches the region of interest. The worked mapping from $z_{0}$ to the terrain profile is in the {ref}`Atmospheric Boundary Layer ` validation case. ``` ```{figure} /_static/img/theory/inflow/inlet_ground_pairing.svg --- align: center width: 65 % --- An ABL inflow is a pair of boundary conditions. The inlet prescribes the mean profile and turbulence statistics; the ground regenerates them through the log-law wall model. Both are governed by the same roughness length $z_{0}$. Match them and the profile is in equilibrium and self-sustains; mismatch them and it drifts toward the floor condition before reaching the region of interest. ``` ```{admonition} Taxonomy of inflow methods Inflow-generation techniques fall into a few families, and it helps to place them before reading the rest of this chapter: - **Synthetic-eddy methods** build the fluctuation field from a population of advected eddies whose statistics are tuned to a target Reynolds-stress tensor {footcite:t}`jarrin2006synthetic,buffa2021lattice`. They are cheap and prescribe single-point statistics directly. - **Spectral methods** synthesise the fluctuations directly in frequency space from target spectra and spatial coherence, giving fine control over the gust content. - **Precursor recycling** runs an auxiliary periodic simulation alongside the main one and feeds its developed turbulence back to the inlet plane every step. - **Precursor replay** runs the auxiliary simulation once, stores a compressed representation of its developed turbulence, and plays it back as the inlet of later simulations. The families trade cost against fidelity: synthetic and spectral methods are inexpensive but reproduce only the statistics they are told to match, while precursor approaches carry the full physics of a developed flow at a higher storage or runtime cost. Nassu provides two of these: the {ref}`bc_synthetic_eddy_method` (SEM), the workhorse for ABL inflow, and {ref}`PODFS ` precursor replay. Both are fed by the same {ref}`precursor ` machinery. ``` The pages that follow cover each method in turn, then the precursor simulation that produces the statistics and recordings they consume. ```{eval-rst} .. footbibliography:: ``` ```{toctree} --- caption: Turbulent inflow hidden: true maxdepth: 1 --- Synthetic eddy method PODFS precursor replay Precursor simulation ```