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:
Name | Description | Units | Default value |
---|---|---|---|
Q | Fixed heat flow rate at port | W | |
T_ref | Reference temperature | K | 293.15 |
alpha | Temperature coefficient of heat flow rate | 1/K | 0 |
Connectors
node
- (Node
)
Behavior
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"
Related
Examples
Experiments
Analyses