# Thermal Capacitance (`cth`)

> Stores heat at a thermal node, in J/K.

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

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

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

## When to use it

Use it to give a node thermal inertia, such as a case, a heat sink or a junction. Use Thermal Resistance for the paths between nodes.

## Pins

| Pin | Domain | Meaning |
|---|---|---|
| `a` | thermal | Thermal node; its temperature rises as heat is stored |

## Common parameters

- `c`: How much heat it can store (Default: required)

## Parameters

| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
| `c` | J/K | required |  | How much heat it can store |

_Parameter descriptions are in English in both languages._

**Use for:** Thermal mass of a body · Heat sink warm-up · Junction and case inertia

**Not for:** Conduction paths between nodes → [`rth`](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/thermal/rth/)

## Formulas

| Formula | Equation | Source |
|---|---|---|
| Heat capacity of a body | C = m·cp | Incropera, DeWitt, Bergman & Lavine, Fundamentals of Heat and Mass Transfer, 7th ed. (2011), §5.1 (lumped capacitance method) |
| Thermal time constant | τ = Rth·C | Incropera, DeWitt, Bergman & Lavine, Fundamentals of Heat and Mass Transfer, 7th ed. (2011), §5.1 (lumped capacitance method) |
| Rise after a heat step | ΔT(t) = P·Rth·(1 − e^(−t/τ)) | Incropera, DeWitt, Bergman & Lavine, Fundamentals of Heat and Mass Transfer, 7th ed. (2011), §5.1 (lumped capacitance method) |

## Quick check

Inputs:

- `c`: Heat capacity = 50 J/K, `c`
- `r`: Thermal resistance to ambient = 500m K/W
- `p`: Heat step = 20 W
- `t`: Time after the step = 10 s

Outputs:

- `tau`: Thermal time constant = `r*c` s
- `tss`: Rise once settled = `p*r` K
- `rise`: Rise at time t = `p*r*(1 - exp(-t/tau))` K

## Model logic

- It is a heat capacity c from its node to the 0 degC reference; each backward Euler step of length h adds a conductance c/h to the node and a heat source from the last temperature.
- Every thermal node starts at the first Ambient Temperature's t, unless the run's thermalStart finds other starting temperatures.
- c is fixed: the specific heat does not change with temperature.

## Model

The part stores heat so that c * dT/dt equals the net heat flowing into the node. It is referenced to 0 degC, and every thermal node starts at the temperature of the first Ambient Temperature part. Each step uses backward Euler, which is stable for the slow thermal behaviour.

## Common mistakes

- A node with a heat capacity but no thermal resistance to an ambient cannot lose heat, so its temperature climbs without limit. Always connect it through a thermal resistance to an Ambient Temperature part.
- Thermal time constants run to seconds or minutes, while switching steps are microseconds. Covering several time constants with a small maximum step can exceed the step limit.

Problems rules: `solver.limits`

## Datasheet and sources

c is the mass of the body times its specific heat, about 0.9 joule per gram per kelvin for aluminium. For a device junction, divide the time constant of each stage in the transient thermal impedance curve by its resistance.

## Example

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

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