# Thermal and losses: where the watts go and how hot the junction gets

A switch that loses 14 W needs somewhere to put the heat. You simulate a buck whose MOSFET heats its own junction, read the losses split into conduction and switching, read the junction temperature, then let Design Thermal compute the steady-state junction temperature and the largest heatsink you may use. About 15 minutes.

Pictures: a numbered red box is what you click or read, `[Run]` is a button, `Analysis › Losses` a menu path.

## 1. Open the buck with a thermal model

Choose `File › Open Example › DC-DC › Buck converter with thermal model`.

![The File menu open at Open Example, DC-DC, Buck converter with thermal model, marked 1 to 4](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/01-open-example.png)

1. `File`.
2. `Open Example`.
3. `DC-DC`.
4. `Buck converter with thermal model`.

## 2. Read the thermal network

The red parts above the power stage are a thermal circuit. Temperature plays the part of a voltage and watts the part of a current.

![The schematic: Q1, and the thermal parts Cth, Rth and Amb, marked 1 to 4](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/02-schematic.png)

1. `Q1`: its `thermal` parameter is `tj`, so its losses flow into the thermal node `tj`. Its on-resistance also rises 0.4 % per kelvin as that node heats.
2. `Cth`: 5 mJ/K, the heat the junction and case store.
3. `Rth`: 1.5 K/W from the junction to the heatsink.
4. `Amb`: holds the heatsink at 40 °C.

## 3. Run

Click `[▶ Run]` in the toolbar (or press `F5`). The scope shows the junction temperature. Click `Maximize` at the panel's top right and `Fit` in the scope's toolbar, then, on the `Signals` tab, click the name `T(tj)` in the table: its row opens with the values at the window's ends, the change between them, min and max.

![The scope: T(tj) rises from 40 °C towards 59 °C, marked 1 to 2](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/03-run.png)

1. `T(tj)` starts at 40 °C and rises with the time constant Rth · Cth = 7.5 ms.
2. `@t2`: about 58.9 °C at the right edge of the plot, 19 ms; the run ends at 59.08 °C at 20 ms (the fitted view leaves a little of each end out, #2677). The run lasts 2.7 time constants, so the junction has not quite settled. Step 8 gives the settled value.

After the run the thermal overlay is on: Q1 is tinted on the temperature scale with its temperature beside it. The run card's thermal chip names the hottest part, its temperature and its margin to `tjMax`; click it to bring the overlay back after you turn it off.

## 4. Open the analyses

Click `Restore` at the panel's top right, then open the `Analysis` menu.

![The Analysis menu with Losses and Thermal, marked 1 to 3](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/04-analysis-menu.png)

1. `Analysis`.
2. `Losses`.
3. `Thermal` (step 6).

## 5. Read the losses

Click `Losses`.

![The Losses window: 15.6 W in total, Q1 13.5 W of switching, marked 1 to 3](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/05-losses.png)

1. `Total losses`: 15.6 W, averaged over the whole run (0 to 20 ms).
2. `Conduction`: Q1 loses 147 mW in its 20 mΩ, and D1 1.95 W in its 0.5 V drop.
3. `Switching`: Q1 loses 13.5 W. Its data gives 50 µJ at turn-on and 80 µJ at turn-off at 48 V and 5 A, and 130 µJ × 100 kHz = 13 W. Switching, not conduction, sets the heat here: halving the switching frequency would nearly halve it.

`Copy` puts the table on the clipboard.

## 6. Read the temperatures

Close the window and choose `Analysis › Thermal`.

![The Thermal window: T(tj) ends at 59.1 °C, T(hs) stays at 40 °C, marked 1](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/06-thermal.png)

1. `Final`: one row per thermal node, with its final, maximum and minimum temperature in °C. `T(tj)` ends at 59.1 °C, and `T(hs)` stays at 40 °C because `Amb` holds it there.

## 7. Open Design Thermal

Close the window and open the `Design` menu.

![The Design menu with Thermal, marked 1 to 2](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/07-design-menu.png)

1. `Design`.
2. `Thermal`.

## 8. Compute the steady state

The Design page opens at `Thermal`. Click `[Run]`, collapse the bottom panel (`↓` at its top right) and open `Advanced` under the conditions.

![Design Thermal: the hottest junction at 60.46 °C, verified, marked 1 to 3](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/08-design-thermal.png)

1. `Heatsink`: 0 K/W, `from circuit`. The heatsink is ideal, since `Amb` holds it at 40 °C.
2. The hottest junction: 60.46 °C = 40 °C + 13.65 W × 1.5 K/W. It is the value the simulation was heading for in step 3. The plot shows how it would rise with a heatsink of 0 to 6 K/W; it reaches the 125 °C limit at 4.14 K/W.
3. `✔ Verified`: both junctions are under 125 °C, and this static result is within 1.4 K of the simulated `T(tj)`.

The notes under the devices say what was assumed: D1 has no thermal data, so 1 K/W junction to case is used, and neither part has a package, so no heatsink part is picked. Give them vendor devices with `Design › Design Steps › Parts` to get one.

## 9. Try a heatsink

Type `3` in `Heatsink` and click `[Run]`.

![A 3 K/W heatsink: 107.3 °C, and the static model row is skipped, marked 1 to 5](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/img/en/thermal-losses/09-heatsink.png)

1. `Heatsink`: `3` K/W, both devices on it.
2. `[Run]`, which reads `[Design again]` once the design is done.
3. The hottest junction: 107.3 °C = 40 + 15.6 W × 3 + 13.65 W × 1.5. It is still under 125 °C, with 17.7 K to spare.
4. `✔ Verified`: every junction passes.
5. The row that is skipped: the static model against the simulated `T(tj)`. The 3 K/W you typed is not in the circuit's thermal network, so the simulation cannot check it (it would show 59.1 °C against 107.3 °C). The junction rows are the answer to "will a 3 K/W heatsink do?". To have the simulation check the heatsink too, draw it into the circuit: an `Rth` of 3 K/W between `hs` and `Amb`.

## Temperatures without a thermal model

Most circuits have no thermal network, and every Real run still shows temperatures. Open `File › Open Example › DC-DC › Buck converter`, set the switch `S1`'s `device` to a library MOSFET whose data sheet gives an RthJA (for example `infineon/bsc070n10ns5`), and run. The run card says *No thermal model on N parts. Temperatures use ambient + Rth from the data sheet.*, the chip shows the MOSFET at about ambient + loss × RthJA, and the overlay marks it `≈`. The diode and `C1` show `—` and **needs Rth**: their data sheets' Rth is not in the catalogue, so no temperature is guessed. **Add heatsinks** opens Design Thermal (step 8), which picks a catalogue heatsink for each device. `thermal.summary` gives the same numbers to a script.

## The same steps from a script

```sh
powercraft-cli run \
    --cmd file.openExample --params '{"name":"buckThermal"}' \
    --cmd simulation.run   --params '{}' \
    --cmd analysis.losses  --params '{}' \
    --cmd analysis.thermal --params '{}' \
    --cmd design.thermal   --params '{}' \
    --cmd design.thermal   --params '{"rthHeatsink":3}' \
    --cmd thermal.summary  --params '{}'
```

Back to the [learning path](https://voltecx-web.nguyenvanqui291.workers.dev/docs/tutorials/).
