> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hardwave.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Advanced Thermal Model

> Premium multi-mode thermal component for junction-to-ambient heat transfer in Hardwave

The **Advanced Thermal Model** is a premium component that models junction-to-ambient heat transfer via conduction, convection, and radiation. It is suitable for PCB components, power semiconductors, and custom thermal packages.

## Physics

The component solves a combined conduction/radiation heat balance:

1. Initial estimate: T\_case = T\_amb + P × R\_ca (pure conduction)
2. Radiation correction loop (up to 20 iterations, converges when ΔT \< 1e-6 K):
   * P\_rad  = ε × σ × A × (T\_case⁴ − T\_amb⁴)
   * P\_conv = max(0, P − P\_rad)
   * T\_case = T\_amb + P\_conv × R\_ca
3. T\_junction = T\_case + P × R\_jc

Where σ is the Stefan-Boltzmann constant (5.67 × 10⁻⁸ W/m²K⁴).

## Ports

| Port                | Direction | Type             | Description                             |
| ------------------- | --------- | ---------------- | --------------------------------------- |
| `power_dissipation` | Input     | Power (W)        | Total power dissipated by the component |
| `ambient_temp`      | Input     | Temperature (°C) | Ambient temperature (default 25 °C)     |
| `junction_temp`     | Output    | Temperature (°C) | Semiconductor junction temperature      |
| `case_temp`         | Output    | Temperature (°C) | Package case temperature                |
| `heat_flux`         | Output    | Power (W)        | Total dissipated power                  |

## Parameters

| Parameter               | Default | Unit | Description                                               |
| ----------------------- | ------- | ---- | --------------------------------------------------------- |
| `thermal_resistance_jc` | 5.0     | °C/W | Junction-to-case thermal resistance                       |
| `thermal_resistance_ca` | 20.0    | °C/W | Case-to-ambient thermal resistance (includes heatsink)    |
| `emissivity`            | 0.9     | -    | Surface emissivity (0 = perfect reflector, 1 = blackbody) |
| `surface_area_cm2`      | 4.0     | cm²  | Effective radiating surface area                          |

## Example

```python theme={null}
import hardwave
import hardwave.stdlib
import hardwave.premium

hardwave.premium.configure()  # reads HARDWAVE_ORGANIZATION_ID and HARDWAVE_SECRET_KEY from env
hardwave.premium.sync()

from hardwave.components import ComponentRegistry
from hardwave.simulation import SimulationGraph, SimulationEngine

ThermalModel = ComponentRegistry.instance().get("AdvancedThermalModel")

graph = SimulationGraph()
graph.add_component(ThermalModel("mosfet", param_values={
    "thermal_resistance_jc": 3.2,
    "thermal_resistance_ca": 15.0,
    "emissivity": 0.9,
    "surface_area_cm2": 4.0,
}))

result = SimulationEngine(graph).run(inputs={
    "mosfet": {
        "power_dissipation": 4.5,
        "ambient_temp": 35.0,
    },
})

print(f"Junction temp: {result.get_output('mosfet', 'junction_temp'):.1f} °C")
print(f"Case temp:     {result.get_output('mosfet', 'case_temp'):.1f} °C")
```

## When to use this component

* Estimating MOSFET or IGBT junction temperature under load
* Comparing heatsink options by adjusting `thermal_resistance_ca`
* Modelling radiation effects at elevated case temperatures
* Coupling with power electronics components in a larger simulation graph

<Note>
  This component requires a Hardwave premium subscription. See [Premium Components](/premium) for setup instructions.
</Note>
