0

I'm trying to implement multigrid approach for a Poisson equation $\frac{1}{r}\frac{\partial}{\partial r}\left( r \frac{\partial H}{\partial r} \right) = f$ with all Neumann boundary conditions. Jacobi iteration with underrelaxation is used for smoothening ($\omega = 2/3$ as in Briggs Multigrid tutorial). After few iterations on the coarsest grid, residual ($R_i = \frac{1}{r_i}\frac{1}{\Delta r}\left( r_{i+1/2} \frac{H_{i+1} - H_{i}}{\Delta r} - r_{i-1/2} \frac{H_{i} - H_{i-1}}{\Delta r} \right) - f_i$) and the residual norm ($\sum |R_i|$) converges to some value, which is not zero. In the case of cartesian coordinates I used discrete compatibility condition $\sum f \Delta x = 0$ to ensure solution uniqueness in the case of all Neumann conditions. Should I modify this condition some how to ensure that the proсedure converges to the solution with zero residual?

  • What is that compatibility condition? Isn't f just a given RHS function? You'd need a constraint on the solution H for uniqueness, otherwise it is defined up to an additive constant. – Maxim Umansky Apr 26 '23 at 15:37
  • Discrete compatibility condition is just a mesh approximated continuous compatibility condition, which in turn is a consequence of a divergence theorem applied to the Poisson equation. Imposing discrete compatibility condition allows to ensure uniqueness of the solution, as it was discussed in detail in other topics (eg 1, 2) – Yakovenko Ivan Apr 26 '23 at 20:18
  • Well, let's interpret H as temperature in a heat conduction model, and f as heat source. Your compatibility condition says that the total integrated heat source in the volume is zero. That helps, because otherwise the solution with zero heat flux on both boundaries would not exist, according to the Gauss theorem. But even with this constraint on the total heat source, if H(x) is a solution for your ODE then H+const is also a solution, agreed? So the ODE with given BC does not have a unique solution. – Maxim Umansky Apr 26 '23 at 22:37
  • Well, I agree that to make solution unique one should impose additional constraint, like fixed value at some point in space (Dirichlet condition). I guess main problem here is that the residual does not converge to zero, though it should become zero for any solution of the equation. Should not it? – Yakovenko Ivan Apr 26 '23 at 22:47
  • Sorry, I think we are having a bit of a disconnect here. We agreed [sort of] that the ODE problem as stated does not have a unique solution. That seems to suggest that it is an ill-posed problem, and it should be thought through more carefully and formulated in a different way. But you apparently still want to solve it the way it is, minimizing those residuals. And the statement of the problem still contains that "compatibility condition ... to ensure solution uniqueness" although we agreed that the solution here is not unique, even with this integral condition (and without it no solution). – Maxim Umansky Apr 26 '23 at 23:34
  • I'm sorry for misunderstanding. Maybe I'm just using wrong terminology here. I understand that the problem is ill-posed and generally solution is not unique. Its just a bit confusing for me, that in cartesian geometry compatibility condition is the only constraint that is required for the residual converge to zero during the iteration process. But in the case of cylindrical geometry the residual does not converge to zero. Actually I have modified compatibility condition a bit: $\sum F r \Delta r$ and the residual started approaching much closer value to zero. – Yakovenko Ivan Apr 27 '23 at 18:39
  • Your condition for the sum means that the integrated source is zero. With that condition there is a solution to the equation but it is not unique. But if you are ok with that and just want to do the same thing in cylindrical geometry, the sum should contain metric coefficients, i.e., $\sum r f=0$ is right, meaning $\int f(r) 2\pi r dr=0$. – Maxim Umansky Apr 27 '23 at 19:29

0 Answers0