# Dynamic Boundary Condition

Hey guys!

I am trying to understand the current implementation and then the solution for this problem. The first thing I notice is that in the improved scheme, three layers of boundary particles are used instead of one only - why is this the case, to avoid "cut off" of the smoothing function?

Secondly I see that the fluid-boundary interaction is the same formulaes, but that in the improved scheme ghost nodes are used as seen in this picture: So by using a ghost node we are calculating the density at an imaginary point. I understand that this ghost node must have a velocity of zero, but having a really hard time understanding the density calculation since:
1. Why do we have to use a mean operator (bar) on the kernel at \rho_g? I don't understand how it is even possible to use a mean operator on a kernel, since it is a function, which means it will become constant?
2. Same as point 1, but a bit different, since what happens when we use the mean of a nabla?
3. I assume point a is the boundary particle and point g is the x, ie. the ghost node? So we are "flipping" it now, instead of getting the property by gathering values around a node, we are instead scattering density property to node a (the boundary particle)?
I hope someone could clear up my confusion, it is really exciting to have some kind of solution for the gap problem, I just hope I can understand it fully too!

Kind regards