# ModelingToolkitStandardLibrary: Thermal Components

## Thermal Utilities

ModelingToolkitStandardLibrary.Thermal.HeatPortFunction
HeatPort(; name, T_start=273.15 + 20.0, Q_flow_start=0.0)

Port for a thermal system.

Parameters:

• T_start: [K] Temperature of the port
• Q_flow_start: [W] Heat flow rate at the port

States:

• T: [K] Temperature of the port
• Q_flow: [W] Heat flow rate at the port
ModelingToolkitStandardLibrary.Thermal.Element1DFunction
Element1D(;name, dT0=0.0, Q_flow0=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.

Parameters:

• dT_start: [K] Initial temperature difference across the component a.T - b.T
• Q_flow_start: [W] Initial heat flow rate from port a -> port b

States:

• dT: [K] Temperature difference across the component a.T - b.T
• Q_flow: [W] Heat flow rate from port a -> port b

## Thermal Components

ModelingToolkitStandardLibrary.Thermal.ConvectiveConductorFunction
ConvectiveConductor(; name, G)

Lumped thermal element for heat convection.

Parameters:

• G: [W/K] Convective thermal conductance

States:

• dT: [K] Temperature difference across the component solid.T - fluid.T
• Q_flow: [W] Heat flow rate from solid -> fluid
ModelingToolkitStandardLibrary.Thermal.ConvectiveResistorFunction
ConvectiveResistor(; name, R)

Lumped thermal element for heat convection.

Parameters:

• R: [K/W] Constant thermal resistance of material

States:

• dT: [K] Temperature difference across the component solid.T - fluid.T
• Q_flow: [W] Heat flow rate from solid -> fluid
ModelingToolkitStandardLibrary.Thermal.HeatCapacitorFunction
HeatCapacitor(; name, C, T_start=273.15 + 20)

Lumped thermal element storing heat

Parameters:

• C: [J/K] Heat capacity of element (= cp*m)
• T_start: Initial temperature of element

States:

• T: [K] Temperature of element
• der_T: [K/s] Time derivative of temperature
ModelingToolkitStandardLibrary.Thermal.ThermalCollectorFunction
ThermalCollector(; name, m=1)

Collects m heat flows

This is a model to collect the heat flows from m heatports to one single heatport.

Parameters:

• m: Number of heat ports (e.g. m=2: port_a1, port_a2)

## Thermal Sensors

ModelingToolkitStandardLibrary.Thermal.HeatFlowSensorFunction
HeatFlowSensor(; 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.

ModelingToolkitStandardLibrary.Thermal.TemperatureSensorFunction
TemperatureSensor(; 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.

## Thermal Sources

ModelingToolkitStandardLibrary.Thermal.FixedHeatFlowFunction
FixedHeatFlow(; 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.

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.FixedTemperatureFunction
FixedTemperature(; 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.

Parameters:

• T: [K] Fixed temperature boundary condition