Macroscopic variables¶
Description¶
macro_variables computes, at every fluid node, the density \(\rho\) (array m0) and the velocity \(\mathbf{u}\)
(array m1) from the distribution functions:
\[
\rho = \sum_{i=0}^{Q-1} f_i,
\qquad
\rho\,\mathbf{u} = \sum_{i=0}^{Q-1} f_i\,\mathbf{e}_i + \frac{1}{2}\,\mathbf{F}_{LBM}
\]
where \(\mathbf{e}_i = (e_{x,i}, e_{y,i}, e_{z,i})\) are the lattice velocities and \(\mathbf{F}_{LBM}\) the body force in lattice units (half-force correction). The velocity is only normalized when \(\rho > 10^{-14}\). The velocity of the solid nodes is set to zero.
YAML syntax¶
macro_variables has no user parameter; it reads Params (from lbm_parameters). It is the default of the
compute_macro_variables hook:
Info
macro_variables_couette_relax replaces it when the Couette relaxation force is used (see
Couette Driving Force).