Message Boards Message Boards

Solving the Laplace equation with only Neumann boundary conditions

Posted 10 years ago

Hey

I want to solve the Laplace equation with Neumann boundary conditions on all boundaries, The solution seems random when I do not include any DirichletConditions though.

Here is an example of the Laplace in cylindrical coordinates (with cylindrical symmetry). "mesh" and "region" are define on the region 0 <= r <= 20 and 0 <= z <= 30.

T = NDSolveValue[ 
   op == NeumannValue[r, z == 0] + NeumannValue[r, z == 30], 
   u, {r, z} \[Element] mesh, 
   Method -> {"FiniteElement", 
     "MeshOptions" -> {"BoundaryMeshGenerator" -> "Continuation"}}];
Show[
 ContourPlot[T[r, z], {r, z} \[Element] region , Mesh -> None, 
  ColorFunction -> "TemperatureMap", Contours -> 40, 
  AspectRatio -> Automatic, PlotRange -> All, 
  Method -> {"GridLinesInFront" -> True}]
 ]

"op" is: op function

And I get the result: plot

What do I do wrong?

POSTED BY: Jens Rix
3 Replies
Posted 10 years ago

By "NeumannValue[r, z == 0]" I mean that the derivative perpendicular to the surface at z=0 is equal to the linear function f(r)=r. This works when I include a DirichletValue.

Where are the conditions for the shank?

When I don't specify anything on a boundary, Mathematica uses that NeumannValue[0,boundary]. Right?

This is ill-posed problem as there is no unique solution in this case.

Sorry, I didn't make myself clear. I am only going to use the gradient of the solution. When there is no unique solution in this case it means that adding a constant is a solution as well. If I could just specify a single point inside the region (and thereby not spoil the boundaries) I would get a unique solution. Would that be possible?

POSTED BY: Jens Rix

I want to solve the Laplace equation with Neumann boundary conditions on all boundaries, The solution seems random when I do not include any DirichletConditions though.

You can't have Neumann boundary conditions on all boundaries. This is ill-posed problem as there is no unique solution in this case. One of the boundaries must be Dirichlet.

POSTED BY: Nasser M. Abbasi

First, what does it mean to say

NeumannValue[r, z == 0]

taken into account that r is an independent variable?

Then there are not enough conditions to avoid randomness in a way. To see that take manual's example

NDSolveValue[{\!\(
\*SubsuperscriptBox[\(\[Del]\), \({x, y}\), \(2\)]\(u[x, y]\)\) == 
   NeumannValue[1., x >= 0.35], 
  DirichletCondition[u[x, y] == 0., x <= -0.3]}, u, {x, y} \[Element] 
  Disk[]]
Plot3D[%[x, y], {x, y} \[Element] Disk[]]

and kick the Dirichlet condition out. The result is (in 2D)

In[9]:= NDSolveValue[{\!\(
\*SubsuperscriptBox[\(\[Del]\), \({x, y}\), \(2\)]\(u[x, y]\)\) == 
   NeumannValue[1., x >= -1.]}, u, {x, y} \[Element] Disk[]]

During evaluation of In[9]:= NDSolveValue::femibcnd: No DirichletCondition or Robin-type NeumannValue was specified; the result may be off by a constant value. >>

Out[9]= InterpolatingFunction[{{-1., 1.}, {-1., 1.}}, <>]

and this NDSolveValue::femibcnd is pretty reasonable. In 3D the question is: Where are the conditions for the shank?

POSTED BY: Udo Krause
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract