Modelica.Fluid.Sensors.BaseClasses

Base classes used in the Sensors package (only of interest to build new component models)

Information

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

NameDescription
Modelica.Fluid.Sensors.BaseClasses.PartialAbsoluteSensor PartialAbsoluteSensor Partial component to model a sensor that measures a potential variable
Modelica.Fluid.Sensors.BaseClasses.PartialFlowSensor PartialFlowSensor Partial component to model sensors that measure flow properties


Modelica.Fluid.Sensors.BaseClasses.PartialAbsoluteSensor Modelica.Fluid.Sensors.BaseClasses.PartialAbsoluteSensor

Partial component to model a sensor that measures a potential variable

Modelica.Fluid.Sensors.BaseClasses.PartialAbsoluteSensor

Information


Partial component to model an absolute sensor. Can be used for pressure sensor models. Use for other properties such as temperature or density is discouraged, because the enthalpy at the connector can have different meanings, depending on the connection topology. Use PartialFlowSensor instead. as signal.

Connectors

TypeNameDescription
FluidPort_aport 

Modelica definition

partial model PartialAbsoluteSensor 
  "Partial component to model a sensor that measures a potential variable"

  replaceable package Medium=Modelica.Media.Interfaces.PartialMedium 
    "Medium in the sensor";

  Modelica.Fluid.Interfaces.FluidPort_a port(redeclare package Medium=Medium, m_flow(min=0));

equation 
  port.m_flow = 0;
  port.h_outflow = 0;
  port.Xi_outflow = zeros(Medium.nXi);
  port.C_outflow = zeros(Medium.nC);
end PartialAbsoluteSensor;

Modelica.Fluid.Sensors.BaseClasses.PartialFlowSensor Modelica.Fluid.Sensors.BaseClasses.PartialFlowSensor

Partial component to model sensors that measure flow properties

Modelica.Fluid.Sensors.BaseClasses.PartialFlowSensor

Information


Partial component to model a sensor that measures any intensive properties of a flow, e.g., to get temperature or density in the flow between fluid connectors.
The model includes zero-volume balance equations. Sensor models inheriting from this partial class should add a medium instance to calculate the measured property.

Extends from Modelica.Fluid.Interfaces.PartialTwoPort (Partial component with two ports).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Assumptions
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)

Modelica definition

partial model PartialFlowSensor 
  "Partial component to model sensors that measure flow properties"
  extends Modelica.Fluid.Interfaces.PartialTwoPort;

equation 
  // mass balance
  0 = port_a.m_flow + port_b.m_flow;

  // momentum equation (no pressure loss)
  port_a.p = port_b.p;

  // isenthalpic state transformation (no storage and no loss of energy)
  port_a.h_outflow = inStream(port_b.h_outflow);
  port_b.h_outflow = inStream(port_a.h_outflow);

  port_a.Xi_outflow = inStream(port_b.Xi_outflow);
  port_b.Xi_outflow = inStream(port_a.Xi_outflow);

  port_a.C_outflow = inStream(port_b.C_outflow);
  port_b.C_outflow = inStream(port_a.C_outflow);
end PartialFlowSensor;

Automatically generated Fri Nov 12 16:31:19 2010.