Buildings.Utilities.Psychrometrics.Examples

Collection of models that illustrate model use and test models

Information


This package contains examples for the use of models
that can be found in 
Buildings.Utilities.Psychrometics.

Package Content

NameDescription
DewPointTemperature Unit test for dew point temperature calculation
HumidityRatioPressure Unit test for humidity ratio model
WetBulbTemperature  


Buildings.Utilities.Psychrometrics.Examples.DewPointTemperature

Unit test for dew point temperature calculation

Buildings.Utilities.Psychrometrics.Examples.DewPointTemperature

Modelica definition

model DewPointTemperature 
  "Unit test for dew point temperature calculation" 
   package Medium = Buildings.Media.PerfectGases.MoistAir "Medium model";
  Buildings.Utilities.Psychrometrics.DewPointTemperature TDewPoi;
  Buildings.Utilities.Psychrometrics.HumidityRatioPressure humRat;
    Modelica.Blocks.Sources.Ramp XHum(
    duration=1,
    height=(0.01 - 0.1),
    offset=0.1) "Humidity concentration";
  Modelica.Blocks.Sources.Constant p(k=101325) "Pressure";
equation 
  connect(humRat.p_w, TDewPoi.p_w);
  connect(p.y, humRat.p);
  connect(XHum.y, humRat.XWat);
end DewPointTemperature;

Buildings.Utilities.Psychrometrics.Examples.HumidityRatioPressure

Unit test for humidity ratio model

Buildings.Utilities.Psychrometrics.Examples.HumidityRatioPressure

Modelica definition

model HumidityRatioPressure "Unit test for humidity ratio model" 
 package Medium = Buildings.Media.PerfectGases.MoistAir "Medium model";
  Buildings.Utilities.Psychrometrics.HumidityRatioPressure humRat 
    "Model for humidity ratio";
    Modelica.Blocks.Sources.Ramp XHum(
    duration=1,
    height=(0.0133 - 0.2),
    offset=0.2) "Humidity concentration";
  Modelica.Blocks.Sources.Constant p(k=101325) "Pressure";
equation 
  connect(p.y, humRat.p);
  connect(XHum.y, humRat.XWat);
end HumidityRatioPressure;

Buildings.Utilities.Psychrometrics.Examples.WetBulbTemperature

Buildings.Utilities.Psychrometrics.Examples.WetBulbTemperature

Information


This examples is a unit test for the wet bulb computation.
The problem setup is such that the moisture concentration and
the dry bulb temperature are varied simultaneously so 
that the wet bulb temperature remains constant.
This wet bulb temperature is checked against a constant value with
an assert statement.
If this assert is triggered, then the model for the wet bulb computation
is broken (assuming that the inputs remained unchanged).

Modelica definition

model WetBulbTemperature 
  
  
 package Medium = Buildings.Media.PerfectGases.MoistAir "Medium model";
  
    Modelica.Blocks.Sources.Ramp TDB(
    height=10,
    duration=1,
    offset=273.15 + 30) "Dry bulb temperature";
  Modelica.Blocks.Sources.Constant const;
  Modelica.Blocks.Math.Feedback feedback;
  Buildings.Utilities.Controls.AssertEquality assertEquality(startTime=0,
      threShold=0.05);
  Modelica.Blocks.Sources.Constant TWBExp(k=273.15 + 25) 
    "Expected wet bulb temperature";
  Buildings.Utilities.Psychrometrics.WetBulbTemperature wetBul(redeclare 
      package Medium = Medium) "Model for wet bulb temperature";
  Modelica.Blocks.Sources.Constant p(k=101325) "Pressure";
    Modelica.Blocks.Sources.Ramp XHum(
    duration=1,
    height=(0.0133 - 0.0175),
    offset=0.0175) "Humidity concentration";
equation 
  connect(const.y, feedback.u1);
  connect(TWBExp.y, assertEquality.u2);
  connect(TDB.y, wetBul.TDryBul);
  connect(feedback.y, wetBul.X[2]);
  connect(p.y, wetBul.p);
  connect(wetBul.TWetBul, assertEquality.u1);
  connect(XHum.y, feedback.u2);
  connect(XHum.y, wetBul.X[1]);
end WetBulbTemperature;

HTML-documentation generated by Dymola Fri Oct 31 16:24:06 2008.