.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/glaciology/plot_02_forbes_viscous_glacier_flow.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_glaciology_plot_02_forbes_viscous_glacier_flow.py: Forbes's viscous glacier flow (1843) ==================================== James David Forbes surveyed the Mer de Glace and found that its centre moves faster than its margins, and its surface faster than its depths, with a speed that changes with the seasons. He concluded that a glacier is "an imperfect fluid" flowing under its own weight. For a slab of uniform viscosity the velocity is a parabola in height, and its depth average is two-thirds of the surface speed. .. GENERATED FROM PYTHON SOURCE LINES 12-32 .. image-sg:: /api/gallery/glaciology/images/sphx_glr_plot_02_forbes_viscous_glacier_flow_001.png :alt: Forbes: a viscous slab, basal stress 144 kPa :srcset: /api/gallery/glaciology/images/sphx_glr_plot_02_forbes_viscous_glacier_flow_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.constants import GRAVITY, ICE_DENSITY, SECONDS_PER_YEAR from earthsciencekit.glaciology import driving_stress, viscous_slab_velocity thickness, slope = 200.0, 0.08 height = np.linspace(0, thickness, 201) fig, ax = plt.subplots() for viscosity in (2e13, 5e13, 1e14): velocity = viscous_slab_velocity(height, thickness, slope, viscosity, ICE_DENSITY, GRAVITY) mean = np.trapezoid(velocity, height) / thickness assert np.isclose(mean, 2 / 3 * velocity[-1], rtol=1e-4) ax.plot(velocity * SECONDS_PER_YEAR, height, label=f"viscosity {viscosity:.0e} Pa s") stress = driving_stress(thickness, slope, ICE_DENSITY, GRAVITY) ax.set(xlabel="velocity [m/year]", ylabel="height above the bed [m]", title=f"Forbes: a viscous slab, basal stress {stress / 1e3:.0f} kPa") ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.091 seconds) .. _sphx_glr_download_api_gallery_glaciology_plot_02_forbes_viscous_glacier_flow.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/glaciology/plot_02_forbes_viscous_glacier_flow.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_02_forbes_viscous_glacier_flow.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_forbes_viscous_glacier_flow.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_forbes_viscous_glacier_flow.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_