.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/statmech/quantum_statistics/plot_01_thermal_de_broglie_wavelength.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_statmech_quantum_statistics_plot_01_thermal_de_broglie_wavelength.py: De Broglie's matter waves: the thermal wavelength of a gas ============================================================= De Broglie's relation :math:`\lambda=h/p`, averaged over a gas's thermal spread of momenta, gives the thermal de Broglie wavelength .. math:: \Lambda=\frac{h}{\sqrt{2\pi mk_BT}}, computed by :func:`~chemistrykit.statmech.thermal_de_broglie_wavelength`. Translational motion can be treated classically when :math:`\Lambda` is much smaller than the mean spacing between molecules, :math:`(V/N)^{1/3}=(k_BT/P)^{1/3}`. The plot compares the two for several gases at 1 bar: only the lightest particles at the lowest temperatures come close. .. GENERATED FROM PYTHON SOURCE LINES 21-50 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np import scipy.constants as sc from chemistrykit.constants import K_B from chemistrykit.statmech import thermal_de_broglie_wavelength species = { "electron": (sc.m_e, "black"), "He": (4.0026 * sc.atomic_mass, "crimson"), "H2": (2.016 * sc.atomic_mass, "darkorange"), "N2": (28.014 * sc.atomic_mass, "seagreen"), "Ar": (39.948 * sc.atomic_mass, "steelblue"), } T = np.logspace(0.0, 3.5, 300) P = 1.0e5 spacing = (K_B * T / P) ** (1.0 / 3.0) fig, ax = plt.subplots(figsize=(7, 5)) for name, (mass, color) in species.items(): ax.loglog(T, thermal_de_broglie_wavelength(mass, T), color=color, label=rf"$\Lambda$ ({name})") ax.loglog(T, spacing, color="gray", linestyle="--", linewidth=2, label=r"mean spacing $(k_BT/P)^{1/3}$ at 1 bar") ax.set_xlabel("T (K)") ax.set_ylabel("length (m)") ax.set_title("Thermal de Broglie wavelength vs. intermolecular spacing") ax.legend(fontsize=8) fig.tight_layout() .. image-sg:: /api/gallery/statmech/quantum_statistics/images/sphx_glr_plot_01_thermal_de_broglie_wavelength_001.png :alt: Thermal de Broglie wavelength vs. intermolecular spacing :srcset: /api/gallery/statmech/quantum_statistics/images/sphx_glr_plot_01_thermal_de_broglie_wavelength_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 51-56 At room temperature Lambda is a small fraction of an angstrom for any molecule, some 100-1000 times smaller than the ~34 angstrom spacing of a gas at 1 bar -- the quantitative reason classical translational statistics work. An electron's wavelength, by contrast, is comparable to that spacing, and much larger than the spacing in a metal. .. GENERATED FROM PYTHON SOURCE LINES 56-64 .. code-block:: Python T_room = 298.15 d = (K_B * T_room / P) ** (1.0 / 3.0) for name, (mass, _) in species.items(): lam = thermal_de_broglie_wavelength(mass, T_room) print(f"{name:8s}: Lambda = {lam * 1e10:8.3f} angstrom, spacing / Lambda = {d / lam:8.1f}") plt.show() .. rst-class:: sphx-glr-script-out .. code-block:: none electron: Lambda = 43.168 angstrom, spacing / Lambda = 0.8 He : Lambda = 0.505 angstrom, spacing / Lambda = 68.3 H2 : Lambda = 0.712 angstrom, spacing / Lambda = 48.5 N2 : Lambda = 0.191 angstrom, spacing / Lambda = 180.7 Ar : Lambda = 0.160 angstrom, spacing / Lambda = 215.8 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.092 seconds) .. _sphx_glr_download_api_gallery_statmech_quantum_statistics_plot_01_thermal_de_broglie_wavelength.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_01_thermal_de_broglie_wavelength.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_01_thermal_de_broglie_wavelength.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_01_thermal_de_broglie_wavelength.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_