Buildings.Fluids.Sensors.Examples

Collection of models that illustrate model use and test models

Package Content

NameDescription
WetBulbTemperature  


Buildings.Fluids.Sensors.Examples.WetBulbTemperature

Buildings.Fluids.Sensors.Examples.WetBulbTemperature

Information


This examples is a unit test for the wet bulb sensor.
The problem setup is such that the moisture concentration and
the dry bulb temperature are varied simultaneously in such a way
that the wet bulb temperature is constant.
This wet bulb temperature is checked against a constant value with
an assert statement.
In case this assert is triggered, then either the wet bulb sensor or
the medium model got broken (assuming that the inputs remained unchanged).

Modelica definition

model WetBulbTemperature 
  
  
 package Medium = Buildings.Media.PerfectGases.MoistAir "Medium model";
  
    Modelica.Blocks.Sources.Ramp p(
    duration=1,
    offset=101325,
    height=250);
  Modelica_Fluid.Sources.PrescribedBoundary_pTX sin(redeclare package Medium = 
        Medium, T=293.15);
  Buildings.Fluids.Sensors.WetBulbTemperature senWetBul(redeclare package 
      Medium = Medium) "Wet bulb temperature sensor";
  Modelica_Fluid.Sources.PrescribedMassFlowRate_TX massFlowRate(redeclare 
      package Medium = Medium, m_flow=1);
    Modelica.Blocks.Sources.Ramp TDB(
    height=10,
    duration=1,
    offset=273.15 + 30) "Dry bulb temperature";
    Modelica.Blocks.Sources.Ramp XHum(
    duration=1,
    height=(0.0133 - 0.0175),
    offset=0.0175) "Humidity concentration";
  Modelica.Blocks.Sources.Constant const;
  Modelica.Blocks.Math.Feedback feedback;
  Buildings.Utilities.Controls.AssertEquality assertEquality(threShold=0.05);
  Modelica.Blocks.Sources.Constant TWBExp(k=273.15 + 25) 
    "Expected wet bulb temperature";
equation 
  connect(senWetBul.port_b, sin.port);
  connect(massFlowRate.port, senWetBul.port_a);
  connect(TDB.y, massFlowRate.T_in);
  connect(const.y, feedback.u1);
  connect(XHum.y, feedback.u2);
  connect(XHum.y, massFlowRate.X_in[1]);
  connect(feedback.y, massFlowRate.X_in[2]);
  connect(senWetBul.TWB, assertEquality.u1);
  connect(TWBExp.y, assertEquality.u2);
  connect(p.y, sin.p_in);
end WetBulbTemperature;

HTML-documentation generated by Dymola Fri Jun 20 09:58:32 2008.