.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "api/gallery/heat_transfer/transient/plot_01_biot_number.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_heat_transfer_transient_plot_01_biot_number.py: Biot's heated bar and the Biot number (1804) ============================================ In 1804 Jean-Baptiste Biot heated one end of iron bars and read thermometers set along them. He saw that the temperature profile is set by a contest between conduction along the bar and loss from its surface. He could not write a consistent differential equation for it; Fourier did in 1807. The ratio of the two effects, now the Biot number :math:`Bi = hL/k` (:func:`~engineeringkit.heat_transfer.biot_number`), decides whether a body can be treated as a single temperature. This example cools a plane wall at three Biot numbers and compares the lumped model :math:`e^{-Bi\,Fo}` with the exact series solution. .. GENERATED FROM PYTHON SOURCE LINES 17-23 .. code-block:: Python import matplotlib.pyplot as plt import numpy as np from scipy import integrate from engineeringkit.heat_transfer import biot_number, fourier_number, plane_wall_transient .. GENERATED FROM PYTHON SOURCE LINES 24-30 The same wall, three coolants ----------------------------- A 40 mm steel plate (:math:`k = 40` W/(m K), half-thickness :math:`L = 20` mm) cooled on both faces by still air, forced air and a water spray. .. GENERATED FROM PYTHON SOURCE LINES 30-37 .. code-block:: Python k, L = 40.0, 0.02 coolants = {"still air": 20.0, "air jet": 200.0, "water spray": 2000.0} Bis = {name: biot_number(h, L, k) for name, h in coolants.items()} for name, Bi in Bis.items(): print(f"{name:12s}: Bi = {Bi:.2f}") .. rst-class:: sphx-glr-script-out .. code-block:: none still air : Bi = 0.01 air jet : Bi = 0.10 water spray : Bi = 1.00 .. GENERATED FROM PYTHON SOURCE LINES 38-43 Lumped versus distributed ------------------------- A lumped body follows :math:`\theta = e^{-Bi\,Fo}`. The exact mean temperature of the wall averages the series over the thickness. .. GENERATED FROM PYTHON SOURCE LINES 43-65 .. code-block:: Python x_star = np.linspace(0, 1, 201) Fo = np.linspace(0, 3, 61)[1:] fig, axes = plt.subplots(1, 2, figsize=(10, 3.8)) for name, Bi in Bis.items(): mean = np.array([integrate.trapezoid(plane_wall_transient(F, Bi, x_star), x_star) for F in Fo]) lumped = np.exp(-Bi * Fo) error = np.max(np.abs(lumped - mean)) print(f"{name:12s}: worst lumped error {error:.4f} (fraction of the initial excess)") line = axes[0].plot(Fo, mean, label=f"exact, Bi = {Bi:.2f}")[0] axes[0].plot(Fo, lumped, "--", color=line.get_color()) axes[1].plot(x_star, plane_wall_transient(0.5, Bi, x_star), color=line.get_color(), label=f"Bi = {Bi:.2f}") if Bi <= 0.1: assert error < 0.01 else: assert error > 0.1 axes[0].set(xlabel="Fourier number", ylabel="mean excess temperature", title="Solid: exact, dashed: lumped") axes[0].legend() axes[1].set(xlabel="x / L (centre to surface)", ylabel="excess temperature", title="Profiles at Fo = 0.5") axes[1].legend() fig.tight_layout() .. image-sg:: /api/gallery/heat_transfer/transient/images/sphx_glr_plot_01_biot_number_001.png :alt: Solid: exact, dashed: lumped, Profiles at Fo = 0.5 :srcset: /api/gallery/heat_transfer/transient/images/sphx_glr_plot_01_biot_number_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none still air : worst lumped error 0.0001 (fraction of the initial excess) air jet : worst lumped error 0.0071 (fraction of the initial excess) water spray : worst lumped error 0.1045 (fraction of the initial excess) .. GENERATED FROM PYTHON SOURCE LINES 66-71 What the time scale means ------------------------- In the still-air case the plate is effectively isothermal, and an hour of cooling is :math:`Fo` of order 100 on the half-thickness. .. GENERATED FROM PYTHON SOURCE LINES 71-76 .. code-block:: Python alpha = k / (7850.0 * 460.0) print(f"one hour is Fo = {fourier_number(alpha, 3600.0, L):.0f}") plt.show() .. rst-class:: sphx-glr-script-out .. code-block:: none one hour is Fo = 100 .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.159 seconds) .. _sphx_glr_download_api_gallery_heat_transfer_transient_plot_01_biot_number.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/heat_transfer/transient/plot_01_biot_number.ipynb :alt: Launch JupyterLite :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_01_biot_number.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_01_biot_number.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_01_biot_number.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_