shan chen interaction

hello
I am trying to develope chan chen model for high density ratio.i found out some scheme like using EOS and force scheme that introduce by kupershokh et al.
i have two problem:
1- in shan chen interaction that use in Multiphase Template 2d there are two part to calculate rhocontribution

for (int iD = 0; iD < Descriptor::d; ++iD) {
rhoContribution[iD] += Descriptor::t[iPop] * rho * Descriptor::c[iPop][iD];
}
and at the end of this file there is another one:
rho = *lattice.get(iX-1,iY+1).getExternal(densityOffset);
rhoContribution[0] = -D::t[1] * rho;
rhoContribution[1] = D::t[1] * rho;
rho = *lattice.get(iX-1,iY ).getExternal(densityOffset);
rhoContribution[0] -= D::t[2] * rho;
rho = *lattice.get(iX-1,iY-1).getExternal(densityOffset);
rhoContribution[0] -= D::t[3] * rho;
rhoContribution[1] -= D::t[3] * rho;
rho = *lattice.get(iX ,iY-1).getExternal(densityOffset);
rhoContribution[1] -= D::t[4] * rho;
rho = *lattice.get(iX+1,iY-1).getExternal(densityOffset);
rhoContribution[0] += D::t[5] * rho;
rhoContribution[1] -= D::t[5] * rho;
rho = *lattice.get(iX+1,iY ).getExternal(densityOffset);
rhoContribution[0] += D::t[6] * rho;
rho = *lattice.get(iX+1,iY+1).getExternal(densityOffset);
rhoContribution[0] += D::t[7] * rho;
rhoContribution[1] += D::t[7] * rho;
rho = *lattice.get(iX ,iY+1).getExternal(densityOffset);
rhoContribution[1] += D::t[8] * rho;
I know than the second one calculate sum of the rhocontribution but what is the first one???/
2- is anyone that use shan chen method for high density ratio???
thanks

Hi m.khatoonabadi
I am also working for high density ratio based on shan-chen model, and I use the CS EOS to calculate the effective mass. But I can’t obtain converged solution for Lapace law. Have you solved the key issues? if yes, could you give me some guidances?

thanks a lot.

Hi Tokgo
Firstly please let me know which force scheme are you using? EDM or Shifting velocity?in palabos?
In addition, do you mean that you cannot obtain any density at the end of your simulation?
an important point in high density ratio is that initial values play significant role in simulation. and most likely your problem comes from initial value that you consider for liquid and vapor density.

Best regards

Hi m.khatoonabadi
Firstly thank you for your timely reply.

  1. Yes, I develope high density ratio model in Palabos platform.
  2. I use Guo scheme and Shifting velocity scheme, but both of them can not work well.
  3. It is worth mentioning that my focus is MCMP rather than SCMP. Initially, the density of heavy fluid is set as 1.0 and 0.001 outside and inside the bubble, while the that for light fluid is set as 0.0001 and 0.1 outside and inside the bubble. Here, the light fluid is considered as an ideal fluid and the effective mass psi = rho. The interaction strength is set as: G_hh = 1.0, G_hl = G_lh = 0.001, and G_ll = 0.
    In my simulation, after several iterative steps, the bubble transform into ellipse and continually contort. I can’t find out the reasons about the strange solution. I hope you can give me some directions.

Thanks a lot,
Best regards.

Hi Tokgo
I hope I can help you to solve your problem. I use Shifting velocity and EDM scheme in SCMP simulation.
1- As a general rule you must change initial value for each density ratio(temperature). Most likely it comes from the initial densities. So change the initial values to reach stable result.
2- I am a little confused because you want to use Carnahan- Starling EOS but you applied Psi=rho??? Why?you can add each EOS into palabos easily. Because it is impossible to use psi=rho and get more than 50 in density ratio.
3- MCMP problems are usually more sophisticated that SCMP. I suggest starting with SCMP and then use other. So start with Segregation code in palabos.
Finally, I do not have simulated many MCMP problems. Hence, If you are going to use SCMP ,I think I can help you better.

King regards

Hi m.khatoonabadi
Thank you for your kind reply.
I will attempt simulate SCMP following your suggestion.

Thanks a lot,
Best regards.

Hi,
Could you please assist with mid-grid bounceback. My code is working fine for the simple bounceback. But I wanted to switch to mid-grid for various benefits. So I added collision to wall node (I hope that is the only change required) but the code became unstable.

Brief: My code became unstable when I add bounceback and force on same node.

I want to be sure I’m not making any fundamental errors here before I go back for a thorough debug.

Thank you for your assistance
Aditya