RelTemperatureSensor

model RelTemperatureSensor "Temperature difference sensor"
    extends Modelica.Thermal.FluidHeatFlow.Interfaces.Partials.RelativeSensor(y(unit = "K") "Temperature difference as output signal");
equation
    medium.cp * y = flowPort_a.h - flowPort_b.h;

    annotation (
        Documentation(info = "<html>\n<p>The RelTemperatureSensor measures the temperature difference between flowPort_a and flowPort_b.</p>\n<p>Thermodynamic equations are defined by Partials.RelativeSensor.</p>\n<p>\n<strong>Note:</strong> Connected flowPorts have the same temperature (mixing temperature)!\nSince mixing my occur, the outlet temperature of a component may be different from the connector's temperature.\nOutlet temperature is defined by variable T of the corresponding component.\n</p>\n</html>"),
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Text(
                    extent = {
                        {-30, -20}, 
                        {30, -60}},
                    textString = "dT")}));
end RelTemperatureSensor;