************ Macroscopics ************ Through a Chapman-Enskog expansion :footcite:`chapman1970mathematical` it is possible to recover the following macroscopic balance equations from LBE: .. math:: &\partial_t\rho + \partial_\alpha\left( \rho u_\alpha \right) = 0 \\ &\partial_t\left(\rho u_\alpha\right) + \partial_\beta\left(\rho u_\alpha u_\beta\right) = - \partial_\alpha p + \partial_\beta\left[\eta\left(\partial_\alpha u_\beta + \partial_\beta u_\alpha\right)\right] + F_\alpha :label: baleqs such that the fluid's dynamic viscosity can be related to LBM mesoscopic variables as: .. math:: \eta = \rho c_s^2\Delta t\left(\frac{1}{\omega} - \frac{1}{2}\right) :label: visc .. important:: The continuity and Navier-Stokes equations are recovered when the Mach number :math:`u_{\mathrm{max}}/ c_s` is smaller than 0.3, which means that the maximum velocity must be controlled. The macroscopics such as density :math:`\rho`, and velocity are also recovered from the populations moments, which are: .. math:: \sum_{i=0}^{q-1}f_{i}=\rho, :label: macr_fmom_1st .. math:: \sum_{i=0}^{q-1}f_{i}c_{i,\alpha}=\rho u_{\alpha}-\frac{\Delta t}{2}F_{\alpha}, :label: macr_fmom_2nd We also define the second-order moment of non-equilibrium populations: .. math:: \Pi_{\alpha\beta}^{\mathrm{neq}} = f_{i}^{\mathrm{neq}}c_{i\alpha}c_{i\beta} :label: pi_neq and the rate-of-strain is computed from the second-order moment of non-equilibrium populations: .. math:: S_{\alpha\beta} = - \frac{\omega}{2 \rho c_s^2 \Delta t} \left[ \Pi_{\alpha\beta}^{\mathrm{neq}} + \frac{\Delta t}{2}\left( F_\alpha u_\beta + F_\beta u_\alpha \right) \right] :label: strain In return, the the second-order moment of non-equilibrium populations :math:`\Pi_{\alpha\beta}^{\mathrm{neq}}` can be calculated from the rate-of-strain tensor with: .. math:: \Pi_{\alpha\beta}^{\mathrm{neq}} = - \frac{2 \rho c_s^2 \Delta t}{\omega}S_{\alpha\beta} - \frac{\Delta t}{2}\left( F_\alpha u_\beta + F_\beta u_\alpha \right) :label: pineqfromstrain .. footbibliography::