Skip to content
LIBRARY
Hello.md

Hello ​

A simple lumped thermal model

Usage ​

MediaComponents.Hello(T_inf=300, T0=320, h=0.7, A=1.0, m=0.1, c_p=1.2)

Parameters: ​

NameDescriptionUnitsDefault value
T_infAmbient temperatureK300
T0Initial temperatureK320
hConvective heat transfer coefficientW/(m2.K)0.7
ASurface aream21.0
mMass of thermal capacitancekg0.1
c_pSpecific HeatJ/(kg.K)1.2

Variables ​

NameDescriptionUnits
TK

Behavior ​

Source ​

dyad
"A simple lumped thermal model"
component Hello
  "Ambient temperature"
  parameter T_inf::Temperature = 300
  "Initial temperature"
  parameter T0::Temperature = 320
  "Convective heat transfer coefficient"
  parameter h::CoefficientOfHeatTransfer = 0.7
  "Surface area"
  parameter A::Area = 1.0
  "Mass of thermal capacitance"
  parameter m::Mass = 0.1
  "Specific Heat"
  parameter c_p::SpecificHeatCapacity = 1.2
  variable T::Temperature
relations
  "Specify initial conditions"
  initial T = T0
  "Newton's law of cooling/heating"
  m * c_p * der(T) = h * A * (T_inf - T)
metadata {"Dyad": {"tests": {"case1": {"stop": 10, "expect": {"initial": {"T": 320}}}}}}
end
Flattened Source
dyad
"A simple lumped thermal model"
component Hello
  "Ambient temperature"
  parameter T_inf::Temperature = 300
  "Initial temperature"
  parameter T0::Temperature = 320
  "Convective heat transfer coefficient"
  parameter h::CoefficientOfHeatTransfer = 0.7
  "Surface area"
  parameter A::Area = 1.0
  "Mass of thermal capacitance"
  parameter m::Mass = 0.1
  "Specific Heat"
  parameter c_p::SpecificHeatCapacity = 1.2
  variable T::Temperature
relations
  "Specify initial conditions"
  initial T = T0
  "Newton's law of cooling/heating"
  m * c_p * der(T) = h * A * (T_inf - T)
metadata {"Dyad": {"tests": {"case1": {"stop": 10, "expect": {"initial": {"T": 320}}}}}}
end


Test Cases ​

Test Case case1 ​

  • Examples

  • Experiments

  • Analyses