Problem about single component multiphase SC model

Dear all,

I just turned to SC model. To velidify my code, I am just simulating the simple case-phase seperation in the original SC paper. Now, I am focused on single component problem. My problem is that when I use periodic boundary scheme(considering a lattice system of 60*60, the periodic boundary condition is applied in four sides), the result is good. However, when I use bounce back boundary scheme, the result is not correct. Is there anyone who can give my some trips or explanation. Is it not feasible to use bounce back scheme. By the way, when the bounce back scheme is used, no fluid-solid interacton is considered. May it lead to the wrong result?

Many thanks.

Beryl

Hi Beryl,

First of all, you applied bounce back in four directions or only in two?

I did with two and found that initial conditions are extremely important if you want to simulate this phenomena. Another thing is how do you treat your wall, because you have to prescribe the wall density, your Shan-Chen force depends on G \psi(x) \sum_i \psi(x+c_i), so all the nodes on the wall should have meaningful \psi function value. There are two approaches to it - one is Sukop thing, when they equal density of the wall to infinity and it creates the index wall function, so your \psi function with original Shan-Chen pseudopotential \psi=1-exp(-\rho) equals to 1=1-exp(-\infty). Another approach is to prescribe wall density - in this case you can control your contact angle with bounce back boundary conditions.

Hope that will help,
Alex

Hi Alex,

Thanks for you answer. I applied bounce back scheme for four directions. If you use it for two directions, how about another two questions? Using periodic scheme. Now in my code, no fluid-solid interaction is considered for simplicity. You have pointed out the problem that I am confused by the wall density. Since contact angel will be considered, I am quite interested in the second method. Would you like to explain how to describe wall density in detail? or would you recommend some papers with regard to this? In addtion, if you could tell me how to determine the value G, I will be quite appreciated.

Many thanks.

Beryl

Hi Beryl,

The thing is that Shan-Chen force can be represented as G\psi(x)\sum_i \psi(x+c_i ) c_i. Suppose you have a wall, that means your \psi(x+c_i) located on the wall are not defined. If you define density of the wall, usually from 0 to 2, your \psi(x+c_i) is defined through \psi=1-exp(-\rho_wall). It’s some kind of fancy idea to implement contact angle, you can do it in many different ways, even prescribing constant force on and near boundary. Also you can specify another G for the wall nodes. Usually you don’t need it.

You start your simulations and contact angle is controlled with wall density. Of course, you need to find some stable parameters with given G. The description is given in the following paper:

PHYSICAL REVIEW E 74, 021509 2006
Mesoscopic modeling of a two-phase ?ow in the presence of boundaries: The contact angle
R. Benzi, L. Biferale, M. Sbragaglia, S. Succi, and F. Toschi

If you have any questions let me know,
I will send you a snippet of code to start with,
Good luck,
Alex

Hi Alex,

Thank you so much for your help. I have defined the wall density as you told me. However, the reslut is not good.I have another question about SC model. Just like you said, the initial condition is quite crucial. If I want to consider the contact angle by setting a half bubble on the wall (bottom side ). For initial condition, the initial density of the bubble is unity. How about the left region? If I set the density is zero, the program is unstable and stop after several time intervals. Otherwise, if I assign a small amount density, take 0.03 for example, the code can run, but the arbitrary value control the running time. Do you have any comment on this? In addtion, I doubt there may be something wrong with my code. So If you could send the snippet code to me, it may be quite helpfull.

Best wishes,

Beryl

Hi Beryl,

You need to initialize gas and liquid densities from Maxwell area reconstruction. I will send you a graph from which it’s good to initialize. Basically you can start your simulations with G=-6.0 and liquid density=1.8 and gas density =0.2 and wall density 0.7 for example - these parameters are stable with my calculations.

So don’t initialize with zero. The code will be unstable. The convergence of your code of course depends on the initial conditions, i.e. how far you are from equilibrium densities obtained from Maxwell area reconstruction.

I will send you a snippet soon,
Good luck,
Alex

Hi Alex,

I have received your snippet. Thank you very much. I will have a try.

Best wishes,

Beryl

Hello ,
I am just simulating the simple case-phase seperation with the periodic boundary condition .Now I encountered the problem that the density of two phase will be negative after several iterations with liquid density=200 and gas density =199 at random lattice.Can you give me some trips or explanation?

A colleague of mine had a similar problem in a two-component simulation. The density became negative after some iterations. The reason were wrong initial conditions. Maybe it is the same in your case.

Timm

Hi Timm,
Thanks for your reply, I confusing that
(1) for(y=0;y<Ny;y++)
for(x=0;x<Nx;x++)
{
a=rand()%2;
f0[y][x]=(rho_0-a)*4.0/9.0;
f1[y][x]=f2[y][x]=f3[y][x]=f4[y][x]=(rho_0-a)/9.0;
f5[y][x]=f6[y][x]=f7[y][x]=f8[y][x]=(rho_0-a)/36.0;
}
in this case,the total density of two phase will be negative after several iterations ,but in case
(2) for(y=0;y<Ny;y++)
{
for(x=0;x<Nx;x++)
{
f0[y][x]=(rho_0-1.)*4.0/9.0;
f1[y][x]=f2[y][x]=f3[y][x]=f4[y][x]=(rho_0-1.)/9.0;
f5[y][x]=f6[y][x]=f7[y][x]=f8[y][x]=(rho_0-1.)/36.0;
}
for(x=0;x<Nx;x+=3)
{
f0[y][x]=(rho_0)*4.0/9.0;
f1[y][x]=f2[y][x]=f3[y][x]=f4[y][x]=(rho_0)/9.0;
f5[y][x]=f6[y][x]=f7[y][x]=f8[y][x]=(rho_0)/36.0;
}
}
it can work perfectly.
If you could suggest me how to set the init density of two phase , I will be quite appreciated. I`m looking forward for suggestion from everyone.

Da_feng

Now you have seen that it really is an initialization problem. But I am afraid, I have never simulated randomly distributed two-phase fluids. What happens if you reduce the amplitude of a?

Timm

Dear Alex,

Can you send me the snippet code of contact angle. Thank you
my adress is

azwadifkm@gmail.com

Hi Timm,
Thanks for your advice, I`ll try it !
Da_feng

Dear Noraz,
Please check your PM box.

Dear Da_feng,
The thing is that Shan-Chen is tolerant to initial random density distributions upto certain strength parameter G. You can try smaller G to see what will be separation.

Hopefully it will help,
Alex

Dear Alex,
Thanks for your advice. I have tried it for many G ,unfortunately,I didnot meet a suitable G. My reference book is Sukop`s “Lattice Boltzmann Modeling”, could you suggust me which valuable papers includes Shan-Chen model to study ?

Da_feng

Dear Alex,
Thanks for your advice. I have tried it for many G ,unfortunately,I didnot meet a suitable G. My reference book is Sukop`s “Lattice Boltzmann Modeling”, could you suggust me which valuable papers includes Shan-Chen model to study ? Any help or hints on how to get started would really be appreciated.

Da_feng

Dear Da_feng,

For me Dr. Succi’s papers are the most understandable. If you want to understand what are the equations of state and proper weights you can check these papers:

Mesoscopic modeling of a two-phase ?ow in the presence of boundaries: The contact angle
R. Benzi, L. Biferale, M. Sbragaglia, S. Succi and F. Toschi

Generalized lattice Boltzmann method with multirange pseudopotential
M. Sbragaglia, R. Benzi, L. Biferale, S. Succi, K. Sugiyama and F. Toschi

Hopefully, it will help,
Alex

Dear Alex,

Can you send me the snippet code of contact angle. Thank you
my adress is

zhrleo@gmail.com