Skip to content

Re: correction for tutorial and question


Hey Mamin,

thank you for mentioning. Basicly, you are right, we should be more precise here, but as we calculate a pressure drop instead of an absolute pressure in the code example on page 27, it does not make a difference.

The function phyPressureFromRho() calculates the pressure in SI units as p = c_s^2 * (rho -1) * C_p + p_0, where c_s^2=1/3 is the speed of sound in lattice units, rho is the density in lattice units, C_p = C_F / C_L^3 is the confersion factor for the pressure derived from the conversion factors of the force and length in their SI units respectively and p_0 is the charactistic pressure level in SI units.

We shift the lattice density by 1 here, to achieve that for rho=1 we get p = p_0.