.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/aerodynamics/boundary_layer/plot_03_turbulent_skin_friction.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_boundary_layer_plot_03_turbulent_skin_friction.py: Turbulent skin friction and the one-fifth-power law =================================================== Prandtl (1927) carried Blasius's empirical pipe-friction law over to the turbulent flat plate, with a :math:`u \propto y^{1/7}` velocity profile. The result, :math:`C_f = 0.074\,Re_L^{-1/5}` (:func:`~engineeringkit.aerodynamics.skin_friction_turbulent`), decays far more slowly with Reynolds number than the laminar :math:`1.328\,Re_L^{-1/2}`; a turbulent layer can carry several times the friction drag. This example compares the two and the payoff of delaying transition. .. GENERATED FROM PYTHON SOURCE LINES 16-21 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from engineeringkit.aerodynamics import skin_friction_laminar, skin_friction_turbulent .. GENERATED FROM PYTHON SOURCE LINES 22-24 Laminar versus turbulent friction coefficient --------------------------------------------- .. GENERATED FROM PYTHON SOURCE LINES 24-35 .. code-block:: Python Re = np.logspace(5, 8, 200) cf_lam = skin_friction_laminar(Re) cf_turb = skin_friction_turbulent(Re) for r in [5e5, 5e6, 5e7]: ratio = float(skin_friction_turbulent(r) / skin_friction_laminar(r)) print(f"Re = {r:.0e}: turbulent / laminar C_f = {ratio:.1f}") slope = np.polyfit(np.log(Re), np.log(cf_turb), 1)[0] print(f"log-log slope of the turbulent law: {slope:.3f}") assert np.isclose(slope, -0.2) .. rst-class:: sphx-glr-script-out .. code-block:: none Re = 5e+05: turbulent / laminar C_f = 2.9 Re = 5e+06: turbulent / laminar C_f = 5.7 Re = 5e+07: turbulent / laminar C_f = 11.4 log-log slope of the turbulent law: -0.200 .. GENERATED FROM PYTHON SOURCE LINES 36-42 A laminar run before transition ------------------------------- A plate that stays laminar up to :math:`Re_{tr}` then turns turbulent has :math:`C_f = 0.074/Re_L^{1/5} - A/Re_L` with :math:`A = Re_{tr}(0.074\,Re_{tr}^{-1/5} - 1.328\,Re_{tr}^{-1/2})`. .. GENERATED FROM PYTHON SOURCE LINES 42-55 .. code-block:: Python fig, ax = plt.subplots(figsize=(6, 4)) ax.loglog(Re, cf_lam, label="laminar (Blasius)") ax.loglog(Re, cf_turb, label="turbulent (Prandtl, 1/5 power)") for re_tr in [5e5, 3e6]: A = re_tr * (skin_friction_turbulent(re_tr) - skin_friction_laminar(re_tr)) mixed = np.where(Re < re_tr, cf_lam, cf_turb - A / Re) ax.loglog(Re, mixed, "--", label=f"transition at Re = {re_tr:.0e}") ax.set(xlabel="plate Reynolds number $Re_L$", ylabel="average $C_f$", title="Flat-plate skin friction") ax.legend(fontsize=8) fig.tight_layout() plt.show() .. image-sg:: /api/gallery/aerodynamics/boundary_layer/images/sphx_glr_plot_03_turbulent_skin_friction_001.png :alt: Flat-plate skin friction :srcset: /api/gallery/aerodynamics/boundary_layer/images/sphx_glr_plot_03_turbulent_skin_friction_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.291 seconds) .. _sphx_glr_download_api_gallery_aerodynamics_boundary_layer_plot_03_turbulent_skin_friction.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/boundary_layer/plot_03_turbulent_skin_friction.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_03_turbulent_skin_friction.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_03_turbulent_skin_friction.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_03_turbulent_skin_friction.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_