Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Poisson equation with boundary conditions on rectangle

560 views
Skip to first unread message

Benjamin Hell

unread,
Mar 21, 2008, 2:58:09 AM3/21/08
to
Hi,
I'm currently trying to solve the following pde with rectangle boundary (I better already use mathematica code here):

The equation (Poisson equation):
D[u[y, z], y, y] + D[u[y, z], z, z] + 1 == 0

The boundary conditions on the rectangle(y in [0,0.1] and z in [-0.4,0.4]):
u[y, 0.4] == 0, u[y, -0.4] == 0, u[0, z] == 0,
Derivative[1, 0][u][0.1, z] == 0

I tried the following in mathematica:
eqn = D[u[y, z], y, y] + D[u[y, z], z, z] + 1 == 0; //defining equation
NDSolve[{eqn, u[y, 0.4] == 0, u[y, -0.4] == 0, u[0, z] == 0, Derivative[1, 0][u][0.1, z] == 0 }, u, {y, 0, 0.1}, {z, -0.4, 0.4}] //using NDSolve to solve the boundary problem

But, as you might guess, I get an error using NDSolve the way above: "NDSolve::ivone: Boundary values may only be specified for one independent variable. Initial values may only be specified at one value of the other independent variable."
When I lookup the description of that error I realize that in my example the following error condition matches: "This input generates a message because the equations specify values for the solution on all sides of the solution region."
Does this mean, that mathematica can't approximate the solution to my problem with NDSolve or am I doing something wrong?
So overall question is: How can I solve my problem using mathematica without writing my own numerical pde solver for my problem?

Thanks in advance!

Szabolcs Horvát

unread,
Mar 22, 2008, 1:51:11 AM3/22/08
to

Quoting the documentation at
http://reference.wolfram.com/mathematica/tutorial/NDSolvePDE.html

"""
The Numerical Method of Lines

...

It is necessary that the PDE problem be well-posed as an initial value
(Cauchy) problem in at least one dimension, since the ODE and DAE
integrators used are initial value problem solvers. This rules out
purely elliptic equations such as Laplace's equation, but leaves a large
class of evolution equations that can be solved quite efficiently.
"""

So it seems that you'll need to look for third party packages to solve
this problem with Mathematica. (But it is possible that I overlooked
something and it can do it with some different method. I've never used
Mathematica to solve PDEs.) You can try your luck at the W Library Archive:
http://library.wolfram.com/

Michael Debono

unread,
Apr 7, 2008, 5:21:01 AM4/7/08
to

I too have a problem like yours...I found this link which may help
you:
http://documents.wolfram.com/mathematica/Built-inFunctions/AdvancedDocumentation/LinearAlgebra/LinearAlgebraInMathematica/Examples/AdvancedDocumentationLinearAlgebra6.3.html
It uses a finite difference method..even tough I don't really know how
it works lol!

Oliver Ruebenkoenig

unread,
Apr 8, 2008, 5:38:45 AM4/8/08
to

Hi Michael,

If you are interested in how the FDM works have a look at a tutorial i
wrote some time ago.

http://www.imtek.uni-freiburg.de/simulation/mathematica/IMSweb/imsTOC/Lectures%20and%20Tips/Simulation%20I/index.html

Oliver

Oliver Ruebenkoenig, <ruebenko AT uni-freiburg.de>

0 new messages