Shan/Chen based two-phase displacement

Hi all,
Recently, I have been studying the problem of two-phase displacement and set the pressure boundary in palabos, but the result is wrong. Both the displacement phase and the resident phase are stagnant. I want a code reference for two-phase displacement in palabos.My email is 1158061642@qq.com, thank you very much!

Hi,

Here you can find such example:

https://github.com/je-santos/MultiphasePorousMediaPalabos/tree/master/examples/unsteady_relperm_spherepack

Best,
Javier

This is how the simulation looks like when periodically increasing the pressure difference across the boundaries:

Hi,Javier
I read and applied your multiphase flow code, but it turned out to be a problem and I changed the model to a 2-dimensional model.But the result is not correct, the 1 phase fluid can’t push the 2 phase fluid, it’s stuck at this position.Do you know what the problem is?Can you give me some guidance?Thank you very muchX0G%HP_MS{6H9CFWB}NX2

Sure @liuqi . If you want you can fork my repo and add your model there so I can take a look

Thank you very much for your reply. I have put my code on Github, please have a look.I hope you can give me some guidance.

@liuqi you implementation looks good!
Try to set a higher pressure at the inlet if you want the red fluid to percolate.

@jesantos
First of all, thanks for your reply!I said the inlet pressure was changed from 3 to 5, but it still looks like this, I think it’s not the inlet pressure, I don’t know what to do now, and the compiler says deltaP[runnum] is defined but it’s not used, could that be the problem here?Can you do something for me?Thank you very much for your help!Here’s what happens at 9000 steps1591584284(1)

I found a problem that your code could not modify the pressure difference. When I used 2 and 1.99, the result was the same as that of 2 and 1.5. Could you please explain this problem to me?Even 2 and 2.02 work.

ZE7DT4NSQLZHPFK8{E9YYCM

Hi @liuqi

I apologize for the delay in my response. Sometimes a few days pass without me checking my favorite lbm forum. In the future feel free to open an issue on the github repo.

The first capillary increment is fixed to something very close to Pc = 0 (0.02 in this case). It should converge in a few iterations and then you’ll be able to see a big effect depending on the parameters that you set on the xml file :slight_smile: just let it run for a while

Best,
Javier

Please if you have matlab code for this problem, kindly share with me pls!

Thank you very much for your answer. Now I am trying to modify it to the speed boundary condition. Do you have any good Suggestions?