Skip to content

Reply To: Shan-Chen

#9917
luizeducze
Participant

Dear xinhui,

Are you using single-component or multi-component ShanChen method?

You can create a layer with a different material number than the fluid to be your solid.
For example, your fluid can be material number 1 and the solid 5.

In your prepare lattice function you can set use the sLattice.defineRho() to set the density in different material numbers. You can find this in many examples in OpenLB.

Also, in your COUPLING, you can choose the material numbers where the operations will be applied, as an example: coupling.restrictTo(superGeometry.getMaterialIndicator({1}));

Since you want to compute the interaction in the solid for the contact angle, you can do that:
coupling.restrictTo(superGeometry.getMaterialIndicator({1}));
coupling.restrictTo(superGeometry.getMaterialIndicator({5}));

Check the binary shear flow example to see how it is applied.

In this way, you can prescribe a density to your solid in prepare lattice, then tell your code to compute the interaction from the solid. Remember to use the bounce-back or other boundary condition for your solid (material number 5) in your prepare lattice.

If you have more doubts just ask.

Kind regards,
Luiz