Skip to content
LIBRARY
Sources.PrescribedHeatFlow.md

Sources.PrescribedHeatFlow

Models a prescribed heat flow rate at a thermal port, with optional temperature dependency.

This component defines a boundary condition that injects or extracts a specified heat flow rate at its thermal port. The primary heat flow rate is determined by the external input signal Q_flow. A positive Q_flow value indicates that heat is flowing from this component into the system connected to port. The model can also account for temperature-dependent variations in the heat flow. If the parameter alpha is set to a value greater than zero, the heat flow is adjusted by a factor proportional to the difference between the temperature at the port (port.T) and a specified reference temperature (T_ref). This allows for simulating effects like temperature-dependent losses or efficiencies. The core behavior is defined by the equation:

\text{port.Q_{flow}} = -Q_{flow} \cdot (1 + \alpha \cdot (\text{port.T} - T_{\text{ref}}))

Usage

ThermalComponents.Sources.PrescribedHeatFlow(T_ref=293.15, alpha=0.0)

Parameters:

NameDescriptionUnitsDefault value
T_refReference temperature for calculating temperature-dependent heat flowK293.15
alphaTemperature coefficient that scales the heat flow based on temperature difference1/K0

Connectors

  • port - This connector represents a thermal port with temperature and heat flow as the potential and flow variables, respectively. (HeatPort)

  • Q_flow - This connector represents a real signal as an input to a component (RealInput)

Behavior

port.Q_flow(t)=(1+(T_ref+port.T(t)) alpha) Q_flow(t)

Source

dyad
"""
Models a prescribed heat flow rate at a thermal port, with optional temperature dependency.

This component defines a boundary condition that injects or extracts a specified
heat flow rate at its thermal `port`. The primary heat flow rate is determined by
the external input signal `Q_flow`. A positive `Q_flow` value indicates that heat
is flowing from this component into the system connected to `port`. The model can
also account for temperature-dependent variations in the heat flow. If the
parameter `alpha` is set to a value greater than zero, the heat flow is adjusted
by a factor proportional to the difference between the temperature at the port
(`port.T`) and a specified reference temperature (`T_ref`). This allows for
simulating effects like temperature-dependent losses or efficiencies. The core
behavior is defined by the equation:

math \text{port.Q_{flow}} = -Q_{flow} \cdot (1 + \alpha \cdot (\text{port.T} - T_{\text{ref}}))

"""
component PrescribedHeatFlow
  "Acausal thermal port through which heat is exchanged"
  port = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_b", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }
  "Input signal defining the prescribed base heat flow rate"
  Q_flow = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Reference temperature for calculating temperature-dependent heat flow"
  parameter T_ref::Temperature = 293.15
  "Temperature coefficient that scales the heat flow based on temperature difference"
  parameter alpha::LinearTemperatureCoefficient = 0.0
relations
  port.Q_flow = -Q_flow * (1 + alpha * (port.T - T_ref))
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ThermalComponents/PrescribedHeatFlow.svg"}
  }
}
end
Flattened Source
dyad
"""
Models a prescribed heat flow rate at a thermal port, with optional temperature dependency.

This component defines a boundary condition that injects or extracts a specified
heat flow rate at its thermal `port`. The primary heat flow rate is determined by
the external input signal `Q_flow`. A positive `Q_flow` value indicates that heat
is flowing from this component into the system connected to `port`. The model can
also account for temperature-dependent variations in the heat flow. If the
parameter `alpha` is set to a value greater than zero, the heat flow is adjusted
by a factor proportional to the difference between the temperature at the port
(`port.T`) and a specified reference temperature (`T_ref`). This allows for
simulating effects like temperature-dependent losses or efficiencies. The core
behavior is defined by the equation:

math \text{port.Q_{flow}} = -Q_{flow} \cdot (1 + \alpha \cdot (\text{port.T} - T_{\text{ref}}))

"""
component PrescribedHeatFlow
  "Acausal thermal port through which heat is exchanged"
  port = HeatPort() {
    "Dyad": {
      "placement": {"icon": {"iconName": "port_b", "x1": 950, "y1": 450, "x2": 1050, "y2": 550}}
    }
  }
  "Input signal defining the prescribed base heat flow rate"
  Q_flow = RealInput() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Reference temperature for calculating temperature-dependent heat flow"
  parameter T_ref::Temperature = 293.15
  "Temperature coefficient that scales the heat flow based on temperature difference"
  parameter alpha::LinearTemperatureCoefficient = 0.0
relations
  port.Q_flow = -Q_flow * (1 + alpha * (port.T - T_ref))
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://ThermalComponents/PrescribedHeatFlow.svg"}
  }
}
end


Test Cases

No test cases defined.

  • Examples

  • Experiments

  • Analyses