回答此问题可获得 20 贡献值,回答如果被采纳可获得 50 分。
<p>我试图用Python绘制以下等式的图形</p>
<p>二维量子环径向微分方程的解</p>
<p><img src="https://i.stack.imgur.com/d0TrH.png" alt=""/></p>
<p>beta参数是</p>
<p><img src="https://i.stack.imgur.com/Zhpnm.png" alt="enter image description here"/></p>
<p>这是我的尝试</p>
<pre><code> import numpy as np
from scipy.special import gamma, genlaguerre
import matplotlib.pyplot as plt
from scipy import exp, sqrt
m = 0.067*9.1*10E-31
R = 5E-9
r = np.linspace(0, 20E-9)
#Definição do parâmetro beta
def beta(gama):
flux = np.linspace(0,1.0)
beta = sqrt((m-flux)**2+(gama**4)/4)
return beta
def Rn(n,gama):
raiz = sqrt((gamma(n+1)/((2**beta(gama)) * gamma(n+beta(gama)+1))))
eval_g = genlaguerre((n,beta(gama)),((gama * r/R)**2/2))
exp_g = exp(-((gama * r/R)**2)/4)
return (1/R) * raiz * (gama * r/R)**beta(gama) * exp_g * eval_g
sol1 = Rn(0,1.5)
sol2 = Rn(0,2.0)
sol3 = Rn(0,2.5)
sol4 = Rn(0,3.0)
fig, ax = plt.subplots()
ax.plot(r/R, sol1, color = 'red', label = '$\gamma$ = 1.5')
ax.plot(r/R, sol2, color = 'green', label = '$\gamma$ = 2.0')
ax.plot(r/R, sol3, color = 'blue', label = '$\gamma$ = 2.5')
ax.plot(r/R, sol4, color = 'black', label = '$\gamma$ = 3.0')
ax.legend()
ax.set_xlabel('R/r')
ax.set_ylabel('$R_0(r)$')
</code></pre>
<p>使用genlaguerre的erro</p>
<pre><code>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
</code></pre>
<p>这里<a href="https://www.sciencedirect.com/science/article/pii/S074960361300061X" rel="nofollow noreferrer">the link to the article</a></p>