.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/aerodynamics/wings/plot_02_induced_drag_elliptic_loading.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_wings_plot_02_induced_drag_elliptic_loading.py: Induced drag and the optimality of elliptic loading =================================================== Prandtl and Max Munk (1918-1919) showed that the trailing vortices carry away kinetic energy at a rate that appears as an *induced* drag, :math:`C_{D,i} = C_L^2/(\pi e AR)` (:func:`~engineeringkit.aerodynamics.induced_drag_coefficient`), and that the elliptic spanwise load (:math:`e = 1`) minimises it for a given span and lift. This example builds spanwise loads, computes their induced drag from the Fourier coefficients, and confirms the ellipse wins. .. GENERATED FROM PYTHON SOURCE LINES 15-20 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.aerodynamics import induced_drag_coefficient .. GENERATED FROM PYTHON SOURCE LINES 21-27 Span efficiency from the load shape ----------------------------------- For :math:`\Gamma \propto \sum A_n \sin n\theta` with lift fixed by :math:`A_1`, :math:`e = 1/(1 + \sum_{n>1} n A_n^2/A_1^2)`: any harmonic content beyond the ellipse adds drag. .. GENERATED FROM PYTHON SOURCE LINES 27-41 .. code-block:: Python theta = np.linspace(0, np.pi, 201) y = -np.cos(theta) loads = {"elliptic": [1.0, 0.0, 0.0], "fuller tips (A3 = -0.1)": [1.0, -0.1, 0.0], "peaky centre (A3 = +0.15)": [1.0, 0.15, 0.02]} AR, CL = 8.0, 0.5 fig, axes = plt.subplots(1, 2, figsize=(9, 3.6)) for label, (a1, a3, a5) in loads.items(): gamma = a1 * np.sin(theta) + a3 * np.sin(3 * theta) + a5 * np.sin(5 * theta) e = 1 / (1 + (3 * a3**2 + 5 * a5**2) / a1**2) axes[0].plot(y, gamma, label=f"{label}: e = {e:.3f}") print(f"{label:28s} e = {e:.4f}, C_Di = {float(induced_drag_coefficient(CL, AR, e)):.5f}") axes[0].set(xlabel="spanwise station 2y/b", ylabel="circulation (normalised)", title="Same lift, different loads") axes[0].legend(fontsize=8) .. image-sg:: /api/gallery/aerodynamics/wings/images/sphx_glr_plot_02_induced_drag_elliptic_loading_001.png :alt: Same lift, different loads :srcset: /api/gallery/aerodynamics/wings/images/sphx_glr_plot_02_induced_drag_elliptic_loading_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none elliptic e = 1.0000, C_Di = 0.00995 fuller tips (A3 = -0.1) e = 0.9709, C_Di = 0.01025 peaky centre (A3 = +0.15) e = 0.9350, C_Di = 0.01064 .. GENERATED FROM PYTHON SOURCE LINES 42-44 Induced drag grows with the square of lift ------------------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 44-53 .. code-block:: Python cl = np.linspace(0, 1.4, 50) for ar in [5, 8, 12, 30]: axes[1].plot(cl, induced_drag_coefficient(cl, ar), label=f"AR = {ar}") axes[1].set(xlabel="$C_L$", ylabel="$C_{D,i}$", title="Elliptic loading, e = 1") axes[1].legend() fig.tight_layout() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.183 seconds) .. _sphx_glr_download_api_gallery_aerodynamics_wings_plot_02_induced_drag_elliptic_loading.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/wings/plot_02_induced_drag_elliptic_loading.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_02_induced_drag_elliptic_loading.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_02_induced_drag_elliptic_loading.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_02_induced_drag_elliptic_loading.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_