Mathematica Asked by jchezlisos on April 5, 2021
I have an eigensystem I am trying to solve using NDEigensystem, so as a test I am using a different operator which is known to admit to analytical solutions which are smooth(i.e., no discontinuities in the derivative)[for context I am calculating quantum wavefunctions, hence discontinuities in the derivative are unphysical]
The problem I have however is that NDEigensystem gives me messy plots with sharp peaks when I know these should not be present. Is there any way to remove/smooth these sharp points or is this a fundamental limitation of NDEigensystem? If so are there any similar functions I could use for this analysis (although the use of NDEigensystem would be preferable). Any help would be really appreciated! 🙂
H1[[Rho]_, m_, l_] :=
R''[[Rho]] + 1/[Rho]*R'[[Rho]] - (m + 1)/l^2*R[[Rho]] -
m^2/[Rho]^2*R[[Rho]] - [Rho]^2/(4*l^4)*R[[Rho]];
H1test = H1[[Rho], 1, 1];
{PapEvals, PapEvecs} =
NDEigensystem[{-H1test, DirichletCondition[R[[Rho]] == 0, True]},
R[[Rho]], {[Rho], 0, 50}, 5];
Plot[PapEvecs, {[Rho], 0, 20}, PlotRange -> All, PlotPoints -> 100,
MaxRecursion -> 15]
Like shown in the comments by Henrik, you'd need to refine the mesh
H1[ρ_, m_, l_] :=
R''[ρ] + 1/ρ*R'[ρ] - (m + 1)/l^2*R[ρ] - m^2/ρ^2*R[ρ] - ρ^2/(4*l^4)*R[ρ];
H1test = H1[ρ, 1, 1];
{PapEvals, PapEvecs} =
NDEigensystem[{-H1test, DirichletCondition[R[ρ] == 0, True]},
R[ρ], {ρ, 0, 50}, 5,
Method -> {"PDEDiscretization" -> {"FiniteElement",
{"MeshOptions" -> {"MaxCellMeasure" -> 0.0025}}}}];
Plot[PapEvecs, {ρ, 0, 20}, PlotRange -> All, PlotPoints -> 100,
MaxRecursion -> 15]
Answered by user21 on April 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP