Iteratively solve Poisson’s Equation with no boundary conditions

poisson's equationrelaxations

I'm working to reimplement the results of this fantastic paper which allows you to design your own caustics. On the top left corner of page 3 there are three images:

enter image description here

  1. A blue and red "difference field" which plays the role of $\sigma$ and is referred to as $D$ in the text of the paper
  2. The "pressure field" which plays the role of $\phi$ and is referred to as such in the text
  3. The "flow field" which is just $\nabla\phi$

I understand the Jacobi Method, Gauss-Seidel Method, and Successive Over Relaxation. I was able to implement them myself and my implementations were able to run to convergence. What I don't understand is that in every text I've read on the subject, such methods always require boundary conditions, either Dirichlet or Neumann. But the text of the paper mentions nothing about boundary conditions and the second image, the resulting $\phi$, doesn't seem to have any boundary conditions imposed on it. If there had been a Dirichlet condition where the boundary everywhere equals zero, I would expect to see a black rectangle around the whole image.

So the question emerges: how does one implement successive over relaxation when no boundary conditions are specified?

Best Answer

You're right that the paper doesn't seem to specify the boundary conditions. But it seems reasonable to impose that the light that hits one side $\partial \mathcal{I}_i$ of the image (with normal $n_i$) comes from the corresponding boundary $\partial \mathcal{B}_i$ of the object (also with normal $n_i$). We therefore want $$\frac{d\mathbf{p}}{dt}(x,y) \cdot n_i = 0$$ for all points $(x,y)\in \partial \mathcal{I}_i$ in order to maintain this property; and thus Neumann conditions on $\phi$.

Note that these Neumann conditions are only well-posed if $\int_{\mathcal{I}} D = 0$, i.e. if the desired total amount of light hitting the screen is equal to the total light hitting the refractive object (a condition you probably wanted to ensure was true anyway).