难以使用scipy.integrate.odeint来解决氢的径向波函数

时间:2016-10-30 12:15:42

标签: python scipy physics odeint

我正在尝试使用scipy.integrate.odeint来解决氢原子的波函数,但它似乎没有给出正确形式的解。这是应该实现SE方程的函数。

def eq(y,r,l,E_nl):  
[u_nl, v_nl] = y

#constants
alpha = 1/137 #Fine structure constant 
mu = 5.11E-1 #MeV/c^2 
V = -alpha/r #Potential  


dydr = [v_nl, (l*(l+1)/r**2 - 2 * mu * (E_nl - V))*u_nl]
return dydr

这是可以实现解算器的代码

ode(eq,y0,r,args=(l,E_nl))

常数都是自然单位。

y0 = [0, 1], l = 1, E_nl = 13.6e-6, r = np.linspace(1,7000,10000)

我已经查看了odeint的许多不同实现,并且无法弄清楚为什么我的代码没有生成正确的解决方案。 Wavefunction produced by the code

0 个答案:

没有答案
相关问题