Now I am learning multi-component SC model for the future simulation. I have just made the code for single component running correctly. Many thanks for the help from this forum. Currently, I encountered some problems when I use multi-component SC model. The density of a certain component will be negative near the interface between two components after several iterations, which is not acceptable. One of the enquiries is that for single component SC model, G is usually set negative, and small then the critical value. This will lead to phase seperation, but how to determine the G value which accounts for the fluid fluid interactioin in multi component SC model? Is there some criteria for this? I found in some papers, the interaction of the same type fluid is always ignored. Does it mean the two fluids are immiscible? Another question is that when initializing the density, is it allowed to assign the density of one component zero, when the lattice is occupied by another component? All comments on this model are welcome.
As a matter of fact, I have only seen the Shan/Chen multi-component model applied to the case of immiscible fluids. Although I might be wrong, I don’t think you can use it for miscible fluids: due to the repulsive force the two components end up separating from each other, except for an interface region, which can become wider when the repulsive force is reduced.
It is correct that the constant G is negative, because the interaction is repulsive, and it is correct that the density of a component can drop to zero when the lattice is occupied by another component.
To debug your code, I would suggest that you compare it with the Matlab example for the multi-component Shan/Chen model. The example is very short, and it should be easy to read and understand the algorithm.