Efficient Implementation of addGuoForce?

Hi,

in src/latticeBoltzmann/externalForceTemplates3D.h there is an efficient implementation for the force term for the D3Q19 lattice. I want to implement such a function for other lattices, but I don’t understand the equations used here.

For example for i=5:

F_5 = 1/12 * (1-omega/2) * ( f_x * (-1 + 2u -3 * v) + f_y * (1 + 2v - 3 * u) - f_z * w)

Where does this come from? Could you recommend a paper where this is described?

Thank you,

Marc