modelSensibleEnthalpyFlowRate

Ideal enthalphy flow rate sensor that outputs the sensible enthalpy flow rate only

Extends from Buildings.Fluid.Sensors.BaseClasses.PartialDynamicFlowSensor (Partial component to model sensors that measure flow properties using a dynamic model), Buildings.Fluid.BaseClasses.IndexMassFraction (Computes the index of a substance in the mass fraction vector Xi), Modelica.Icons.RoundSensor (Icon representing a round measurement device).

Information

This model outputs the sensible enthalphy flow rate of the medium in the flow between its fluid ports. In particular, if the total enthalpy flow rate is

tot = Ḣsen + Ḣlat,

where sen = ṁ (1-Xw) cp,air, then this sensor outputs Ḣ = Ḣsen.

If the parameter tau is non-zero, then the measured specific sensible enthalpy hout that is used to compute the sensible enthalpy flow rate sen = ṁ hout is computed using a first order differential equation. See Buildings.Fluid.Sensors.UsersGuide for an explanation.

For a sensor that measures tot, use Buildings.Fluid.Sensors.EnthalpyFlowRate.
For a sensor that measures lat, use Buildings.Fluid.Sensors.LatentEnthalpyFlowRate.

The sensor is ideal, i.e., it does not influence the fluid. The sensor can only be used with medium models that implement the function enthalpyOfNonCondensingGas(T).

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.Timetau (from PartialDynamicFlowSensor)1Time constant at nominal flow rate (use tau=0 for steady-state sensor, but see user guide for potential problems)
StringsubstanceName (from IndexMassFraction)""Name of species substance
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal
Nominal condition
Modelica.Units.SI.MassFlowRatem_flow_nominal (from PartialFlowSensor)Nominal mass flow rate, used for regularization near zero flow
Advanced
Modelica.Units.SI.MassFlowRatem_flow_small (from PartialFlowSensor)1E-4*m_flow_nominalFor bi-directional flow, temperature is regularized in the region |m_flow| < m_flow_small (m_flow_small > 0 required)
Initialization
Modelica.Blocks.Types.InitinitType (from PartialDynamicFlowSensor)Modelica.Blocks.Types.Init.InitialStateType of initialization (InitialState and InitialOutput are identical)
Modelica.Units.SI.SpecificEnthalpyh_out_startMedium.enthalpyOfNonCondensingGas(T = Medium.T_default)Initial or guess value of measured specific sensible enthalpy

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Blocks.Interfaces.RealOutputH_flowSensible enthalpy flow rate, positive if from port_a to port_b

Revisions

  • June 25, 2026, by Michael Wetter:
    Added nominal attribute to state variable.
    This is for IBPSA, #2132.
  • October 19, 2020, by Antoine Gautier:
    Changed default value for tau from 1 to 0.
    This is for #1406.
  • February 25, 2020, by Michael Wetter:
    Changed icon to display its operating state.
    This is for #1294.
  • January 18, 2016 by Filip Jorissen:
    Using parameter tauInv since this now exists in Buildings.Fluid.Sensors.BaseClasses.PartialDynamicFlowSensor. This is for #372.
  • September 10, 2013, by Michael Wetter:
    Changed medium declaration in the extends statement to replaceable to avoid a translation error in OpenModelica.
  • August 31, 2013, by Michael Wetter:
    Removed default value tau=0 as the base class already sets tau=1. This change was made so that all sensors use the same default value.
  • December 18, 2012, by Michael Wetter:
    Moved computation of i_w to new base class Buildings.Fluid.BaseClasses.IndexWater. The value of this parameter is now assigned dynamically and does not require to be specified by the user.
  • November 3, 2011, by Michael Wetter:
    Moved der(h_out) := 0; from the initial algorithm section to the initial equation section as this assignment does not conform to the Modelica specification.
  • August 10, 2011 by Michael Wetter:
    Added parameter i_w and an assert statement to make sure it is set correctly. Without this change, Dymola cannot differentiate the model when reducing the index of the DAE.
  • June 3, 2011 by Michael Wetter:
    Revised implementation to add dynamics in such a way that the time constant increases as the mass flow rate tends to zero. This can improve the numerics.
  • February 22, by Michael Wetter:
    Improved code that searches for index of 'water' in the medium model.
  • September 9, 2009 by Michael Wetter:
    First implementation. Implementation is based on enthalpy sensor of Modelica.Fluid.