i am trying to plot wavefunction which is scattered by a step function. I referred Griffith quantum mechanics 2nd edition problem 2.35. here, the energy is E=V/3 and i set V=3. the shape of the potential looks like cliff, left side of the cliff is higher than the right side one.
Then, i am trying to find reflection coefficient for this and i just compared the height of the wavefunction; left with respect to the step function is 2, and right is 1.7, and i got a reasonable value of reflection probability; 0.15 but the exact answer is 0.11111
My question is that is this code is correct or i just got a right answer by chance???
import matplotlib.pyplot as plt
%matplotlib inline
from scipy.integrate import odeint
import numpy as np
def ps(y,t):
if t<10:
u=0
else:
u=-3
psi=y[0]
dpsi=y[1]
dp=dpsi
dp2=(-1+u)*psi
return [dp,dp2]
yo=[2,0]
t=np.linspace(0,100,400)
psis=odeint(ps,yo,t)
#plt.ylim(-3,3)
plt.xlim(0,20)
plt.plot(t,psis[:,0],'r')
plt.plot([0,10,10,40],[0,0,-3,-3],'g')
Aucun commentaire:
Enregistrer un commentaire