.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/aerodynamics/airfoils/plot_03_hess_smith_panel_method.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_airfoils_plot_03_hess_smith_panel_method.py: The Hess-Smith panel method (1967) ================================== At the Douglas Aircraft Company, John Hess and A. M. O. Smith replaced a body by straight surface panels, each with its own uniform source strength, and solved for the strengths that make the surface a streamline. Their 1967 review in *Progress in Aerospace Sciences* added a single vortex strength shared by every panel. With the Kutta condition at the trailing edge, that let the method carry lift. :func:`~engineeringkit.aerodynamics.panel_method` implements it. This example checks it against the exact flow round a circular cylinder, then shows what it adds to thin-airfoil theory: the leading-edge suction peak and the extra lift slope of a thick section. .. GENERATED FROM PYTHON SOURCE LINES 17-22 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.aerodynamics import naca4_airfoil, panel_method, thin_airfoil_cl .. GENERATED FROM PYTHON SOURCE LINES 23-25 The circular cylinder is exact ------------------------------ .. GENERATED FROM PYTHON SOURCE LINES 25-33 .. code-block:: Python t = np.linspace(0, -2 * np.pi, 49) circle = panel_method(np.column_stack((np.cos(t), np.sin(t))), 0.0) angle = np.arctan2(circle.y, circle.x) error = np.max(np.abs(circle.cp - (1 - 4 * np.sin(angle) ** 2))) print(f"cylinder, 48 panels: max |Cp - (1 - 4 sin^2)| = {error:.1e}") assert error < 1e-10 .. rst-class:: sphx-glr-script-out .. code-block:: none cylinder, 48 panels: max |Cp - (1 - 4 sin^2)| = 3.6e-15 .. GENERATED FROM PYTHON SOURCE LINES 34-36 Pressure on the NACA 0012 and 2412 ---------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 36-46 .. code-block:: Python fig, axes = plt.subplots(1, 2, figsize=(11, 4)) for name in ("0012", "2412"): result = panel_method(naca4_airfoil(name, 101), np.radians(4.0)) result.plot(ax=axes[0]) axes[0].lines[-2].set_label(f"NACA {name} upper") axes[0].lines[-1].set_label(f"NACA {name} lower") axes[0].set_title("Surface pressure at 4°") axes[0].legend(fontsize=8) .. image-sg:: /api/gallery/aerodynamics/airfoils/images/sphx_glr_plot_03_hess_smith_panel_method_001.png :alt: Surface pressure at 4° :srcset: /api/gallery/aerodynamics/airfoils/images/sphx_glr_plot_03_hess_smith_panel_method_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 47-52 Lift slope grows with thickness ------------------------------- Thin-airfoil theory gives :math:`2\pi` per radian whatever the thickness; the panel method gives about :math:`2\pi(1 + 0.77\,t/c)`. .. GENERATED FROM PYTHON SOURCE LINES 52-67 .. code-block:: Python alpha = np.radians(np.linspace(-4, 10, 8)) for name in ("0006", "0012", "0018"): cl = np.array([panel_method(naca4_airfoil(name, 101), a).cl for a in alpha]) axes[1].plot(np.degrees(alpha), cl, "o-", ms=3, label=f"NACA {name}") slope = np.polyfit(alpha, cl, 1)[0] thickness = int(name[2:]) / 100 print(f"NACA {name}: slope {slope:.3f} per rad = 2 pi x {slope / (2 * np.pi):.3f} (1 + 0.77 t/c = {1 + 0.77 * thickness:.3f})") assert np.isclose(slope, 2 * np.pi * (1 + 0.77 * thickness), rtol=0.02) axes[1].plot(np.degrees(alpha), thin_airfoil_cl(alpha), "k--", label="thin airfoil, 2π") axes[1].set(xlabel="angle of attack [deg]", ylabel="$c_l$", title="Inviscid lift of symmetric sections") axes[1].legend() fig.tight_layout() plt.show() .. rst-class:: sphx-glr-script-out .. code-block:: none NACA 0006: slope 6.571 per rad = 2 pi x 1.046 (1 + 0.77 t/c = 1.046) NACA 0012: slope 6.828 per rad = 2 pi x 1.087 (1 + 0.77 t/c = 1.092) NACA 0018: slope 7.094 per rad = 2 pi x 1.129 (1 + 0.77 t/c = 1.139) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.309 seconds) .. _sphx_glr_download_api_gallery_aerodynamics_airfoils_plot_03_hess_smith_panel_method.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/airfoils/plot_03_hess_smith_panel_method.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_hess_smith_panel_method.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_hess_smith_panel_method.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_hess_smith_panel_method.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_