Buildings.Fluids.Sensors

Package with sensor models

Information


This package contains sensor models. Additional sensor models may be found
in 
Modelica_Fluid.Sensors.

Package Content

NameDescription
Buildings.Fluids.Sensors.Conversions Conversions Package with conversions for sensor models
Buildings.Fluids.Sensors.DryBulbTemperatureDynamic DryBulbTemperatureDynamic Ideal temperature sensor
Buildings.Fluids.Sensors.EnthalpyFlowRate EnthalpyFlowRate Ideal enthalphy flow rate sensor
Buildings.Fluids.Sensors.Examples Examples Collection of models that illustrate model use and test models
Buildings.Fluids.Sensors.ExtraPropertyOnePort ExtraPropertyOnePort Ideal wet bulb temperature sensor
Buildings.Fluids.Sensors.Pressure Pressure Pressure sensor
Buildings.Fluids.Sensors.RelativePressure RelativePressure Ideal relative pressure sensor
Buildings.Fluids.Sensors.WetBulbTemperature WetBulbTemperature Ideal wet bulb temperature sensor


Buildings.Fluids.Sensors.DryBulbTemperatureDynamic Buildings.Fluids.Sensors.DryBulbTemperatureDynamic

Ideal temperature sensor

Buildings.Fluids.Sensors.DryBulbTemperatureDynamic

Information


This component monitors the temperature of the medium in the flow between fluid ports. The sensor does not influence the fluid. Its output is computed using a first order differential equation.


Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the sensor
Timetau10Time constant [s]
Initialization
TempinitTypeModelica.Blocks.Types.Init.N...Type of initialization (InitialState and InitialOutput are identical)
TemperatureT_startMedium.T_defaultInitial or guess value of output (= state) [K]
Advanced
TempflowDirectionModelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_aport_a 
FluidPort_bport_b 
output RealOutputTTemperature in port medium

Modelica definition

model DryBulbTemperatureDynamic "Ideal temperature sensor" 
  extends Modelica_Fluid.Sensors.BaseClasses.PartialFlowSensor;
  
  Medium.BaseProperties medium;
  parameter Modelica.SIunits.Time tau(min=0) = 10 "Time constant";
  Modelica.Blocks.Interfaces.RealOutput T(redeclare type SignalType = 
       Modelica.SIunits.Temperature(start=T_start)) 
    "Temperature in port medium";
  parameter Modelica.Blocks.Types.Init.Temp initType=Modelica.Blocks.Types.Init.NoInit 
    "Type of initialization (InitialState and InitialOutput are identical)";
  parameter Modelica.SIunits.Temperature T_start=Medium.T_default 
    "Initial or guess value of output (= state)";
  
initial equation 
  if initType == Modelica.Blocks.Types.Init.SteadyState then
    der(T) = 0;
  elseif initType == Modelica.Blocks.Types.Init.InitialState or 
         initType == Modelica.Blocks.Types.Init.InitialOutput then
    T = T_start;
  end if;
equation 
  port_a.p = medium.p;
  h  = medium.h;
  Xi = medium.Xi;
  der(T)  = (medium.T-T)/tau;
end DryBulbTemperatureDynamic;

Buildings.Fluids.Sensors.EnthalpyFlowRate Buildings.Fluids.Sensors.EnthalpyFlowRate

Ideal enthalphy flow rate sensor

Buildings.Fluids.Sensors.EnthalpyFlowRate

Information


This component monitors the enthalphy flow rate of the medium in the flow between fluid ports. The sensor is ideal, i.e., it does not influence the fluid.


Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the sensor
Advanced
TempflowDirectionModelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_aport_a 
FluidPort_bport_b 
output RealOutputH_flowEnthalpy flow rate, positive if from port_a to port_b [W]

Modelica definition

model EnthalpyFlowRate "Ideal enthalphy flow rate sensor" 
  extends Modelica_Fluid.Sensors.BaseClasses.PartialFlowSensor;
  extends Modelica.Icons.RotationalSensor;
  Modelica.Blocks.Interfaces.RealOutput H_flow(unit="W") 
    "Enthalpy flow rate, positive if from port_a to port_b";
  
equation 
  H_flow = port_a.H_flow;
end EnthalpyFlowRate;

Buildings.Fluids.Sensors.ExtraPropertyOnePort Buildings.Fluids.Sensors.ExtraPropertyOnePort

Ideal wet bulb temperature sensor

Buildings.Fluids.Sensors.ExtraPropertyOnePort

Information


This component monitors the concentration of a species defined in the vector Medium.C. The sensor is ideal, i.e., it does not influence the fluid.


Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the sensor
StringsubstanceName"CO2"Name of species in vector of auxiliary substances

Connectors

TypeNameDescription
FluidPort_aport 
output RealOutputCMass fraction of auxiliary component in the fluid

Modelica definition

model ExtraPropertyOnePort "Ideal wet bulb temperature sensor" 
  extends Modelica_Fluid.Sensors.BaseClasses.PartialAbsoluteSensor;
  
  
  Modelica.Blocks.Interfaces.RealOutput C(
    redeclare type SignalType = Modelica.SIunits.MassFraction) 
    "Mass fraction of auxiliary component in the fluid";
  parameter String substanceName = "CO2" 
    "Name of species in vector of auxiliary substances";
//  constant Real con = 28.97/44.01*1E6 
//    "Conversion from mass fraction CO2 to part per million";
protected 
  parameter Integer ind(fixed=false) 
    "Index of species in vector of auxiliary substances";
  
initial algorithm 
  ind:= -1;
  for i in 1:Medium.nC loop
   if ( Modelica.Utilities.Strings.isEqual(Medium.extraPropertiesNames[i], substanceName)) then
    ind := i;
   end if;
  end for;
  assert(ind > 0, "Substance '" + substanceName + "' is not present in medium '"
           + Medium.mediumName + "'.\n"
           + "Check sensor parameter and medium model.");
  
equation 
  C = port.C[ind];
  ///////////////////////////////////////////////////////////////////////////////////
  // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid. 
  port.mC_flow = zeros(Medium.nC);
  ///////////////////////////////////////////////////////////////////////////////////
end ExtraPropertyOnePort;

Buildings.Fluids.Sensors.Pressure Buildings.Fluids.Sensors.Pressure

Pressure sensor

Buildings.Fluids.Sensors.Pressure

Information


This component monitors the pressure at its ports. The sensor does not influence the fluid. The model is identical to Modelica_Fluid.Sensors.Pressure but it adds the mass balance for the extra species properties that is missing in the original sensor of Modelica_Fluid beta 1.


Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the sensor

Connectors

TypeNameDescription
FluidPort_aport 
output RealOutputpPressure at port [Pa]

Modelica definition

model Pressure "Pressure sensor" 
  extends Modelica_Fluid.Sensors.Pressure;
equation 
  ///////////////////////////////////////////////////////////////////////////////////
  // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid. 
  port.mC_flow = zeros(Medium.nC);
  ///////////////////////////////////////////////////////////////////////////////////
  
end Pressure;

Buildings.Fluids.Sensors.RelativePressure Buildings.Fluids.Sensors.RelativePressure

Ideal relative pressure sensor

Buildings.Fluids.Sensors.RelativePressure

Information


This component monitors the pressure difference between its ports. The sensor does not influence the fluid. The model is identical to Modelica_Fluid.Sensors.RelativePressure but it adds the mass balance for the extra species properties that is missing in the original sensor of Modelica_Fluid beta 1.


Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the sensor

Connectors

TypeNameDescription
FluidPort_aport_a 
FluidPort_bport_b 
output RealOutputp_relRelative pressure signal

Modelica definition

model RelativePressure "Ideal relative pressure sensor" 
  extends Modelica_Fluid.Sensors.RelativePressure;
equation 
  ///////////////////////////////////////////////////////////////////////////////////
  // Extra species flow. This may be removed when upgrading to the new Modelica.Fluid. 
  port_a.mC_flow = zeros(Medium.nC);
  port_b.mC_flow = zeros(Medium.nC);
  ///////////////////////////////////////////////////////////////////////////////////
end RelativePressure;

Buildings.Fluids.Sensors.WetBulbTemperature Buildings.Fluids.Sensors.WetBulbTemperature

Ideal wet bulb temperature sensor

Buildings.Fluids.Sensors.WetBulbTemperature

Information


This component monitors the wet bulb temperature of the medium in the flow between fluid ports. The sensor is ideal, i.e., it does not influence the fluid.


Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the sensor
Advanced
TempflowDirectionModelica_Fluid.Types.FlowDir...Unidirectional (port_a -> port_b) or bidirectional flow component

Connectors

TypeNameDescription
FluidPort_aport_a 
FluidPort_bport_b 
output RealOutputTWet bulb temperature in port medium

Modelica definition

model WetBulbTemperature "Ideal wet bulb temperature sensor" 
  extends Modelica_Fluid.Sensors.BaseClasses.PartialFlowSensor;
  Medium.BaseProperties medium;
  
  
  Modelica.Blocks.Interfaces.RealOutput T(
    redeclare type SignalType = Modelica.SIunits.Temperature,
    start=Medium.T_default) "Wet bulb temperature in port medium";
  
  Buildings.Utilities.Psychrometrics.WetBulbTemperature wetBulMod(redeclare 
      package Medium = Medium) "Model for wet bulb temperature";
  
equation 
  port_a.p = medium.p;
  h  = medium.h;
  Xi = medium.Xi;
  
  // Compute wet bulb temperature
  wetBulMod.dryBul.h  = medium.h;
  wetBulMod.dryBul.p  = medium.p;
  wetBulMod.dryBul.Xi = medium.Xi;
  T = wetBulMod.wetBul.T;
  
end WetBulbTemperature;

HTML-documentation generated by Dymola Tue Sep 30 14:24:33 2008.