]>
tutorial4
This tutorial introduces the following concepts:
- Discontinuous equations (symmetrical state transition networks: daeIF statements)
In this example we model a very simple heat transfer problem where a small piece of copper
is at one side exposed to the source of heat and at the other to the surroundings.
The lumped heat balance is given by the following equation::
rho * cp * dT/dt - Qin = h * A * (T - Tsurr)
where Qin is the power of the heater, h is the heat transfer coefficient,
A is the surface area and Tsurr is the temperature of the surrounding air.
The process starts at the temperature of the metal of 283K.
The metal is allowed to warm up for 200 seconds, when the heat source is
removed and the metal cools down slowly to the ambient temperature.
This can be modelled using the following symmetrical state transition network:
.. code-block:: none
IF t < 200
Qin = 1500 W
ELSE
Qin = 0 W
The temperature plot:
.. image:: _static/tutorial4-results.png
:width: 500px
$\mathit{tutorial4}$IF_0${\mathit{IF}}_{\mathit{0}}$eIFState_1${\mathit{State}}_{\mathit{1}}$Q_onThe heater is on${\mathit{Q}}_{\mathit{on}}$$${ { Q_in } - {1500 {{W}}}} = 0$$$${ { tutorial4.Q_in } - {1500 {{W}}}} = 0$$TrueOnConditionActions_0${\mathit{OnConditionActions}}_{\mathit{0}}$$\mathit{\tau}<200\mathit{s}$${\mathit{IF}}_{\mathit{0}}$
IF_0ELSE$\mathit{ELSE}$Q_offThe heater is off${\mathit{Q}}_{\mathit{off}}$$${ Q_in } = 0$$$${ tutorial4.Q_in } = 0$$True${\mathit{IF}}_{\mathit{0}}$
IF_0