---
url: /dyad/stable/stdlib/ThermalComponents/components/Sensors.TemperatureSensor.md
description: >-
  Dyad Sensors.TemperatureSensor docs.  Measures the absolute temperature at a
  thermal node.
---

# `Sensors.TemperatureSensor` {#Sensors.TemperatureSensor}

Measures the absolute temperature at a thermal node.

This component represents an ideal sensor that measures the absolute temperature from a thermal `HeatPort`. The temperature at the `port` is directly provided as a `RealOutput` signal. The sensor is considered ideal because it imposes no thermal load on the system it is connected to, which is enforced by the equation `port.Q_flow = 0`. The output temperature `T` is thus defined as:

$$T = port.T$$

And the heat flow at the port is:

$$port.Q\_{flow} = 0$$

## Usage {#Usage}

`ThermalComponents.Sensors.TemperatureSensor()`

## Connectors {#Connectors}

* `port` - This connector represents a thermal port with temperature and heat flow as the potential and flow variables, respectively. ([`HeatPort`](/stdlib/Dyad/connectors/HeatPort#HeatPort))

* `T` - This connector represents a real signal as an output from a component ([`RealOutput`](/stdlib/Dyad/connectors/RealOutput#RealOutput))

## Behavior {#Behavior}

$$ \begin{align}
T\left( t \right) &= \mathtt{port.T}\left( t \right) \\
\mathtt{port.Q_flow}\left( t \right) &= 0
\end{align}
$$

## Source {#Source}

````dyad
"""
Measures the absolute temperature at a thermal node.

This component represents an ideal sensor that measures the absolute temperature
from a thermal `HeatPort`. The temperature at the `port` is directly provided as
a `RealOutput` signal. The sensor is considered ideal because it imposes no
thermal load on the system it is connected to, which is enforced by the
equation `port.Q_flow = 0`. The output temperature `T` is thus defined as:
```math
T = port.T
```
And the heat flow at the port is:
```math
port.Q_{flow} = 0
```
"""
component TemperatureSensor
  "Thermal connection point from which temperature is measured"
  port = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_a", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }
  "Output signal representing the measured absolute temperature"
  T = RealOutput() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
relations
  T = port.T
  port.Q_flow = 0
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ThermalComponents/TemperatureSensor.svg"}
  }
}
end
````

````dyad
"""
Measures the absolute temperature at a thermal node.

This component represents an ideal sensor that measures the absolute temperature
from a thermal `HeatPort`. The temperature at the `port` is directly provided as
a `RealOutput` signal. The sensor is considered ideal because it imposes no
thermal load on the system it is connected to, which is enforced by the
equation `port.Q_flow = 0`. The output temperature `T` is thus defined as:
```math
T = port.T
```
And the heat flow at the port is:
```math
port.Q_{flow} = 0
```
"""
component TemperatureSensor
  "Thermal connection point from which temperature is measured"
  port = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_a", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }
  "Output signal representing the measured absolute temperature"
  T = RealOutput() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
relations
  T = port.T
  port.Q_flow = 0
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ThermalComponents/TemperatureSensor.svg"}
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
