inlet velocity BC in the Shan-Chen multiphase model

I have a question on implementing inlet velocity BC in the Shan-Chen multiphase model. For calculating the interaction force, the effective mass (e.g. psi(x)) for the neighbor nodes (e.g. psi(x+e) & psi(x-e)) should be known. In the case of inlet velocity, the function psi(x-e) is out of the computational domain. How can I compute the interaction force for inlet boundary nodes? I really appreciate your kind suggestions and helps.

Hi there,

The weighted summation of effective masses at neighbouring points gives the spatial gradient of the effective mass at a given node. If a particular grid point is right on the edge of the simulation domain and you intend to apply a non-periodic boundary condition, you can change the calculation for that point by calculating the effective mass gradient using a one-sided stencil. For instance:

d(psi)/dx(x) = (-psi(x) + psi(x+dx)) / dx

is a first-order scheme, but you could also use a second-order scheme that extends further into the computational domain, i.e.

d(psi)/dx(x) = (-1.5psi(x) + 2.0psi(x+dx) - 0.5psi(x+2dx)) / dx

These stencils can be used instead of the sum of w(e)*psi(x+e) normally used for Shan-Chen calculations at the relevant boundary nodes.