ModelingToolkitStandardLibrary: Thermal Components
Index
- ModelingToolkitStandardLibrary.Thermal.BodyRadiation
- ModelingToolkitStandardLibrary.Thermal.ConvectiveConductor
- ModelingToolkitStandardLibrary.Thermal.ConvectiveResistor
- ModelingToolkitStandardLibrary.Thermal.Element1D
- ModelingToolkitStandardLibrary.Thermal.FixedHeatFlow
- ModelingToolkitStandardLibrary.Thermal.FixedTemperature
- ModelingToolkitStandardLibrary.Thermal.HeatCapacitor
- ModelingToolkitStandardLibrary.Thermal.HeatFlowSensor
- ModelingToolkitStandardLibrary.Thermal.HeatPort
- ModelingToolkitStandardLibrary.Thermal.PrescribedHeatFlow
- ModelingToolkitStandardLibrary.Thermal.PrescribedTemperature
- ModelingToolkitStandardLibrary.Thermal.RelativeTemperatureSensor
- ModelingToolkitStandardLibrary.Thermal.TemperatureSensor
- ModelingToolkitStandardLibrary.Thermal.ThermalCollector
- ModelingToolkitStandardLibrary.Thermal.ThermalConductor
- ModelingToolkitStandardLibrary.Thermal.ThermalResistor
Thermal Utilities
ModelingToolkitStandardLibrary.Thermal.HeatPort — ConstantHeatPort(; T = nothing, T_guess = 273.15 + 20, Q_flow = nothing, Q_flow_guess = 0.0, name)Port for a thermal system.
Parameters:
- T_guess: [K] Initial guess for the temperature of the port (set to 273.15 + 20).
- Q_flow_guess: [W] Initial guess for the heat flow rate at the port (set to 0.0).
States:
- T: [K] Temperature of the port. Guess set to- T_guess. Passing a value for- Twill set its default.
- Q_flow: [W] Heat flow rate at the port. Guess set to- Q_flow_guess. Passing a value for- Q_flowwill set its default.
ModelingToolkitStandardLibrary.Thermal.Element1D — ConstantElement1D(; name, dT = 0.0, Q_flow = 0.0)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, dT, and the heat flow rate through the element from port_a to port_b, Q_flow.
States:
- dT: [- K] Temperature difference across the component a.T - b.T. It accepts an initial value, which defaults to 0.0.
- Q_flow: [- W] Heat flow rate from port a -> port b. It accepts an initial value, which defaults to 0.0.
Connectors:
port_aport_b
Thermal Components
ModelingToolkitStandardLibrary.Thermal.BodyRadiation — ConstantBodyRadiation(; name, G)Lumped thermal element for radiation heat transfer.
States:
- dT: [- K] Temperature difference across the component a.T - b.T
- Q_flow: [- W] Heat flow rate from port a -> port b
Connectors:
- port_a
- port_b
Parameters:
- G: [m^2] Net radiation conductance between two surfaces # Stefan-Boltzmann constant TODO: extract into physical constants module or use existing one
ModelingToolkitStandardLibrary.Thermal.ConvectiveConductor — ConstantConvectiveConductor(; name, G)Lumped thermal element for heat convection.
States:
- dT: [- K] Temperature difference across the component- solid.T-- fluid.T
- Q_flow: [- W] Heat flow rate from- solid->- fluid
Connectors:
- solid
- fluid
Parameters:
- G: [W/K] Convective thermal conductance
ModelingToolkitStandardLibrary.Thermal.ConvectiveResistor — ConstantConvectiveResistor(; name, R)Lumped thermal element for heat convection.
States:
- dT: [- K] Temperature difference across the component- solid.T-- fluid.T
- Q_flow: [- W] Heat flow rate from- solid->- fluid
Connectors:
- solid
- fluid
Parameters:
- R: [- K/W] Constant thermal resistance of material
ModelingToolkitStandardLibrary.Thermal.HeatCapacitor — ConstantHeatCapacitor(; name, C, T = 273.15 + 20)Lumped thermal element storing heat
States:
- T: [- K] Temperature of element. It accepts an initial value, which defaults to 273.15 + 20.
- der_T: [- K/s] Time derivative of temperature
Connectors:
- port
Parameters:
- C: [- J/K] Heat capacity of element (= cp*m)
ModelingToolkitStandardLibrary.Thermal.ThermalConductor — ConstantThermalConductor(; name, G)Lumped thermal element transporting heat without storing it.
States:
see Element1D
Connectors:
port_aport_b
Parameters:
- G: [- W/K] Constant thermal conductance of material
ModelingToolkitStandardLibrary.Thermal.ThermalResistor — ConstantThermalResistor(; name, R)Lumped thermal element transporting heat without storing it.
States:
- dT: [- K] Temperature difference across the component a.T - b.T
- Q_flow: [- W] Heat flow rate from port a -> port b
Connectors:
- port_a
- port_b
Parameters:
- R: [- K/W] Constant thermal resistance of material
ModelingToolkitStandardLibrary.Thermal.ThermalCollector — ConstantThermalCollector(; name, m = 1)Collects m heat flows
This is a model to collect the heat flows from m heatports to one single heatport.
States:
Connectors:
- port_a1to- port_am
- port_b
Parameters:
- m: Number of heat ports (e.g. m=2:- port_a1,- port_a2)
Thermal Sensors
ModelingToolkitStandardLibrary.Thermal.RelativeTemperatureSensor — ConstantRelativeTemperatureSensor(; name)Relative Temperature sensor.
The relative temperature port_a.T - port_b.T is determined between the two ports of this component and is provided as output signal in kelvin.
Connectors:
- port_a: HeatPort Thermal port from which sensor information shall be measured
- port_b: HeatPort Thermal port from which sensor information shall be measured
- T: RealOutput [K] Relative temperature- a.T - b.T
ModelingToolkitStandardLibrary.Thermal.HeatFlowSensor — ConstantHeatFlowSensor(; name)Heat flow rate sensor.
This model is capable of monitoring the heat flow rate flowing through this component. The sensed value of heat flow rate is the amount that passes through this sensor while keeping the temperature drop across the sensor zero. This is an ideal model, so it does not absorb any energy, and it has no direct effect on the thermal response of a system it is included in. The output signal is positive, if the heat flows from port_a to port_b.
Connectors:
- port_a: HeatPort Thermal port from which sensor information shall be measured
- port_b: HeatPort Thermal port from which sensor information shall be measured
- Q_flow: RealOutput [W] Heat flow from- port_ato- port_b
ModelingToolkitStandardLibrary.Thermal.TemperatureSensor — ConstantTemperatureSensor(; name)Absolute temperature sensor in kelvin.
This is an ideal absolute temperature sensor which returns the temperature of the connected port in kelvin as an output signal. The sensor itself has no thermal interaction with whatever it is connected to. Furthermore, no thermocouple-like lags are associated with this sensor model.
Connectors:
- port: HeatPort Thermal port from which sensor information shall be measured
- T: RealOutput [K] Absolute temperature of port
Thermal Sources
ModelingToolkitStandardLibrary.Thermal.FixedHeatFlow — ConstantFixedHeatFlow(; name, Q_flow = 1.0, T_ref = 293.15, alpha = 0.0)Fixed heat flow boundary condition.
This model allows a specified amount of heat flow rate to be "injected" into a thermal system at a given port. The constant amount of heat flow rate Q_flow is given as a parameter. The heat flows into the component to which the component FixedHeatFlow is connected, if parameter Q_flow is positive.
Connectors:
- port
Parameters:
- Q_flow: [W] Fixed heat flow rate at port
- T_ref: [K] Reference temperature
- alpha: [1/K] Temperature coefficient of heat flow rate
ModelingToolkitStandardLibrary.Thermal.FixedTemperature — ConstantFixedTemperature(; name, T)Fixed temperature boundary condition in kelvin.
This model defines a fixed temperature T at its port in kelvin, i.e., it defines a fixed temperature as a boundary condition.
Connectors:
- port
Parameters:
- T: [K] Fixed temperature boundary condition
ModelingToolkitStandardLibrary.Thermal.PrescribedHeatFlow — ConstantPrescribedHeatFlow(; name, T_ref = 293.15, alpha = 0.0)Prescribed heat flow boundary condition.
This model allows a specified amount of heat flow rate to be "injected" into a thermal system at a given port. The amount of heat is given by the input signal Q_flow into the model. The heat flows into the component to which the component PrescribedHeatFlow is connected, if the input signal is positive. If parameter alpha is > 0, the heat flow is multiplied by 1 + alpha*(port.T - T_ref) in order to simulate temperature dependent losses (which are given a reference temperature T_ref).
Connectors:
- port
- RealInput- Q_flowInput for the heat flow
Parameters:
- T_ref: [K] Reference temperature
- alpha: [1/K] Temperature coefficient of heat flow rate
ModelingToolkitStandardLibrary.Thermal.PrescribedTemperature — ConstantPrescribedTemperature(; name)This model represents a variable temperature boundary condition.
The temperature in kelvin is given as input signal to the RealInputT. The effect is that an instance of this model acts as an infinite reservoir, able to absorb or generate as much energy as required to keep the temperature at the specified value.
Connectors:
- port
- RealInput- Tinput for the temperature