.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/geophysics/plot_10_larmor_self_exciting_dynamo.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 or to run this example in your browser via JupyterLite. .. rst-class:: sphx-glr-example-title .. _sphx_glr_api_gallery_geophysics_plot_10_larmor_self_exciting_dynamo.py: Larmor's self-exciting dynamo (1919) ==================================== Joseph Larmor asked how a body such as the Sun could be a magnet, and proposed that conducting fluid moving through a magnetic field could induce the currents that sustain that field, like a self-exciting dynamo. The Earth needs one: a field left in a still iron core would decay in tens of thousands of years, yet rocks record a field for over three billion years. The core's flow of a fraction of a millimetre per second gives a magnetic Reynolds number in the hundreds, enough for induction to beat diffusion. .. GENERATED FROM PYTHON SOURCE LINES 13-39 .. image-sg:: /api/gallery/geophysics/images/sphx_glr_plot_10_larmor_self_exciting_dynamo_001.png :alt: A still core forgets its field, Induction beats diffusion :srcset: /api/gallery/geophysics/images/sphx_glr_plot_10_larmor_self_exciting_dynamo_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.geophysics import magnetic_decay_time, magnetic_reynolds_number from earthsciencekit.units import convert core_radius, shell = 3.48e6, 2.26e6 conductivity = np.logspace(5, 6, 100) decay = convert(magnetic_decay_time(core_radius, conductivity), "s", "kyr") assert decay.max() < 100 and convert(3.5, "Ga", "kyr") / decay.max() > 1e4 speed = np.logspace(-5, -2, 100) reynolds = magnetic_reynolds_number(speed, shell, 5e5) assert magnetic_reynolds_number(5e-4, shell, 5e5) > 100 fig, (left, right) = plt.subplots(1, 2, figsize=(10, 4)) left.loglog(conductivity, decay) left.set(xlabel="core conductivity [S/m]", ylabel="free decay time [kyr]", title="A still core forgets its field") right.loglog(convert(speed, "m/s", "cm/year"), reynolds) right.axhspan(10, 100, color="0.85", label="typical dynamo threshold") right.axvline(convert(5e-4, "m/s", "cm/year"), color="C3", ls="--", label="core flow from secular variation") right.set(xlabel="flow speed [cm/year]", ylabel="magnetic Reynolds number", title="Induction beats diffusion") right.legend(fontsize="small") fig.tight_layout() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.387 seconds) .. _sphx_glr_download_api_gallery_geophysics_plot_10_larmor_self_exciting_dynamo.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: lite-badge .. image:: images/jupyterlite_badge_logo.svg :target: ../../../lite/lab/index.html?path=api/gallery/geophysics/plot_10_larmor_self_exciting_dynamo.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_10_larmor_self_exciting_dynamo.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_10_larmor_self_exciting_dynamo.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_10_larmor_self_exciting_dynamo.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_