.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/surface/langmuir_hinshelwood/plot_01_lh_kinetics.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_surface_langmuir_hinshelwood_plot_01_lh_kinetics.py: Langmuir-Hinshelwood surface-reaction kinetics ================================================= Single-site Langmuir-Hinshelwood kinetics (:func:`~chemistrykit.surface.systems.langmuir_hinshelwood.lh_rate_single_site`) transitions from first order (low pressure) to zero order (surface saturated) in the reactant's pressure. Dual-site kinetics (:func:`~chemistrykit.surface.systems.langmuir_hinshelwood.lh_rate_dual_site`) -- competitive adsorption of two reactants on the same sites -- shows the characteristic non-monotonic rate-vs-pressure behavior: too much of one reactant crowds the other off the surface entirely. .. GENERATED FROM PYTHON SOURCE LINES 16-29 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from chemistrykit.surface.systems.langmuir_hinshelwood import lh_rate_dual_site, lh_rate_single_site from chemistrykit.surface.visualizers.surface_plots import plot_lh_rate_vs_pressure k, K_A = 4.0, 2.0 P_A = np.linspace(0.001, 20.0, 300) rate_single = lh_rate_single_site(k, K_A, P_A) print(f"Rate at half-saturation pressure P_A=1/K_A: {lh_rate_single_site(k, K_A, 1.0 / K_A):.4f} (should be k/2 = {k / 2:.4f})") print(f"Rate at very high pressure: {lh_rate_single_site(k, K_A, 1.0e6):.4f} (should saturate to k = {k})") .. rst-class:: sphx-glr-script-out .. code-block:: none Rate at half-saturation pressure P_A=1/K_A: 2.0000 (should be k/2 = 2.0000) Rate at very high pressure: 4.0000 (should saturate to k = 4.0) .. GENERATED FROM PYTHON SOURCE LINES 30-32 Dual-site kinetics: fix P_B and scan P_A. The rate rises, peaks, then falls as A crowds B off the surface. .. GENERATED FROM PYTHON SOURCE LINES 32-37 .. code-block:: Python K_B, P_B = 5.0, 0.2 rate_dual = lh_rate_dual_site(k, K_A, P_A, K_B, P_B) peak_idx = int(np.argmax(rate_dual)) print(f"\nDual-site rate peaks at P_A = {P_A[peak_idx]:.4f}") .. rst-class:: sphx-glr-script-out .. code-block:: none Dual-site rate peaks at P_A = 1.0043 .. GENERATED FROM PYTHON SOURCE LINES 38-48 .. code-block:: Python fig, axes = plt.subplots(1, 2, figsize=(10, 4)) plot_lh_rate_vs_pressure(P_A, rate_single, ax=axes[0]) axes[0].axhline(k, color="gray", linestyle="--", linewidth=0.8) axes[0].set_title("Single-site: saturates to k") plot_lh_rate_vs_pressure(P_A, rate_dual, ax=axes[1]) axes[1].axvline(P_A[peak_idx], color="gray", linestyle="--", linewidth=0.8) axes[1].set_title("Dual-site: non-monotonic") plt.tight_layout() plt.show() .. image-sg:: /api/gallery/surface/langmuir_hinshelwood/images/sphx_glr_plot_01_lh_kinetics_001.png :alt: Single-site: saturates to k, Dual-site: non-monotonic :srcset: /api/gallery/surface/langmuir_hinshelwood/images/sphx_glr_plot_01_lh_kinetics_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.059 seconds) .. _sphx_glr_download_api_gallery_surface_langmuir_hinshelwood_plot_01_lh_kinetics.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_lh_kinetics.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_01_lh_kinetics.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_01_lh_kinetics.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_