Initial Conditions¶
Before the first time step, initialize sets every distribution function to the rest state of the reference
density, \(f_i = w_i\) (\(\rho_{LBM} = 1\), \(\mathbf{u} = 0\), operator set_default_distribution). The user initial
conditions are then applied by the set_distributions hook, in the order they are listed:
| Operator | Description |
|---|---|
set_distribution |
rest state of density value (lattice units), everywhere, in a box or in a quadric |
set_dp_pressure |
rest state at a pressure difference \(\Delta p\) (Pa), everywhere, in a box, inside or outside a quadric |
set_dp_pressure_gradient |
rest state with a linear pressure ramp along X, Y or Z inside a box |
init_couette |
equilibrium of a linear (Couette) velocity profile |
init_double_couette |
equilibrium of a symmetric double Couette profile |
Regions¶
set_distribution, set_dp_pressure and set_dp_pressure_gradient can be restricted to a region:
bounds: [[xmin,ymin,zmin],[xmax,ymax,zmax]]: an axis-aligned box in physical coordinates, projected on the grid with the domain origin;quadrics+transform: a quadric surface (sphere,cylx,cyly,cylz,conez), scaled and translated, with the same syntax as the quadric obstacles. A node is inside when \(Q(\mathbf{x}) \le 0\).
Restart
set_default_distribution and set_distributions are skipped when the simulation restarts from a checkpoint
(read_dump sets do_set_distributions to false). See Checkpoint / Restart.