Collision¶
The collision model is selected with the collision hook:
Both models add the same body-force term after the relaxation:
BGK¶
Description¶
The Bhatnagar-Gross-Krook (BGK) model relaxes every distribution function towards the local equilibrium with a single relaxation time \(\tau\):
with \(w_i\) the lattice weights and \(\tau\) the relaxation time of lbm_parameters. Simple and efficient, it is the
default model.
YAML syntax¶
No parameter: bgk reads Params (from lbm_parameters).
MRT¶
Description¶
The Multiple-Relaxation-Time (MRT) model (D'Humières et al., 2002 [6]) transforms the 19 distribution functions into 19 moments \(m_k\) (density, energy \(e\), energy square \(\varepsilon\), momentum \(\mathbf{j}\), energy flux \(\mathbf{q}\), stress \(p_{xx}, p_{ww}, p_{xy}, p_{yz}, p_{xz}\), stress square \(\pi_{xx}, \pi_{ww}\), third-order moments \(m_x, m_y, m_z\)), relaxes each moment towards its equilibrium with its own rate, and transforms back:
The density and the momentum are conserved. The equilibrium moments are the moments of the BGK equilibrium:
The stress moments relax with \(1/\tau\), which fixes the same viscosity as BGK, \(\nu_{LBM} = (\tau - 1/2)/3\). The other rates are user-defined:
| Slot | Moments | Default |
|---|---|---|
s_e |
energy \(e\) | 1.19 |
s_eps |
energy square \(\varepsilon\) | 1.4 |
s_q |
energy flux \(q_x, q_y, q_z\) | 1.2 |
s_pi |
stress square \(\pi_{xx}, \pi_{ww}\) | 1.4 |
s_m |
third order \(m_x, m_y, m_z\) | 1.98 |
| — | stress \(p_{xx}, p_{ww}, p_{xy}, p_{yz}, p_{xz}\) | \(1/\tau\) |
Because the equilibrium moments are those of the BGK equilibrium, the rest state and the BGK equilibrium are fixed points of the MRT collision, and MRT with all rates equal to \(1/\tau\) is exactly BGK. MRT is more stable than BGK at high Reynolds numbers or for \(\tau\) close to \(1/2\), at the cost of a heavier kernel.
YAML syntax¶
Usage example¶
MRT equivalent to BGK (regression test regression_lbm_couette_mrt_bgk_equiv)
With nuth: 1e-2 on a 30³ grid of 0.1 m, \(\tau = 9.5\): all the rates are set to \(1/\tau = 0.10526315789473684\).
collision:
- mrt:
s_e: 0.10526315789473684
s_eps: 0.10526315789473684
s_q: 0.10526315789473684
s_pi: 0.10526315789473684
s_m: 0.10526315789473684
See the Couette flow tutorial for a BGK / MRT comparison.
Info
bgk_couette_relax replaces bgk when the Couette relaxation force is used (see
Couette Driving Force).