Skip to main content

bgk_equilibrium

Function bgk_equilibrium 

Source
pub fn bgk_equilibrium(
    rho: f64,
    ux: f64,
    uy: f64,
    w: f64,
    cx: f64,
    cy: f64,
) -> f64
Expand description

Compute the BGK equilibrium distribution for one velocity direction.

Formula: f_eq = w · ρ · (1 + (c·u)/cs² + (c·u)²/(2cs⁴) − u²/(2cs²))

  • rho – macroscopic density
  • ux, uy – macroscopic velocity components
  • w – lattice weight for this direction
  • cx, cy – discrete velocity components for this direction