using rayleigh_benard2D code in multicomponent


I found that the thermal2d code is about single component problem. I meet some problems when I was trying to use the AdvectionDiffusion code to simulate multicomponent problem. My case is about dissolution among two kinds of fluid in the domain. I set two NS lattice in the domain, and those two fluids have different density. I am confused about two questions.

couplingBetweenNavierStokesAndAdvectionDiffusion(ADlattice, NSlattice,converter)

whether I should couple the AdvectionDiffusion to both of these two NSlattices, like couplingBetweenNavierStokesAndAdvectionDiffusion(ADlattice, NSlatticeOne, NSlatticeTwo, converter) or only one NSlattice which is the solventcouplingBetweenNavierStokesAndAdvectionDiffusion(ADlattice, NSlatticeOne, converter).

2.whether I should add the code below (which is used in the multicomponent case) to those two NSlattice

vector<SpatiallyExtendedObject2D* > partnerForOne;
    ForcedShanChenCouplingGenerator2D<T,DESCRIPTOR> coupling(0,nx-1,1,ny-2,G);
    NSlatticeOne.addLatticeCoupling(coupling, partnerForOne);

Thank you in advance. I really appreciate for your response.



If you’d like both components to be heated, then I guess you should add a “couplingBetweenNavierStokesAndAdvectionDiffusion” to both components. But note that we’ve never tried to combine the multi-component fluid model with the thermal model in OpenLB, and don’t have the experience to say what’s the right way of doing.