HeatSystemTest
IconHeatSystemTest
Heat system with a fixed temperature source This is a test component for HeatCapacitor
, FixedTemperature
and ThermalConductor
Usage
HeatSystemTest(T=10.0, T0=-10.0, C=10.0, G=10.0)
Parameters:
Name | Description | Units | Default value |
---|---|---|---|
T | – | 10 | |
T0 | – | -10 | |
C | – | 10 | |
G | – | 10 |
Behavior
\[ \begin{equation} \left[ \begin{array}{c} \mathrm{connect}\left( source_{+}node, conductor_{+}node_{a} \right) \\ \mathrm{connect}\left( conductor_{+}node_{b}, mass_{+}node \right) \\ \mathtt{mass.T}\left( t \right) = \mathtt{mass.node.T}\left( t \right) \\ \frac{\mathrm{d} \mathtt{mass.T}\left( t \right)}{\mathrm{d}t} = \mathtt{mass.dT}\left( t \right) \\ \mathtt{mass.dT}\left( t \right) = \frac{\mathtt{mass.node.Q}\left( t \right)}{\mathtt{mass.C}} \\ \mathtt{source.node.T}\left( t \right) = \mathtt{source.T} \\ \mathtt{conductor.{\Delta}T}\left( t \right) = - \mathtt{conductor.node\_b.T}\left( t \right) + \mathtt{conductor.node\_a.T}\left( t \right) \\ \mathtt{conductor.node\_a.Q}\left( t \right) = \mathtt{conductor.Q}\left( t \right) \\ \mathtt{conductor.node\_b.Q}\left( t \right) + \mathtt{conductor.node\_a.Q}\left( t \right) = 0 \\ \mathtt{conductor.Q}\left( t \right) = \mathtt{conductor.G} \mathtt{conductor.{\Delta}T}\left( t \right) \\ \end{array} \right] \end{equation} \]
Source
# Heat system with a fixed temperature source
# This is a test component for `HeatCapacitor`, `FixedTemperature` and
# `ThermalConductor`
component HeatSystemTest
mass = HeatCapacitor(C=C, T0=T0)
source = FixedTemperature(T=T)
conductor = ThermalConductor(G=G)
parameter T::Real = 10.0
parameter T0::Real = -10.0
parameter C::Real = 10.0
parameter G::Real = 10.0
relations
connect(source.node, conductor.node_a)
connect(conductor.node_b, mass.node)
metadata {
"JuliaSim": {
"tests": {
"case1": {
"stop": 10,
"atol": {"mass.T": 0.001, "mass.dT": 0.001},
"expect": {"final": {"mass.T": 9.999, "mass.dT": 0}}
}
}
}
}
end
Flattened Source
# Heat system with a fixed temperature source # This is a test component for `HeatCapacitor`, `FixedTemperature` and # `ThermalConductor` component HeatSystemTest mass = HeatCapacitor(C=C, T0=T0) source = FixedTemperature(T=T) conductor = ThermalConductor(G=G) parameter T::Real = 10.0 parameter T0::Real = -10.0 parameter C::Real = 10.0 parameter G::Real = 10.0 relations connect(source.node, conductor.node_a) connect(conductor.node_b, mass.node) metadata { "JuliaSim": { "tests": { "case1": { "stop": 10, "atol": {"mass.T": 0.001, "mass.dT": 0.001}, "expect": {"final": {"mass.T": 9.999, "mass.dT": 0}} } } } } end
Test Cases
Test Case case1
Related
- Examples
- Experiments
- Analyses