0
$\begingroup$

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?

$\endgroup$
7
  • $\begingroup$ 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. $\endgroup$ Apr 26, 2023 at 15:37
  • $\begingroup$ 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) $\endgroup$ Apr 26, 2023 at 20:18
  • $\begingroup$ 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. $\endgroup$ Apr 26, 2023 at 22:37
  • $\begingroup$ 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? $\endgroup$ Apr 26, 2023 at 22:47
  • $\begingroup$ 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). $\endgroup$ Apr 26, 2023 at 23:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.