This package contains models of sensors. There are models with one and with two fluid ports.
When selecting a sensor model, a distinction needs to be made whether the measured quantity depends on the direction of the flow or not, and whether the sensor output signal is the product of the mass flow rate and a medium property.
Output signals that depend on the flow direction and are not multiplied by the mass flow rate are temperature, relative humidity, water vapor concentration X, trace substances C and density. For such quantities, sensors with two fluid ports need to be used. An exception is if the quantity is measured directly in a fluid volume, such as modeled in models of the package Buildings.Fluid.MixingVolumes. Therefore, to measure for example the outlet temperature of a heat exchanger, the configuration on the left in the figure below should be used, and not the configuration on the right. For an explanation, see Modelica.Fluid.Examples.Explanatory.MeasuringTemperature.
Correct use | |||
---|---|---|---|
Not recommended |
Measured quantity | One port sensor | Two port sensor | |
---|---|---|---|
steady-state (tau=0 ) |
dynamic (tau > 0 ) |
||
temperature relative humidity mass fraction trace substances specific enthalpy |
use only if connected to a volume | avoid | recommended |
volume flow rate enthalpy flow rate |
- | recommended | recommended |
pressure | recommended | recommended | recommended |
If a sensor is configured as a dynamic sensor by setting tau > 0
,
then the measured quantity, say the temperature T, is
computed as
τ dT ⁄ dt = |ṁ| ⁄ ṁ0 (θ-T),
where τ is a user-defined time constant of the sensor (a suggested value is around 10 seconds, which is the default setting for the components), dT ⁄ dt is the time derivative of the sensor output signal, |ṁ| is the absolute value of the mass flow rate, ṁ0 is the user-specified nominal value of the mass flow rate and θ is the temperature of the medium inside the sensor. An equivalent physical model of such a sensor would be a perfectly mixed volume with a sensor that outputs the temperature of this volume. In this situation, the size of the volume would be V=τ ṁ0 ⁄ ρ, where ρ is the density of the fluid.The above equation is implemented in such a way that it is differentiable in the mass flow rate.
Note that the implementation of the dynamic sensors does not use the model Buildings.Fluid.MixingVolumes. The reason is that depending on the selected medium model, the mixing volume may introduce states for the pressure, species concentration, trace substance and enthalpy. Not all states are typically needed to model the dynamics of a sensor. Moreover, in many building system applications, the sensor dynamics is not of concern, but is rather used here to avoid numerical problems that steady-state models of sensors cause when flow rates are very close to zero.
Extends from Modelica.Icons.Info (Icon for general information packages).