# 環境溫度 (`ambient`)

> 把熱節點固定在某個溫度，相當於熱的接地。

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

[元件參考](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/) · [English](https://voltecx-web.nguyenvanqui291.workers.dev/docs/reference/thermal/ambient/)

**分類:** 熱 · **種類:** `{"element":"ambient","kind":"thermal"}`

## 何時使用

每個熱網路至少放一個，接在熱阻鏈所通往的空氣或冷卻液節點。它與元件之間用熱阻與熱容。

## 接腳

| 接腳 | 訊號域 | 意義 |
|---|---|---|
| `a` | 熱 | 溫度固定為 t 的熱節點 |

## 常用參數

- `t`: Fixed temperature it holds (預設值: 25)

## 參數

| 鍵 | 單位 | 預設值 | 典型範圍 | 說明 |
|---|---|---|---|---|
| `t` | °C | 25 |  | Fixed temperature it holds |
| `pwlTime` | s | 選填（預設關閉） |  | Times of a temperature profile, rising strictly, with commas; with pwlTemp the profile replaces t |
| `pwlTemp` | °C | 選填（預設關閉） |  | Temperature at each of those times; straight lines between them, held before the first and after the last |

_參數說明在兩種語言中都是英文。_

**適用於:** 室內或機殼內空氣 · 冷卻液或冷板 · 最壞情況環境溫度

**不適用於:** 會升溫的物體 → [`cth`](https://voltecx-web.nguyenvanqui291.workers.dev/zh/docs/reference/thermal/cth/)

## 公式

| 公式 | 方程式 | 出處 |
|---|---|---|
| 散熱片溫度 | Ts = Ta + P·Rsa | Mohan, Undeland & Robbins, Power Electronics, 3rd ed. (2003), ch. 29 (heat sinks) |
| 距離上限的餘裕 | Tmax − Ts | Mohan, Undeland & Robbins, Power Electronics, 3rd ed. (2003), ch. 29 (heat sinks) |

## 快速驗算

輸入:

- `ta`: 環境溫度 = 25 °C, `t`
- `p`: 送入散熱片的熱量 = 30 W
- `rsa`: 散熱片到環境熱阻 = 1.5 K/W
- `tmax`: 散熱片容許最高溫度 = 100 °C

輸出:

- `tsink`: 散熱片溫度 = `ta + p*rsa` °C
- `headroom`: 距離上限的餘裕 = `tmax - tsink` K

## 模型邏輯

- 它把所接節點在熱網路中的那一列換成固定值 t，所以不論流入多少熱量，溫度都不變。
- 電路中第一個環境溫度元件的 t，也是所有熱節點的起始溫度。
- 有 pwlTime 與 pwlTemp（個數相同、時間嚴格遞增）時，溫度改依該曲線變化而不用 t：點與點之間取直線，第一點之前與最後一點之後保持不變，在每個熱步結束時設定。沒有接腳或訊號能驅動它。

## 模型

元件把所接節點固定在 t degC（預設 25），不論流入多少熱量。電路中第一個環境溫度元件的 t，也是所有熱節點的起始溫度。

## 常見錯誤

- 沒有任何環境溫度的熱網路無法編譯。請在熱量散出的節點加一個。
- t 單位是 degC，填 298 是 298 degC，不是 25 degC。與環境隔絕的節點會被回報。

Problems 規則: `compile.error`, `solver.thermal`

## 規格書與來源

t 取應用中最壞情況的環境溫度，例如機殼內的 40 或 85 degC，而不是規格書測試條件的 25 degC。

## 範例

以指令 `file.openExample` 開啟範例，名稱為 `demo:ambient`.

---
由 `cargo xtask reference` 依使用說明文字與參數規格產生，請勿手動編輯。
