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

Laplace equation with gradient boundary conditions

424 views
Skip to first unread message

Tom Wolander

unread,
Nov 29, 2011, 7:05:47 AM11/29/11
to
I have bought Mathematica 8 a week ago and this is my first post on
this board.
My main purpose for the purchase was to work on PDEs, specifically on
the heat equation.
As one of the first tests I wanted to solve a steady state temperaure
distribution on a rectangular domain with a radiative boundary
condition on one face (flux=0 on the other 3). I made sure to have
continuity in corners.
This is a rather easy exercice of a radiating wall - I have solved
many of similar and more complex problems "by hand" many years ago.
Unfortunately I failed with NDSolve in Mathematica and the tutorials
are of no help despite some 4 hours I spent in there.
I found only one rather esotherical hint somewhere deep in one "Issue"
section on a command which seemed to say that NDSolve could work only
with Cauchy boundary conditions.
If this were true, then use of Mathematica 8 would be excluded for
virtually any work in thermics where the boundary conditions are
always of the (non Cauchy) convection/radiation type.
In other words the elementary steady state problem (Laplace equation)
with flux conditions on boundaries can't be solved?

It might be that this issue has been already discussed but I couldn't
find a relevant thread by using search.

Could somebody help me by answering whether Laplace equation with
Robin like BC can't really be solved?
And if it can be done, what have I missed to make NDSolve work?

Andrzej Kozlowski

unread,
Nov 30, 2011, 3:22:19 AM11/30/11
to

On 29 Nov 2011, at 13:03, Tom Wolander wrote:

> Could somebody help me by answering whether Laplace equation with
> Robin like BC can't really be solved?
> And if it can be done, what have I missed to make NDSolve work?

I think it is quite clearly stated that NDSolve, which uses the method
of lines to solve PDE's, can't solve purely elliptic PDE's, including
the Laplace equation.
I believe (though not on the basis of any personal experience) that you
can do much of what you want with the IMTEK package
http://portal.uni-freiburg.de/imteksimulation/downloads/ims

Andrzej Kozlowski

Mark McClure

unread,
Nov 30, 2011, 3:29:59 AM11/30/11
to
On Tue, Nov 29, 2011 at 7:03 AM, Tom Wolander <ult...@hotmail.com> wrote:

> I have bought Mathematica 8 a week ago and this is my first post on this board.
> My main purpose for the purchase was to work on PDEs, specifically on the
> heat equation. As one of the first tests I wanted to solve a steady state
> temperature distribution on a rectangular domain with a radiative boundary
> condition on one face (flux=0 on the other 3). I made sure to have
> continuity in corners.

First, you should know that V8 does *not* include a finite element
solver - probably the best tool to use for this type of problem. All
signs seem to indicate that NDSolve will provide access to a finite
element solver by V9, which would hopefully be released sometime next
year. For PDEs, NDSolve use the so-called numerical method of lines,
which requires one dynamic variable. What one can do, is to set up a
hyperbolic equation that converges to the steady state solution you
describe. Clearly, this is not terribly efficient but it's good
enough for government work. This technique can deal with a wide
variety of types of boundary conditions - radiation type conditions
are no problem. Inconsistent boundary conditions can also be dealt
with but, of course, this will affect error estimates.

I have taught a full-semester undergraduate PDE course several times
using Mathematica and have a web page for the last time I taught it:
http://facstaff.unca.edu/mcmcclur/class/Spring11PDE/

This page has quite a few Mathematica demos with explanations on how
to use NDSolve and other tools. Specifically, the third demo link
titled "Heat conduction on a square" describes a situation close to
yours. In that example, the boundary conditions are not continuous;
the technique should work better if your boundary conditions are
continuous.

I'm really looking forward to V9,
Mark McClure

Oliver Ruebenkoenig

unread,
Dec 1, 2011, 7:23:21 AM12/1/11
to


On Tue, 29 Nov 2011, Tom Wolander wrote:

> I have bought Mathematica 8 a week ago and this is my first post on
> this board.
> My main purpose for the purchase was to work on PDEs, specifically on
> the heat equation.
> As one of the first tests I wanted to solve a steady state temperaure
> distribution on a rectangular domain with a radiative boundary
> condition on one face (flux=0 on the other 3). I made sure to have
> continuity in corners.
> This is a rather easy exercice of a radiating wall - I have solved
> many of similar and more complex problems "by hand" many years ago.
> Unfortunately I failed with NDSolve in Mathematica and the tutorials
> are of no help despite some 4 hours I spent in there.
> I found only one rather esotherical hint somewhere deep in one "Issue"
> section on a command which seemed to say that NDSolve could work only
> with Cauchy boundary conditions.
> If this were true, then use of Mathematica 8 would be excluded for
> virtually any work in thermics where the boundary conditions are
> always of the (non Cauchy) convection/radiation type.

Tom, could you be a little more specific in writing down the boundary
condition you want? I assume it is not a generalized Neumann condition. Is
it more like a Sommerfeld condition?

Thanks,
Oliver

> In other words the elementary steady state problem (Laplace equation)
> with flux conditions on boundaries can't be solved?
>
> It might be that this issue has been already discussed but I couldn't
> find a relevant thread by using search.
>

Nasser M. Abbasi

unread,
Dec 2, 2011, 7:24:54 AM12/2/11
to
On 11/29/2011 6:05 AM, Tom Wolander wrote:

>
> Could somebody help me by answering whether Laplace equation with
> Robin like BC can't really be solved?

Robin is when the same boundary has both Neumann boundary conditions and
Dirichlet on it.

I have a mathematica CDF which solves the Poisson/Laplace on
rectangle, non-uniform grid, with mixed boundary conditions.

In mixed BC, one boundary can have Neumann and the other boundary
can have Dirichlet.

It is still beta, and can have bugs, but here it is if you like
to try it (#25 in the list)

http://12000.org/my_notes/mma_demos/KERNEL/KERNEL.htm

I update it on regular basis.

I implemented it myself, using finite difference. I can
add Robin, not too hard to do, but I do not think Robin is used
much. At least in school, we never had a HW problem using it,
and it would make the GUI where one defines the BC' more
complex, and I am running out of real estate on the demonstration
interace (too many things to fit on too little space :)

--Nasser

Tom Wolander

unread,
Dec 2, 2011, 7:29:59 AM12/2/11
to
Oliver

It is really an easy exercice of a rectangular wall (axb) isolated on
3 sides and radiating on the 4th.
In steady state f is solution of Laplace = 0 with BC df/dx(a,y)=df/
dx(0,y)=df/dy(x,0)=0 and df/dy(x,b) = S(x) - k.[f(x,b)]^4 . Same
problem is obtained with a convective case just by replacing k.
[f(x,b)]^4 by k.f(x,b).
S(x) is the incoming radiation and can serve to adjust continuity if
that's what one wants to do.
So it has nothing to do with Sommerfeld conditions. The convective
case is just a Robin BC and the radiating case is a generalised Robin.

Andrzej

It is neither clearly nor obviously stated that NDSolve can't solve
the Laplace equation. DSolve even uses it as an example of symbolical
solution. I agree that after having spent hours and/or for somebody
familiar with resolution algorithms it becomes clear but I can assure
everybody that for a first time user it is a long and unpleasant
journey. I would have expected that in the tutorial (part dealing with
classification of PED) there would be a warning with glowing red
characters following the definitions of PED : "Beware ! NDSolve is
unable to solve most of these PED with the exception of : {list of
conditions}".

Mark

Thanks. I have come empirically to the same conclusion and you
explained me why. I have also got some results by looking at the
asymptotic behaviour of the time dependent equation. This is not
something one would do spontaneously when working by hand - the
Laplace equation in 2D is easy so there is no incentive going to the
time dependent case. I agree, will have to wait for Version 9 to deal
with the problems I wanted to deal.
Thanks for the link. Even if I knew the mathematics, I understood a
bit more about Mathematica :)

0 new messages