I have a square, at left and right edge of it; I exactly know the boundary values (Dirichlet boundary). But at top and bottom edge, I want to let the potential to float. That means I don't imply any fixed boundary value rather I want the potential to take any value depending on the source term (i.e. right hand side of the Poisson's equation) as well as on the boundaries imposed at left and right edge.

How can I do that? More specifically, How would my matrix look to do it?

[Note: When I discretize the Poisson's equation in finite difference scheme, I get the matrix equation $Au$=$h^2$$f$$-$$B$, where $B$ serves for the Dirichlet boundaries. In the figure I show how it looks when I apply Dirichlet boundary at left and right edge. Then how to put floating boundary at top and bottom edge?]

enter image description here


You can't let the values at the top and bottom totally float. It will leave the matrix system under-determined.

If you look at it from the discretized matrix perspective it's obvious: Total of $(m+1)(n+1)$ unknowns. $(m-1)(n-1)$ internal constraints enforcing the discretized form of the p.d.e. $2(m+1)$ Dirichlet constraints at the left and right boundaries. That leaves $2(n-1)$ unconstrained equations.

So you have to have boundary conditions on the top and bottom. The values can't "float". What specific boundary condition depends on the physics of your specific situation. Maybe you want to impose a Neumann boundary condition? That will allow the value itself to "float", but force the derivative (specifically, the normal of the gradient) to zero. This Computational Science.SE question talks about that implementation.

There's also Robin boundary conditions which more-or-less enforce a ratio between the Dirichlet and Neumann conditions. A form of these is often used in solutions of the Helmholtz equation to absorb waves that hit the boundaries.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.