.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/plate_tectonics/plot_03_kelvin_cooling_earth.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_plate_tectonics_plot_03_kelvin_cooling_earth.py: Kelvin's cooling Earth (1862) ============================= William Thomson (Lord Kelvin) treated the Earth as a half-space cooling from a uniform 7000 degrees Fahrenheit. The surface gradient of the conductive solution falls as one over the square root of age, so the measured gradient of about 1 degree Fahrenheit per 50 feet fixes an age near 100 million years. Kelvin did not know about radioactive heating or mantle convection. .. GENERATED FROM PYTHON SOURCE LINES 11-42 .. image-sg:: /api/gallery/plate_tectonics/images/sphx_glr_plot_03_kelvin_cooling_earth_001.png :alt: Kelvin's geotherm :srcset: /api/gallery/plate_tectonics/images/sphx_glr_plot_03_kelvin_cooling_earth_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.plate_tectonics import halfspace_heat_flux, halfspace_temperature from earthsciencekit.units import convert surface = 273.0 excess = 7000 * 5 / 9 diffusivity = 1.18e-6 measured_gradient = (5 / 9) / (50 * 0.3048) age = excess**2 / (np.pi * diffusivity * measured_gradient**2) gradient = halfspace_heat_flux(age, diffusivity, 1.0, surface, surface + excess) assert np.isclose(float(gradient), measured_gradient) age_myr = convert(age, "s", "year") / 1e6 assert 90 < age_myr < 105 ages = convert(np.logspace(6, 10, 200), "year", "s") depth = np.linspace(0, 400e3, 201) fig, (left, right) = plt.subplots(1, 2, figsize=(9, 4)) left.loglog(convert(ages, "s", "year") / 1e6, halfspace_heat_flux(ages, diffusivity, 1.0, surface, surface + excess) * 1e3) left.axhline(measured_gradient * 1e3, color="k", ls="--", label="measured gradient") left.axvline(age_myr, color="tab:red", label=f"{age_myr:.0f} million years") left.set(xlabel="age [million years]", ylabel="surface gradient [K/km]") left.legend() right.plot(halfspace_temperature(depth, age, diffusivity, surface, surface + excess), depth / 1e3) right.invert_yaxis() right.set(xlabel="temperature [K]", ylabel="depth [km]", title="Kelvin's geotherm") fig.tight_layout() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.335 seconds) .. _sphx_glr_download_api_gallery_plate_tectonics_plot_03_kelvin_cooling_earth.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/plate_tectonics/plot_03_kelvin_cooling_earth.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_kelvin_cooling_earth.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_kelvin_cooling_earth.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_kelvin_cooling_earth.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_