1
$\begingroup$

I am trying to find the eigen values/functions of laplace operator in polar coordinates r, fi in disk region. In cartesian coordinates: (NDEigensystem[{-Laplacian[u[x, y], {x, y}], DirichletCondition[u[x, y] == 0, True]}, u[x, y], {x, y} \[Element] Disk[], 6]). In polar coordinates angle variabe should sutisfy periodic b.c. and radial shoud sutisfy dirichlet. The code I am working on looks like:

NDEigensystem[
 {
  -(D[y[r, fi], {fi, 2}]/r^2) - 1/r D[r*D[y[r, fi], r], r], (* equation *)
    DirichletCondition[y[r, fi] == 0, r == 1.],
    PeriodicBoundaryCondition[y[r, fi], fi == 2 Pi, Function[fi, fi - 2 Pi]
  },

 y[r, fi],
 {r, 0, 1}, {fi, 0, 2 Pi},
 3]

The problem is with setting following periodic condition y(r,fi+2 Pi) = y(r,fi) the way I did: PeriodicBoundaryCondition[y[r, fi], fi == 2 Pi, Function[fi, fi - 2 Pi]]. Is it possibe to do such "mixing" of boundary condition, and if yes how exacly should I specify them?

I will appreciate any help. Thank you very much in advance.

$\endgroup$
3
  • $\begingroup$ Please add the definition of rmax to the question. $\endgroup$
    – user21
    Feb 1 '18 at 11:11
  • $\begingroup$ Can you clarify what you mean with 'mixing'? $\endgroup$
    – user21
    Feb 1 '18 at 11:12
  • $\begingroup$ rmax was a typo , its the same 1. "Mixing" is to use Dirichlet b.c. for r and periodic for fi varibles. $\endgroup$ Feb 1 '18 at 11:48
4
$\begingroup$

After some trial and error process I finally made this work:

{vals, funs} = 
  NDEigensystem[{-(D[y[r, fi], {fi, 2}]/r^2) - 
     1/r D[r*D[y[r, fi], r], r],
    DirichletCondition[y[r, fi] == 0, r == 1 && 0 < fi <= 2 * Pi],
    PeriodicBoundaryCondition[y[r, fi], fi == 0, 
     TranslationTransform[{0, 2 *Pi}]]
    },
   y[r, fi], {r, 0, 1}, {fi, 0, 2 * Pi},
   5
   ];
vals

(* {5.78319, 14.684, 14.684, 26.3764, 30.4756} *)

which are the eigenvalues of the Laplace operator in a unit disk:

Sort@Flatten@Table[(N@BesselJZero[i, j])^2, {i, 0, 2}, {j, 1, 2}]
$\endgroup$
2
  • $\begingroup$ Great. Would you mind if I added this example to the documentation of PeriodicBoundaryCondition? $\endgroup$
    – user21
    Feb 2 '18 at 6:56
  • $\begingroup$ Sure with great pleasure. $\endgroup$ Feb 2 '18 at 7:01
2
$\begingroup$

The DirichletCondition overlaps with the periodic boundary condition (See the Issues Section)

You can use:

{vals, funs} = 
  NDEigensystem[{-(D[y[r, fi], {fi, 2}]/r^2) - 
     1/r D[r*D[y[r, fi], r], r],
    DirichletCondition[y[r, fi] == 0, 
     r == 1 && (fi != 0 && fi != 2 \[Pi])], 
    PeriodicBoundaryCondition[y[r, fi], fi == 2 \[Pi], 
     Function[fi, fi + 2 Pi]]}, y[r, fi], {r, 0, 1}, {fi, 0, 2 Pi}, 3];
vals
{5.9417694867356845`, 10.845294000815311`, 15.731501290360747`}
$\endgroup$
5
  • $\begingroup$ I`m sorry that I forgot to mention, but I would like to obtain the results the same as here NDEigensystem[{-Laplacian[u[x, y], {x, y}], DirichletCondition[u[x, y] == 0, True]}, u[x, y], {x, y} \[Element] Disk[], 6] the eigenvalues shuld be expressed with BesselJZero like Sort@Flatten@Table[(N@BesselJZero[i, j])^2, {i, 0, 2}, {j, 1, 3}] $\endgroup$ Feb 1 '18 at 12:33
  • $\begingroup$ @DavidBaghdasaryan, How does that relate to the question? Could you update the question? Why would you expect that a region with a periodic bc has the same eigenvalues as one with all Dirichlet conditions? $\endgroup$
    – user21
    Feb 1 '18 at 12:38
  • $\begingroup$ Sure I will update it, I just want to solve the disk problem (NDEigensystem[{-Laplacian[u[x, y], {x, y}], DirichletCondition[u[x, y] == 0, True]}, u[x, y], {x, y} \[Element] Disk[], 6]) in polar coordinates in polar coorfinates angle variabe should sutisfy periodic b.c. and radial shoud sutisfy dirichlet. $\endgroup$ Feb 1 '18 at 12:43
  • $\begingroup$ @DavidBaghdasaryan, I see. If you think it helps I can delete my answer. $\endgroup$
    – user21
    Feb 1 '18 at 13:17
  • $\begingroup$ No, no there is no need. Thank you @user21, your answer was helpful for finding the solution. $\endgroup$ Feb 2 '18 at 6:49

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.