modelDifferentialPressure

Differential pressure sensor

Extends from Buildings.Templates.Components.Interfaces.PartialSensor (Interface class for sensor).

Information

This is a model for a differential pressure sensor that can be enabled or disabled with the Boolean parameter have_sen. If disabled, the control input variable y is removed and the model simply consists of two fluid ports that are not connected to each other and for which the following equations are used. So the model must still be provided with pressure conditions at each port.

// Zero flow equations
port_(a|b).m_flow = 0;
// No contribution of specific quantities
port_(a|b).h_outflow = 0;
port_(a|b).Xi_outflow = zeros(Medium.nXi);
port_(a|b).C_outflow = zeros(Medium.nC);

Parameters

TypeNameDefaultDescription
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 PartialTwoPortInterface)Nominal mass flow rate
Advanced
Modelica.Units.SI.MassFlowRatem_flow_small (from PartialTwoPortInterface)1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortInterface)false= true, if actual temperature at port is computed
Configuration
Booleanhave_sen (from PartialSensor)trueSet to true for sensor, false for direct pass through
BooleanisDifPreSen (from PartialSensor)falseSet to true for differential pressure sensor, false for any other sensor
Graphics
Integertext_rotation (from PartialSensor)0Text rotation angle in icon layer
Booleantext_flip (from PartialSensor)falseTrue to flip text horizontally in icon layer
Buildings.Templates.Components.Types.IntegrationPointicon_pipe (from PartialSensor)Buildings.Templates.Components.Types.IntegrationPoint.NonePipe symbol

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)
Buildings.Controls.OBC.CDL.Interfaces.RealOutputy (from PartialSensor)Connector for measured value

Components

TypeNameDefaultDescription
Modelica.Units.SI.MassFlowRatem_flow (from PartialTwoPortInterface)port_a.m_flowMass flow rate from port_a to port_b (m_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp (from PartialTwoPortInterface)port_a.p - port_b.pPressure difference between port_a and port_b
Medium.ThermodynamicStatesta_a (from PartialTwoPortInterface)if allowFlowReversal then Medium.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) else Medium.setState_phX(port_a.p, noEvent(inStream(port_a.h_outflow)), noEvent(inStream(port_a.Xi_outflow)))Medium properties in port_a
Medium.ThermodynamicStatesta_b (from PartialTwoPortInterface)if allowFlowReversal then Medium.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) else Medium.setState_phX(port_b.p, noEvent(port_b.h_outflow), noEvent(port_b.Xi_outflow))Medium properties in port_b
Buildings.Fluid.Sensors.RelativePressuresenRelPreRelative pressure sensor