.. _bc_inlet: ===== Inlet ===== The inlet of a flow is usually defined by a pressure gradient or a imposed velocity, the BCs most frequently used to represent this kind of boundary are described below: ---------------- Uniform Velocity ---------------- This boundary condition forces an uniform velocity and pressure profile. Its implementation consists on setting the populations to its equilibrium fixing velocity and pressure values. .. math:: f_{\bar{i}}\left(t+\Delta t\right)=f_{i}^{\mathrm{eq}}\left(\rho,\mathbf{u}\right) :label: uniform_velocity .. admonition:: Use Case Uniform velocity is used to assure a constant velocity and density inlet, which increases the simulation stability and allows for the calculation of the pressure coefficient. .. _bc_synthetic_eddy_method: --------------------- Synthetic Eddy Method --------------------- The synthetic eddy method (SEM) builds a turbulent inlet with transient aspect, it was first introduced by :footcite:t:`jarrin2006synthetic` and presented in an LBM framework by :footcite:t:`buffa2021lattice`. It requires the user to provide the flow average velocity profile :math:`\bar{u}_{\alpha}` and Reynolds stress tensor :math:`R_{\alpha\beta}` associated to the desired turbulent intensity :math:`\left\{I_{u},I_{v},I_{w}\right\}`. That way, it is possible to reproduce atmospheric boundary layer profiles at inlet. .. note:: The input data for the SEM can be obtained from experimental wind tunnel data or by performing a precursor simulation that reproduces a wind tunnel configuration necessary to generate the wind profile of the desired terrain category. In the SEM, :math:`N` synthetic eddies are distributed in random positions :math:`\left\{x_{i},y_{i}z_{i}\right\}` in a virtual domain as illustrated below: .. figure:: /_static/img/theory/BC/schematic_sem.svg :width: 60 % :align: center The variable :math:`L` is a representative length scale provided as input data that represents the radius of influence of each eddy. That way, the interval to which eddies will be distributed in :math:`x` is :math:`\left[-L,L\right]`, in :math:`y` is :math:`\left[0-L,n_{y}+L\right]`, and in :math:`z` is :math:`\left[0-L,n_{z}+L\right]`. The inlet of the simulation domain is then given by the velocity field in the plane :math:`x=0`. There, the velocity is given by: .. math:: u_{\alpha}\left(0,y,z\right) = \bar{u}_{\alpha}\left(z\right) + {u}'_{\alpha}\left(0,y,z,t\right) :label: bc_velocity_profile where :math:`u'` is a fluctuation velocity responsible to provide turbulent intensity at inlet, this vector field is calculated as: .. math:: u'_{\alpha}\left(x,y,z,t\right)=A_{\alpha\beta}\left(z\right)\tilde{u}_{\beta}\left(x,y,z,t\right) :label: bc_fluctuation velocity in which, :math:`A_{\alpha\beta}` is the Cholesky decomposition of the prescribed Reynolds stress tensor with a user defined scaling factor :math:`K`, introduced by :footcite:t:`buffa2021lattice` as a tunning parameter for turbulent intensity: .. math:: A_{\alpha\beta} = K\left( \begin{matrix} \sqrt{R_{11}} & 0 & 0 \\ R_{21}/A_{11} & \sqrt{R_{22}-A_{21}^{2}} & 0 \\ R_{31}/A_{11} & \left(R_{32}-A_{21}A_{31}/A_{22}\right) & \sqrt{R_{33}-A_{31}^{2}-A_{32}^{2}} \end{matrix} \right) :label: bc_cholesky and :math:`\tilde{u}_{\alpha\beta}` is given by: .. math:: \tilde u_{\beta}\left(x,y,z,t\right) = \frac{1}{\sqrt{N_{\mathrm{eff}}}}\sum_{i=1}^{N}\epsilon_{i\beta}f\left(\frac{x-x_{i}}{L}\right)f\left(\frac{y-y_{i}}{L}\right)f\left(\frac{z-z_{i}}{L}\right) :label: bc_tilde_velocity where :math:`N_{\mathrm{eff}}` is the effective number of vortices acting at a domain position, considering :math:`L` as a radius of acting. It can be calculated with: .. math:: N_{\mathrm{eff}} = \left(\frac{N}{2L\left(n_{y}+2L\right)\left(n_{z}+2L\right)}\right)\frac{4}{3}\pi L^{3} :label: effective_n Where :math:`n_{y}` and :math:`n_{z}` are the domain size in :math:`y` and :math:`z`. .. note:: The use of :math:`N_{\mathrm{eff}}` is an adjustment developed in the current solver, in :footcite:t:`buffa2021lattice` the value :math:`N` is used instead. The function :math:`f\left(x\right)` is a gaussian function: .. math:: f\left(x\right)=2\mathrm{exp}\left(\frac{-1}{2\left(0.225\right)^{2}}x^{2}\right) :label: bc_gaussian The tensor :math:`\epsilon_{\alpha\beta}\left[N:3\right]` is composed of random signs -1 or 1 for the directions of each eddy. The evolution of inlet boundary occurs through the displacement of the eddies positions. They move alongside flow direction with the average inlet velocity :math:`U_{\infty}`, hence: .. math:: x_{i}\left(t+\Delta t\right) = x_{i}\left(t\right) + U_{\infty}\Delta t :label: bc_displacement When :math:`x_{i}\left(t+\Delta t\right)>L` the positions :math:`y_{i}` and :math:`z_{i}` are randomized along with :math:`\epsilon_{i\beta}`. At direction :math:`x`, periodicity is adopted, so when :math:`x_{i}\left(t+\Delta t\right)>L`, the new :math:`x_{i}` position will be :math:`x_{i}\left(t+\Delta t\right)-2L`. The average flow velocity :math:`U_{\infty}` is given by: .. math:: U_{\infty}=\frac{1}{n_{z}}\int_{0}^{n_{z}}\bar{u}\left(z\right)dz :label: bc_avg_velocity Following the above approach, it is possible to produce a transient velocity field whose statistics return the input data of average velocity and Reynolds stress tensor. Knowing the velocity field at :math:`x`, the rate-of-strain :math:`S_{\alpha\beta}` is calculated through a finite difference scheme and the density is assumed constant :math:`\rho=\rho_{0}`. such that :math:`\partial \rho/ \partial \mathbf{n}=0`. For the obtained :math:`S_{\alpha\beta}`, the SGS viscosity can be calculated and from all known macroscopic variables, the populations at inlet can be built within the LBM framework. .. note:: In finite volume methods is also found formulations to which :math:`\partial \rho/ \partial \mathbf{n}=0`, however as reported by :footcite:t:`buffa2021lattice`, the LBM is related to a weakly compressible flow, and a purely solenoidal inlet condition is not appropriate. Hence, the density perturbations at the inlet must be freeze to minimize the radiated noise. .. footbibliography::