Skip to content
HeatFlowSensor.md

HeatFlowSensor

Heat flow rate sensor

Usage

HeatFlowSensor()

Connectors

  • Q - This connector represents a real signal as an output from a component (RealOutput)

  • node_a - (Node)

  • node_b - (Node)

Behavior

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

Source

dyad
# Heat flow rate sensor
component HeatFlowSensor
  # Heat flow from node_a to node_b as output signal
  Q = RealOutput() [{"Dyad": {"placement": {"icon": {"x1": 400, "y1": 900, "x2": 600, "y2": 1100}}}}]
  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}}
    }
  }]
relations
  node_a.T = node_b.T
  node_a.Q+node_b.Q = 0
  Q = node_a.Q
end
Flattened Source
dyad
# Heat flow rate sensor
component HeatFlowSensor
  # Heat flow from node_a to node_b as output signal
  Q = RealOutput() [{"Dyad": {"placement": {"icon": {"x1": 400, "y1": 900, "x2": 600, "y2": 1100}}}}]
  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}}
    }
  }]
relations
  node_a.T = node_b.T
  node_a.Q+node_b.Q = 0
  Q = node_a.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