# getEquilibriumIncomp Function

## public pure function getEquilibriumIncomp(dens, vel, layout, rho0) result(equil)

Calculate the equilibrium distribution function in all directions This is the incompressible formulation with reference density rho0

The equilibrium distribution function is:\n \n where $w_i$ is the weight in each direction,\n $\rho = \sum_i f_i$ is the macroscopic density,\n $c_s$ is the speed of sound,\n $\vec c_i$ is the lattice unit velocity in each direction,\n $\vec u = \sum_i c_i f_i$ is the macroscopic value of velocity.

### Arguments

TypeIntentOptionalAttributesName
real(kind=rk), intent(in) :: dens
real(kind=rk), intent(in) :: vel(3)
type(mus_scheme_layout_type), intent(in) :: layout
real(kind=rk), intent(in) :: rho0

## Variables

TypeVisibilityAttributesNameInitial
real(kind=rk), private :: ucx
real(kind=rk), private :: usq
integer, private :: iDir