.. _bc_outlet: ===== Inlet ===== 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 :width: 50 % :align: center .. _bc_neumann: ------- Neumann ------- Neumann forces a normal derivative of all populations must 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. ---------------------------- Regularized Neumann (Outlet) ---------------------------- An alternative to use the Neumann BC framework for representation of a free surface boundary consists on fixing a pressure through regularization of populations post application of Neumann BC: .. math:: \rho\left(\mathbf{x}_{\mathrm{out}}\right) = \rho_{\mathrm{cte}} .. 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 peculirities 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 wheter 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.