- marked as minor
- edited description
Incompatible right-hand side in Neumann demo
The demo neumann-poisson uses a right-hand side which seems to be incompatible with the Neumann boundary condition (we need \int_{\Omega} f \dx = - \int_{\partial\Omega} g \ds, which does not seem to be the case. The Lagrange multiplier takes care of this but a comment/explanation should be added.
Comments (11)
-
reporter -
reporter - edited description
-
Testing by $v=1$ you actually get, $$ c |\Omega| = \int_\Omega f \dx + \int_{\partial\Omega} g \ds. $$ Unknown $c$ therefore takes care of this incompatibility and a necessary condition given above does not apply.
-
Issue
#142was marked as a duplicate of this issue. -
I am sorry that I reported a duplicate of this issue. I originally searched for demo 13 instead of poisson neumann.
However, the Lagrange multiplier doesn't take care of the issue that the problem, as it is stated, is ill-defined. Using fenics one can actually show this easily. After the Poisson equation is solved the term \nabla^2 u + f should by definition be zero on the domain \Omega.
So let's plot this term using fenics: (Note, in order for the projection to work, one first needs to increase the polynomial degree of the function space to >= 2)
plot(project(nabla_div(nabla_grad(u)), V) + f, interactive=True)
The term, however, is not zero and therefore the Poisson equation is not fulfilled. In a next step one can fix f to fulfill the compatibility condition:
fV = interpolate(f, V) f = f - assemble(fV*dx + g*ds))
and if one plots \nabla^2 u + f again, one can see that this term is now indeed zero on \Omega.
Note, that the result u itself is the same as before. The Lagrange multiplier only takes care of the problem in the sense, that it "redefines" f such that it fulfills the compatibility condition \int_{\Omega} f \dx = - \int_{\partial\Omega} g \ds, but the original problem is still ill-defined and therefore doesn't have a solution.
Note, that "Demo 13" is actually the first link that one gets when searching for "pure neumann condition" on google, so I would fix this rather sooner than later...
-
In some sense you're correct that the equation
- \nabla^2 u = f
is not fulfilled. But the problem which is being solved in the demo, i.e. the weak problem with the Lagrange multiplier, is definitely well-posed. Your interpretation that the Lagrange multiplier redefinesf
is correct. -
reporter -
assigned issue to
- marked as major
-
assigned issue to
-
- changed milestone to 1.3
-
reporter - changed status to resolved
Fix issue 117: Incompatible right-hand side in Neumann demo
→ <<cset 2e82a0ed195c>>
-
reporter Resolved by explaining in the documentation how the incompatible right-hand side is handled by the variational formulation.
-
- removed milestone
Removing milestone: 1.3 (automated comment)
- Log in to comment