HeatCapacitor IconHeatCapacitor
Represents a lumped thermal element that stores heat energy.
This component models the thermal behavior of a body with a given heat capacity C. The temperature T of the component changes over time based on the heat flow rate Q_{flow} into the component through its thermal node. The fundamental relationship governing this behavior is:
\[C \frac{dT}{dt} = Q_{flow}\]
where dT/dt is the rate of change of temperature, represented by dT in the model. The component's temperature is initialized to T0.
Usage
ThermalComponents.HeatCapacitor(C, T0)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
C | Heat capacity of the element | J/K | |
T0 | Initial temperature of the element | K |
Connectors
node- This connector represents a thermal node with temperature and heat flow as the potential and flow variables, respectively. (Node)
Variables
| Name | Description | Units |
|---|---|---|
T | Temperature of the element | K |
dT | Time derivative of temperature T | K/s |
Behavior
\[ \begin{align} T\left( t \right) &= \mathtt{node.T}\left( t \right) \\ \frac{\mathrm{d} T\left( t \right)}{\mathrm{d}t} &= \mathtt{dT}\left( t \right) \\ \mathtt{dT}\left( t \right) &= \frac{\mathtt{node.Q}\left( t \right)}{C} \end{align} \]
Source
# Represents a lumped thermal element that stores heat energy.
#
# This component models the thermal behavior of a body with a given heat capacity `C`.
# The temperature `T` of the component changes over time based on the heat flow rate `Q_{flow}`
# into the component through its thermal `node`. The fundamental relationship governing
# this behavior is:
# ```math
# C \frac{dT}{dt} = Q_{flow}
# ```
# where `dT/dt` is the rate of change of temperature, represented by `dT` in the model.
# The component's temperature is initialized to `T0`.
component HeatCapacitor
# Thermal port (connector) for heat exchange
node = Node() [{"Dyad": {"placement": {"icon": {"x1": 400, "y1": 900, "x2": 600, "y2": 1100}}}}]
# Heat capacity of the element
parameter C::HeatCapacity
# Temperature of the element
variable T::Temperature
# Initial temperature of the element
parameter T0::Temperature
# Time derivative of temperature `T`
variable dT::TemperatureSlope
relations
initial T = T0
T = node.T
der(T) = dT
dT = node.Q / C
metadata {
"Dyad": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "dyad://ThermalComponents/HeatCapacitor.svg"}
}
}
endFlattened Source
# Represents a lumped thermal element that stores heat energy.
#
# This component models the thermal behavior of a body with a given heat capacity `C`.
# The temperature `T` of the component changes over time based on the heat flow rate `Q_{flow}`
# into the component through its thermal `node`. The fundamental relationship governing
# this behavior is:
# ```math
# C \frac{dT}{dt} = Q_{flow}
# ```
# where `dT/dt` is the rate of change of temperature, represented by `dT` in the model.
# The component's temperature is initialized to `T0`.
component HeatCapacitor
# Thermal port (connector) for heat exchange
node = Node() [{"Dyad": {"placement": {"icon": {"x1": 400, "y1": 900, "x2": 600, "y2": 1100}}}}]
# Heat capacity of the element
parameter C::HeatCapacity
# Temperature of the element
variable T::Temperature
# Initial temperature of the element
parameter T0::Temperature
# Time derivative of temperature `T`
variable dT::TemperatureSlope
relations
initial T = T0
T = node.T
der(T) = dT
dT = node.Q / C
metadata {
"Dyad": {
"labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
"icons": {"default": "dyad://ThermalComponents/HeatCapacitor.svg"}
}
}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses
- Tests