@@ -7,23 +7,18 @@ This is an ideal absolute temperature sensor which returns the temperature of th
77signal. The sensor itself has no thermal interaction with whatever it is connected to. Furthermore, no thermocouple-like
88lags are associated with this sensor model.
99
10- # States:
11-
12- - `T(t)`: [`K`] Absolute temperature
13-
1410# Connectors:
1511
16- - `port`
12+ - `port`: [HeatPort](@ref) Thermal port from which sensor information shall be measured
13+ - `T`: [RealOutput](@ref) [K] Absolute temperature of port
1714"""
1815@mtkmodel TemperatureSensor begin
1916 @components begin
2017 port = HeatPort ()
21- end
22- @variables begin
23- T (t)
18+ T = RealOutput ()
2419 end
2520 @equations begin
26- T ~ port. T
21+ T. u ~ port. T
2722 port. Q_flow ~ 0
2823 end
2924end
@@ -36,25 +31,20 @@ Relative Temperature sensor.
3631The relative temperature `port_a.T - port_b.T` is determined between the two ports of this component and is provided as
3732output signal in kelvin.
3833
39- # States:
40-
41- - `T(t)`: [`K`] Relative temperature `a.T - b.T`
42-
4334# Connectors:
4435
45- - `port_a`
46- - `port_b`
36+ - `port_a`: [HeatPort](@ref) Thermal port from which sensor information shall be measured
37+ - `port_b`: [HeatPort](@ref) Thermal port from which sensor information shall be measured
38+ - `T`: [RealOutput](@ref) [K] Relative temperature `a.T - b.T`
4739"""
4840@mtkmodel RelativeTemperatureSensor begin
4941 @components begin
5042 port_a = HeatPort ()
5143 port_b = HeatPort ()
52- end
53- @variables begin
54- T (t)
44+ T = RealOutput ()
5545 end
5646 @equations begin
57- T ~ port_a. T - port_b. T
47+ T. u ~ port_a. T - port_b. T
5848 port_a. Q_flow ~ 0
5949 port_b. Q_flow ~ 0
6050 end
@@ -70,26 +60,21 @@ is the amount that passes through this sensor while keeping the temperature drop
7060model, so it does not absorb any energy, and it has no direct effect on the thermal response of a system it is included in.
7161The output signal is positive, if the heat flows from `port_a` to `port_b`.
7262
73- # States:
74-
75- - `Q_flow(t)`: [`W`] Heat flow from `port_a` to `port_b`
76-
7763# Connectors:
7864
79- - `port_a`
80- - `port_b`
65+ - `port_a`: [HeatPort](@ref) Thermal port from which sensor information shall be measured
66+ - `port_b`: [HeatPort](@ref) Thermal port from which sensor information shall be measured
67+ - `Q_flow`: [RealOutput](@ref) [W] Heat flow from `port_a` to `port_b`
8168"""
8269@mtkmodel HeatFlowSensor begin
8370 @components begin
8471 port_a = HeatPort ()
8572 port_b = HeatPort ()
86- end
87- @variables begin
88- Q_flow (t)
73+ Q_flow = RealOutput ()
8974 end
9075 @equations begin
9176 port_a. T ~ port_b. T
9277 port_a. Q_flow + port_b. Q_flow ~ 0
93- Q_flow ~ port_a. Q_flow
78+ Q_flow. u ~ port_a. Q_flow
9479 end
9580end
0 commit comments