I’m going to take the risk of confusing things further. I am by no means an expert on this topic so you’ll have to forgive me if I miss the point a bit. Still, here is how I think about (or sometimes think about) the pressure and the equation of state in LB.
There is a linear invertible transformation between the distribution functions and their moments. That is,
m=M*f
where f is the vector of the f_i (so it is 9 dimensional for the D2Q9 lattice), M is the transformation matrix (a linear operator) and the vector m contains the corresponding moments. For example, since the zeroth moment of the distribution function is the density then the first row of M is just 1,1,1,…,1. For a 9 velocity model M will be a 9 by 9 matrix (note that a DmQn lattice as at most n independent moments). The rows of M are combinations of the lattice velocities, and these must be independent, of course.
You think I’m missing the point, don’t you?
We can do the same with the equilibrium (ie with for m^e and f^e) and since the matrix is invertible
f^e=M^-1*m^e
Now we set the equilibrium moments (and M). If we are interested in solving the Navier-Stokes equations then we know that
a) the equilibrium moments of density and velocity are zero because they are conserved (the corresponding rows of M being a row of 1’s, c_ix and c_iy, respectively);
b) the equilibrium momentum flux is \Pi^e_{\alpha\beta}=P+rhou_xu_y, where P is the pressure.
Let’s not worry about the other moments for now as it is these 6 quantities that also appear in the Navier-Stokes equations. So, by having independent rows of M and by specifying the equilibrium moments we can solve for f^e. It is easily checked that the “usual” eqilibrium moments will give you the usual equilibrium function.
The point is, we haven’t said what P is. Indeed, we need to define it to close the system. Most people will have P=rho/3, and for good reason (it’s the natural choice from the low Ma number expansion of the Maxwell-Boltzmann function, it turns out to be the most stable, and anything else for single component flow may mean it’s hard/impossible to obtain a truly time-accurate solution if certain restrictions aren’t met - see below). However, as Erlend says, it is somewhat unphysical…
The ideal gas equation of state (in the LB computational scaling) is P=rho(‘RT’), where ‘RT’ is the gas constant RT divided by c^2 (c is the “particle” speed). The standard choice is ‘RT’=1/3 and gives maximum stability and accuracy. It is unphysical because it is a function of the scaling used (ie c=Delta_x/Delta_t, Delta_ being the space and time step). This isn’t really an issue in the incompressible limit but can be important in, for example, multicomponent systems.
We could, in principle at least, use the true ideal equation of state, P=rho(‘R*T’), without the assumption that ‘RT’ must be 1/3. The resulting equilibrium function would have rho’RT’ terms in it. The problems of having ‘RT’>1/3, for example, can become apparent after the Chapman-Enskog analysis (we’d get a negative bulk viscosity). However if you wanted to simulate, say, hydrogen, in Poiseuille flow at a given (constant) temperate then you could adjust P accordingly. Note that to make sure you’d not have a negative bulk viscosity you’d have to chose your mesh parameters (c, and hence space and time steps) so that ‘RT’ is less that or equal to 1/3.
I hope that hasn’t made thing worse!!
Good luck!
ps
P=c_s^2 is just P=1/3/c^2 for D2Q9. I should also say that the ideal gas law is commonly used for the compressible Navier-Stokes when energy conservation isn’t explicitly declared. Naturally this isn’t perfect but is often sufficient (and the energy equation in LB is another issue)