This page was generated from the Jupyter notebook rubidium_wavefunction.ipynb.

Rubidium wavefunction and potential

[1]:
import logging

import matplotlib.pyplot as plt
import numpy as np

from ryd_numerov.rydberg import RydbergState

logging.basicConfig(level=logging.INFO, format="%(levelname)s %(filename)s: %(message)s")
logging.getLogger("ryd_numerov").setLevel(logging.DEBUG)
[ ]:
atom = RydbergState("Rb", n=130, l=129, j=129.5)
atom.create_wavefunction()

turning_points = {
    "hydrogen": atom.model.calc_hydrogen_turning_point_z(atom.n, atom.l),
    "classical": atom.model.calc_turning_point_z(atom.n, atom.l, atom.j),
}
[3]:
hydrogen = RydbergState("H_textbook", n=atom.n, l=atom.l, j=atom.j)
hydrogen.create_model()
hydrogen.create_wavefunction()
[4]:
label = f"{atom.species}:n={atom.n},l={atom.l},j={atom.j}"
fig, axs = plt.subplots(1, 3, figsize=(12, 4))

axs[0].plot(atom.grid.z_list, atom.wavefunction.w_list, "C0-", label=label)
axs[0].plot(hydrogen.grid.z_list, hydrogen.wavefunction.w_list, "C1--", lw=0.75, label="Hydrogen")
axs[0].set_xlabel(r"$z$")
axs[0].set_ylabel(r"$w(z)$")

axs[0].axvline(turning_points["classical"], color="k", ls="-", lw=0.75, label="classical turning point")
axs[0].axvline(turning_points["hydrogen"], color="C1", ls="--", lw=0.75, label="hydrogen turning point")
axs[0].legend()

axs[1].plot(atom.grid.x_list, atom.wavefunction.u_list, "C0-", label=label)
axs[1].plot(hydrogen.grid.x_list, hydrogen.wavefunction.u_list, "C1--", lw=0.75, label="Hydrogen")
axs[1].set_xlabel(r"$r / a_0$")
axs[1].set_ylabel(r"$u(r) = r R(r)$")
axs[1].legend()

axs[2].plot(atom.grid.x_list, atom.wavefunction.r_list, "C0-", label=label)
axs[2].plot(hydrogen.grid.x_list, hydrogen.wavefunction.r_list, "C1--", lw=0.75, label="Hydrogen")
axs[2].set_xlabel(r"$r / a_0$")
axs[2].set_ylabel(r"$R(r)$")
axs[2].legend()

fig.tight_layout()
plt.show()
../_images/examples_rubidium_wavefunction_4_0.png
[5]:
fig, ax = plt.subplots(figsize=(8, 4))

new_z_list = np.linspace(0.75 * np.sqrt(atom.grid.x_min), np.sqrt(atom.grid.x_max), 10_000)
new_x_list = np.power(new_z_list, 2)
hydrogen_v_phys = hydrogen.model.calc_total_effective_potential(new_x_list)

ax.plot(new_z_list, atom.model.calc_total_effective_potential(new_x_list), "k-", label=r"$V_{eff}$")
ax.plot(new_z_list[::200], hydrogen_v_phys[::200], "kx", lw=0.75, label=r"Hydrogen $V_{eff}$")

if True:
    ax.plot(new_z_list, atom.model.calc_effective_potential_centrifugal(new_x_list), "C5-", label=r"$V_{centrifugal}$")
    ax.plot(new_z_list, atom.model.calc_potential_coulomb(new_x_list), "C2-", label=r"$V_{Coulomb}$")
    ax.plot(
        new_z_list, atom.model.calc_model_potential_marinescu_1993(new_x_list), "C3:", label=r"$V_{marinescu 1993}$"
    )
    ax.plot(new_z_list, atom.model.calc_effective_potential_sqrt(new_x_list), "C6:", label=r"$V_{sqrt}$")

ax.axvline(turning_points["classical"], color="k", ls="-", lw=0.75, label=None)
ax.axvline(turning_points["hydrogen"], color="C1", ls="--", lw=0.75, label=None)

ax.set_xlabel(r"$z$")
ax.set_ylabel(r"$V(z)$")
ax.legend(loc="upper right")

fig.tight_layout()
plt.show()
../_images/examples_rubidium_wavefunction_5_0.png