Projected gradient different from Neumann BC

Note that your problem is not well-posed. A nonzero source term is only compatible with a zero-flux Neumann BC if the integral of the source term is exactly zero. Even with a compatible source term, the solution is only defined up to an arbitrary constant. My answer in the following thread explains these issues in more detail:

2 Likes