engineeringkit.heat_transfer#

Fourier’s law and thermal resistances (plane, cylindrical and spherical walls, composite walls, critical insulation radius); Harper-Brown fins with adiabatic and convecting tips; finite-difference conduction by the explicit, implicit and Crank-Nicolson schemes (scipy.linalg.solve_banded) and steady 2-D conduction (scipy.sparse); conduction shape factors; Newton cooling, lumped and semi-infinite transients (scipy.special.erf) and Heisler’s plane-wall, cylinder and sphere series; flat plates (Pohlhausen), cylinders (Churchill-Bernstein) and tube banks (Žukauskas) in forced flow, laminar tube flow and the entry length (Graetz, Hausen), the Dittus-Boelter and Churchill-Chu correlations and the Chilton-Colburn analogy; Planck, Stefan-Boltzmann and Wien blackbody laws, gray-surface exchange, view factors and Oppenheim’s radiation network with shields; Neumann’s solution of the Stefan problem, Nusselt film condensation, Rohsenow’s nucleate boiling and Zuber’s critical heat flux; and LMTD and effectiveness-NTU heat exchangers in parallel, counter, cross and shell-and-tube flow with the LMTD correction factor.

engineeringkit.heat_transfer: conduction, convection, radiation, phase change and heat exchangers.

Fourier’s law and thermal-resistance networks, with composite walls, radial shells, critical insulation and Harper-Brown fins (adiabatic or convecting tip); finite-difference conduction (explicit, implicit, Crank-Nicolson, and steady 2-D) and conduction shape factors; Newton cooling, lumped and semi-infinite transients and Heisler’s plane-wall, cylinder and sphere series; forced convection over flat plates, cylinders and tube banks and in laminar tubes, Dittus-Boelter and Churchill-Chu, and the Chilton-Colburn analogy; blackbody laws (Planck, Stefan-Boltzmann, Wien), view factors and Oppenheim’s gray-surface network with shields; Neumann’s solution of the Stefan problem, Nusselt film condensation, Rohsenow’s nucleate boiling and Zuber’s critical heat flux; and LMTD and effectiveness-NTU exchangers in every common arrangement, with the LMTD correction factor. Models are hand-written closed forms; SciPy supplies erf, Bessel functions, root bracketing and the banded and sparse solvers.

class engineeringkit.heat_transfer.Conduction2DResult(x, y, T, heat_rates)[source]#

Bases: object

Output of engineeringkit.heat_transfer.conduction_2d().

Parameters:
  • x (ndarray)

  • y (ndarray)

  • T (ndarray)

  • heat_rates (dict)

T: ndarray#

Temperatures [K], shape (ny, nx); T[j, i] is at (x[i], y[j]).

Type:

ndarray

heat_rates: dict#

Heat rate per unit depth entering through each edge [W/m], keyed "left", "right", "bottom", "top".

Type:

dict

plot(ax=None, levels=20)[source]#

Draw filled isotherms with a colour bar; return (fig, ax).

Parameters:
  • ax (matplotlib.axes.Axes, optional) – Axes to draw on; a new figure is created if omitted.

  • levels (int, optional) – Number of contour levels.

Returns:

(fig, ax).

Return type:

tuple

summary()[source]#

Grid size, temperature range, edge heat rates [W/m] and their sum (zero to round-off).

Return type:

dict

x: ndarray#

Node positions along x [m], shape (nx,).

Type:

ndarray

y: ndarray#

Node positions along y [m], shape (ny,).

Type:

ndarray

class engineeringkit.heat_transfer.ConductionResult(x, t, T, method, mesh_fourier)[source]#

Bases: object

Output of engineeringkit.heat_transfer.conduction_1d().

Parameters:
  • x (ndarray)

  • t (ndarray)

  • T (ndarray)

  • method (str)

  • mesh_fourier (float)

T: ndarray#

Temperatures [K], shape (steps + 1, n); row i is the profile at t[i].

Type:

ndarray

mesh_fourier: float#

Mesh Fourier number \(r = \alpha\,\Delta t/\Delta x^2\) [-]; the explicit scheme needs \(r \le 1/2\).

Type:

float

method: str#

"explicit", "implicit" or "crank_nicolson".

Type:

str

plot(ax=None, profiles=6)[source]#

Draw evenly spaced temperature profiles; return (fig, ax).

Parameters:
  • ax (matplotlib.axes.Axes, optional) – Axes to draw on; a new figure is created if omitted.

  • profiles (int, optional) – Number of time instants to draw, first and last included.

Returns:

(fig, ax).

Return type:

tuple

summary()[source]#

Grid size, scheme, mesh Fourier number and final temperature range.

Return type:

dict

t: ndarray#

Times [s], shape (steps + 1,).

Type:

ndarray

x: ndarray#

Node positions [m], shape (n,).

Type:

ndarray

class engineeringkit.heat_transfer.EnclosureResult(radiosity, heat_rate, temperature)[source]#

Bases: object

Output of engineeringkit.heat_transfer.radiation_enclosure().

Parameters:
  • radiosity (ndarray)

  • heat_rate (ndarray)

  • temperature (ndarray)

heat_rate: ndarray#

Net radiation leaving each surface [W]; the entries sum to zero.

Type:

ndarray

plot(ax=None)[source]#

Draw the net heat rate leaving each surface as bars; return (fig, ax).

radiosity: ndarray#

Radiosity \(J_i\) of each surface [W/m^2].

Type:

ndarray

summary()[source]#

Net heat rate per surface [W], temperatures [K] and the enclosure’s imbalance [W].

Return type:

dict

temperature: ndarray#

Temperature of each surface [K], given or, for reradiating surfaces, solved.

Type:

ndarray

class engineeringkit.heat_transfer.WallResult(heat_rate, interface_temperatures)[source]#

Bases: object

Output of engineeringkit.heat_transfer.composite_wall().

Parameters:
  • heat_rate (float)

  • interface_temperatures (ndarray)

heat_rate: float#

Heat rate through the wall [W], positive from hot to cold.

Type:

float

interface_temperatures: ndarray#

Temperature at each node of the resistance chain, hot side first [K].

Type:

ndarray

plot(ax=None)[source]#

Draw the temperature at each interface; return (fig, ax).

summary()[source]#

Heat rate [W] and interface temperatures [K].

Return type:

dict

engineeringkit.heat_transfer.biot_number(h, Lc, k)[source]#

Biot number \(Bi = hL_c/k\), internal conduction resistance over surface convection resistance.

Parameters:
  • h (float or array_like) – Surface convection coefficient [W/(m^2 K)], nonnegative.

  • Lc (float or array_like) – Characteristic length [m], positive: \(V/A\) for a lumped body, the half-thickness for a plane wall.

  • k (float or array_like) – Conductivity of the solid [W/(m K)], positive.

Returns:

Biot number [-]; below about 0.1 the body is nearly isothermal.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

J.-B. Biot, “Mémoire sur la propagation de la chaleur,” Bibliothèque britannique 27 (1804) 310-329.

Examples

>>> biot_number(10.0, 0.01, 1.0)
0.1
engineeringkit.heat_transfer.blackbody_peak_wavelength(T)[source]#

Wavelength of maximum blackbody spectral emissive power, \(\lambda_{max} = b/T\) (Wien’s displacement law).

Parameters:

T (float or array_like) – Absolute temperature [K], positive.

Returns:

Peak wavelength [m]; \(b = 2.898\times10^{-3}\) m K.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

W. Wien, “Eine neue Beziehung der Strahlung schwarzer Körper zum zweiten Hauptsatz der Wärmetheorie,” Sitzungsber. Preuss. Akad. Wiss. Berlin (1893) 55-62.

Examples

>>> round(float(blackbody_peak_wavelength(5772.0)) * 1e9, 1)
502.0
engineeringkit.heat_transfer.chilton_colburn_mass_transfer(h, rho, cp, Le)[source]#

Mass transfer coefficient from a heat transfer coefficient by the Chilton-Colburn analogy.

Equal Colburn factors \(j_H = St\,Pr^{2/3}\) and \(j_m = St_m Sc^{2/3}\) give

\[\frac{h}{h_m} = \rho\,c_p\,Le^{2/3}.\]
Parameters:
  • h (float or array_like) – Heat transfer coefficient [W/(m^2 K)], nonnegative.

  • rho (float or array_like) – Density of the fluid [kg/m^3], positive.

  • cp (float or array_like) – Specific heat of the fluid [J/(kg K)], positive.

  • Le (float or array_like) – Lewis number \(\alpha/D_{AB}\) [-], positive (see lewis_number()).

Returns:

Mass transfer coefficient \(h_m\) [m/s]; the species flux is \(h_m(\rho_{A,s} - \rho_{A,\infty})\) [kg/(m^2 s)].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Exact between correlations of the form \(Nu \propto Re^m Pr^{1/3}\) and \(Sh \propto Re^m Sc^{1/3}\) (laminar flat plate); a good approximation for turbulent flow with \(0.6 < Pr, Sc < 60\). Low mass transfer rates are assumed.

References

T. H. Chilton and A. P. Colburn, “Mass transfer (absorption) coefficients: prediction from data on heat transfer and fluid friction,” Ind. Eng. Chem. 26 (1934) 1183-1187.

Examples

>>> round(float(chilton_colburn_mass_transfer(20.0, 1.16, 1007.0, 0.85)) * 1000, 2)
19.08
engineeringkit.heat_transfer.churchill_bernstein_nusselt(Re, Pr)[source]#

Churchill-Bernstein average Nusselt number for a circular cylinder in crossflow.

\[\bar{Nu}_D = 0.3 + \frac{0.62\,Re_D^{1/2}Pr^{1/3}}{[1 + (0.4/Pr)^{2/3}]^{1/4}} \left[1 + \left(\frac{Re_D}{282\,000}\right)^{5/8}\right]^{4/5}\]
Parameters:
  • Re (float or array_like) – Reynolds number \(VD/\nu\) on the diameter [-], nonnegative.

  • Pr (float or array_like) – Prandtl number [-], positive.

Returns:

Average Nusselt number \(\bar hD/k\) [-].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Meant for \(Re\,Pr \ge 0.2\), with a ValidityWarning below; properties at the film temperature. One blended expression covers the whole range, from creeping flow to the drag crisis; the authors present it as a slight underestimate of most data.

References

S. W. Churchill and M. Bernstein, “A correlating equation for forced convection from gases and liquids to a circular cylinder in crossflow,” J. Heat Transfer 99 (1977) 300-306.

Examples

>>> round(float(churchill_bernstein_nusselt(6071.0, 0.7)), 1)
40.6
engineeringkit.heat_transfer.churchill_chu_nusselt(Ra, Pr, laminar=False)[source]#

Churchill-Chu average Nusselt number for natural convection on a vertical plate.

\[Nu = \left\{0.825 + \frac{0.387\,Ra^{1/6}}{[1 + (0.492/Pr)^{9/16}]^{8/27}}\right\}^2\]

holds for every Rayleigh number. With laminar=True the more accurate laminar form \(Nu = 0.68 + 0.670\,Ra^{1/4}/[1 + (0.492/Pr)^{9/16}]^{4/9}\) (for \(Ra \le 10^9\); a ValidityWarning is issued above) is returned instead.

Parameters:
  • Ra (float or array_like) – Rayleigh number on the plate height [-], nonnegative (see rayleigh_number()).

  • Pr (float or array_like) – Prandtl number [-], positive.

  • laminar (bool, optional) – Use the laminar-only correlation.

Returns:

Average Nusselt number \(\bar h L/k\) [-].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Fluid properties are taken at the film temperature \((T_s + T_\infty)/2\).

References

S. W. Churchill and H. H. S. Chu, “Correlating equations for laminar and turbulent free convection from a vertical plate,” Int. J. Heat Mass Transfer 18 (1975) 1323-1329.

Examples

>>> round(float(churchill_chu_nusselt(1e9, 0.71)), 1)
122.9
engineeringkit.heat_transfer.composite_wall(T_hot, T_cold, layers, A=1.0, h_hot=None, h_cold=None)[source]#

Steady heat flow through plane layers in series, with optional surface films.

The resistances \(1/(h_{hot}A)\), \(L_i/(k_iA)\) and \(1/(h_{cold}A)\) add; the heat rate is \(\dot Q = (T_{hot} - T_{cold})/\sum R\) and each node temperature drops by \(\dot Q R\) from the one before.

Parameters:
  • T_hot (float) – Hot-side temperature [K]: the fluid if h_hot is given, else the surface.

  • T_cold (float) – Cold-side temperature [K]: the fluid if h_cold is given, else the surface.

  • layers (sequence of (float, float)) – (thickness [m], conductivity [W/(m K)]) per layer, hot side first; at least one.

  • A (float, optional) – Wall area [m^2], positive.

  • h_hot (float, optional) – Film coefficients [W/(m^2 K)], positive; None omits that film.

  • h_cold (float, optional) – Film coefficients [W/(m^2 K)], positive; None omits that film.

Returns:

Heat rate [W] and the temperature at each node [K], hot side first.

Return type:

WallResult

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> composite_wall(400, 300, [(0.1, 1.0), (0.2, 2.0)], A=2.0).interface_temperatures.tolist()
[400.0, 350.0, 300.0]
engineeringkit.heat_transfer.conduction_1d(T_initial, length, alpha, dt, steps, T_left=None, T_right=None, method='crank_nicolson')[source]#

Transient one-dimensional conduction by finite differences (explicit, implicit or Crank-Nicolson).

Solves \(\partial T/\partial t = \alpha\,\partial^2 T/\partial x^2\) on evenly spaced nodes with the \(\theta\)-scheme

\[(I - \theta r A)\,T^{n+1} = (I + (1-\theta) r A)\,T^{n}, \qquad r = \frac{\alpha\,\Delta t}{\Delta x^2},\]

where \(A\) is the second-difference matrix and \(\theta\) is 0 (explicit, stable only for \(r \le 1/2\)), 1 (fully implicit) or 1/2 (Crank-Nicolson, unconditionally stable and second order in time).

Parameters:
  • T_initial (array_like) – Initial temperature at each node [K], at least three nodes spanning 0 to length.

  • length (float) – Domain length [m], positive.

  • alpha (float) – Thermal diffusivity [m^2/s], positive.

  • dt (float) – Time step [s], positive.

  • steps (int) – Number of time steps, at least one.

  • T_left (float, optional) – Fixed surface temperature [K] at x = 0 and x = length; None (the default) makes that face adiabatic.

  • T_right (float, optional) – Fixed surface temperature [K] at x = 0 and x = length; None (the default) makes that face adiabatic.

  • method ({"crank_nicolson", "implicit", "explicit"}, optional) – Time-stepping scheme.

Returns:

Node positions, times, the temperature history, the scheme and the mesh Fourier number \(r\).

Return type:

ConductionResult

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. The explicit scheme is not refused above \(r = 1/2\); it is left to grow so that the instability can be seen.

References

J. Crank and P. Nicolson, “A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type,” Proc. Cambridge Phil. Soc. 43 (1947) 50-67.

Examples

>>> result = conduction_1d([300.0] * 11, 0.1, 1e-5, 1.0, 100, T_left=400.0, T_right=400.0)
>>> round(float(result.T[-1].min()), 1)
352.6
engineeringkit.heat_transfer.conduction_2d(width, height, nx, ny, T_left, T_right, T_bottom, T_top, k=1.0)[source]#

Steady two-dimensional conduction in a rectangle with fixed edge temperatures, by finite differences.

The interior nodes satisfy the five-point form of Laplace’s equation,

\[\frac{T_{i+1,j} - 2T_{i,j} + T_{i-1,j}}{\Delta x^2} + \frac{T_{i,j+1} - 2T_{i,j} + T_{i,j-1}}{\Delta y^2} = 0,\]

solved as one sparse linear system. The heat entering through each edge is summed from the conduction between each edge node and its interior neighbour, so the four edge heat rates add up to zero to round-off.

Parameters:
  • width (float) – Sides of the rectangle along \(x\) and \(y\) [m], positive.

  • height (float) – Sides of the rectangle along \(x\) and \(y\) [m], positive.

  • nx (int) – Number of nodes along \(x\) and \(y\), edges included; at least three.

  • ny (int) – Number of nodes along \(x\) and \(y\), edges included; at least three.

  • T_left (float) – Temperatures of the edges \(x = 0\), \(x = ` ``width`\), \(y = 0\) and \(y = ` ``height`\) [K], nonnegative.

  • T_right (float) – Temperatures of the edges \(x = 0\), \(x = ` ``width`\), \(y = 0\) and \(y = ` ``height`\) [K], nonnegative.

  • T_bottom (float) – Temperatures of the edges \(x = 0\), \(x = ` ``width`\), \(y = 0\) and \(y = ` ``height`\) [K], nonnegative.

  • T_top (float) – Temperatures of the edges \(x = 0\), \(x = ` ``width`\), \(y = 0\) and \(y = ` ``height`\) [K], nonnegative.

  • k (float, optional) – Thermal conductivity [W/(m K)], positive.

Returns:

Node coordinates, the temperature field (rows along \(y\)) and the heat rate per unit depth entering through each edge.

Return type:

Conduction2DResult

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Constant conductivity, no generation. The corner nodes belong to two edges and take the mean of their temperatures; they enter no equation. The error falls as \(\Delta x^2\).

Examples

>>> result = conduction_2d(1.0, 1.0, 41, 41, 300.0, 300.0, 300.0, 400.0)
>>> round(float(result.T[20, 20]), 2)
325.0
engineeringkit.heat_transfer.convection_heat_rate(h, A, Ts, Tinf)[source]#

Newton’s law of cooling, \(\dot Q = hA(T_s - T_\infty)\).

Parameters:
  • h (float or array_like) – Convection coefficient [W/(m^2 K)], nonnegative.

  • A (float or array_like) – Surface area [m^2], positive.

  • Ts (float or array_like) – Surface temperature [K].

  • Tinf (float or array_like) – Fluid temperature far from the surface [K].

Returns:

Heat rate from the surface to the fluid [W]; negative if the fluid is hotter.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

[I. Newton], “Scala graduum caloris,” Phil. Trans. R. Soc. 22 (1701) 824-829.

Examples

>>> convection_heat_rate(10.0, 2.0, 400.0, 300.0)
2000.0
engineeringkit.heat_transfer.convection_resistance(h, A=1.0)[source]#

Convection (film) resistance, \(R = 1/(hA)\).

Parameters:
  • h (float or array_like) – Convection coefficient [W/(m^2 K)], positive.

  • A (float or array_like, optional) – Surface area [m^2], positive; the default 1 gives the resistance per unit area.

Returns:

Thermal resistance [K/W].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> convection_resistance(10.0, 2.0)
0.05
engineeringkit.heat_transfer.critical_insulation_radius_cylinder(k, h)[source]#

Critical insulation radius of a cylinder, \(r_{cr} = k/h\).

Below this outer radius, adding insulation increases the heat loss, because the convective area grows faster than the conduction resistance.

Parameters:
  • k (float or array_like) – Insulation conductivity [W/(m K)], positive.

  • h (float or array_like) – Outer convection coefficient [W/(m^2 K)], positive.

Returns:

Radius of maximum heat loss [m].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> critical_insulation_radius_cylinder(0.05, 10.0)
0.005
engineeringkit.heat_transfer.critical_insulation_radius_sphere(k, h)[source]#

Critical insulation radius of a sphere, \(r_{cr} = 2k/h\).

Parameters:
  • k (float or array_like) – Insulation conductivity [W/(m K)], positive.

  • h (float or array_like) – Outer convection coefficient [W/(m^2 K)], positive.

Returns:

Radius of maximum heat loss [m].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> critical_insulation_radius_sphere(0.05, 10.0)
0.01
engineeringkit.heat_transfer.cylinder_resistance(r1, r2, k, L=1.0)[source]#

Radial conduction resistance of a cylindrical shell, \(R = \ln(r_2/r_1)/(2\pi k L)\).

Parameters:
  • r1 (float or array_like) – Inner radius [m], positive.

  • r2 (float or array_like) – Outer radius [m], greater than r1.

  • k (float) – Thermal conductivity [W/(m K)], positive.

  • L (float, optional) – Length [m], positive; the default 1 gives the resistance per metre.

Returns:

Thermal resistance [K/W].

Return type:

float

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(cylinder_resistance(0.01, 0.02, 1.0)), 5)
0.11032
engineeringkit.heat_transfer.cylinder_transient(Fo, Bi, r_star=0.0, terms=100)[source]#

Dimensionless temperature of a long cylinder cooled by convection (Heisler’s charts).

\[\theta^* = \sum_{n=1}^{N} C_n e^{-\zeta_n^2 Fo} J_0(\zeta_n r^*), \qquad C_n = \frac{2}{\zeta_n}\frac{J_1(\zeta_n)}{J_0^2(\zeta_n) + J_1^2(\zeta_n)},\]

with \(\zeta_n J_1(\zeta_n)/J_0(\zeta_n) = Bi\).

Parameters:
  • Fo (float or array_like) – Fourier number \(\alpha t/r_o^2\) on the outer radius [-], nonnegative.

  • Bi (float) – Biot number \(hr_o/k\) on the outer radius [-], positive.

  • r_star (float or array_like, optional) – Radial position \(r/r_o\) [-], in [0, 1]; 0 is the axis.

  • terms (int, optional) – Number of series terms \(N\), at least one; terms=1 is Heisler’s one-term chart, good for \(Fo > 0.2\).

Returns:

\(\theta^* = (T - T_\infty)/(T_i - T_\infty)\) [-], broadcast over Fo and r_star.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. The cylinder is infinitely long (no end losses); near \(Fo = 0\) use more terms.

References

M. P. Heisler, “Temperature charts for induction and constant-temperature heating,” Trans. ASME 69 (1947) 227-236.

Examples

>>> round(float(cylinder_transient(0.5, 1.0)), 4)
0.5486
engineeringkit.heat_transfer.dittus_boelter_nusselt(Re, Pr, heating=True)[source]#

Dittus-Boelter correlation for fully developed turbulent tube flow, \(Nu = 0.023\,Re^{0.8} Pr^{n}\).

Parameters:
  • Re (float or array_like) – Reynolds number on the tube diameter [-], positive; the correlation is meant for \(Re \ge 10^4\).

  • Pr (float or array_like) – Prandtl number [-], positive; meant for \(0.6 \le Pr \le 160\).

  • heating (bool, optional) – True (the fluid is heated, \(n = 0.4\)) or False (cooled, \(n = 0.3\)).

Returns:

Nusselt number \(hD/k\) [-]; typical error is about 25%.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. A ValidityWarning is issued outside the stated ranges of Re and Pr. The coefficient 0.023 is McAdams’s rounding; Dittus and Boelter’s paper gave 0.0243 (heating) and 0.0265 (cooling).

References

F. W. Dittus and L. M. K. Boelter, “Heat transfer in automobile radiators of the tubular type,” Univ. Calif. Publ. Eng. 2 (1930) 443-461; R. H. S. Winterton, “Where did the Dittus and Boelter equation come from?”, Int. J. Heat Mass Transfer 41 (1998) 809-810.

Examples

>>> round(float(dittus_boelter_nusselt(1e5, 0.7)), 1)
199.4
engineeringkit.heat_transfer.entry_length(Re, D, Pr=1.0)[source]#

Entry length of tube flow: laminar \(0.05\,Re_D\,Pr\,D\), turbulent \(10D\).

Parameters:
  • Re (float or array_like) – Reynolds number on the diameter [-], positive; laminar below 2300.

  • D (float or array_like) – Tube diameter [m], positive.

  • Pr (float or array_like, optional) – Prandtl number [-], positive. The default 1 gives the hydrodynamic entry length; the fluid’s Prandtl number gives the thermal one.

Returns:

Distance from the inlet to fully developed conditions [m].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. The turbulent value is a rule of thumb; turbulent profiles develop within 10 to 60 diameters, almost independently of the Prandtl number.

Examples

>>> float(entry_length(1000.0, 0.01, 7.0))
3.5
engineeringkit.heat_transfer.exchanger_effectiveness_counterflow(NTU, Cr)[source]#

Effectiveness of a counterflow exchanger.

\[\varepsilon = \frac{1 - e^{-NTU(1-C_r)}}{1 - C_r e^{-NTU(1-C_r)}}, \qquad \varepsilon = \frac{NTU}{1 + NTU} \text{ at } C_r = 1.\]
Parameters:
  • NTU (float) – Number of transfer units \(UA/C_{min}\) [-], nonnegative.

  • Cr (float) – Capacity ratio \(C_{min}/C_{max}\) [-], in [0, 1].

Returns:

Effectiveness [-]; tends to one as NTU grows, for every \(C_r\).

Return type:

float

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

    1. Kays and A. L. London, Compact Heat Exchangers (1955).

Examples

>>> round(float(exchanger_effectiveness_counterflow(2.0, 0.5)), 4)
0.7746
engineeringkit.heat_transfer.exchanger_effectiveness_crossflow(NTU, Cr, mixed='none')[source]#

Effectiveness of a single-pass crossflow exchanger.

\[\begin{split}\varepsilon &= 1 - \exp\left[\frac{NTU^{0.22}}{C_r}\left(e^{-C_r NTU^{0.78}} - 1\right)\right] && \text{both fluids unmixed (approximate)},\\ \varepsilon &= \frac{1}{C_r}\left\{1 - \exp\left[-C_r\left(1 - e^{-NTU}\right)\right]\right\} && C_{max} \text{ mixed}, C_{min} \text{ unmixed},\\ \varepsilon &= 1 - \exp\left[-\frac{1 - e^{-C_r NTU}}{C_r}\right] && C_{min} \text{ mixed}, C_{max} \text{ unmixed}.\end{split}\]
Parameters:
  • NTU (float or array_like) – Number of transfer units \(UA/C_{min}\) [-], nonnegative.

  • Cr (float) – Capacity ratio \(C_{min}/C_{max}\) [-], in [0, 1].

  • mixed ({"none", "cmax", "cmin"}, optional) – Which stream is mixed across the flow passage: neither (finned tubes, plate-fin cores), the one with the larger capacity rate, or the one with the smaller.

Returns:

Effectiveness [-]; every arrangement reduces to \(1 - e^{-NTU}\) at \(C_r = 0\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. The unmixed-unmixed expression is the usual fit to the exact series solution; it is within 4% of it for \(NTU \le 5\), and within about 1% for \(2 \le NTU \le 5\).

References

W. M. Kays and A. L. London, Compact Heat Exchangers (1955); F. P. Incropera et al., Fundamentals of Heat and Mass Transfer, Table 11.3.

Examples

>>> round(float(exchanger_effectiveness_crossflow(2.0, 0.5)), 4)
0.7388
engineeringkit.heat_transfer.exchanger_effectiveness_parallel(NTU, Cr)[source]#

Effectiveness of a parallel-flow exchanger, \(\varepsilon = [1 - e^{-NTU(1+C_r)}]/(1 + C_r)\).

Parameters:
  • NTU (float or array_like) – Number of transfer units \(UA/C_{min}\) [-], nonnegative.

  • Cr (float) – Capacity ratio \(C_{min}/C_{max}\) [-], in [0, 1].

Returns:

Effectiveness \(\dot Q/[C_{min}(T_{h,in} - T_{c,in})]\) [-]; it never exceeds \(1/(1 + C_r)\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

    1. Kays and A. L. London, Compact Heat Exchangers (1955).

Examples

>>> round(float(exchanger_effectiveness_parallel(2.0, 0.5)), 4)
0.6335
engineeringkit.heat_transfer.exchanger_effectiveness_shell_tube(NTU, Cr, shells=1)[source]#

Effectiveness of a shell-and-tube exchanger with shells shell passes and 2, 4, … tube passes each.

One shell pass, with \(\Gamma = \sqrt{1 + C_r^2}\) and \(N_1 = NTU/n\):

\[\varepsilon_1 = 2\left\{1 + C_r + \Gamma\,\frac{1 + e^{-N_1\Gamma}}{1 - e^{-N_1\Gamma}}\right\}^{-1},\]

and \(n\) shells in counterflow series combine as

\[\varepsilon = \frac{[(1 - \varepsilon_1 C_r)/(1 - \varepsilon_1)]^n - 1} {[(1 - \varepsilon_1 C_r)/(1 - \varepsilon_1)]^n - C_r}, \qquad \varepsilon = \frac{n\varepsilon_1}{1 + (n - 1)\varepsilon_1} \text{ at } C_r = 1.\]
Parameters:
  • NTU (float or array_like) – Total number of transfer units \(UA/C_{min}\) [-], nonnegative.

  • Cr (float) – Capacity ratio \(C_{min}/C_{max}\) [-], in [0, 1].

  • shells (int, optional) – Number of shell passes \(n\), at least one.

Returns:

Effectiveness [-]; between parallel flow and counterflow, tending to counterflow as shells grows.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. The number of tube passes per shell does not matter once it is even; mixing across each pass is assumed.

References

W. M. Kays and A. L. London, Compact Heat Exchangers (1955); F. P. Incropera et al., Fundamentals of Heat and Mass Transfer, Table 11.3.

Examples

>>> round(float(exchanger_effectiveness_shell_tube(2.0, 0.5)), 4)
0.6931
engineeringkit.heat_transfer.fin_efficiency_adiabatic(m, L)[source]#

Efficiency of a straight fin with an adiabatic tip, \(\eta = \tanh(mL)/(mL)\).

Parameters:
  • m (float or array_like) – Fin parameter [1/m], nonnegative (see fin_parameter()).

  • L (float or array_like) – Fin length [m], nonnegative. For a convecting tip, Harper and Brown’s corrected length \(L + A_c/P\) is a good approximation.

Returns:

Fin efficiency [-]: the heat rate over that of an isothermal fin at the base temperature; one in the limit \(mL = 0\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

D. R. Harper and W. B. Brown, “Mathematical equations for heat conduction in the fins of air-cooled engines,” NACA Report 158 (1922).

Examples

>>> round(float(fin_efficiency_adiabatic(10.0, 0.1)), 4)
0.7616
engineeringkit.heat_transfer.fin_heat_rate_adiabatic(h, P, k, Ac, L, Tb, Tinf)[source]#

Heat rate of a straight fin with an adiabatic tip, \(\sqrt{hPkA_c}\,(T_b - T_\infty)\tanh(mL)\).

Parameters:
  • h (float) – Convection coefficient [W/(m^2 K)], nonnegative.

  • P (float) – Fin perimeter [m], positive.

  • k (float) – Fin conductivity [W/(m K)], positive.

  • Ac (float) – Cross-sectional area [m^2], positive.

  • L (float or array_like) – Fin length [m], nonnegative.

  • Tb (float) – Base temperature [K].

  • Tinf (float) – Surrounding fluid temperature [K].

Returns:

Heat rate leaving the base [W].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(fin_heat_rate_adiabatic(25.0, 0.04, 200.0, 5e-5, 0.1, 400.0, 300.0)), 3)
7.616
engineeringkit.heat_transfer.fin_heat_rate_convective_tip(h, P, k, Ac, L, Tb, Tinf, h_tip=None)[source]#

Heat rate of a straight fin whose tip also loses heat by convection.

\[\dot Q = \sqrt{hPkA_c}\,(T_b - T_\infty)\, \frac{\sinh mL + (h_{tip}/mk)\cosh mL}{\cosh mL + (h_{tip}/mk)\sinh mL}\]
Parameters:
  • h (float) – Convection coefficient on the fin sides [W/(m^2 K)], positive.

  • P (float) – Fin perimeter [m], positive.

  • k (float) – Fin conductivity [W/(m K)], positive.

  • Ac (float) – Cross-sectional area [m^2], positive.

  • L (float or array_like) – Fin length [m], nonnegative.

  • Tb (float) – Base temperature [K].

  • Tinf (float) – Surrounding fluid temperature [K].

  • h_tip (float, optional) – Convection coefficient on the tip face [W/(m^2 K)], nonnegative; None takes it equal to h. Zero gives the adiabatic tip.

Returns:

Heat rate leaving the base [W]. At L = 0 it is the bare \(h_{tip}A_c(T_b - T_\infty)\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. The adiabatic formula (fin_heat_rate_adiabatic()) with Harper and Brown’s corrected length \(L + A_c/P\) approximates this one closely when \(hA_c/(kP) \lesssim 0.0625\).

References

D. R. Harper and W. B. Brown, “Mathematical equations for heat conduction in the fins of air-cooled engines,” NACA Report 158 (1922).

Examples

>>> round(float(fin_heat_rate_convective_tip(25.0, 0.04, 200.0, 5e-5, 0.1, 400.0, 300.0)), 3)
7.668
engineeringkit.heat_transfer.fin_parameter(h, P, k, Ac)[source]#

Fin parameter \(m = \sqrt{hP/(kA_c)}\).

Parameters:
  • h (float or array_like) – Convection coefficient [W/(m^2 K)], nonnegative.

  • P (float or array_like) – Fin perimeter [m], positive.

  • k (float or array_like) – Fin conductivity [W/(m K)], positive.

  • Ac (float or array_like) – Fin cross-sectional area [m^2], positive.

Returns:

Fin parameter [1/m]; \(1/m\) is the decay length of the excess temperature.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> float(fin_parameter(25.0, 0.04, 200.0, 5e-5))
10.0
engineeringkit.heat_transfer.flat_plate_nusselt(Re, Pr, Re_c=500000.0, local=False)[source]#

Nusselt number of a flat plate in parallel flow, laminar, turbulent or mixed.

Laminar (Pohlhausen): \(Nu_x = 0.332\,Re_x^{1/2}Pr^{1/3}\) locally and \(\bar{Nu}_L = 0.664\,Re_L^{1/2}Pr^{1/3}\) on average. Turbulent: \(Nu_x = 0.0296\,Re_x^{4/5}Pr^{1/3}\). Transition at Re_c makes the average over a plate with both regimes

\[\bar{Nu}_L = \left[0.037\,(Re_L^{4/5} - Re_c^{4/5}) + 0.664\,Re_c^{1/2}\right] Pr^{1/3}.\]
Parameters:
  • Re (float or array_like) – Reynolds number \(u_\infty x/\nu\) on the distance from the leading edge (the plate length for the average) [-], nonnegative.

  • Pr (float or array_like) – Prandtl number [-], positive; the \(Pr^{1/3}\) laws are meant for \(0.6 \le Pr \le 60\) (a ValidityWarning is issued outside).

  • Re_c (float, optional) – Transition Reynolds number [-], nonnegative; 0 makes the boundary layer turbulent from the leading edge and numpy.inf keeps it laminar.

  • local (bool, optional) – Return the local \(Nu_x = h_x x/k\) instead of the average \(\bar h L/k\).

Returns:

Nusselt number [-].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Isothermal plate, properties at the film temperature. A uniform heat flux raises the laminar coefficient 0.332 to 0.453.

References

E. Pohlhausen, “Der Wärmeaustausch zwischen festen Körpern und Flüssigkeiten mit kleiner Reibung und kleiner Wärmeleitung,” Z. Angew. Math. Mech. 1 (1921) 115-121.

Examples

>>> round(float(flat_plate_nusselt(1e5, 0.7)), 1)
186.4
>>> round(float(flat_plate_nusselt(1e6, 0.7)), 1)
1299.2
engineeringkit.heat_transfer.fourier_heat_rate(k, A, dT, L)[source]#

Steady conduction through a plane slab, \(\dot Q = kA\,\Delta T/L\) (Fourier’s law).

Parameters:
  • k (float or array_like) – Thermal conductivity [W/(m K)], positive.

  • A (float or array_like) – Area normal to the heat flow [m^2], positive.

  • dT (float or array_like) – Temperature difference across the slab, hot minus cold [K].

  • L (float or array_like) – Slab thickness [m], positive.

Returns:

Heat rate [W], positive from the hot face to the cold face.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

  1. Fourier, Théorie analytique de la chaleur (Paris: Firmin Didot, 1822).

Examples

>>> float(fourier_heat_rate(1.0, 2.0, 30.0, 0.1))
600.0
engineeringkit.heat_transfer.fourier_number(alpha, t, Lc)[source]#

Fourier number \(Fo = \alpha t/L_c^2\), dimensionless time of transient conduction.

Parameters:
  • alpha (float or array_like) – Thermal diffusivity [m^2/s], positive.

  • t (float or array_like) – Time [s], nonnegative.

  • Lc (float or array_like) – Characteristic length [m], positive.

Returns:

Fourier number [-].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> fourier_number(1e-5, 100.0, 0.01)
10.0
engineeringkit.heat_transfer.hausen_nusselt(Re, Pr, D, L)[source]#

Hausen’s average Nusselt number for laminar thermal entry flow in an isothermal tube.

\[\bar{Nu}_D = 3.66 + \frac{0.0668\,Gz_D}{1 + 0.04\,Gz_D^{2/3}}, \qquad Gz_D = \frac{D}{L}\,Re_D\,Pr.\]
Parameters:
  • Re (float or array_like) – Reynolds number on the diameter [-], positive; laminar (below 2300, with a ValidityWarning above).

  • Pr (float or array_like) – Prandtl number [-], positive.

  • D (float or array_like) – Tube diameter [m], positive.

  • L (float or array_like) – Heated length from the inlet [m], positive.

Returns:

Nusselt number averaged over the length \(L\) [-]; tends to Graetz’s 3.66 as \(L\) grows.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. The velocity profile is fully developed at the start of heating (the “thermal entry” or Graetz problem), which also fits oils and other high-Prandtl fluids whose flow develops much faster than their temperature. Taken from Incropera et al.; Hausen’s original paper (1943) could not be checked.

Examples

>>> round(float(hausen_nusselt(1000.0, 5.0, 0.01, 1.0)), 3)
5.825
engineeringkit.heat_transfer.heat_exchanger_rate(U, A, dt_lm, F=1.0)[source]#

Heat-exchanger duty from the LMTD method, \(\dot Q = UAF\,\Delta T_{lm}\).

Parameters:
  • U (float) – Overall heat-transfer coefficient [W/(m^2 K)], positive.

  • A (float) – Heat-transfer area [m^2], positive.

  • dt_lm (float) – Counterflow log-mean temperature difference [K], positive.

  • F (float, optional) – Correction factor for multipass or crossflow arrangements [-], in [0, 1].

Returns:

Heat rate [W].

Return type:

float

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> heat_exchanger_rate(500.0, 2.0, 36.41)
36410.0
engineeringkit.heat_transfer.laminar_tube_nusselt(boundary='flux')[source]#

Nusselt number of fully developed laminar flow in a circular tube.

Parameters:

boundary ({"flux", "temperature"}, optional) – Uniform wall heat flux (\(Nu_D = 48/11 \approx 4.364\)) or uniform wall temperature (\(Nu_D = 3.657\), Graetz’s limit).

Returns:

Nusselt number \(hD/k\) [-], based on the mean (bulk) temperature.

Return type:

float

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Valid for \(Re_D \lesssim 2300\) beyond the thermal entry length (entry_length()). The uniform-flux value follows in closed form from the parabolic profile; the uniform-temperature value is twice the square of the first eigenvalue of Graetz’s problem (scaled by the radius) and has no closed form.

References

L. Graetz, “Über die Wärmeleitungsfähigkeit von Flüssigkeiten,” Ann. Phys. Chem. 18 (1883) 79-94.

Examples

>>> round(laminar_tube_nusselt("flux"), 3)
4.364
engineeringkit.heat_transfer.lewis_number(alpha, D_AB)[source]#

Lewis number \(Le = \alpha/D_{AB} = Sc/Pr\), heat over mass diffusivity.

Parameters:
  • alpha (float or array_like) – Thermal diffusivity [m^2/s], positive.

  • D_AB (float or array_like) – Binary mass diffusivity of species A in B [m^2/s], positive.

Returns:

Lewis number [-]; about 0.85 for water vapour in air.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(lewis_number(2.2e-5, 2.6e-5)), 3)
0.846
engineeringkit.heat_transfer.lmtd_correction_factor(P, R, shells=1)[source]#

LMTD correction factor \(F\) of a shell-and-tube exchanger (Bowman, Mueller and Nagle).

With the temperature effectiveness of the tube fluid \(P = (t_o - t_i)/(T_i - t_i)\) and the capacity ratio \(R = (T_i - T_o)/(t_o - t_i) = C_t/C_s\), one shell pass gives

\[F = \frac{\sqrt{R^2 + 1}}{R - 1}\, \frac{\ln[(1 - P)/(1 - PR)]} {\ln\dfrac{2 - P(R + 1 - \sqrt{R^2 + 1})}{2 - P(R + 1 + \sqrt{R^2 + 1})}}.\]

For \(n\) shells, \(P\) is first replaced by the per-shell value \(P_1 = (1 - X)/(R - X)\) with \(X = [(1 - PR)/(1 - P)]^{1/n}\) (\(P_1 = P/[n - P(n - 1)]\) at \(R = 1\)).

Parameters:
  • P (float) – Temperature effectiveness of the tube-side fluid [-], in [0, 1).

  • R (float) – Ratio of tube-side to shell-side capacity rates [-], positive.

  • shells (int, optional) – Number of shell passes, at least one; each with an even number of tube passes.

Returns:

Correction factor [-] in (0, 1], so that \(\dot Q = UAF\,\Delta T_{lm,cf}\) with the counterflow LMTD. Designs below about 0.75 are usually rejected.

Return type:

float

Raises:

ValueError – If P is at or beyond the largest value the arrangement can reach for this R, where \(F\) falls to zero (a temperature cross).

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. \(F\) is symmetric in the two streams: \(F(P, R) = F(PR, 1/R)\).

References

R. A. Bowman, A. C. Mueller and W. M. Nagle, “Mean temperature difference in design,” Trans. ASME 62 (1940) 283-294.

Examples

>>> round(float(lmtd_correction_factor(0.4, 1.5)), 4)
0.8033
engineeringkit.heat_transfer.log_mean_temperature_difference(dt1, dt2)[source]#

Log-mean temperature difference \((\Delta T_1 - \Delta T_2)/\ln(\Delta T_1/\Delta T_2)\).

Parameters:
  • dt1 (float) – Hot-minus-cold temperature differences at the two ends [K], positive.

  • dt2 (float) – Hot-minus-cold temperature differences at the two ends [K], positive.

Returns:

LMTD [K]; equal to dt1 when the two ends match.

Return type:

float

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Evaluated with log1p so that nearly equal differences keep full precision.

Examples

>>> round(float(log_mean_temperature_difference(60.0, 20.0)), 3)
36.41
engineeringkit.heat_transfer.lumped_temperature(Ti, Tinf, h, A, rho, cp, V, t)[source]#

Temperature of a lumped (isothermal) body cooling by convection.

\[\frac{T - T_\infty}{T_i - T_\infty} = \exp\left(-\frac{hA}{\rho c_p V}\,t\right)\]
Parameters:
  • Ti (float) – Initial temperature [K].

  • Tinf (float) – Fluid temperature [K].

  • h (float) – Convection coefficient [W/(m^2 K)], nonnegative.

  • A (float) – Surface area [m^2], positive.

  • rho (float) – Density [kg/m^3], positive.

  • cp (float) – Specific heat [J/(kg K)], positive.

  • V (float) – Volume [m^3], positive.

  • t (float or array_like) – Time [s], nonnegative.

Returns:

Body temperature [K].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Valid when biot_number() with \(L_c = V/A\) is below about 0.1; that is not checked here.

Examples

>>> round(float(lumped_temperature(400.0, 300.0, 10.0, 1.0, 1000.0, 1000.0, 0.01, 1000.0)), 2)
336.79
engineeringkit.heat_transfer.neumann_stefan_front(t, alpha, Ste)[source]#

Position of the phase front in the one-phase Stefan problem (Neumann’s solution).

A liquid at its melting point fills \(x > 0\); at \(t = 0\) the face \(x = 0\) is held \(\Delta T\) below the melting point and a solid layer grows (or, the other way round, a solid at its melting point melts). The front is at

\[s(t) = 2\lambda\sqrt{\alpha t}, \qquad \lambda\,e^{\lambda^2}\operatorname{erf}\lambda = \frac{Ste}{\sqrt\pi},\]

and the temperature in the new phase is \(T_s + \Delta T\,\operatorname{erf}(x/2\sqrt{\alpha t})/\operatorname{erf}\lambda\).

Parameters:
  • t (float or array_like) – Time [s], nonnegative.

  • alpha (float) – Thermal diffusivity of the growing phase [m^2/s], positive.

  • Ste (float) – Stefan number of the growing phase [-], positive (see stefan_number()).

Returns:

Front position [m]. For small \(Ste\) this tends to Stefan’s quasi-steady \(\sqrt{2\,Ste\,\alpha t}\).

Return type:

float or ndarray

Notes

Ste is scalar-only, since the front coefficient is a root found for one Stefan number; t and alpha broadcast.

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Densities of the two phases are taken equal, and the original phase does not conduct.

References

J. Stefan, “Über die Theorie der Eisbildung, insbesondere über die Eisbildung im Polarmeere,” Ann. Phys. Chem. 42 (1891) 269-286.

Examples

>>> round(float(neumann_stefan_front(86400.0, 1.2e-6, 0.1257)) * 100, 2)
15.82
engineeringkit.heat_transfer.nusselt_film_condensation(rho_l, rho_v, mu_l, k_l, h_fg, Tsat, Ts, L, g=9.80665)[source]#

Nusselt’s average coefficient for laminar film condensation on a vertical wall.

\[\bar h = 0.943\left[\frac{g\,\rho_l(\rho_l - \rho_v)\,k_l^3\,h_{fg}} {\mu_l\,L\,(T_{sat} - T_s)}\right]^{1/4}\]

The film thickness grows as \(\delta(x) = [4\mu_l k_l (T_{sat}-T_s)\,x/(g\rho_l(\rho_l-\rho_v)h_{fg})]^{1/4}\), and the local coefficient is \(k_l/\delta\).

Parameters:
  • rho_l (float) – Liquid and vapour densities [kg/m^3], with rho_l > rho_v >= 0.

  • rho_v (float) – Liquid and vapour densities [kg/m^3], with rho_l > rho_v >= 0.

  • mu_l (float) – Liquid dynamic viscosity [Pa s], positive.

  • k_l (float) – Liquid conductivity [W/(m K)], positive.

  • h_fg (float) – Latent heat [J/kg], positive. Rohsenow’s \(h_{fg} + 0.68\,c_{p,l}(T_{sat}-T_s)\) accounts for subcooling of the film.

  • Tsat (float) – Saturation temperature [K].

  • Ts (float or array_like) – Wall temperature [K], below Tsat.

  • L (float or array_like) – Wall height [m], positive.

  • g (float, optional) – Gravitational acceleration [m/s^2], positive.

Returns:

Average heat-transfer coefficient over the height [W/(m^2 K)].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Laminar film: a ValidityWarning is issued when the film Reynolds number at the bottom of the wall, \(Re_\delta = 4\bar h L (T_{sat} - T_s)/(\mu_l h_{fg})\), exceeds 1800. Ripples above about 30 raise the coefficient by 10-20%. Properties at the film temperature.

References

W. Nusselt, “Die Oberflächenkondensation des Wasserdampfes,” Z. VDI 60 (1916) 541-546, 569-575.

Examples

>>> round(float(nusselt_film_condensation(960.0, 0.6, 2.8e-4, 0.68, 2.257e6, 373.15, 363.15, 0.5)))
7757
engineeringkit.heat_transfer.overall_u(*resistances)[source]#

Conductance \(1/\sum R_i\) of thermal resistances in series (legacy name).

Parameters:

*resistances (float) – Full thermal resistances, each including its area [K/W], positive.

Returns:

Conductance \(UA\) [W/K]. Divide by the reference area for the area-normalised coefficient \(U\) [W/(m^2 K)].

Return type:

float

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> overall_u(0.1, 0.4)
2.0
engineeringkit.heat_transfer.planck_spectral_emissive_power(wavelength, T)[source]#

Planck’s spectral emissive power of a blackbody.

\[E_{\lambda,b} = \frac{2\pi h c^2}{\lambda^5\,[\exp(hc/\lambda k T) - 1]}\]
Parameters:
  • wavelength (float or array_like) – Wavelength [m], positive.

  • T (float or array_like) – Absolute temperature [K], positive.

Returns:

Spectral emissive power [W/(m^2 m)], broadcast over the inputs. Its integral over wavelength is \(\sigma T^4\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Written with \(e^{-x}/(1 - e^{-x})\) so that very short wavelengths underflow to zero instead of overflowing.

References

M. Planck, “Über das Gesetz der Energieverteilung im Normalspectrum,” Ann. Phys. 4 (1901) 553-563.

Examples

>>> f"{float(planck_spectral_emissive_power(10e-6, 300.0)):.4e}"
'3.1177e+07'
engineeringkit.heat_transfer.plane_wall_resistance(L, k, A=1.0)[source]#

Conduction resistance of a plane wall, \(R = L/(kA)\).

Parameters:
  • L (float or array_like) – Thickness [m], nonnegative.

  • k (float or array_like) – Thermal conductivity [W/(m K)], positive.

  • A (float or array_like, optional) – Area [m^2], positive; the default 1 gives the resistance per unit area.

Returns:

Thermal resistance [K/W].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> float(plane_wall_resistance(0.2, 0.8, 5.0))
0.05
engineeringkit.heat_transfer.plane_wall_transient(Fo, Bi, x_star=0.0, terms=100)[source]#

Dimensionless temperature of a plane wall cooled by convection on both faces (Heisler’s charts).

\[\theta^* = \frac{T - T_\infty}{T_i - T_\infty} = \sum_{n=1}^{N} C_n e^{-\zeta_n^2 Fo}\cos(\zeta_n x^*), \qquad C_n = \frac{4\sin\zeta_n}{2\zeta_n + \sin 2\zeta_n},\]

with \(\zeta_n\tan\zeta_n = Bi\). terms=1 gives the one-term approximation behind Heisler’s charts, within 2% at the midplane for \(Fo > 0.2\) (about 3% off-centre).

Parameters:
  • Fo (float or array_like) – Fourier number \(\alpha t/L^2\) on the half-thickness \(L\) [-], nonnegative.

  • Bi (float) – Biot number \(hL/k\) on the half-thickness [-], positive.

  • x_star (float or array_like, optional) – Position \(x/L\) from the midplane [-], in [0, 1]; 0 is the centre.

  • terms (int, optional) – Number of series terms \(N\), at least one.

Returns:

\(\theta^*\) [-], broadcast over Fo and x_star.

Return type:

float or ndarray

Notes

Bi is scalar-only, since the eigenvalues are roots found for one Biot number; Fo and x_star broadcast.

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Near \(Fo = 0\) the truncated series oscillates about the initial value; use more terms there.

References

M. P. Heisler, “Temperature charts for induction and constant-temperature heating,” Trans. ASME 69 (1947) 227-236.

Examples

>>> round(float(plane_wall_transient(0.5, 1.0)), 4)
0.7725
engineeringkit.heat_transfer.radiation_coefficient(epsilon, Ts, Tsur, sigma=5.670374419e-08)[source]#

Radiation heat-transfer coefficient \(h_r = \varepsilon\sigma(T_s + T_{sur})(T_s^2 + T_{sur}^2)\).

With it, radiation can be written like convection, \(\dot Q = h_r A (T_s - T_{sur})\), and added to \(h\) in parallel.

Parameters:
  • epsilon (float or array_like) – Surface emissivity [-], in [0, 1].

  • Ts (float or array_like) – Absolute surface temperature [K], nonnegative.

  • Tsur (float or array_like) – Absolute temperature of the surroundings [K], nonnegative.

  • sigma (float, optional) – Stefan-Boltzmann constant [W/(m^2 K^4)].

Returns:

Radiation coefficient [W/(m^2 K)].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(radiation_coefficient(0.8, 400.0, 300.0)), 3)
7.939
engineeringkit.heat_transfer.radiation_enclosure(T, epsilon, A, F, reradiating=None, sigma=5.670374419e-08)[source]#

Net radiation exchange in an enclosure of diffuse gray surfaces (Oppenheim’s network).

Each surface’s radiosity \(J_i\) is linked to its blackbody emissive power by the surface resistance \((1 - \varepsilon_i)/(\varepsilon_iA_i)\) and to every other radiosity by the space resistance \(1/(A_iF_{ij})\). The node equations reduce to

\[J_i - (1 - \varepsilon_i)\sum_j F_{ij}J_j = \varepsilon_i\sigma T_i^4,\]

with \(\varepsilon_i\) replaced by 0 for a reradiating (insulated) surface, and the net radiation leaving surface \(i\) is \(\dot Q_i = A_i(J_i - \sum_j F_{ij}J_j)\).

Parameters:
  • T (array_like) – Absolute temperature of each surface [K], nonnegative; ignored for reradiating surfaces. n surfaces, at least two.

  • epsilon (array_like) – Emissivity of each surface [-], in [0, 1]; 1 is black.

  • A (array_like) – Area of each surface [m^2], positive.

  • F (array_like) – View-factor matrix [-], shape (n, n); F[i, j] is \(F_{ij}\). Each row must sum to one (the enclosure is closed) and \(A_iF_{ij} = A_jF_{ji}\) must hold, both to 1e-6.

  • reradiating (array_like of bool, optional) – Surfaces that are insulated (net radiation zero); their temperature is solved for.

  • sigma (float, optional) – Stefan-Boltzmann constant [W/(m^2 K^4)].

Returns:

Radiosities [W/m^2], net heat rates [W] summing to zero, and the temperatures [K] with the reradiating ones filled in.

Return type:

EnclosureResult

Raises:

ValueError – If the shapes disagree, a view factor lies outside [0, 1], or the summation or reciprocity rule fails.

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Each surface is isothermal, diffuse and gray with uniform radiosity; the medium between them does not participate.

References

A. K. Oppenheim, “Radiation analysis by the network method,” Trans. ASME 78 (1956) 725-735.

Examples

>>> F = [[0.0, 1.0], [0.25, 0.75]]
>>> result = radiation_enclosure([500.0, 300.0], [0.8, 0.8], [1.0, 4.0], F)
>>> round(float(result.heat_rate[0]), 1)
2350.2
engineeringkit.heat_transfer.radiation_heat_rate(epsilon, A, Ts, Tsur, sigma=5.670374419e-08)[source]#

Net radiation from a small gray surface to large surroundings, \(\dot Q = \varepsilon\sigma A(T_s^4 - T_{sur}^4)\).

Parameters:
  • epsilon (float or array_like) – Surface emissivity [-], in [0, 1]; by Kirchhoff’s law also its absorptivity.

  • A (float or array_like) – Surface area [m^2], positive.

  • Ts (float or array_like) – Absolute surface temperature [K], nonnegative.

  • Tsur (float or array_like) – Absolute temperature of the surroundings [K], nonnegative.

  • sigma (float, optional) – Stefan-Boltzmann constant [W/(m^2 K^4)].

Returns:

Net heat rate leaving the surface [W].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. The surroundings are a large isothermal enclosure; Celsius temperatures give wrong answers silently.

References

G. Kirchhoff, “Über das Verhältniss zwischen dem Emissionsvermögen und dem Absorptionsvermögen der Körper für Wärme und Licht,” Ann. Phys. Chem. 109 (1860) 275-301.

Examples

>>> round(float(radiation_heat_rate(0.8, 1.0, 400.0, 300.0)), 1)
793.9
engineeringkit.heat_transfer.radiation_shield_heat_flux(T1, T2, eps1, eps2, shields=(), sigma=5.670374419e-08)[source]#

Radiation flux between large parallel plates separated by thin radiation shields.

Each gap adds a resistance \(1/\varepsilon_a + 1/\varepsilon_b - 1\) per unit area, so with shields whose faces have emissivities \(\varepsilon_{k,a}\) and \(\varepsilon_{k,b}\)

\[q'' = \frac{\sigma(T_1^4 - T_2^4)}{\dfrac{1}{\varepsilon_1} + \dfrac{1}{\varepsilon_2} - 1 + \sum_k\left(\dfrac{1}{\varepsilon_{k,a}} + \dfrac{1}{\varepsilon_{k,b}} - 1\right)}.\]
Parameters:
  • T1 (float or array_like) – Absolute temperatures of the two plates [K], nonnegative.

  • T2 (float or array_like) – Absolute temperatures of the two plates [K], nonnegative.

  • eps1 (float) – Plate emissivities [-], in (0, 1].

  • eps2 (float) – Plate emissivities [-], in (0, 1].

  • shields (sequence of float or (float, float), optional) – One entry per shield: a single emissivity for both faces, or the pair (eps_a, eps_b) of the faces towards plate 1 and plate 2, each in (0, 1]. Empty means no shield.

  • sigma (float, optional) – Stefan-Boltzmann constant [W/(m^2 K^4)].

Returns:

Net heat flux from plate 1 to plate 2 [W/m^2]. \(N\) shields with the plates’ emissivity divide it by \(N + 1\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Shields are thin, conduct well across their thickness and fill the gap (all view factors one). Shield temperatures follow from the flux, one resistance at a time.

References

A. K. Oppenheim, “Radiation analysis by the network method,” Trans. ASME 78 (1956) 725-735.

Examples

>>> round(float(radiation_shield_heat_flux(500.0, 300.0, 0.8, 0.8, [0.05])), 1)
76.2
engineeringkit.heat_transfer.rayleigh_number(beta, dT, L, nu, alpha, g=9.80665)[source]#

Rayleigh number \(Ra = g\beta\,\Delta T L^3/(\nu\alpha)\) for natural convection.

Parameters:
  • beta (float or array_like) – Volumetric expansion coefficient [1/K], positive (\(1/T\) for an ideal gas).

  • dT (float or array_like) – Magnitude of the surface-to-fluid temperature difference [K], nonnegative.

  • L (float or array_like) – Characteristic length (plate height) [m], positive.

  • nu (float or array_like) – Kinematic viscosity [m^2/s], positive.

  • alpha (float or array_like) – Thermal diffusivity [m^2/s], positive.

  • g (float, optional) – Gravitational acceleration [m/s^2], positive.

Returns:

Rayleigh number [-].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> f"{float(rayleigh_number(1 / 300, 20.0, 0.5, 1.6e-5, 2.2e-5)):.3e}"
'2.322e+08'
engineeringkit.heat_transfer.rohsenow_boiling_heat_flux(mu_l, h_fg, rho_l, rho_v, sigma, cp_l, Pr_l, dT_excess, C_sf=0.013, n=1.0, g=9.80665)[source]#

Rohsenow’s heat flux in nucleate pool boiling.

\[q''_s = \mu_l h_{fg}\left[\frac{g(\rho_l - \rho_v)}{\sigma}\right]^{1/2} \left(\frac{c_{p,l}\,\Delta T_e}{C_{s,f}\,h_{fg}\,Pr_l^{\,n}}\right)^3\]
Parameters:
  • mu_l (float) – Liquid dynamic viscosity [Pa s], positive.

  • h_fg (float) – Latent heat of vaporisation [J/kg], positive.

  • rho_l (float) – Liquid and vapour densities [kg/m^3], with rho_l > rho_v >= 0.

  • rho_v (float) – Liquid and vapour densities [kg/m^3], with rho_l > rho_v >= 0.

  • sigma (float) – Surface tension [N/m], positive.

  • cp_l (float) – Liquid specific heat [J/(kg K)], positive.

  • Pr_l (float) – Liquid Prandtl number [-], positive.

  • dT_excess (float or array_like) – Excess temperature \(T_s - T_{sat}\) [K], nonnegative.

  • C_sf (float, optional) – Surface-fluid constant [-], positive; 0.013 for water on polished copper or stainless steel, 0.0060 on brass.

  • n (float, optional) – Prandtl exponent [-], positive: 1.0 for water, 1.7 for other liquids.

  • g (float, optional) – Gravitational acceleration [m/s^2], positive.

Returns:

Heat flux from the heater to the liquid [W/m^2]; it grows as \(\Delta T_e^3\), up to the critical flux of zuber_critical_heat_flux().

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Saturated pool boiling in the nucleate regime, liquid properties at saturation. Errors of up to 100% in the flux (about 25% in \(\Delta T_e\) for a given flux) are common; most of the uncertainty is in \(C_{s,f}\).

References

W. M. Rohsenow, “A method of correlating heat-transfer data for surface boiling of liquids,” Trans. ASME 74 (1952) 969-976 (MIT Heat Transfer Laboratory report 5, 1951).

Examples

>>> round(float(rohsenow_boiling_heat_flux(279e-6, 2.257e6, 957.9, 0.5955, 58.9e-3, 4217.0, 1.76, 18.0)) / 1e3)
798
engineeringkit.heat_transfer.semi_infinite_temperature(Ti, Ts, x, alpha, t)[source]#

Semi-infinite solid after a step change of surface temperature.

\[\frac{T(x,t) - T_s}{T_i - T_s} = \operatorname{erf}\frac{x}{2\sqrt{\alpha t}}\]
Parameters:
  • Ti (float) – Initial uniform temperature [K].

  • Ts (float) – Surface temperature imposed at \(t = 0\) [K].

  • x (float or array_like) – Depth below the surface [m], nonnegative.

  • alpha (float) – Thermal diffusivity [m^2/s], positive.

  • t (float or array_like) – Time since the step [s], positive.

Returns:

Temperature [K]. The surface gradient is \((T_i - T_s)/\sqrt{\pi\alpha t}\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

W. Thomson, “On the secular cooling of the earth,” Trans. R. Soc. Edinburgh 23 (1864) 157-169 (read 1862).

Examples

>>> round(float(semi_infinite_temperature(300.0, 400.0, 0.01, 1e-5, 2.5)), 2)
315.73
engineeringkit.heat_transfer.shape_factor_buried_cylinder(D, z, L=1.0)[source]#

Conduction shape factor of a long isothermal cylinder buried in a semi-infinite medium, \(S = 2\pi L/\cosh^{-1}(2z/D)\).

Parameters:
  • D (float or array_like) – Cylinder diameter [m], positive.

  • z (float or array_like) – Depth of the axis below the isothermal surface [m], greater than D/2.

  • L (float or array_like, optional) – Length [m], positive and much larger than D; the default 1 gives the shape factor per metre.

Returns:

Shape factor [m]; for \(z \gg D\) it tends to \(2\pi L/\ln(4z/D)\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Exact in two dimensions (method of images).

Examples

>>> round(float(shape_factor_buried_cylinder(0.5, 1.0)), 4)
3.045
engineeringkit.heat_transfer.shape_factor_buried_sphere(D, z)[source]#

Conduction shape factor of an isothermal sphere buried in a semi-infinite medium, \(S = 2\pi D/(1 - D/4z)\).

Parameters:
  • D (float or array_like) – Sphere diameter [m], positive.

  • z (float or array_like) – Depth of the centre below the isothermal surface [m], greater than D/2.

Returns:

Shape factor [m]: \(\dot Q = Sk(T_1 - T_2)\). Tends to the isolated sphere’s \(2\pi D\) as the depth grows.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. From the method of images; exact as \(z \to \infty\), approximate near the surface.

Examples

>>> round(float(shape_factor_buried_sphere(1.0, 1.0)), 4)
8.3776
engineeringkit.heat_transfer.shape_factor_eccentric_cylinders(d, D, z, L=1.0)[source]#

Conduction shape factor between a cylinder and an enclosing eccentric cylinder.

\[S = \frac{2\pi L}{\cosh^{-1}\left[(D^2 + d^2 - 4z^2)/(2Dd)\right]}\]
Parameters:
  • d (float or array_like) – Inner diameter [m], positive.

  • D (float or array_like) – Outer diameter [m], greater than d + 2z.

  • z (float or array_like) – Offset between the two axes [m], nonnegative.

  • L (float or array_like, optional) – Length [m], positive; the default 1 gives the shape factor per metre.

Returns:

Shape factor [m]; at \(z = 0\) it is the concentric \(2\pi L/\ln(D/d)\) of cylinder_resistance().

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Exact (bipolar coordinates).

Examples

>>> round(float(shape_factor_eccentric_cylinders(0.1, 0.3, 0.05)), 4)
6.5285
engineeringkit.heat_transfer.shape_factor_parallel_cylinders(D1, D2, w, L=1.0)[source]#

Conduction shape factor between two long parallel cylinders in an infinite medium.

\[S = \frac{2\pi L}{\cosh^{-1}\left[(4w^2 - D_1^2 - D_2^2)/(2D_1D_2)\right]}\]
Parameters:
  • D1 (float or array_like) – Diameters [m], positive.

  • D2 (float or array_like) – Diameters [m], positive.

  • w (float or array_like) – Distance between the axes [m], greater than (D1 + D2)/2.

  • L (float or array_like, optional) – Length [m], positive; the default 1 gives the shape factor per metre.

Returns:

Shape factor [m]. For equal cylinders the midplane is isothermal, so it is half that of one cylinder buried at depth \(w/2\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Exact in two dimensions.

Examples

>>> round(float(shape_factor_parallel_cylinders(0.5, 0.5, 2.0)), 4)
1.5225
engineeringkit.heat_transfer.sphere_resistance(r1, r2, k)[source]#

Radial conduction resistance of a spherical shell, \(R = (1/r_1 - 1/r_2)/(4\pi k)\).

Parameters:
  • r1 (float or array_like) – Inner radius [m], positive.

  • r2 (float or array_like) – Outer radius [m], greater than r1.

  • k (float) – Thermal conductivity [W/(m K)], positive.

Returns:

Thermal resistance [K/W].

Return type:

float

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(sphere_resistance(1.0, 2.0, 1.0)), 6)
0.039789
engineeringkit.heat_transfer.sphere_transient(Fo, Bi, r_star=0.0, terms=100)[source]#

Dimensionless temperature of a sphere cooled by convection (Heisler’s charts).

\[\theta^* = \sum_{n=1}^{N} C_n e^{-\zeta_n^2 Fo}\,\frac{\sin(\zeta_n r^*)}{\zeta_n r^*}, \qquad C_n = \frac{4(\sin\zeta_n - \zeta_n\cos\zeta_n)}{2\zeta_n - \sin 2\zeta_n},\]

with \(1 - \zeta_n\cot\zeta_n = Bi\); at the centre \(\sin(\zeta r^*)/(\zeta r^*) = 1\).

Parameters:
  • Fo (float or array_like) – Fourier number \(\alpha t/r_o^2\) on the outer radius [-], nonnegative.

  • Bi (float) – Biot number \(hr_o/k\) on the outer radius [-], positive.

  • r_star (float or array_like, optional) – Radial position \(r/r_o\) [-], in [0, 1]; 0 is the centre.

  • terms (int, optional) – Number of series terms \(N\), at least one; terms=1 is Heisler’s one-term chart, good for \(Fo > 0.2\).

Returns:

\(\theta^* = (T - T_\infty)/(T_i - T_\infty)\) [-], broadcast over Fo and r_star.

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Near \(Fo = 0\) use more terms.

References

M. P. Heisler, “Temperature charts for induction and constant-temperature heating,” Trans. ASME 69 (1947) 227-236.

Examples

>>> round(float(sphere_transient(0.5, 1.0)), 4)
0.3708
engineeringkit.heat_transfer.stefan_boltzmann_emissive_power(T, sigma=5.670374419e-08)[source]#

Total emissive power of a blackbody, \(E_b = \sigma T^4\) (Stefan-Boltzmann law).

Parameters:
  • T (float or array_like) – Absolute temperature [K], nonnegative.

  • sigma (float, optional) – Stefan-Boltzmann constant [W/(m^2 K^4)].

Returns:

Emissive power [W/m^2].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

J. Stefan, “Über die Beziehung zwischen der Wärmestrahlung und der Temperatur,” Sitzungsber. Akad. Wiss. Wien 79 (1879) 391-428; L. Boltzmann, “Ableitung des Stefan’schen Gesetzes,” Ann. Phys. Chem. 22 (1884) 291-294.

Examples

>>> round(float(stefan_boltzmann_emissive_power(5772.0)) / 1e6, 2)
62.94
engineeringkit.heat_transfer.stefan_number(cp, dT, latent_heat)[source]#

Stefan number \(Ste = c_p\,\Delta T/h_{sf}\), sensible over latent heat.

Parameters:
  • cp (float or array_like) – Specific heat of the phase that conducts [J/(kg K)], positive.

  • dT (float or array_like) – Temperature difference driving the phase change [K], nonnegative.

  • latent_heat (float or array_like) – Latent heat of fusion (or vaporisation) [J/kg], positive.

Returns:

Stefan number [-].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(stefan_number(2100.0, 20.0, 334e3)), 4)
0.1257
engineeringkit.heat_transfer.tube_bank_max_velocity(V, D, ST, SL, arrangement='aligned')[source]#

Maximum velocity between the tubes of a bank, on which Žukauskas’s Reynolds number is based.

Aligned: \(V_{max} = S_T V/(S_T - D)\). Staggered: the same, unless the diagonal gap \(S_D - D\) with \(S_D = [S_L^2 + (S_T/2)^2]^{1/2}\) is narrower than \((S_T - D)/2\), in which case \(V_{max} = S_T V/[2(S_D - D)]\).

Parameters:
  • V (float or array_like) – Upstream (approach) velocity [m/s], nonnegative.

  • D (float) – Tube outer diameter [m], positive.

  • ST (float) – Transverse pitch, normal to the flow [m], greater than D.

  • SL (float) – Longitudinal pitch, along the flow [m], positive.

  • arrangement ({"aligned", "staggered"}, optional) – Tube layout.

Returns:

Maximum velocity [m/s].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(tube_bank_max_velocity(6.0, 0.01, 0.015, 0.015)), 6)
18.0
engineeringkit.heat_transfer.two_surface_radiation(T1, T2, eps1, eps2, A1, A2, F12=1.0, sigma=5.670374419e-08)[source]#

Net radiation exchange in a two-surface gray enclosure.

\[\dot Q_{12} = \frac{\sigma(T_1^4 - T_2^4)} {\dfrac{1 - \varepsilon_1}{\varepsilon_1A_1} + \dfrac{1}{A_1F_{12}} + \dfrac{1 - \varepsilon_2}{\varepsilon_2A_2}}\]
Parameters:
  • T1 (float or array_like) – Absolute temperatures of the two surfaces [K], nonnegative.

  • T2 (float or array_like) – Absolute temperatures of the two surfaces [K], nonnegative.

  • eps1 (float) – Emissivities [-], in (0, 1].

  • eps2 (float) – Emissivities [-], in (0, 1].

  • A1 (float) – Areas [m^2], positive.

  • A2 (float) – Areas [m^2], positive.

  • F12 (float, optional) – View factor from surface 1 to surface 2 [-], in (0, 1].

  • sigma (float, optional) – Stefan-Boltzmann constant [W/(m^2 K^4)].

Returns:

Net heat rate from surface 1 to surface 2 [W].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Diffuse gray surfaces, each isothermal with uniform radiosity. Large parallel plates have \(A_1 = A_2\) and \(F_{12} = 1\); a convex body inside a large enclosure (\(A_1/A_2 \to 0\)) recovers radiation_heat_rate().

References

A. K. Oppenheim, “Radiation analysis by the network method,” Trans. ASME 78 (1956) 725-735.

Examples

>>> round(float(two_surface_radiation(500.0, 300.0, 0.8, 0.8, 1.0, 1.0)), 1)
2056.5
engineeringkit.heat_transfer.view_factor_coaxial_disks(r1, r2, L)[source]#

View factor from one disk to a parallel, coaxial disk.

With \(R_1 = r_1/L\), \(R_2 = r_2/L\) and \(S = 1 + (1 + R_2^2)/R_1^2\), \(F_{12} = \tfrac12\{S - [S^2 - 4(r_2/r_1)^2]^{1/2}\}\).

Parameters:
  • r1 (float or array_like) – Radius of the emitting disk [m], positive.

  • r2 (float or array_like) – Radius of the receiving disk [m], positive.

  • L (float or array_like) – Separation [m], positive.

Returns:

View factor \(F_{12}\) [-]; reciprocity gives \(r_1^2F_{12} = r_2^2F_{21}\).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

W. Nusselt, “Graphische Bestimmung des Winkelverhältnisses bei der Wärmestrahlung,” Z. VDI 72 (1928) 673; J. R. Howell, A Catalog of Radiation Heat Transfer Configuration Factors, case C-41.

Examples

>>> round(float(view_factor_coaxial_disks(1.0, 1.0, 1.0)), 4)
0.382
engineeringkit.heat_transfer.view_factor_parallel_plates(a, b, L)[source]#

View factor between two aligned, directly opposed parallel rectangles.

With \(X = a/L\) and \(Y = b/L\),

\[F_{12} = \frac{2}{\pi XY}\Big\{\ln\Big[\frac{(1+X^2)(1+Y^2)}{1+X^2+Y^2}\Big]^{1/2} + X\sqrt{1+Y^2}\arctan\frac{X}{\sqrt{1+Y^2}} + Y\sqrt{1+X^2}\arctan\frac{Y}{\sqrt{1+X^2}} - X\arctan X - Y\arctan Y\Big\}.\]
Parameters:
  • a (float or array_like) – Side lengths of each rectangle [m], positive.

  • b (float or array_like) – Side lengths of each rectangle [m], positive.

  • L (float or array_like) – Separation [m], positive.

Returns:

Fraction of the diffuse radiation leaving one rectangle that strikes the other [-].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

References

W. Nusselt, “Graphische Bestimmung des Winkelverhältnisses bei der Wärmestrahlung,” Z. VDI 72 (1928) 673; J. R. Howell, A Catalog of Radiation Heat Transfer Configuration Factors, case C-11.

Examples

>>> round(float(view_factor_parallel_plates(1.0, 1.0, 1.0)), 4)
0.1998
engineeringkit.heat_transfer.view_factor_reciprocity(F_ij, A_i, A_j)[source]#

View factor \(F_{ji}\) from its reverse by reciprocity, \(A_iF_{ij} = A_jF_{ji}\).

Parameters:
  • F_ij (float or array_like) – View factor from surface \(i\) to surface \(j\) [-], in [0, 1].

  • A_i (float or array_like) – Areas of the two surfaces [m^2], positive.

  • A_j (float or array_like) – Areas of the two surfaces [m^2], positive.

Returns:

View factor \(F_{ji}\) [-].

Return type:

float or ndarray

Raises:

ValueError – If the result exceeds one, which no pair of real surfaces allows.

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. With the summation rule \(\sum_j F_{ij} = 1\) over an enclosure, reciprocity gives every view factor of a two- or three-surface enclosure from its areas.

Examples

>>> float(view_factor_reciprocity(1.0, 1.0, 4.0))
0.25
engineeringkit.heat_transfer.zuber_critical_heat_flux(rho_l, rho_v, h_fg, sigma, g=9.80665, C=0.1308996938995747)[source]#

Zuber’s critical (maximum) heat flux in saturated pool boiling.

\[q''_{max} = C\,h_{fg}\,\rho_v\left[\frac{\sigma g(\rho_l - \rho_v)}{\rho_v^2}\right]^{1/4}\]
Parameters:
  • rho_l (float or array_like) – Liquid and vapour densities [kg/m^3], with rho_l > rho_v > 0.

  • rho_v (float or array_like) – Liquid and vapour densities [kg/m^3], with rho_l > rho_v > 0.

  • h_fg (float or array_like) – Latent heat of vaporisation [J/kg], positive.

  • sigma (float or array_like) – Surface tension [N/m], positive.

  • g (float, optional) – Gravitational acceleration [m/s^2], positive.

  • C (float, optional) – Constant [-]: Zuber’s \(\pi/24 \approx 0.131\); Lienhard and Dhir’s 0.149 fits large flat heaters better.

Returns:

Critical heat flux [W/m^2]; beyond it a vapour film blankets the heater and its temperature jumps (burnout).

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Large horizontal heater, saturated liquid.

References

S. Nukiyama, “The maximum and minimum values of the heat Q transmitted from metal to boiling water under atmospheric pressure,” J. Soc. Mech. Eng. Japan 37 (1934) 367-374 (transl. Int. J. Heat Mass Transfer 9 (1966) 1419-1433); N. Zuber, “On the stability of boiling heat transfer,” Trans. ASME 80 (1958) 711-720.

Examples

>>> round(float(zuber_critical_heat_flux(957.9, 0.5955, 2.257e6, 0.0589)) / 1e6, 3)
1.106
engineeringkit.heat_transfer.zukauskas_nusselt(Re, Pr, ST, SL, arrangement='aligned', rows=20, Pr_s=None)[source]#

Žukauskas’s average Nusselt number for a bank of tubes in crossflow.

\[\bar{Nu}_D = C_2\,C\,Re_{D,max}^{m}\,Pr^{0.36}\,(Pr/Pr_s)^{1/4},\]

with \(C\) and \(m\) from Žukauskas’s table for the layout and Reynolds range, and \(C_2\) the correction for fewer than 20 rows. In the staggered range \(10^3 < Re < 2\times10^5\), \(C = 0.35\,(S_T/S_L)^{1/5}\) for \(S_T/S_L < 2\) and 0.40 above.

Parameters:
  • Re (float or array_like) – Reynolds number \(V_{max}D/\nu\) on the maximum velocity (see tube_bank_max_velocity()) [-], in [10, 2e6].

  • Pr (float or array_like) – Prandtl number at the mean fluid temperature [-], positive; meant for \(0.7 \le Pr \le 500\).

  • ST (float) – Transverse and longitudinal pitches [m], positive.

  • SL (float) – Transverse and longitudinal pitches [m], positive.

  • arrangement ({"aligned", "staggered"}, optional) – Tube layout.

  • rows (int, optional) – Number of tube rows along the flow, at least one; 20 or more needs no correction.

  • Pr_s (float or array_like, optional) – Prandtl number at the tube surface temperature [-], positive; None takes it equal to Pr.

Returns:

Average Nusselt number \(\bar hD/k\) over the bank [-].

Return type:

float or ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Properties except \(Pr_s\) at the arithmetic mean of the inlet and outlet fluid temperatures. Between 100 and 1000 the table values 0.52 and 0.71 with \(m = 0.5\) are Žukauskas’s; Incropera et al. suggest the single-cylinder correlation there. Aligned banks with \(S_T/S_L < 0.7\) transfer heat poorly and are not covered by the correlation. A ValidityWarning is issued for either, or for Pr outside its range. The row correction is interpolated linearly between the tabulated row counts.

References

A. Žukauskas, “Heat transfer from tubes in crossflow,” Adv. Heat Transfer 8 (1972) 93-160.

Examples

>>> round(float(zukauskas_nusselt(13943.0, 0.71, 0.0313, 0.0343, "staggered", rows=7, Pr_s=0.70)), 1)
88.8

Utilities#

Supporting numerics for engineeringkit.heat_transfer’s systems/ modules.

engineeringkit.heat_transfer.utils.cylinder_eigenvalues(Bi, terms)[source]#

First terms positive roots of \(\zeta J_1(\zeta) = Bi\,J_0(\zeta)\).

Parameters:
  • Bi (float) – Biot number \(hr_o/k\) [-] on the outer radius, positive.

  • terms (int) – Number of eigenvalues, at least one.

Returns:

Eigenvalues \(\zeta_1 < \zeta_2 < \cdots\) [-]; \(\zeta_n\) lies between the \((n-1)\)-th zero of \(J_1\) (0 for \(n = 1\)) and the \(n\)-th zero of \(J_0\).

Return type:

ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(cylinder_eigenvalues(1.0, 1)[0]), 4)
1.2558
engineeringkit.heat_transfer.utils.plane_wall_eigenvalues(Bi, terms)[source]#

First terms positive roots of \(\zeta \tan\zeta = Bi\).

Parameters:
  • Bi (float) – Biot number \(hL/k\) [-] on the wall half-thickness, positive.

  • terms (int) – Number of eigenvalues, at least one.

Returns:

Eigenvalues \(\zeta_1 < \zeta_2 < \cdots\) [-]; \(\zeta_n\) lies in \(((n-1)\pi, (n-1)\pi + \pi/2)\).

Return type:

ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting.

Examples

>>> round(float(plane_wall_eigenvalues(1.0, 1)[0]), 4)
0.8603
engineeringkit.heat_transfer.utils.sphere_eigenvalues(Bi, terms)[source]#

First terms positive roots of \(1 - \zeta\cot\zeta = Bi\).

Parameters:
  • Bi (float) – Biot number \(hr_o/k\) [-] on the outer radius, positive.

  • terms (int) – Number of eigenvalues, at least one.

Returns:

Eigenvalues \(\zeta_1 < \zeta_2 < \cdots\) [-]; \(\zeta_n\) lies in \(((n-1)\pi, n\pi)\).

Return type:

ndarray

Notes

Inputs are raw SI numbers with no dimensional metadata; see Heat transfer: absolute temperatures and resistance accounting. Solved as \(\zeta\cos\zeta + (Bi - 1)\sin\zeta = 0\), which is positive just above zero (where it behaves as \(Bi\,\zeta\)).

Examples

>>> round(float(sphere_eigenvalues(1.0, 1)[0]), 4)
1.5708

Visualizers#

Matplotlib visualizers for engineeringkit.heat_transfer.

engineeringkit.heat_transfer.visualizers.plot_blackbody_spectra(temperatures, wavelength=None, ax=None)[source]#

Plot Planck’s spectral emissive power for several temperatures, with each Wien peak marked.

Parameters:
  • temperatures (array_like) – Absolute temperatures [K], positive.

  • wavelength (array_like, optional) – Wavelengths [m]; defaults to 0.1-100 um on a log grid.

  • ax (matplotlib.axes.Axes, optional) – Axes to draw on; a new figure is created if omitted.

Return type:

matplotlib.axes.Axes

engineeringkit.heat_transfer.visualizers.plot_temperature_profiles(x, T, times=None, ax=None)[source]#

Plot one or more temperature profiles \(T(x)\).

Parameters:
  • x (array_like) – Positions [m], shape (n,).

  • T (array_like) – Temperatures [K], shape (n,) or (k, n) for k profiles.

  • times (array_like, optional) – Time of each profile [s], shape (k,), used as legend labels.

  • ax (matplotlib.axes.Axes, optional) – Axes to draw on; a new figure is created if omitted.

Return type:

matplotlib.axes.Axes