.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/electrochem/electrolysis/plot_03_davy_alkali_metals.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_electrochem_electrolysis_plot_03_davy_alkali_metals.py: Davy's electrolytic isolation of potassium and sodium ======================================================= In 1807 Humphry Davy passed current through molten potash and soda and isolated potassium and sodium -- metals no chemical reducing agent of the day could free, because their reduction potentials are among the most negative in the electrochemical series. This example ranks Davy's two couples against the rest of :data:`~chemistrykit.electrochem.systems.standard_potentials.STANDARD_REDUCTION_POTENTIALS`, shows why the common reducing metals (Zn, Fe) cannot reduce K+ or Na+, computes the minimum electrolysis voltage for the molten chlorides with :func:`~chemistrykit.electrochem.systems.electrolysis.minimum_applied_voltage_electrolytic`, and uses Faraday's law to estimate how much potassium a current yields. .. GENERATED FROM PYTHON SOURCE LINES 18-25 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from chemistrykit.electrochem.systems.electrolysis import faradays_law_mass, minimum_applied_voltage_electrolytic from chemistrykit.electrochem.systems.standard_potentials import STANDARD_REDUCTION_POTENTIALS as T from chemistrykit.electrochem.systems.standard_potentials import cell_potential, is_spontaneous .. GENERATED FROM PYTHON SOURCE LINES 26-28 Could zinc or iron (the reducing agents available in 1807) reduce K+? The cell "K+ reduced by Zn" has a strongly negative potential: no. .. GENERATED FROM PYTHON SOURCE LINES 28-33 .. code-block:: Python for metal in ("Zn2+/Zn", "Fe2+/Fe"): for target in ("K+/K", "Na+/Na"): E = cell_potential(cathode=T[target], anode=T[metal]) print(f"{target} reduced by {metal.split('/')[1]}: E = {E:+.2f} V, spontaneous = {is_spontaneous(E)}") .. rst-class:: sphx-glr-script-out .. code-block:: none K+/K reduced by Zn: E = -2.17 V, spontaneous = False Na+/Na reduced by Zn: E = -1.95 V, spontaneous = False K+/K reduced by Fe: E = -2.49 V, spontaneous = False Na+/Na reduced by Fe: E = -2.27 V, spontaneous = False .. GENERATED FROM PYTHON SOURCE LINES 34-37 Driving the reaction electrically: minimum voltage to decompose the chloride into metal (cathode) and chlorine (anode), using standard aqueous potentials as an estimate for the molten salt. .. GENERATED FROM PYTHON SOURCE LINES 37-44 .. code-block:: Python for target in ("K+/K", "Na+/Na"): E = cell_potential(cathode=T[target], anode=T["Cl2/Cl-"]) print(f"Electrolysis of {target.split('/')[1]}Cl: at least {minimum_applied_voltage_electrolytic(E):.2f} V") mass_K = faradays_law_mass(current=1.0, time=3600.0, molar_mass=39.098, n=1) print(f"\n1 A for 1 h deposits {mass_K:.2f} g of potassium") .. rst-class:: sphx-glr-script-out .. code-block:: none Electrolysis of KCl: at least 4.29 V Electrolysis of NaCl: at least 4.07 V 1 A for 1 h deposits 1.46 g of potassium .. GENERATED FROM PYTHON SOURCE LINES 45-58 .. code-block:: Python names = list(T) values = np.array([T[name].E_standard for name in names]) order = np.argsort(values) colors = ["crimson" if names[i] in ("K+/K", "Na+/Na") else "lightgray" for i in order] fig, ax = plt.subplots(figsize=(6, 7)) ax.barh(range(len(names)), values[order], color=colors) ax.set_yticks(range(len(names))) ax.set_yticklabels([names[i] for i in order], fontsize=8) ax.axvline(0.0, color="black", linewidth=0.8) ax.set_xlabel(r"$E^\circ$ (V vs. SHE)") ax.set_title("Davy's targets: K and Na near the bottom of the series") fig.tight_layout() plt.show() .. image-sg:: /api/gallery/electrochem/electrolysis/images/sphx_glr_plot_03_davy_alkali_metals_001.png :alt: Davy's targets: K and Na near the bottom of the series :srcset: /api/gallery/electrochem/electrolysis/images/sphx_glr_plot_03_davy_alkali_metals_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_electrochem_electrolysis_plot_03_davy_alkali_metals.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_davy_alkali_metals.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_davy_alkali_metals.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_davy_alkali_metals.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_