---
url: /dyad/dev/stdlib/ThermalComponents/components/Components.ThermalResistor.md
description: >-
  Dyad Components.ThermalResistor docs.  Represents a pure thermal resistance
  relating temperature difference to heat flow rate.
---

# `Components.ThermalResistor` {#Components.ThermalResistor}

Represents a pure thermal resistance relating temperature difference to heat flow rate.

This component models a lumped thermal resistance where heat is transported without being stored. The relationship between the temperature difference ($\Delta T$) across the component and the heat flow rate ($Q\_{flow}$) through it is defined by its constant thermal resistance ($R$). The fundamental behavior is captured by Fourier's law of heat conduction in its lumped form:

$$\Delta T = R \cdot Q\_{flow}$$

This component is acausal and inherits from `Element1D`, implying it has two thermal ports through which heat can flow.

This component extends from [`ThermalComponents.Interfaces.Element1D`](../types/Interfaces.Element1D.md)

## Usage {#Usage}

`ThermalComponents.Components.ThermalResistor(R)`

## Parameters: {#Parameters:}

| Name |                                 Description | Units | Default value |
| ----:| -------------------------------------------:| -----:| -------------:|
|  `R` | Constant thermal resistance of the material |   K/W |               |

## Connectors {#Connectors}

* `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))

## Variables {#Variables}

|     Name |                                                                  Description | Units |
| --------:| ----------------------------------------------------------------------------:| -----:|
|     `ΔT` | Temperature difference across the element, calculated as port_a.T - port_b.T |     K |
| `Q_flow` |           Heat flow rate through the element, positive from port_a to port_b |     W |

## Behavior {#Behavior}

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

## Source {#Source}

````dyad
"""
Represents a pure thermal resistance relating temperature difference to heat flow rate.

This component models a lumped thermal resistance where heat is transported without being stored.
The relationship between the temperature difference ($\Delta T$) across the
component and the heat flow rate ($Q_{flow}$) through it is defined by its constant
thermal resistance ($R$). The fundamental behavior is captured by Fourier's law of heat conduction
in its lumped form:
```math
\Delta T = R \cdot Q_{flow}
```
This component is acausal and inherits from `Element1D`, implying it has two
thermal ports through which heat can flow.
"""
component ThermalResistor
  extends ThermalComponents.Interfaces.Element1D
  "Constant thermal resistance of the material"
  parameter R::ThermalResistance
relations
  ΔT = R * Q_flow
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ThermalComponents/ThermalResistor.svg"}
  }
}
end
````

````dyad
"""
Represents a pure thermal resistance relating temperature difference to heat flow rate.

This component models a lumped thermal resistance where heat is transported without being stored.
The relationship between the temperature difference ($\Delta T$) across the
component and the heat flow rate ($Q_{flow}$) through it is defined by its constant
thermal resistance ($R$). The fundamental behavior is captured by Fourier's law of heat conduction
in its lumped form:
```math
\Delta T = R \cdot Q_{flow}
```
This component is acausal and inherits from `Element1D`, implying it has two
thermal ports through which heat can flow.
"""
component ThermalResistor
  "Port 'a' for thermal connection"
  port_a = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_a", "x1": -50, "y1": 450, "x2": 50, "y2": 550}}
    }
  }
  "Port 'b' for thermal connection"
  port_b = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_b", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }
  "Temperature difference across the element, calculated as port_a.T - port_b.T"
  variable ΔT::Temperature
  "Heat flow rate through the element, positive from port_a to port_b"
  variable Q_flow::HeatFlowRate
  "Constant thermal resistance of the material"
  parameter R::ThermalResistance
relations
  ΔT = port_a.T - port_b.T
  port_a.Q_flow = Q_flow
  port_a.Q_flow + port_b.Q_flow = 0
  ΔT = R * Q_flow
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ThermalComponents/ThermalResistor.svg"}
  }
}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
