Periodic Boundary Condition in General Form PDE -- No Solution for very Simple Equation

Please login with a confirmed email address before reporting spam

Dear COMSOL community,

I have a lack in understanding solving PDE with PBC, which I can break down to a very simple example, i.e. finding a solution for . The height and width of the 2D simulation domain is , and at the top and bottom a Dirichlet BC () should be applied, while at the left and right site a periodic BC should be applied.

Integrating above equation twice, is given as and from the Dirichlet BC we get and from the periodic BC .

However, when implementing this in the COMSOL general form PDE interface and solving using a Stationary Solver, I do not get the result but an error "Failed to find a solution. The relative error (0.0092) is greater than the relative tolerance.", even not when I use the calculated solution as initial values. However, when replacing the periodic BC at the left and right Interface with a Dirichlet BC , I get the expected result. Therefore, I have two questions:

  • Why don't I get any result when using periodic BC at the left and right interface?
  • Why does the periodic BC not overwrite the default Zero Flux 1 BC, but contribute to it? I also implemented what is suggested here, which then overwrites the Zero Flux 1 BC, but I get the same error as using the implemented Periodic Condition.

Attached is a file of the simulation.

Thank you in advance!



1 Reply Last Post 25 giu 2025, 11:32 CEST
Henrik Sönnerlind COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 11 hours ago 25 giu 2025, 11:32 CEST

A correct integration gives

so the problem is a bit more complicated than you assume. When you set Dirichlet conditions on top and bottom, the only things known are and .

But the main reason it does not work, is that you have not set the y-component of the Conservative Flux to 'uy'.

Finally: The information about overrides seems strange. We need to investigate that. But it does not affect the solution in any way since the Zero Flux condition does not have any contributions at all. So the override is a pure formality.

-------------------
Henrik Sönnerlind
COMSOL
A correct integration gives u (x,y) = -\frac{w^2}{4 \pi^2}\, \sin(\frac{2 \pi}{w}\,x)\,\sin(\frac{\pi}{w}\, y) + f_1(y) x + f_2(y) so the problem is a bit more complicated than you assume. When you set Dirichlet conditions on top and bottom, the only things known are f_1(0) + f_2(0)x = 0 and f_1(1) + f_2(1)x = 0 . But the main reason it does not work, is that you have not set the y-component of the Conservative Flux to 'uy'. Finally: The information about overrides seems strange. We need to investigate that. But it does not affect the solution in any way since the *Zero Flux* condition does not have any contributions at all. So the override is a pure formality.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.