Skip to content
ConvectiveElement1D.md

ConvectiveElement1D

This partial model contains the basic connectors and variables to allow heat transfer models to be created that do not store energy. This model defines and includes equations for the temperature drop across the element, ΔT, and the heat flow rate through the element from solid to fluid, Q.

Usage

ConvectiveElement1D()

Connectors

Variables

NameDescriptionUnits
ΔTK
QW

Source

dyad
# This partial model contains the basic connectors and variables to allow heat
# transfer models to be created that do not store energy. This model defines and
# includes equations for the temperature drop across the element, `ΔT`, and the heat
# flow rate through the element from `solid` to `fluid`, `Q`.
partial component ConvectiveElement1D
  solid = Node() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "node_a", "x1": -100, "y1": 400, "x2": 100, "y2": 600}}
    }
  }]
  fluid = Node() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "node_b", "x1": 900, "y1": 400, "x2": 1100, "y2": 600}}
    }
  }]
  variable ΔT::Temperature
  variable Q::HeatFlowRate
relations
  ΔT = solid.T-fluid.T
  solid.Q = Q
  fluid.Q = -Q
end
Flattened Source
dyad
# This partial model contains the basic connectors and variables to allow heat
# transfer models to be created that do not store energy. This model defines and
# includes equations for the temperature drop across the element, `ΔT`, and the heat
# flow rate through the element from `solid` to `fluid`, `Q`.
partial component ConvectiveElement1D
  solid = Node() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "node_a", "x1": -100, "y1": 400, "x2": 100, "y2": 600}}
    }
  }]
  fluid = Node() [{
    "Dyad": {
      "placement": {"icon": {"iconName": "node_b", "x1": 900, "y1": 400, "x2": 1100, "y2": 600}}
    }
  }]
  variable ΔT::Temperature
  variable Q::HeatFlowRate
relations
  ΔT = solid.T-fluid.T
  solid.Q = Q
  fluid.Q = -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