Package Modelica.​Thermal.​HeatTransfer.​Examples
Example models to demonstrate the usage of package Modelica.Thermal.HeatTransfer

Information

Extends from Modelica.​Icons.​ExamplesPackage (Icon for packages containing runnable examples).

Package Contents

NameDescription
ControlledTemperatureControl temperature of a resistor
GenerationOfFMUsExample to demonstrate variants to generate FMUs (Functional Mock-up Units)
MotorSecond order thermal model of a motor
TwoMassesSimple conduction demo
UtilitiesUtility classes used by the Example models

Model Modelica.​Thermal.​HeatTransfer.​Examples.​TwoMasses
Simple conduction demo

Information

This example demonstrates the thermal response of two masses connected by a conducting element. The two masses have the same heat capacity but different initial temperatures (T1=100 [degC], T2= 0 [degC]). The mass with the higher temperature will cool off while the mass with the lower temperature heats up. They will each asymptotically approach the calculated temperature T_final_K (T_final_degC) that results from dividing the total initial energy in the system by the sum of the heat capacities of each element.

Simulate for 5 s and plot the variables
mass1.T, mass2.T, T_final_K or
Tsensor1.T, Tsensor2.T, T_final_degC

Extends from Modelica.​Icons.​Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureT_final_K Projected final temperature

Model Modelica.​Thermal.​HeatTransfer.​Examples.​ControlledTemperature
Control temperature of a resistor

Information

A constant voltage of 10 V is applied to a temperature dependent resistor of 10*(1+(T-20C)/(235+20C)) Ohms, whose losses v**2/r are dissipated via a thermal conductance of 0.1 W/K to ambient temperature 20 degree C. The resistor is assumed to have a thermal capacity of 1 J/K, having ambient temperature at the beginning of the experiment. The temperature of this heating resistor is held by an OnOff-controller at reference temperature within a given bandwidth +/- 1 K by switching on and off the voltage source. The reference temperature starts at 25 degree C and rises between t = 2 and 8 seconds linear to 50 degree C. An appropriate simulating time would be 10 seconds.

Extends from Modelica.​Icons.​Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureTAmb293.15Ambient Temperature
TemperatureDifferenceTDif2Error in Temperature

Model Modelica.​Thermal.​HeatTransfer.​Examples.​Motor
Second order thermal model of a motor

Information

This example contains a simple second order thermal model of a motor. The periodic power losses are described by table "lossTable":

timewinding lossescore losses
0 100 500
360 100 500
360 1000 500
600 1000 500

Since constant speed is assumed, the core losses keep constant whereas the winding losses are low for 6 minutes (no-load) and high for 4 minutes (over load).

The winding losses are corrected by (1 + alpha*(T - T_ref)) because the winding's resistance is temperature dependent whereas the core losses are kept constant (alpha = 0).

The power dissipation to the environment is approximated by heat flow through a thermal conductance between winding and core, partially storage of the heat in the winding's heat capacity as well as the core's heat capacity and finally by forced convection to the environment.
Since constant speed is assumed, the convective conductance keeps constant.
Using Modelica.Thermal.FluidHeatFlow it would be possible to model the coolant air flow, too (instead of simple dissipation to a constant ambient's temperature).

Simulate for 7200 s; plot Twinding.T and Tcore.T.

Extends from Modelica.​Icons.​Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureTAmb293.15Ambient temperature

Model Modelica.​Thermal.​HeatTransfer.​Examples.​GenerationOfFMUs
Example to demonstrate variants to generate FMUs (Functional Mock-up Units)

Information

This example demonstrates how to generate an input/output block (e.g. in form of an FMU - Functional Mock-up Unit) from various HeatTransfer components. The goal is to export such an input/output block from Modelica and import it in another modeling environment. The essential issue is that before exporting it must be known in which way the component is utilized in the target environment. Depending on the target usage, different flange variables need to be in the interface with either input or output causality. Note, this example model can be used to test the FMU export/import of a Modelica tool. Just export the components marked in the icons as "toFMU" as FMUs and import them back. The models should then still work and give the same results as a pure Modelica model.

Connecting two masses
The upper part (DirectCapacity, InverseCapacity) demonstrates how to export two heat capacitors and connect them together in a target system. This requires that one of the capacitors (here: DirectCapacity) is defined to have states and the temperature and derivative of temperature are provided in the interface. The other capacitor (here: InverseCapacity) requires heat flow according to the provided input temperature and derivative of temperature.

Connecting a conduction element that needs only temperature
The lower part (Conductor) demonstrates how to export a conduction element that needs only temperatures for its conduction law and connect this conduction law in a target system between two capacitors.

Extends from Modelica.​Icons.​Example (Icon for runnable examples).


Generated 2018-12-12 12:14:34 EST by MapleSim.