.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/seismology/plot_02_rayleigh_surface_waves.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_seismology_plot_02_rayleigh_surface_waves.py: Rayleigh's surface waves (1885) =============================== Lord Rayleigh found a wave bound to the free surface of an elastic solid, slower than the shear wave and decaying with depth. Its speed solves a cubic that depends only on Poisson's ratio: about 0.92 of the shear speed in a Poisson solid. Because it spreads in two dimensions rather than three, it carries the largest motions on distant seismograms. .. GENERATED FROM PYTHON SOURCE LINES 11-31 .. image-sg:: /api/gallery/seismology/images/sphx_glr_plot_02_rayleigh_surface_waves_001.png :alt: Surface waves trail the shear wave :srcset: /api/gallery/seismology/images/sphx_glr_plot_02_rayleigh_surface_waves_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from earthsciencekit.seismology import poisson_ratio, rayleigh_wave_speed vs = 1.0 vp = np.sqrt(np.linspace(4 / 3 + 1e-3, 100, 400)) * vs ratio = rayleigh_wave_speed(vp, vs) / vs nu = poisson_ratio(vp, vs) assert np.isclose(rayleigh_wave_speed(np.sqrt(3), 1), np.sqrt(2 - 2 / np.sqrt(3))) assert np.all(ratio < 1) and np.all(np.diff(ratio[np.argsort(nu)]) > 0) fig, ax = plt.subplots() ax.plot(nu, ratio) ax.plot(0.25, np.sqrt(2 - 2 / np.sqrt(3)), "o", label="Poisson solid: 0.9194") ax.set(xlabel="Poisson's ratio", ylabel="Rayleigh speed / shear speed", title="Surface waves trail the shear wave") ax.legend() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.083 seconds) .. _sphx_glr_download_api_gallery_seismology_plot_02_rayleigh_surface_waves.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/seismology/plot_02_rayleigh_surface_waves.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_02_rayleigh_surface_waves.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_rayleigh_surface_waves.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_rayleigh_surface_waves.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_