set_distribution¶
Description¶
Sets every distribution function to the rest state of a lattice density value:
\[
f_i = w_i \cdot \texttt{value}, \qquad \rho_{LBM} = \texttt{value}, \qquad \mathbf{u} = 0,
\]
on the whole grid, in an axis-aligned box (bounds) or inside a quadric (quadrics + transform).
Warning
value is a lattice density: value: 1.5 is a 50 % over-density, i.e. a very large pressure jump. To impose
a physical pressure perturbation independent of the time step, use set_dp_pressure.
YAML syntax¶
Parameters' description
| Slot | Type | Default | Description |
|---|---|---|---|
value |
double |
1.0 |
lattice density of the rest state |
do_update |
bool |
false |
if true, operates on the real nodes only and updates the ghost layers; otherwise applies to all nodes including the ghost layers |
bounds |
AABB |
optional | restricts the initialization to this box |
quadrics |
Mat4d |
optional | quadric shape restricting the initialized region |
transform |
Mat4d |
optional | sequence of scale / translate transforms applied to the quadric |
Usage example¶
High-density region driving a flow (lbm_diff_pressure)
See the pressure-driven flow tutorial.