---
url: /dyad/stable/stdlib/ThermalComponents/components/Sensors.HeatFlowSensor.md
description: >-
  Dyad Sensors.HeatFlowSensor docs.  Measures the rate of heat flow between two
  thermal connection points.
---

# `Sensors.HeatFlowSensor` {#Sensors.HeatFlowSensor}

Measures the rate of heat flow between two thermal connection points.

This component represents an ideal thermal sensor that quantifies the heat flow rate passing from `port_a` to `port_b`. It introduces no temperature drop between its connection points (`port_a.T = port_b.T`) and has no thermal energy storage (`port_a.Q_flow + port_b.Q_flow = 0`). The output signal `Q_flow` represents the heat flow rate from `port_a` to `port_b`.

The key behaviors are defined by:

$$Q\_{flow} = \text{port_a.Q\_{flow}}
\text{port_a.Q\_{flow}} + \text{port_b.Q\_{flow}} = 0
\text{port_a.T} = \text{port_b.T}$$

## Usage {#Usage}

`ThermalComponents.Sensors.HeatFlowSensor()`

## Connectors {#Connectors}

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

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

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

## Behavior {#Behavior}

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

## Source {#Source}

````dyad
"""
Measures the rate of heat flow between two thermal connection points.

This component represents an ideal thermal sensor that quantifies the heat flow rate
passing from `port_a` to `port_b`. It introduces no temperature drop between
its connection points (`port_a.T = port_b.T`) and has no thermal energy storage
(`port_a.Q_flow + port_b.Q_flow = 0`). The output signal `Q_flow` represents the heat flow
rate from `port_a` to `port_b`.

The key behaviors are defined by:
```math
Q_{flow} = \text{port_a.Q_{flow}}
\text{port_a.Q_{flow}} + \text{port_b.Q_{flow}} = 0
\text{port_a.T} = \text{port_b.T}
```
"""
component HeatFlowSensor
  "Output signal representing the measured heat flow rate from port_a to port_b"
  Q_flow = RealOutput() {
    "Dyad": {
      "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
    }
  }
  "Thermal connection point 'a'"
  port_a = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_a", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }
  "Thermal connection point 'b'"
  port_b = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_b", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }
relations
  port_a.T = port_b.T
  port_a.Q_flow + port_b.Q_flow = 0
  Q_flow = port_a.Q_flow
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {"label": "W", "x": 500, "y": 708.3, "rot": 0}
    ],
    "icons": {"default": "dyad://ThermalComponents/HeatFlowSensor.svg"}
  }
}
end
````

````dyad
"""
Measures the rate of heat flow between two thermal connection points.

This component represents an ideal thermal sensor that quantifies the heat flow rate
passing from `port_a` to `port_b`. It introduces no temperature drop between
its connection points (`port_a.T = port_b.T`) and has no thermal energy storage
(`port_a.Q_flow + port_b.Q_flow = 0`). The output signal `Q_flow` represents the heat flow
rate from `port_a` to `port_b`.

The key behaviors are defined by:
```math
Q_{flow} = \text{port_a.Q_{flow}}
\text{port_a.Q_{flow}} + \text{port_b.Q_{flow}} = 0
\text{port_a.T} = \text{port_b.T}
```
"""
component HeatFlowSensor
  "Output signal representing the measured heat flow rate from port_a to port_b"
  Q_flow = RealOutput() {
    "Dyad": {
      "placement": {"icon": {"x1": 450, "y1": 950, "x2": 550, "y2": 1050, "rot": 90}}
    }
  }
  "Thermal connection point 'a'"
  port_a = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_a", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }
  "Thermal connection point 'b'"
  port_b = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_b", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }
relations
  port_a.T = port_b.T
  port_a.Q_flow + port_b.Q_flow = 0
  Q_flow = port_a.Q_flow
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {"label": "W", "x": 500, "y": 708.3, "rot": 0}
    ],
    "icons": {"default": "dyad://ThermalComponents/HeatFlowSensor.svg"}
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
