-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numerov wavefunction for continuum #43
Comments
Hi @zzpwahaha Thank you for your question.
Hope this clarifies all. I would have to think how to extend the existing method correctly for free states. |
Hi Nikola %%cython -a
import numpy as np
cdef extern from "math.h":
double fabs(double x)
def Numerovc(double [:] f, double x0, double dx, double dh):
cdef int divergentPoint = 0
cdef double maxValue = 1e16
cdef double [:] x = np.zeros(len(f))
x[0]=x0
x[1]=x0 + dh*dx
cdef double h2 = dh*dh
cdef double h12 = h2/12.
cdef double w0 = x[0]*(1-h12*f[0])
cdef double w1 = x[1]*(1-h12*f[1])
cdef double w2
cdef double xi = x[1]
cdef double fi = f[1]
for i in range(2,len(f)):
w2 = 2*w1 - w0 + h2*fi*xi # here fi=f1
fi = f[i] # fi=f2
xi = w2/(1-h12*fi)
x[i] = xi
w0 = w1
w1 = w2
# check convergence to avoid instability near origin
return x
def getRadialWf_Contin(Enconti,Rlsqrt,l,j):
feffsqrt = - np.array([effRadialPotentialsqrt(l,0.5,j, i, Enconti) for i in Rlsqrt])
ursqrt = Numerovc(feffsqrt,
0.0,
-1e-15,
Rlsqrt[1]-Rlsqrt[0]) * np.sqrt(Rlsqrt)
normsqrt = integrate.simps(ursqrt**2,x=Rlsqrt**2)
return ursqrt*1/np.sqrt(abs(normsqrt))
def effRadialPotentialsqrt(l, s, j, x, stateEnergy):
r = x * x
mu = (atom.mass - cc.m_e) / atom.mass
return -3. / (4. * r) + 4. * r * (
2. * mu * (stateEnergy - atom.potential(l, s, j, r))
- l * (l + 1) / (r**2)
) where the method is the same as in ARC in the sense that we use the same sqrt(r) discretization as well as the parametric model potential. The start point of integration is at origin. The problem with that is in some case, the wavefunction's amplitude is too large and the normalization returns a Nan. Hope that will help you |
Hi
I am trying to compute the continuum radial wavefuntion of Rb87 with the parameteric model potential https://journals.aps.org/pra/pdf/10.1103/PhysRevA.49.982. I looked up the cpp code in
arc_c_extensions.c
and have couple of questions:x = sqrt(r)
. Is that for a better percision? since it is not the regular way we write the radial wavefunction.u =r * R
, like this with the corresponding paramatric potential taken from you code. Below is my code. What I found is that the solution of the two methods sometimes agree but mostly do not. For example,En = 1.5, Rl = np.linspace(1e-7,100,10000)
does not, but
En = 0.5, Rl = np.linspace(1e-7,100,10000)
agree. I am wondering what could cause that, would it be the way of re-parametrization?
The text was updated successfully, but these errors were encountered: