modelMeasuringTemperature

Differences between using one port with and without explicit junction model and two port sensors for fluid temperature measuring

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

Information

This model demonstrates the differences that occur when using one- and two-port temperature sensors with and without explicit junction models. As shown in the next figure, the same system is shown in 3 different variations. In all cases exactly the same fluid system is defined. The only difference is how the temperature is measured:

MeasuringTemperature1.png

A pre-defined mass flow rate is present so that fluid flows from the reservoir to the tanks and after 0.5 s the mass flows from the tanks to the reservoir. The reservoir has a temperature of 500C whereas the tanks have an initial temperature of 200C and of 800C. The initial height of the tanks is made in such a form that fluid always flows out of the cold tank. When the fluid flows from the reservoir to the tanks, then it mixes with the cold tank and enters the hot tank. When the fluid flow from the tanks to the reservoir, then the cold and hot water from the two tanks first mixes and the flows to the reservoir.

A one-port sensor measures the mixing temperature at a connection point. Therefore T_onePort.T (the blue curve in the figure below) is the temperature of the mixing point. A two-port sensor measures the temperature at the upstream side. Therefore T_twoPort.T (the red curve in the figure below which is identical to the green curve) shows first the temperature of the reservoir and then the mixing temperature when fluid flows from the tanks to the reservoir. The same is measured with T_junction.T (the green curve below), because the one-port sensor is connected between the mass flow source and the junction and since the mixing takes place in the junction, the same situation is present as for T_twoPort.T.

MeasuringTemperature2.png

Components

TypeNameDefaultDescription
Modelica.Fluid.Sensors.TemperatureT_onePort
Modelica.Fluid.Sensors.TemperatureTwoPortT_twoPort
Modelica.Fluid.Systemsystem
Modelica.Fluid.Vessels.OpenTankopenTankCold2
Modelica.Fluid.Vessels.OpenTankopenTankCold1
Modelica.Fluid.Vessels.OpenTankopenTankHot1
Modelica.Fluid.Vessels.OpenTankopenTankHot2
Modelica.Fluid.Sources.MassFlowSource_TmFlow1
Modelica.Fluid.Sources.MassFlowSource_TmFlow2
Modelica.Blocks.Sources.Sinesine
Modelica.Fluid.Sensors.TemperatureT_junction
Modelica.Fluid.Vessels.OpenTankopenTankCold3
Modelica.Fluid.Vessels.OpenTankopenTankHot3
Modelica.Fluid.Sources.MassFlowSource_TmFlow3
Modelica.Fluid.Fittings.TeeJunctionIdealjunctionIdeal