I have been looking at the source code, and there are a few things I'd like to ask.
In the paper, it says that in the continuity equation, the initial solid particle volume is used and the velocity is set to the prescribed velocity. Then, the dummy particle velocity (ghost velocity) is calculated after the extrapolation.
But in the source code, both in ContinuitySolid and in SolidWallNoSlipBC, ghost velocities are used as shown below
class ContinuitySolid(Equation):
"""Continuity equation for the solid's ghost particles.
The key difference is that we use the ghost velocity ug, and not the
particle velocity u.
"""
def loop(self, d_idx, s_idx, d_rho, d_u, d_v, d_w, d_arho,
s_m, s_rho, s_ug, s_vg, s_wg, DWIJ):
Vj = s_m[s_idx] / s_rho[s_idx]
rhoi = d_rho[d_idx]
uij = d_u[d_idx] - s_ug[s_idx]
vij = d_v[d_idx] - s_vg[s_idx]
wij = d_w[d_idx] - s_wg[s_idx]
vij_dot_dwij = uij*DWIJ[0] + vij*DWIJ[1] + wij*DWIJ[2]
d_arho[d_idx] += rhoi*Vj*vij_dot_dwij
class SolidWallNoSlipBC(Equation):
...
..
# scalar part of the kernel gradient
Fij = XIJ[0]*DWIJ[0] + XIJ[1]*DWIJ[1] + XIJ[2]*DWIJ[2]
# viscous contribution (third term) from Eq. (8), with VIJ
# defined appropriately using the ghost values
tmp = 1./d_m[d_idx] * (Vi2 + Vj2) * (etaij * Fij/(R2IJ + EPS))
d_au[d_idx] += tmp * (d_u[d_idx] - s_ug[s_idx])
d_av[d_idx] += tmp * (d_v[d_idx] - s_vg[s_idx])
d_aw[d_idx] += tmp * (d_w[d_idx] - s_wg[s_idx])
Shouldn't we use different velocities in each of those computations?