Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Zero flux boundary conditions issue with Poisson equation

Please login with a confirmed email address before reporting spam

Good morning,

I am using version 4.3b. One of the steps in my project requires me to solve a Poisson equation with zero flux conditions at the boundaries. My geometry is a simple 2-by-2 square (domain: [-1,1]x[-1,1]). I have 2 questions regarding a tolerance error that keeps popping up.

1). When I have a source term as simple as: f=cos(2*pi*x), it says:

Failed to find a solution.
The relative error (25) is greater than the relative tolerance.
Returned solution is not converged.
- Feature: Stationary Solver 1(sol1/s1)
- Error: Failed to find a solution.

But if I replace just 1 of the side walls with a Dirichlet condition, I get the analytic solution.

I have verified the consistency condition for Poisson's equation with Neumann conditions (integral of f over the region is equal to zero, which is the same as the integral of zero (flux) over the boundary). I don't understand why COMSOL can't handle the zero flux condition.

2). When I try something even simpler with source term: f=0, I get the same error if my initial guess is u=2, but I get a valid solution when my initial guess is u=0. With zero flux on the walls, both u=2 and u=0 everywhere should be valid solutions. What is the reasoning for this error?

Thanks in advance,
-Peter

4 Replies Last Post 2015年8月12日 GMT-4 10:09
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月11日 GMT-4 14:29
Hi

my understanding is that the Poisson equation is a second order equation so you need more BC's to define unambiguously an unique solution.
The Dirichlet conditions fixes a "gauge" and COMSOL converges, else its not sure to which constant it should converge.
For whichever Dirichlet condition value I set, COMSOL converges (v5.1) with a bias of the results, cleanly if I chose a vertical X=cte edge, somewhat unevenly if I choose a "horizontal" Y=cte edge, since the "f" term depends on "x"

--
Good luck
Ivar
Hi my understanding is that the Poisson equation is a second order equation so you need more BC's to define unambiguously an unique solution. The Dirichlet conditions fixes a "gauge" and COMSOL converges, else its not sure to which constant it should converge. For whichever Dirichlet condition value I set, COMSOL converges (v5.1) with a bias of the results, cleanly if I chose a vertical X=cte edge, somewhat unevenly if I choose a "horizontal" Y=cte edge, since the "f" term depends on "x" -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月11日 GMT-4 14:41
Thanks Ivar,

Is there anyway to just prescribe a value of u at a single point rather than an entire edge? It seems to me like that would be a sufficient condition, but I can't figure out how to do that. The system I actually want to solve has a more complicated f, so I wouldn't know of an accurate Dirichlet condition to put along an entire edge.

-Peter
Thanks Ivar, Is there anyway to just prescribe a value of u at a single point rather than an entire edge? It seems to me like that would be a sufficient condition, but I can't figure out how to do that. The system I actually want to solve has a more complicated f, so I wouldn't know of an accurate Dirichlet condition to put along an entire edge. -Peter

Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月12日 GMT-4 04:16
Dear Peter,

the hint of Ivar hit the point. Imagine a second order ODE d2u/dx^2=0. The solutions are all linear functions u=ax+b. Constraining only fluxes (e.f. du/dx at x=0) would allow you to define the coefficient a=0 only but not b. In order to do that and make u(x) unique, you need a gauge for u itself, for instance a Dirichlet conditon.

In a PDE problem also a point gauge would be sufficient. You could do that that in Poisson Equation > Pointwise Constraints by writing a constraint expression u-0 (or just u). This would constrain u to zero in this point.

Note however, that the solution might not be what you want. If you have a source term in the domain and you have zero flux conditions on all boundaries and fix only u=0 in a point, this point will act as sink for all everything that is produced. So basically you have an infinite flux through a point - not very physical. There are other ways of making your problem unique, e.g. by constraining the average of u in the domain.

Best regards,

Sven
Dear Peter, the hint of Ivar hit the point. Imagine a second order ODE d2u/dx^2=0. The solutions are all linear functions u=ax+b. Constraining only fluxes (e.f. du/dx at x=0) would allow you to define the coefficient a=0 only but not b. In order to do that and make u(x) unique, you need a gauge for u itself, for instance a Dirichlet conditon. In a PDE problem also a point gauge would be sufficient. You could do that that in Poisson Equation > Pointwise Constraints by writing a constraint expression u-0 (or just u). This would constrain u to zero in this point. Note however, that the solution might not be what you want. If you have a source term in the domain and you have zero flux conditions on all boundaries and fix only u=0 in a point, this point will act as sink for all everything that is produced. So basically you have an infinite flux through a point - not very physical. There are other ways of making your problem unique, e.g. by constraining the average of u in the domain. Best regards, Sven

Please login with a confirmed email address before reporting spam

Posted: 9 years ago 2015年8月12日 GMT-4 10:09
Thanks a bunch, got it working!
Thanks a bunch, got it working!

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.