I was interested in simulating diffusion in a ternary mixture with palabos, but I’m having problems with numerical (in)stability. My first thought was to try and modify the multiComponent2d example included in palabos source files, however, the system i’m interested in has one component (ethyl glycol) which is much more viscous than the others (about an order of magnitude apart). Therefore when I compute

tau=3*nuLB+0.5;

I get ratios of TauMax/TauMin ranging from 2 to 10, depending on how I make my physical units dimensionless. however if I try to make this ratio small, the values of the relaxation times come very close to 0.5, which is also numerically unstable.
So far I’ve only been able to simulate a ternary mixture with the Shan-Chen model by choosing unphysical values for tau. Is there a better way to simulate this situation with palabos?

the multicomponent2d example uses the interparticle potential model in its basic form (incorporating forces as velocity shift, bgk collision). In this way, it is not suited for large viscosity ratios. If modeling the viscosity ratio is key to you, you could for example use the improved version of the model from porter et al. (applicable with viscosity ratios up to 1:1000). For details see:

Porter et al.: Physical Review E 86, 036701 (2012) or
Li et al.: Physical Review 90, 043015 (2014)

The model is based on an explicit forcing term and a MRT collision operator. As far as I know, the fundamentals for the model are implemented (lattice descriptors and dynamics with the external forcing term), but you would have to adjust the data processor that does the shan chen coupling.

Thanks kk, I’ll try that. However I’m a little confused by the fact that this model has an explicit forcing term in the lattice boltzmann equation. Should I then use for the dynamics:

[code=“cpp”]
MultiBlockLattice2D<T, DESCRIPTOR> MEG (
nx,ny, new HeExternalForceBGKdynamics<T, DESCRIPTOR>(omega3) );

To get the forcing term right? And when editing the SC coupling (implemented in the file ShanChenProcessor2D.hh), how can I 'pass' the force between components calculated there (or the equilibrium velocity for that matter) to the dynamics, so that it appears in the He external forcing term? I don't understand completely which files pass this information along, or if other files besides ShanChenProcessor2D.hh should be edited for this task.
Regards, and thanks

the model does use the he forcing scheme, yes, but it is MRT based. Thus, you should probably be using HeExternalForceMRTdynamics (see ./src/complexDynamics/externalForceMrtDynamics.h and .hh).

To calculate something (e.g. the interaction force) in a dataprocessor and use it later on, there are external fields connected to each cell. E.g. inside the shan chen data processor, the line

stores the content of the right side (here the density) in the external field for the density. The number of fields connected to a cell depends on the descriptor you are using and there are descriptors which have an external field available to store forces in (e.g. see: ./src/multiPhysics/shanChenLattices2D.h).
You would have to look into the code of the HeExternalForceMRTdynamics and see how the collision and the adding of the source term is done. When you know how it is done, you can adjust the shan chen dataprocessor so that the correct variables are stored in the correct external fields.
A brief look into it revealed that there seems to be some confusion about how collision and source term should be handled (see ./src/latticeBoltzmann/mrtTemplates.h line 463).
Hope this helps and is getting you on the right way.
Regards,
kk