Chapter 26
22 min read
Section 224 of 353

Applications: Thermal Analysis

The Heat Equation

Learning Objectives

By the end of this section, you will be able to:

  1. Apply the heat equation to real-world engineering problems in electronics, buildings, and industrial systems
  2. Design heat sinks using fin efficiency analysis and thermal resistance networks
  3. Calculate heat loss through building walls and pipe insulation using R-values and U-values
  4. Understand the concept of critical radius in cylindrical insulation
  5. Interpret thermal images using Stefan-Boltzmann law and Gaussian heat distribution
  6. Connect steady-state thermal analysis to machine learning applications like CNNs for thermal imaging
  7. Implement finite difference methods for 2D thermal analysis in Python

The Big Picture: Heat Equation in Practice

"The laws of physics do not care about engineering conventions — they only care about energy balance."

The heat equation is not just a mathematical curiosity. It forms the foundation for some of the most critical engineering analyses performed today:

Electronics Cooling

CPUs, GPUs, and power electronics generate enormous heat densities (>100 W/cm²). Thermal throttling begins around 100°C.

Building Energy

40% of US energy goes to heating/cooling buildings. Thermal analysis drives energy codes and green building design.

Industrial Processes

Heat exchangers, furnaces, and chemical reactors all require precise thermal control for safety and efficiency.

Medical Thermography

Skin temperature maps reveal inflammation, circulation issues, and even early cancer detection without invasive procedures.

Automotive Engines

Combustion generates temperatures >2000°C. Cooling system design prevents engine failure and maximizes efficiency.

Aerospace Systems

Spacecraft face extreme thermal environments: -270°C in shadow to +120°C in sunlight. Precise thermal analysis is mission-critical.

From Theory to Practice

In this section, we'll see how the abstract heat equation ut=α2u\frac{\partial u}{\partial t} = \alpha \nabla^2 u becomes practical formulas for thermal resistance, fin efficiency, critical insulation radius, and more.


The Three Modes of Heat Transfer

Before diving into applications, let's review the three fundamental mechanisms by which heat moves:

1. Conduction

Heat transfer through a stationary medium via molecular vibrations. Governed by Fourier's Law:

q=kTq = -k \nabla T

The thermal conductivity kk varies enormously across materials:

Materialk (W/m·K)Notes
Diamond2000Best natural conductor
Copper401Excellent for heat sinks
Aluminum237Lightweight, good conductor
Steel50Moderate conductor
Glass1.0Poor conductor
Wood0.12Natural insulator
Fiberglass0.04Designed insulator
Air0.025Excellent insulator when still

2. Convection

Heat transfer between a surface and moving fluid. Described by Newton's Law of Cooling:

q=h(TsT)q = h(T_s - T_\infty)

The convection coefficient hh depends on fluid motion:

Conditionh (W/m²·K)Examples
Natural convection (gas)5-25Hot coffee cooling
Forced convection (gas)25-250Fan-cooled electronics
Natural convection (liquid)50-1000Hot pot of water
Forced convection (liquid)100-20,000CPU water cooling
Boiling/Condensation2,500-100,000Steam power plants

3. Radiation

Heat transfer via electromagnetic waves (photons). Governed by the Stefan-Boltzmann Law:

q=ϵσT4q = \epsilon \sigma T^4

where σ=5.67×108\sigma = 5.67 \times 10^{-8} W/(m²·K&sup4;) and ϵ\epsilon is emissivity (0-1).

When Radiation Matters

Radiation becomes significant when: (1) temperature differences are large (>100K), (2) convection is suppressed (vacuum, still air), or (3) surfaces have high emissivity (most non-metals have ε > 0.8).


Electronics Thermal Management

Modern processors pack billions of transistors into tiny areas, creating heat fluxes rivaling nuclear reactors. The thermal management challenge is extreme:

The Thermal Challenge

Modern CPU specs:

  • TDP: 65-250 W
  • Die area: ~100-400 mm²
  • Heat flux: 50-150 W/cm²
  • Tjunction,max: 100-105°C

For comparison:

  • Sun surface: ~6 W/cm²
  • Hot plate: ~10 W/cm²
  • Nuclear reactor: ~100 W/cm²
  • Rocket nozzle: ~1000 W/cm²

Thermal Resistance Networks

Just like electrical circuits, heat flow through a thermal system can be modeled as resistances in series and parallel:

Rthermal=ΔTQR_\text{thermal} = \frac{\Delta T}{Q}

For series resistances (layers in sequence):

Rtotal=Rjunction-case+Rcase-heatsink+Rheatsink-ambientR_\text{total} = R_\text{junction-case} + R_\text{case-heatsink} + R_\text{heatsink-ambient}
ComponentR (K/W)Description
Junction to case0.1-0.5Internal chip packaging
Thermal interface0.05-0.5Paste, pad, or gap filler
Case to heat sink0.1-0.3Mounting pressure dependent
Heat sink to air0.3-3.0Fin design, airflow dependent

The junction temperature is then:

Tjunction=Tambient+QRtotalT_\text{junction} = T_\text{ambient} + Q \cdot R_\text{total}

Heat Sink Design and Fin Efficiency

Heat sinks extend surface area using fins to enhance convective cooling. But there's a catch: heat must conduct through the fin to reach the outer portions, and temperature drops along the way.

The Fin Equation

Consider a thin rectangular fin of length L extending from a base at temperature Tb. The governing equation (steady-state heat equation with convection loss) is:

d2Tdx2m2(TT)=0,m=hPkAc\frac{d^2T}{dx^2} - m^2(T - T_\infty) = 0, \quad m = \sqrt{\frac{hP}{kA_c}}

where P is the fin perimeter and Ac is its cross-sectional area.

Fin Efficiency

The fin efficiency η compares actual heat transfer to the ideal case where the entire fin is at base temperature:

η=tanh(mL)mL\eta = \frac{\tanh(mL)}{mL}

This efficiency decreases as fins get taller because heat cannot reach the tip effectively:

mLη (%)Interpretation
0.592%Short fin, nearly isothermal
1.076%Moderate efficiency
2.048%Significant temperature drop
3.033%Outer fin barely contributes
5.020%Inefficient design

Heat Sink Thermal Analyzer

Design and analyze a finned heat sink for electronic cooling. The heat equation governs the temperature distribution along each fin.

Thermal Analysis Results

Junction Temp:110.6°C
Total Rth:1711.68 K/W
Rconv:1703.37 K/W
Rcond:8.317 K/W
Fin Efficiency:97.3%
Effective Area:259.9 cm²
h coefficient:22.6 W/(m²K)
Fin Spacing:6.3 mm
Warning: Junction temperature exceeds safe operating limit (85°C)

Cross-section view with temperature distribution (blue = cool, red = hot)

Heat Equation Connection

The temperature along each fin follows the steady-state heat equation with convection: k(d²T/dx²) = h·P/A·(T - Tambient). This gives an exponential temperature profile T(x) = Tamb + (Tbase - Tamb) · cosh(m(L-x))/cosh(mL), where m = √(hP/kA) is the fin parameter.

Design Rule of Thumb

For optimal heat sink design, aim for mL ≈ 1-2. Beyond this, making fins taller adds weight and cost without proportional cooling benefit. Better to add more fins or increase airflow.


PCB Thermal Management

Printed circuit boards present a 2D thermal challenge. Multiple heat sources (CPU, GPU, voltage regulators) interact through the board material. The steady-state temperature distribution satisfies:

k2T+q(x,y)=0k\nabla^2 T + q'''(x,y) = 0

where q'''(x,y) is the local heat generation rate (W/m³).

PCB Thermal Simulation

Simulate heat diffusion across a circuit board with multiple heat-generating components. The 2D heat equation models how heat spreads from hot components.

Standard FR4: ~0.25 W/(m·K), Metal-core: ~1.0 W/(m·K)

Natural: ~5-10, Forced air: ~15-40 W/(m²·K)

Simulation Statistics

Time:0.00 s
Max Temp:25.0°C
Avg Temp:0.0°C
ΔT:0.0°C

Heat Sources

CPU: 15W
GPU: 8W
VRM: 5W
Memory: 3W
Controller: 2W
25°C
105°C

Top-down thermal map of PCB with component hotspots

Governing Equation

The 2D heat equation with convection: ρcp(∂T/∂t) = k(∇²T) - h(T - T)/tpcb + Q'''. Here, the Laplacian ∇²T = ∂²T/∂x² + ∂²T/∂y² captures lateral heat spreading, while the convection term models heat loss to the surrounding air.

Thermal Vias

PCB FR-4 material is a poor thermal conductor (k ≈ 0.3 W/m·K). To improve heat spreading, designers add thermal vias — copper-plated holes that conduct heat vertically through the board.

StrategyBenefitTrade-off
Thermal vias10-100× better Z-axis conductionBoard area, signal integrity
Copper planes100× better XY spreadingLayer count, cost
Metal-core PCB10× better overall conductionWeight, cost, manufacturing
Ceramic substrateExcellent thermal & electricalVery high cost

Building Thermal Analysis

Buildings are complex thermal systems where the heat equation governs energy flow through walls, windows, and roofs. The goal is to minimize heating and cooling energy while maintaining comfort.

R-Values and U-Values

The R-value (thermal resistance) measures how well a material resists heat flow:

R=Lk[m2K/W]R = \frac{L}{k} \quad [\text{m}^2\cdot\text{K/W}]

For multiple layers, R-values add in series:

Rtotal=Rsurface,in+iRi+Rsurface,outR_\text{total} = R_\text{surface,in} + \sum_i R_i + R_\text{surface,out}

The U-value (thermal transmittance) is the inverse of total R-value:

U=1Rtotal[W/(m2K)]U = \frac{1}{R_\text{total}} \quad [\text{W}/(\text{m}^2\cdot\text{K})]

Building Thermal Model

Analyze heat loss through a building wall. The temperature profile through the wall follows the steady-state heat equation with constant heat flux.

Heat Loss Analysis

Wall R-value:2.98 m²K/W
Wall U-value:0.336 W/(m²K)
Wall Heat Loss:139.6 W
Window Heat Loss:297.1 W
Total Heat Loss:436.7 W
Wall: 32%Window: 68%

Annual Estimate

Energy:1008 kWh
Cost:$121/year
21.0°C-5.0°CInteriorFiberglassPlywoodBrickWall Thickness (m)Temperature (°C)Temperature Profile Through Wall
LayerThicknesskR-value
Interior Drywall13 mm0.160.081
Fiberglass Insulation100 mm0.042.500
Plywood Sheathing12 mm0.120.100
Brick Exterior100 mm0.720.139

Steady-State Heat Transfer

In steady state, the heat equation reduces to d²T/dx² = 0, giving a linear temperature profile through each layer. The heat flux q = -k(dT/dx) is constant through all layers, leading to the thermal resistance formula R = L/k. Multiple layers add in series: Rtotal = ΣRi.

Temperature Profile Through a Wall

In steady state, the heat equation through a planar wall reduces to:

d2Tdx2=0    T(x)=ax+b\frac{d^2T}{dx^2} = 0 \implies T(x) = ax + b

The temperature varies linearly through each homogeneous layer, with the slope proportional to heat flux divided by conductivity.

Windows: The Weak Link

A typical double-pane window has U ≈ 3 W/(m²·K), while a well-insulated wall might have U ≈ 0.2 W/(m²·K). Even though windows are a small fraction of wall area, they often account for 25-50% of total heat loss!


Pipe Insulation and Critical Radius

Heat flow through cylindrical geometries (pipes, wires) follows a different pattern than planar walls. The steady-state temperature distribution is:

1rddr(rdTdr)=0    T(r)=Alnr+B\frac{1}{r}\frac{d}{dr}\left(r\frac{dT}{dr}\right) = 0 \implies T(r) = A\ln r + B

The temperature profile is logarithmic, not linear! The thermal resistance of a cylindrical layer is:

Rcyl=ln(ro/ri)2πkLR_\text{cyl} = \frac{\ln(r_o/r_i)}{2\pi k L}

The Critical Radius

Here's a counterintuitive result: for small-diameter pipes, adding insulation can actually increase heat loss! This happens because the outer surface area grows faster than the thermal resistance.

The critical radius is:

rcrit=kinshoutsider_\text{crit} = \frac{k_\text{ins}}{h_\text{outside}}

For r < rcrit, adding insulation increases heat loss. For r > rcrit, insulation reduces heat loss as expected.

Pipe Insulation Calculator

Analyze heat loss from insulated pipes using the cylindrical heat equation solution. The logarithmic temperature profile is characteristic of radial heat flow.

Thermal Analysis

Heat Loss:246.0 W
Bare Pipe Loss:56401.4 W
Energy Savings:99.6%
Rtotal:0.2846 K/W

Thermal Resistance Breakdown

Inside Convection0.2%
Pipe Conduction0.0%
Insulation89.2%
Outside Convection10.6%

Annual Savings

Estimated annual cost savings: $49192 (at $0.10/kWh, continuous operation)

90°C27.4°Cr₁=25mm25mm insulationHot FluidSteel PipeInsulationHeat Loss: 246.0 W

Cross-sectional view showing temperature gradient and heat flow

Cylindrical Heat Equation

For radial steady-state conduction: (1/r) d/dr(r dT/dr) = 0. The solution is T(r) = A ln(r) + B, giving logarithmic temperature profiles. Thermal resistance for a cylindrical shell: R = ln(router/rinner) / (2πkL).

When Critical Radius Matters

For typical insulation (k ≈ 0.04 W/m·K) and outdoor air (h ≈ 10 W/m²·K), the critical radius is rcrit = 4 mm. This affects small wires and tubes but rarely large pipes.


Engine Thermal Management

Internal combustion engines present extreme thermal challenges. Combustion reaches 2000-2500°C, but cylinder walls must stay below ~200°C to prevent material failure and oil breakdown.

Heat Flow Path

Heat generated in the combustion chamber flows through several resistances:

  1. Combustion gases → cylinder wall: Convection with h ≈ 200-500 W/(m²·K)
  2. Through cylinder wall: Conduction through cast iron or aluminum
  3. Cylinder wall → coolant: Forced convection with h ≈ 5,000-10,000 W/(m²·K)
  4. Coolant → radiator tubes: Internal forced convection
  5. Radiator tubes → air: External forced convection (fan + vehicle motion)

Engine Block Thermal Analysis

Simulate heat transfer in an internal combustion engine block. Heat from combustion must be efficiently transferred to coolant passages to prevent overheating.

Engine Thermal Status

Runtime:0.0 s
Heat Generated:-5859 kW
Heat to Coolant:-1517 kW
Cooling Effectiveness:100%
Cool
Hot

Cross-section of engine block showing heat flow from cylinder to coolant

Engine Thermal Management

About 30% of combustion energy is rejected to the cooling system. The transient heat equation ρcp(∂T/∂t) = k∇²T + Q''' governs heat transfer through the block, while forced convection (h·A·ΔT) removes heat at coolant passages. Proper coolant flow ensures heat removal matches heat generation.

The Thermostat's Role

Engine efficiency depends on operating temperature. Cold engines run rich (more fuel) and have higher friction. The thermostat blocks coolant flow until the engine reaches optimal temperature (~90°C), then modulates flow to maintain it.

Why Not Just Cool More?

Maximum cooling isn't optimal. Engines are most efficient at elevated temperatures where thermal expansion reduces friction and fuel burns more completely. The thermal management goal is maintaining the optimal temperature, not minimizing it.


Thermal Imaging and the Stefan-Boltzmann Law

Thermal cameras detect infrared radiation emitted by objects according to the Stefan-Boltzmann law:

P=ϵσAT4P = \epsilon \sigma A T^4

This fourth-power dependence makes thermal imaging highly sensitive: a 10% temperature increase (in Kelvin) results in ~46% more radiation.

Applications

Thermal Imaging Analysis

Thermal cameras detect infrared radiation emitted by objects according to the Stefan-Boltzmann law. The temperature distribution follows the heat equation's steady-state solution.

Medical Thermography

Detecting inflammation and circulatory issues through skin temperature variations

Simulates heat diffusion and image resolution

Lines of constant temperature

Detected Anomalies

Inflammation38.5°C

Color Scale (Iron Palette)

28°C
38.5°C

Simulated thermal image with body temperature distribution

Physical Basis

Objects emit infrared radiation based on the Stefan-Boltzmann law: P = εσAT4. In steady-state, the temperature distribution satisfies ∇²T = 0 (Laplace's equation) away from heat sources, with Gaussian decay around localized sources from the heat kernel solution.

Temperature Distribution

In many thermal imaging scenarios, heat sources create temperature distributions that follow the steady-state heat equation. Away from localized sources, the solution to ∇²T = 0 produces smooth temperature gradients that the heat kernel characterizes.

For a point heat source, the steady-state temperature in 2D decays as:

T(r)Tln(r0r)T(r) - T_\infty \propto \ln\left(\frac{r_0}{r}\right)

In 3D, it decays as 1/r (like gravity or electrostatics). The heat kernel solution gives Gaussian-like profiles for transient problems.


Machine Learning Connections

Thermal analysis intersects with machine learning in several important ways:

1. CNNs for Thermal Image Analysis

Convolutional neural networks excel at thermal image classification:

  • Predictive maintenance: Detecting hot spots in electrical equipment before failure
  • Medical diagnosis: Identifying inflammation patterns in thermography
  • Building inspection: Automatic detection of insulation gaps and air leaks

2. Physics-Informed Neural Networks (PINNs)

PINNs solve PDEs by embedding the heat equation directly into the loss function:

L=Ldata+λLphysics\mathcal{L} = \mathcal{L}_\text{data} + \lambda \mathcal{L}_\text{physics}

where Lphysics=utα2u2\mathcal{L}_\text{physics} = \left\| \frac{\partial u}{\partial t} - \alpha \nabla^2 u \right\|^2

3. Surrogate Models for Optimization

Full thermal simulations are computationally expensive. ML models trained on simulation data can provide rapid predictions for:

  • Heat sink geometry optimization
  • Thermal interface material selection
  • Building energy modeling

The Biot Number: When to Use Simplified Models

Bi=hLk=Internal resistanceExternal resistance\text{Bi} = \frac{hL}{k} = \frac{\text{Internal resistance}}{\text{External resistance}}
  • Bi < 0.1: Lumped capacitance is valid (uniform internal temperature)
  • Bi > 0.1: Must solve the full heat equation (internal gradients matter)

Python Implementation

2D Finite Difference Solver

Steady-State 2D Heat Equation Solver
🐍thermal_2d_solver.py
3Steady-State Heat Equation

For time-independent problems, ∂T/∂t = 0, so the heat equation reduces to Laplace&apos;s equation with sources: ∇²T = -q/k. This is much easier to solve than the time-dependent case.

15Central Difference Discretization

The Laplacian ∇²T is approximated using a 5-point stencil. The second derivative in x is (T[i+1,j] - 2T[i,j] + T[i-1,j])/Δx², and similarly for y. This gives O(Δx²) accuracy.

27Gauss-Seidel Iteration

We solve the discretized equations iteratively. Gauss-Seidel uses updated values as soon as they&apos;re available, converging faster than Jacobi iteration. For better convergence, use Successive Over-Relaxation (SOR).

43Convergence Check

We iterate until the maximum temperature change between iterations is below tolerance. For real applications, use multigrid methods or conjugate gradient for much faster convergence.

51Non-Uniform Heat Generation

Modern CPUs have hot spots (cores) and cooler regions (cache, I/O). Modeling these accurately is critical for thermal management. The heat generation rate has units of W/m³.

76 lines without explanation
1import numpy as np
2import matplotlib.pyplot as plt
3
4def solve_2d_heat_equation(Lx, Ly, nx, ny, k, q_gen, T_boundary, tol=1e-6, max_iter=10000):
5    """
6    Solve steady-state 2D heat equation using finite differences.
7
8    The governing equation:
9    ∇²T = -q_gen/k
10
11    Discretized using central differences:
12    (T[i+1,j] - 2T[i,j] + T[i-1,j])/dx² +
13    (T[i,j+1] - 2T[i,j] + T[i,j-1])/dy² = -q_gen/k
14    """
15    dx = Lx / (nx - 1)
16    dy = Ly / (ny - 1)
17
18    # Initialize temperature field
19    T = np.ones((ny, nx)) * T_boundary
20
21    # Source term (heat generation)
22    source = q_gen / k
23
24    # Gauss-Seidel iteration
25    for iteration in range(max_iter):
26        T_old = T.copy()
27
28        # Update interior points
29        for i in range(1, ny - 1):
30            for j in range(1, nx - 1):
31                T[i, j] = (
32                    (T[i+1, j] + T[i-1, j]) / dx**2 +
33                    (T[i, j+1] + T[i, j-1]) / dy**2 +
34                    source[i, j]
35                ) / (2/dx**2 + 2/dy**2)
36
37        # Check convergence
38        max_change = np.max(np.abs(T - T_old))
39        if max_change < tol:
40            print(f"Converged in {iteration} iterations")
41            break
42
43    return T
44
45# Example: CPU die with non-uniform heat generation
46Lx, Ly = 0.01, 0.01  # 1cm x 1cm die
47nx, ny = 50, 50
48k = 150  # Silicon conductivity (W/m·K)
49T_boundary = 50  # °C (heat sink temperature)
50
51# Non-uniform heat generation (hot spots)
52q_gen = np.zeros((ny, nx))
53q_gen[15:25, 15:25] = 1e8  # Core (100 W/cm³)
54q_gen[30:40, 25:35] = 5e7  # Cache (50 W/cm³)
55
56# Solve
57T = solve_2d_heat_equation(Lx, Ly, nx, ny, k, q_gen, T_boundary)
58
59# Visualize
60x = np.linspace(0, Lx*1000, nx)  # Convert to mm
61y = np.linspace(0, Ly*1000, ny)
62X, Y = np.meshgrid(x, y)
63
64plt.figure(figsize=(10, 4))
65
66plt.subplot(1, 2, 1)
67plt.contourf(X, Y, q_gen/1e6, cmap='hot', levels=20)
68plt.colorbar(label='Heat Generation (MW/m³)')
69plt.xlabel('x (mm)')
70plt.ylabel('y (mm)')
71plt.title('Heat Source Distribution')
72
73plt.subplot(1, 2, 2)
74plt.contourf(X, Y, T, cmap='hot', levels=20)
75plt.colorbar(label='Temperature (°C)')
76plt.xlabel('x (mm)')
77plt.ylabel('y (mm)')
78plt.title(f'Temperature Distribution\nMax: {T.max():.1f}°C')
79
80plt.tight_layout()
81plt.show()

Thermal Resistance Network

Building Wall Thermal Analysis
🐍thermal_resistance.py
3Thermal Resistance Network

Just like electrical circuits, heat transfer problems can be modeled as resistance networks. For steady-state 1D heat flow through series layers, resistances add: R_total = ΣR_i.

10Convection Resistance

At surfaces, heat transfers by convection with resistance R_conv = 1/(hA). The convection coefficient h depends on fluid motion: h ≈ 5-25 for natural convection, h ≈ 25-250 for forced air.

16Conduction Resistance

Through a material layer, R_cond = L/(kA). Low k (insulators) means high resistance. Doubling thickness doubles resistance, but doubling k halves it.

22Heat Transfer Rate

This is Ohm&apos;s law for heat: Q = ΔT/R_total. The temperature difference drives heat flow, resistance opposes it. Units: W = K / (K/W).

44U-Value

The U-value (thermal transmittance) is the inverse of total R-value per unit area: U = 1/R_total. It&apos;s the standard metric for building envelope performance. Lower U = better insulation.

68 lines without explanation
1import numpy as np
2
3def thermal_resistance_network(layers, h_inside, h_outside, T_inside, T_outside, A):
4    """
5    Calculate heat transfer through a composite wall using
6    the thermal resistance network method.
7
8    R_total = 1/(h_in*A) + Σ(L_i/(k_i*A)) + 1/(h_out*A)
9    Q = ΔT / R_total
10    """
11    # Convection resistances
12    R_conv_in = 1 / (h_inside * A)
13    R_conv_out = 1 / (h_outside * A)
14
15    # Conduction resistances for each layer
16    R_cond = []
17    for layer in layers:
18        R = layer['thickness'] / (layer['k'] * A)
19        R_cond.append(R)
20
21    R_total = R_conv_in + sum(R_cond) + R_conv_out
22
23    # Heat transfer rate
24    Q = (T_inside - T_outside) / R_total
25
26    # Calculate interface temperatures
27    temperatures = [T_inside]
28    T_current = T_inside
29
30    # Temperature drop at inside surface
31    T_current -= Q * R_conv_in
32    temperatures.append(T_current)
33
34    # Temperature through each layer
35    for R in R_cond:
36        T_current -= Q * R
37        temperatures.append(T_current)
38
39    return {
40        'Q': Q,
41        'R_total': R_total,
42        'U_value': 1 / (R_total * A),  # Overall heat transfer coefficient
43        'temperatures': temperatures
44    }
45
46# Example: Building wall analysis
47A = 1.0  # m² (per unit area)
48h_inside = 10    # W/(m²·K) - natural convection
49h_outside = 25   # W/(m²·K) - wind convection
50
51layers = [
52    {'name': 'Drywall', 'thickness': 0.013, 'k': 0.16},
53    {'name': 'Insulation', 'thickness': 0.1, 'k': 0.04},
54    {'name': 'Plywood', 'thickness': 0.012, 'k': 0.12},
55    {'name': 'Brick', 'thickness': 0.1, 'k': 0.72},
56]
57
58T_inside = 21   # °C
59T_outside = -5  # °C
60
61result = thermal_resistance_network(layers, h_inside, h_outside, T_inside, T_outside, A)
62
63print("Thermal Resistance Network Analysis")
64print("=" * 50)
65print(f"Heat loss rate: {result['Q']:.2f} W/m²")
66print(f"Total R-value: {result['R_total']:.3f} m²·K/W")
67print(f"U-value: {result['U_value']:.3f} W/(m²·K)")
68print()
69print("Temperature Profile:")
70print(f"  Inside air: {result['temperatures'][0]:.1f}°C")
71print(f"  Inside surface: {result['temperatures'][1]:.1f}°C")
72for i, layer in enumerate(layers):
73    print(f"  After {layer['name']}: {result['temperatures'][i+2]:.1f}°C")

Fin Efficiency Analysis

Heat Sink Optimization
🐍fin_efficiency.py
3Fin Efficiency Formula

The fin parameter m = √(hP/kA_c) balances convection (hP) against conduction (kA_c). Efficiency η = tanh(mL)/(mL) shows that longer fins become less efficient as heat can&apos;t reach the tip.

20Why η < 1

An ideal fin has uniform temperature (same as the base). Real fins have temperature drop toward the tip, so the outer portions contribute less to heat transfer. Higher k materials improve efficiency.

28Heat Sink Trade-offs

Heat sink design involves competing factors: more fins means more area but tighter spacing reduces airflow and h. Taller fins add area but reduce efficiency. Optimization requires balancing these.

45Effective Area

The effective heat transfer area accounts for fin efficiency: A_eff = A_base + n×η×A_fin. This gives the equivalent isothermal area for the same heat transfer.

71 lines without explanation
1import numpy as np
2import matplotlib.pyplot as plt
3
4def fin_efficiency(h, k, P, A_c, L):
5    """
6    Calculate efficiency of a straight fin with adiabatic tip.
7
8    The fin parameter m = sqrt(hP/(kA_c)) characterizes the
9    balance between convective heat loss and conductive supply.
10
11    Fin efficiency η = tanh(mL)/(mL)
12
13    As L increases, η decreases because heat can't reach the tip.
14    """
15    m = np.sqrt(h * P / (k * A_c))
16    mL = m * L
17
18    # Prevent division by zero
19    if mL < 0.01:
20        return 1.0
21
22    eta = np.tanh(mL) / mL
23    return eta
24
25def optimize_heat_sink(base_area, n_fins, fin_thickness, fin_height, k, h):
26    """
27    Analyze a heat sink with n parallel rectangular fins.
28
29    Trade-offs:
30    - More fins → more surface area, but less spacing
31    - Taller fins → more area, but lower efficiency
32    - Thicker fins → better conduction, but less total fins
33    """
34    fin_spacing = (base_area / n_fins) - fin_thickness
35
36    if fin_spacing < 0.001:  # Minimum 1mm spacing
37        return None
38
39    # Fin geometry
40    P = 2 * (fin_thickness + base_area / n_fins)  # Perimeter
41    A_c = fin_thickness * (base_area / n_fins)    # Cross-section
42    A_fin = P * fin_height / 2                     # Surface area (one fin)
43
44    eta = fin_efficiency(h, k, P, A_c, fin_height)
45
46    # Total heat transfer
47    # Q = h * (A_base + n * η * A_fin) * ΔT
48    A_base = base_area - n_fins * fin_thickness * base_area / n_fins
49    A_effective = A_base + n_fins * eta * A_fin
50
51    return {
52        'efficiency': eta,
53        'A_effective': A_effective,
54        'spacing': fin_spacing * 1000,  # mm
55        'thermal_resistance': 1 / (h * A_effective)
56    }
57
58# Optimization study
59k_aluminum = 200  # W/(m·K)
60h_forced = 50     # W/(m²·K) - forced convection
61base_area = 0.01  # m² (10cm x 10cm base)
62
63print("Heat Sink Optimization Study")
64print("=" * 60)
65print(f"{'Fins':<8} {'Height(mm)':<12} {'η (%)':<10} {'Spacing(mm)':<12} {'R (K/W)':<10}")
66print("-" * 60)
67
68for n_fins in [10, 20, 30, 50]:
69    for height in [0.01, 0.02, 0.03, 0.05]:  # 10-50mm
70        result = optimize_heat_sink(
71            base_area, n_fins, 0.002, height, k_aluminum, h_forced
72        )
73        if result:
74            print(f"{n_fins:<8} {height*1000:<12.0f} {result['efficiency']*100:<10.1f} "
75                  f"{result['spacing']:<12.2f} {result['thermal_resistance']:<10.3f}")

Common Pitfalls

Ignoring Contact Resistance

Thermal interface resistance between components (e.g., CPU to heat sink) is often the largest single resistance in the path. Air gaps of just 25 μm can add 0.1-0.5 K/W. Always use thermal paste or pads!

Confusing R-value Systems

US R-values use ft²·°F·h/BTU, while SI uses m²·K/W. The conversion is RSI = 0.176 × RUS. Always check units in specifications!

Neglecting Radiation

At elevated temperatures, radiation becomes significant. At 100°C, a black surface radiates ~1000 W/m² — comparable to typical forced convection. Include radiation for high-temperature applications.

Numerical Stability in Transient Problems

For explicit finite difference methods, the CFL condition must be satisfied:

αΔtΔx20.5\frac{\alpha \Delta t}{\Delta x^2} \leq 0.5

This limits time step size. For large simulations, use implicit methods (Crank-Nicolson) or adaptive time stepping.


Test Your Understanding

Thermal Analysis Quiz

Question 1 of 8

In a finned heat sink, what happens to fin efficiency as the fin height increases?

Score: 0/0

Summary

We've seen how the heat equation becomes practical engineering formulas for thermal design. The key concepts bridge abstract mathematics to real-world applications.

Key Equations

EquationNameApplication
R = L/kConduction ResistanceWall/layer analysis
R = 1/(hA)Convection ResistanceSurface heat transfer
R = ln(r₂/r₁)/(2πkL)Cylindrical ResistancePipe insulation
η = tanh(mL)/(mL)Fin EfficiencyHeat sink design
r_crit = k/hCritical RadiusSmall pipe insulation
U = 1/R_totalOverall U-valueBuilding energy codes
Bi = hL/kBiot NumberModel selection criterion
P = εσAT⁴Stefan-BoltzmannThermal imaging, radiation

Key Takeaways

  1. Thermal resistance networks simplify complex systems into series and parallel combinations, analogous to electrical circuits
  2. Fin efficiency decreases with height because heat cannot conduct to the outer portions; optimal design balances area versus efficiency
  3. Cylindrical heat transfer has logarithmic temperature profiles and the counterintuitive critical radius effect
  4. Biot number determines whether internal temperature gradients matter (Bi > 0.1) or can be ignored (Bi < 0.1)
  5. Thermal imaging relies on the T&sup4; dependence of radiation, making it highly sensitive to temperature differences
  6. Steady-state analysis (∇²T = -q/k) is often sufficient for design; transient analysis adds complexity but is needed for time-dependent problems
  7. Machine learning complements traditional analysis through surrogate models, image classification, and physics-informed neural networks
Engineering Thermal Analysis in One Sentence:
"Heat always flows from hot to cold, and the rate depends on the resistance in its path — minimizing resistance for cooling, maximizing it for insulation."
Coming Next: In the next section, we'll explore how the heat equation applies to biological systems, from cell membrane diffusion to drug delivery and neural signal propagation.
Loading comments...