0

The code (1.) finds eigenvalues and eigenfunctions of the system $H=-\frac{1}{2}\Delta-\frac{1}{\sqrt{\rho^2+z^2}}$ using NDEigensystem, where $\frac{1}{\sqrt{\rho^2+z^2}}$ is a Coulomb potential written in a cylindrical system.

in the code I renamed $\rho≡r$

1)

ClearAll["Global`*"]
rmax = 20;
zmax = 20;

{valsc, funsc} = NDEigensystem[{(-1/2* Laplacian[ψ[r, z], {r, θ, z}, "Cylindrical"] - 1/(Sqrt[r^2 + z^2])ψ[r, z]) + ψ[r, z]0.5}, ψ[ r, z], {r, 0, rmax}, {z, -zmax, zmax}, 20, Method -> {"SpatialDiscretization" -> {"FiniteElement",
{"MeshOptions" -> {"MaxCellMeasure" -> 0.05}}}, "Eigensystem" -> {"Arnoldi", "MaxIterations" -> 10000}}]; Sort[valsc] - 0.5

({-0.503427, -0.125434, -0.125001, -0.0591382, -0.0575661,
-0.0567415, -0.0366165, -0.0348045, -0.0331543, -0.0305338,
-0.0194174, -0.011569, -0.00383252, -0.000633831, 0.0115625,
0.0130426, 0.0228641, 0.0287679, 0.0380814, 0.0405388}
)

Why, if I enter the angle θ into the function ψ, then the code (2.) does not work correctly?

2)

ClearAll["Global`*"]
rmax = 20;
zmax = 20;

{valsr, funsr} = NDEigensystem[{(-1/2* Laplacian[ψ[r, θ, z], {r, θ, z}, "Cylindrical"] - 1/(Sqrt[r^2 + z^2])ψ[r, θ, z]) + ψ[ r, θ, z]0.5}, ψ[r, θ, z], {r, 0, rmax}, {θ, 0, 2*Pi}, {z, -zmax, zmax}, 100, Method -> {"SpatialDiscretization" -> {"FiniteElement",
{"MeshOptions" -> {"MaxCellMeasure" -> 0.05}}}, "Eigensystem" -> {"Arnoldi", "MaxIterations" -> 10000}}]; Sort[valsr] - 0.5

AsukaMinato
  • 9,758
  • 1
  • 14
  • 40
Mam Mam
  • 1,843
  • 2
  • 9
  • 2
    I don't know what you mean by "does not work correctly," but they are not the same problem, are they? One is 2D, one is 3D. And it makes a difference if $\partial \psi/\partial \theta$ is identically zero. – Michael E2 Jul 10 '23 at 00:03
  • 1
    If you want to formulate a standard Coulomb problem, then you should write your equation in spherical coorinates, because the standard Coulomb problem is spherically symmetric. And as noted in your previous question you expect degeneracy of the levels according to spherical symmetry. If you write your problem in cylindrical coorinates you may loose spherical symmetery from the outset, and the exspected degeneracy as well. So for a start I would suggest you try to set up a standard Coulomb problm, – Michael Weyrauch Jul 10 '23 at 03:47
  • 1
    where you know everything analytically, and if this works correctly then generalize to the problem you may want to solve. – Michael Weyrauch Jul 10 '23 at 03:47
  • 1
    Periodic boundary conditions for [Theta} atenot specified, excluding half of the possible eigenstates. But the real problem is time and memory. Task manager: after 10 minutes the memory in use is 30 GB and still growing at 100MB/s.For 40 GB RAM, after 15 min use of the hard disk becomes the timing problem. Perhaps drastic reduction of precision goal may help. Advice: Use Laplacian in spherical coordinates, and add the m^2 /r^2 term fo the trivial eigenfunctions of d/dphi, reducing the problem to (r, theta) with boundary value 0 at theta =0,pi. ###Stops with kernel shutdown. – Roland F Jul 10 '23 at 04:47
  • @Michael Weyrauch, thanks! I have rewritten the question for spherical coordinate system – Mam Mam Jul 10 '23 at 08:06
  • @Roland F, thanks a lot! Could you please demonstrate how to set periodic boundary conditions for the angle Theta in the code – Mam Mam Jul 11 '23 at 20:33
  • Add periodic boundary condition {Laplacian ..., psi[r,z ,0] == psi[r,z,2pi] } or use separation psi(r,z,theta) = u[r,z] e^(i m phi) yielding the additional centrifugal potential term m^2/(r^2) psi , m=0,+-1, ... – Roland F Jul 12 '23 at 07:54
  • @Roland F, thanks! I added periodic boundary conditions, but it still does not give a result, please see if I wrote it correctly – Mam Mam Jul 12 '23 at 10:11
  • @Roland F, {valsr, funsr} = NDEigensystem[{(-1/2* Laplacian[\[Psi][r, \[Theta], z], {r, \[Theta], z}, "Cylindrical"] - 1/(Sqrt[r^2 + z^2])*\[Psi][r, \[Theta], z]) + \[Psi][r, \[Theta], z]*0.5, PeriodicBoundaryCondition[\[Psi][r, \[Theta], z], \[Theta] == 2 \[Pi], Function[\[Theta], \[Theta] - 2 \[Pi]]]}, \[Psi][r, \[Theta], z], {r, 0, rmax}, {\[Theta], 0, 2*Pi}, {z, -zmax, zmax}, 10, Method -> {"SpatialDiscretization" -> {"FiniteElement", {"MeshOptions" -> {"MaxCellMeasure" -> 0.05}}}, "Eigensystem" -> {"Arnoldi", "MaxIterations" -> 10000}}]; – Mam Mam Jul 12 '23 at 10:12

0 Answers0