# Heatsink (`heatsink`)

> A catalogue heatsink's sink-to-ambient thermal resistance, read off its data sheet at a heat and an airflow.

![heatsink](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/img/heatsink.svg)

[Component reference](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/) · [繁體中文](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/thermal/heatsink/)

**Group:** Thermal · **Kind:** `{"element":"heatsink","kind":"thermal"}`

## When to use it

Use it between a device's case (through the interface pad's resistance) and the ambient. Place it with thermal.placeHeatsink, which copies the resistance from parts/heatsinks.json; design.thermal names the part, the heat and the airflow to pass.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `a` | thermal | Mounting surface, the sink's hot spot |
| `b` | thermal | Ambient side: connect an Ambient Temperature here |

## Common parameters

- `part`: Catalogue part number the resistance was read from (Default: optional (off))
- `rth`: Sink-to-ambient resistance, read off the catalogue by thermal.placeHeatsink (Default: optional (off))
- `airflow`: Airflow the resistance was read at; 0 is natural convection (Default: 0)
- `watts`: Heat the resistance was read at; the data sheet's resistance falls as the heatsink gets hotter (Default: optional (off))
- `massG`: Weight from the data sheet; with material it gives the heatsink its heat capacity, so it warms over its own time constant (Default: optional (off))

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `rth` | K/W | optional (off) |  | Sink-to-ambient resistance, read off the catalogue by thermal.placeHeatsink |
| `part` | — | optional (off) |  | Catalogue part number the resistance was read from |
| `airflow` | m/s | 0 |  | Airflow the resistance was read at; 0 is natural convection |
| `watts` | W | optional (off) |  | Heat the resistance was read at; the data sheet's resistance falls as the heatsink gets hotter |
| `lengthMm` | mm | optional (off) |  | Extrusion cut length the resistance was read at |
| `curveW` | W | optional (off) |  | Heat at each point of the data sheet's temperature-rise table, rising, with commas; with curveK the run reads the resistance at the heat the heatsink carries |
| `curveK` | K | optional (off) |  | Temperature rise at each of those points, from the same table |
| `massG` | g | optional (off) |  | Weight from the data sheet; with material it gives the heatsink its heat capacity, so it warms over its own time constant |
| `material` | — | aluminium |  | Metal of the heatsink for its specific heat: aluminium or copper |
| `fanRth` | K/W | optional (off) |  | Resistance under the cooling fan: sink to ambient at the airflow of the fan that names it, read off the catalogue by thermal.placeFan; used while that fan is fitted and simulated |
| `fanCurveW` | W | optional (off) |  | Rise table under the fan, heat: each point's heat in the data sheet's table at the fan's airflow, rising, with commas; used with fanCurveK while that fan is fitted and simulated |
| `fanCurveK` | K | optional (off) |  | Rise table under the fan, rise: the temperature rise at each of those points, from the same table |
| `footprint` | — | optional (off) |  | KiCad library id of the footprint the heatsink sits on, such as Heatsink:Heatsink_Fischer_SK104-STC-STIC_35x13mm; board.addFootprints places it with every pad on no net; information only, not simulated |

_Parameter descriptions are in English in both languages._

**Use for:** Catalogue heat sinks · Forced-air cooling · Natural convection

**Not for:** A thermal pad or interface → [`rth`](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/thermal/rth/)

## Formulas

| Formula | Equation | Source |
|---|---|---|
| Heat sink temperature | Ts = Ta + P·Rsa | Mohan, Undeland & Robbins, Power Electronics, 3rd ed. (2003), ch. 29 (heat sinks) |
| Junction temperature | Tj = Ta + P·(Rjc + Rcs + Rsa) | Mohan, Undeland & Robbins, Power Electronics, 3rd ed. (2003), ch. 29 (series thermal resistances) |
| Largest sink resistance allowed | Rsa = (Tjmax − Ta)/P − Rjc − Rcs | Mohan, Undeland & Robbins, Power Electronics, 3rd ed. (2003), ch. 29 (heat sink selection) |

## Quick check

Inputs:

- `p`: Heat of the device = 20 W, `watts`
- `rsa`: Sink-to-ambient resistance = 2 K/W, `rth`
- `ta`: Ambient temperature = 40 °C
- `rjc`: Junction-to-case resistance = 500m K/W
- `rcs`: Case-to-sink resistance = 300m K/W
- `tjmax`: Highest allowed junction temperature = 125 °C

Outputs:

- `tsink`: Heat sink temperature = `ta + p*rsa` °C
- `tj`: Junction temperature = `ta + p*(rjc + rcs + rsa)` °C
- `rneed`: Largest sink resistance allowed = `(tjmax - ta)/p - rjc - rcs` K/W

## Model logic

- It is a plain thermal resistance rth from a to b, stamped like Thermal Resistance.
- With curveW and curveK it reads rth again off the table at the heat it carries after every thermal step and in each round of a steady-state solve; above the last point it holds the last point's value and the run warns. part, airflow, watts and lengthMm only record where the value was read.
- massG of material (aluminium 903 or copper 385 J/(kg·K), Çengel & Ghajar, Heat and Mass Transfer 5th ed., Table A-3) is a heat capacity from a to the reference; without it the sink settles in the same step. An unset rth with no table, or a non-positive one, stops the build.

## Model

A thermal resistance rth from a to b. thermal.placeHeatsink reads it as the data sheet's temperature rise at watts divided by watts, on the fastest listed airflow not above airflow (straight lines between the table's points). Convection makes a heatsink's resistance fall as it gets hotter, so the part also keeps the sheet's rise table (curveW, curveK) and the run reads the resistance at the heat the sink carries. massG (the sheet's weight) gives it a heat capacity m·cp on a.

## Common mistakes

- With massG the heatsink warms over minutes (τ = rth·m·cp): a run of milliseconds shows almost none of its rise. Use thermalStart steady or a multi-rate run, and do not also add a Thermal Capacitance on a, or the mass counts twice.
- A heatsink placed from the library has no rth and stops the build; place it with thermal.placeHeatsink or enter the resistance from your own heatsink's data sheet.

Problems rules: `solver.thermal`, `compile.error`

## Datasheet and sources

Every value comes from parts/heatsinks.json, which cites each heatsink's data sheet, revision and the table read.

## Example

Open the example with the command `file.openExample` and the name `demo:heatsink`.

---
Generated by `cargo xtask reference` from the usage texts and parameter specs. Do not edit by hand.
