.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/electrochem/standard_potentials/plot_01_daniell_cell.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_standard_potentials_plot_01_daniell_cell.py: The Daniell cell: a steady 1.10 V from zinc and copper ======================================================== Daniell's 1836 two-fluid cell separated a zinc electrode in zinc (or acid) solution from a copper electrode in copper sulfate. Copper metal, not hydrogen gas, is deposited at the cathode, so the cell does not polarize. This example reproduces its standard potential with :func:`~chemistrykit.electrochem.systems.standard_potentials.standard_cell_potential`, balances the overall reaction with :func:`~chemistrykit.electrochem.systems.standard_potentials.balance_redox_reaction`, and uses the Nernst equation to show how gently the voltage falls as the cell discharges -- the steadiness that made it the first practical voltage standard. .. GENERATED FROM PYTHON SOURCE LINES 18-25 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from chemistrykit.electrochem.systems.nernst import nernst_potential from chemistrykit.electrochem.systems.standard_potentials import STANDARD_REDUCTION_POTENTIALS as T from chemistrykit.electrochem.systems.standard_potentials import balance_redox_reaction, standard_cell_potential .. GENERATED FROM PYTHON SOURCE LINES 26-27 Zn(s) + Cu2+(aq) -> Zn2+(aq) + Cu(s) .. GENERATED FROM PYTHON SOURCE LINES 27-31 .. code-block:: Python E0 = standard_cell_potential("Cu2+/Cu", "Zn2+/Zn") cathode_mult, anode_mult, n = balance_redox_reaction(T["Cu2+/Cu"], T["Zn2+/Zn"]) print(f"Daniell cell E0 = {E0:.2f} V; balancing multiples = ({cathode_mult}, {anode_mult}), n = {n}") .. rst-class:: sphx-glr-script-out .. code-block:: none Daniell cell E0 = 1.10 V; balancing multiples = (1, 1), n = 2 .. GENERATED FROM PYTHON SOURCE LINES 32-34 As the cell discharges, Cu2+ is consumed and Zn2+ produced (starting from 1 M each). Q = [Zn2+]/[Cu2+]. .. GENERATED FROM PYTHON SOURCE LINES 34-48 .. code-block:: Python extent = np.linspace(0.0, 0.99, 200) Q = (1.0 + extent) / (1.0 - extent) E = nernst_potential(E0, n, Q) fig, ax = plt.subplots() ax.plot(extent * 100, E) ax.axhline(E0, color="gray", linestyle="--", label=r"$E^\circ$ = 1.10 V") ax.set_xlabel(r"Cu$^{2+}$ consumed (%)") ax.set_ylabel("Cell voltage (V)") ax.set_ylim(0.9, 1.2) ax.set_title("Daniell cell voltage during discharge") ax.legend() fig.tight_layout() plt.show() .. image-sg:: /api/gallery/electrochem/standard_potentials/images/sphx_glr_plot_01_daniell_cell_001.png :alt: Daniell cell voltage during discharge :srcset: /api/gallery/electrochem/standard_potentials/images/sphx_glr_plot_01_daniell_cell_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.034 seconds) .. _sphx_glr_download_api_gallery_electrochem_standard_potentials_plot_01_daniell_cell.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_daniell_cell.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_01_daniell_cell.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_01_daniell_cell.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_