Skip to content
ThermalResistor.md

ThermalResistor

Lumped thermal element, with resistance, transporting heat without storing it.

This component extends from Element1D

Usage

ThermalResistor(R)

Parameters:

NameDescriptionUnitsDefault value
RConstant thermal resistance of the materialK/W

Connectors

Variables

NameDescriptionUnits
ΔTK
QW

Behavior

ΔT(t)=node_b.T(t)+node_a.T(t)node_a.Q(t)=Q(t)node_a.Q(t)+node_b.Q(t)=0ΔT(t)=RQ(t)

Source

dyad
# Lumped thermal element, with resistance, transporting heat without storing it.
component ThermalResistor
  extends Element1D
  # Constant thermal resistance of the material
  parameter R::ThermalResistance
relations
  ΔT = R*Q
end
Flattened Source
dyad
# Lumped thermal element, with resistance, transporting heat without storing it.
component ThermalResistor
  node_a = Node() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "node_a", "x1": -100, "y1": 400, "x2": 100, "y2": 600}}
    }
  }]
  node_b = Node() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "node_b", "x1": 900, "y1": 400, "x2": 1100, "y2": 600}}
    }
  }]
  variable ΔT::Temperature
  variable Q::HeatFlowRate
  # Constant thermal resistance of the material
  parameter R::ThermalResistance
relations
  ΔT = node_a.T-node_b.T
  node_a.Q = Q
  node_a.Q+node_b.Q = 0
  ΔT = R*Q
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