# Smoothed particle hydrodynamics bounduary (ghost particles) properties

I am learning SPH method. At the moment I am trying to implement simulation described in this very good article. However I don't get how the ghost particles properties are computed:

• Position of the ghost particle: $$\textbf{x}_{i,G}=2\textbf{x}_w-\textbf{x}_i,$$

where $\textbf{x}_i$ denotes the $i^{th}$ particle position, $\textbf{x}_w$ is the rigid boundary instantaneous position, $\textbf{x}_{i,G}$ is the ghost particle position.

• Normal velocity component with respect to the boundary: $$u_{niG}=2U_{nw}-u_{ni}$$

where $U_{nw}$ is the local displacement velocity of the rigid boundary with instantaneous position $\textbf{x}_w$, $u_{ni}$ is the normal velocity component of the particle to the boundary, $u_{niG}$ is the normal velocity component of the ghost particle.

What is the local displacement velocity of the rigid boundary with instantaneous position $\textbf{x}_w$, and what is $\textbf{x}_w$?

I thought that if the boundary is rigid (let's say a solid wall) it will have $U_{nw}=0$, and invariant position. However with those assumptions I don't get the ghost particles similar as described in the paper (it is a part of the Fig 15 from the mentioned paper):

I imagine the figure on the right was generated for a non-zero value of $U_B(t)$. A boundary that is moving left with a certain velocity, at that instant, would give the specific vectors shown in the figure. In general, the boundary does not have to be rigid or fixed. It could be flexible and moving.