Skip to content
FixedHeatFlow.md

FixedHeatFlow

Fixed heat flow boundary condition.

This model allows a specified amount of heat flow rate to be "injected" into a thermal system at a given port. The constant amount of heat flow rate Q is given as a parameter. The heat flows into the component to which the component FixedHeatFlow is connected, if parameter Q is positive.

Usage

FixedHeatFlow(Q, T_ref=293.15, alpha=0.0)

Parameters:

NameDescriptionUnitsDefault value
QFixed heat flow rate at portW
T_refReference temperatureK293.15
alphaTemperature coefficient of heat flow rate1/K0

Connectors

Behavior

node.Q(t)=Q(1+(T_ref+node.T(t))alpha)

Source

dyad
# Fixed heat flow boundary condition.
#
# This model allows a specified amount of heat flow rate to be "injected" into a thermal system at a given port.
# The constant amount of heat flow rate `Q` is given as a parameter. The heat flows into the component to which
# the component `FixedHeatFlow` is connected, if parameter `Q` is positive.
component FixedHeatFlow
  node = Node() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "node_b", "x1": 900, "y1": 400, "x2": 1100, "y2": 600}}
    }
  }]
  # Fixed heat flow rate at port
  parameter Q::HeatFlowRate
  # Reference temperature
  parameter T_ref::Temperature = 293.15
  # Temperature coefficient of heat flow rate
  parameter alpha::LinearTemperatureCoefficient = 0.0
relations
  node.Q = -Q*(1+alpha*(node.T-T_ref))
end
Flattened Source
dyad
# Fixed heat flow boundary condition.
#
# This model allows a specified amount of heat flow rate to be "injected" into a thermal system at a given port.
# The constant amount of heat flow rate `Q` is given as a parameter. The heat flows into the component to which
# the component `FixedHeatFlow` is connected, if parameter `Q` is positive.
component FixedHeatFlow
  node = Node() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "node_b", "x1": 900, "y1": 400, "x2": 1100, "y2": 600}}
    }
  }]
  # Fixed heat flow rate at port
  parameter Q::HeatFlowRate
  # Reference temperature
  parameter T_ref::Temperature = 293.15
  # Temperature coefficient of heat flow rate
  parameter alpha::LinearTemperatureCoefficient = 0.0
relations
  node.Q = -Q*(1+alpha*(node.T-T_ref))
metadata {}
end


Test Cases

This is setup code, that must be run before each test case.

julia
using ThermalComponents
using ModelingToolkit, OrdinaryDiffEqDefault
using Plots
using CSV, DataFrames

snapshotsdir = joinpath(dirname(dirname(pathof(ThermalComponents))), "test", "snapshots")
"/home/actions-runner-10/.julia/packages/ThermalComponents/uOuoD/test/snapshots"
  • Examples

  • Experiments

  • Analyses