.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/aerodynamics/compressible/plot_04_prandtl_glauert.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_aerodynamics_compressible_plot_04_prandtl_glauert.py: The Prandtl-Glauert compressibility correction ============================================== Hermann Glauert (1928), building on remarks by Prandtl, showed that the linearised subsonic potential equation is Laplace's equation in stretched coordinates. Every pressure coefficient of a thin body is therefore amplified by :math:`1/\sqrt{1-M_\infty^2}` (:func:`~engineeringkit.aerodynamics.prandtl_glauert_cp`), a factor that blows up at :math:`M = 1` and fed the myth of an impenetrable "sound barrier". The Kármán-Tsien rule (1939) is plotted alongside: the two agree at low Mach and diverge as the flow becomes transonic. .. GENERATED FROM PYTHON SOURCE LINES 16-21 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.aerodynamics import prandtl_glauert_cp .. GENERATED FROM PYTHON SOURCE LINES 22-24 Amplification of a suction peak ------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 24-40 .. code-block:: Python M = np.linspace(0, 0.9, 181) fig, ax = plt.subplots(figsize=(6, 4)) for cp0 in [-0.3, -0.6]: pg = prandtl_glauert_cp(cp0, M) beta = np.sqrt(1 - M**2) kt = cp0 / (beta + M**2 / (1 + beta) * cp0 / 2) ax.plot(M, pg, label=f"Prandtl-Glauert, $C_{{p,0}}$ = {cp0}") ax.plot(M, kt, "--", label=f"Kármán-Tsien, $C_{{p,0}}$ = {cp0}") print(f"C_p0 = {cp0}: at M = 0.7, PG {float(prandtl_glauert_cp(cp0, 0.7)):.3f}, KT {np.interp(0.7, M, kt):.3f}") assert np.isclose(pg[0], cp0) ax.set(xlabel="free-stream Mach number", ylabel="pressure coefficient $C_p$", title="Subsonic compressibility corrections") ax.invert_yaxis() ax.legend(fontsize=8) fig.tight_layout() .. image-sg:: /api/gallery/aerodynamics/compressible/images/sphx_glr_plot_04_prandtl_glauert_001.png :alt: Subsonic compressibility corrections :srcset: /api/gallery/aerodynamics/compressible/images/sphx_glr_plot_04_prandtl_glauert_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none C_p0 = -0.3: at M = 0.7, PG -0.420, KT -0.447 C_p0 = -0.6: at M = 0.7, PG -0.840, KT -0.955 .. GENERATED FROM PYTHON SOURCE LINES 41-46 Lift slope rises the same way ----------------------------- The same factor multiplies the lift-curve slope: :math:`2\pi/\sqrt{1-M^2}` is 25% higher at :math:`M = 0.6`. .. GENERATED FROM PYTHON SOURCE LINES 46-50 .. code-block:: Python print(f"lift-slope factor at M = 0.6: {float(prandtl_glauert_cp(1.0, 0.6)):.3f}") plt.show() .. rst-class:: sphx-glr-script-out .. code-block:: none lift-slope factor at M = 0.6: 1.250 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.159 seconds) .. _sphx_glr_download_api_gallery_aerodynamics_compressible_plot_04_prandtl_glauert.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/aerodynamics/compressible/plot_04_prandtl_glauert.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_04_prandtl_glauert.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_04_prandtl_glauert.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_04_prandtl_glauert.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_