(bc_outlet)= # Outlet The flow outlet is mostly defined through a periodic or Neumann based boundary condition as those described below: (bc_periodic)= ## Periodic Periodic boundaries can be seen as the most basic to be implemented in LBM since they only consist of performing the streaming operation such that it crosses the computational domain back to its opposite side, as illustrated below. ```{figure} /_static/img/theory/LBM/periodic.svg --- align: center width: 50 % --- ``` (bc_neumann)= ## Neumann Neumann forces the normal derivative of all populations to be zero at the boundary. To implement that, the boundary nodes replicate the macroscopic values from the first node towards normal direction. ```{admonition} Use case Neumann can be used for representation of open surfaces, which could be an outlet or free lateral surfaces of a open flow. ``` ```{note} Plain Neumann lets the density float at the boundary, which keeps it flexible but does not guarantee a stable domain-average density. The regularized Neumann variant below trades that flexibility for a fixed outlet pressure. ``` ## Regularized Neumann (Outlet) An alternative that uses the Neumann BC framework to represent a free surface boundary consists of fixing a pressure through regularization of populations post application of Neumann BC: $$ \rho\left(\mathbf{x}_{\mathrm{out}}\right) = \rho_{\mathrm{cte}} $$ ```{warning} Fixing the pressure assumes the macroscopics are nearly uniform across the outlet plane. Place the regularized Neumann outlet far from wakes, separation, or any region of high pressure gradient. Sitting it inside a steep gradient imposes a wrong pressure on the flow, contaminating the solution upstream. ``` ```{figure} /_static/img/theory/LBM/outlet_placement.svg --- align: center width: 65 % --- Outlet placement for the regularized Neumann condition. Placed far downstream where the wake has recovered and the pressure is nearly uniform (top), fixing the outlet pressure is harmless. Placed inside the wake where the pressure still varies across the plane (bottom), imposing a uniform pressure is wrong and the error propagates upstream. ``` % Additionally, a null stress tensor can be defined for the Neumann BC if :math:`a_{\alpha_{1}\alpha_{2}}^{(2),\mathrm{neq}}` is calculated as: % .. math:: % a_{\alpha_{1}\alpha_{2}}^{(2),\mathrm{neq}} = -\frac{1}{c_{s}^{2}}\frac{\Delta t}{2}\left(F_{\alpha}u_{\beta}+F_{\beta}u_{\alpha}\right) % :label: bc_neumann_a2s0 ````{only} internal ```{important} Neumann has some peculiarities with the AA memory scheme, specially regularized. When running regularized Neumann in different walls with different order, Outlet should *always* run after Slip. Also, take care when regularizing multiple walls in sequence. It's recommended to run a simple case comparing AA and AB with the BC configuration to check whether there will be instability or not. One trivial way to resolve order problems is setting the corners and vertices to Neumann without regularization. These problems are mainly because Neumann is not local, which may cause undesired interactions between pack/unpack and the BC. ``` ````