Extend vicinity of the ShanChenSingleComponent2D Processor

Hello everyone,

I am trying to extend the range of the interactions in the Shan Chen single component model. So far I used the ShanChenSingleComponentProcessor2D and created a modified version of it which uses a 13-point finite difference scheme instead of the standard 9-point scheme in the calculation of the interaction force. I have specified the new vector composition and the corresponding weights inside the data processor and adjusted all the loops/calculations.
The problem I am facing is that although the collision itself is done on the d2q9 lattice (ShanChenD2Q9Descriptor) I need additional points for the interaction force, thus the vicinity is larger. So I need Descriptor::vicinity to be 2 even though I am operating on a d2q9 lattice where a vicinity of 1 is sufficient. When I simply set the vicinity constant (in the d2q9constants in src/nearestNeighborLattices2D.hh) to 2, everything works fine. However, this is nasty and intrusive…

So my question is, is there a way to work on a d2q9 lattice and set the vicinity parameter somehow else?

Best regards,


Hey everyone,

after some time, I found a way to solve my problem.

For those who might be interested: I made a copy of


and created a new descriptor base, which contained the same parameters as the
standard D2Q9 descriptor base, except that I increased the vicinity paramter accordingly.
In the following, I created a copy of


and set up a new ShanChen Descriptor, which inherited the new descriptor base.

Using the new Descriptor seems to work just fine.

Best regards,