Skip to content

Reply To: Help with the velocity shift in ShanChen


Hi Lucas,

I just want to provide additional comments, mostly for other answers seekers like myself.

You said in you question that you are looking for a way to change the interaction force’s formulation and that you looked into the velocity shift implementation and still had no clue on how to do it.

It is implicit in Stephan’s answer, but the velocity shift is not where the interaction force is calculated, it is rather where this force is introduced into the collide step, no matter the equation you use to calculate it. As Stephan said, you rather want to use another postProcessor to calculate it, look for example ShanChenForcedSingleComponentPostProcessor which does (used in examples//multiComponent/phaseSeparation2d/phaseSeparation2d.cpp).

Finally, you said you are interesting in implementing your own solid/liquid interaction force’s formulation? Then maybe considering a boundary condition is what you need ? In that case, have you looked at this answer ?