Buildings.Utilities.Psychrometrics.Functions.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.Functions.

Extends from Buildings.BaseClasses.BaseIconExamples (Icon for Examples packages).

Package Content

NameDescription
pW_X Model to test pW_X and its inverse function
pW_TDewPoi Model to test pW_TDewPoi and its inverse function
pW_TDewPoi_comparison Model to test the approximation for pW_TDewPoi and its inverse function


Buildings.Utilities.Psychrometrics.Functions.Examples.pW_X

Model to test pW_X and its inverse function

Modelica definition

model pW_X "Model to test pW_X and its inverse function"

  Modelica.SIunits.MassFraction X "Mass fraction";
  Modelica.SIunits.MassFraction XInv "Mass fraction";
  Modelica.SIunits.MassFraction dX "Difference between mass fraction";
  Modelica.SIunits.Pressure p_w "Water vapor partial pressure";
  constant Real conv(unit="1/s") = 0.999 "Conversion factor";
equation 
  X = conv*time;
  p_w = Buildings.Utilities.Psychrometrics.Functions.pW_X(X);
  XInv = Buildings.Utilities.Psychrometrics.Functions.X_pW(p_w);
  dX = X - XInv;
  assert(abs(dX) < 10E-12, "Error in function implementation.");
end pW_X;

Buildings.Utilities.Psychrometrics.Functions.Examples.pW_TDewPoi

Model to test pW_TDewPoi and its inverse function

Modelica definition

model pW_TDewPoi "Model to test pW_TDewPoi and its inverse function"

  Modelica.SIunits.Temperature T "Dew point temperature";
  Modelica.SIunits.Temperature TInv "Dew point temperature";
  Modelica.SIunits.TemperatureDifference dT "Difference between temperatures";
  Modelica.SIunits.Pressure p_w "Water vapor partial pressure";
  constant Real conv(unit="K/s") = 100 "Conversion factor";
equation 
  T = conv*time + 273.15;
  p_w = Buildings.Utilities.Psychrometrics.Functions.pW_TDewPoi(T);
  TInv = Buildings.Utilities.Psychrometrics.Functions.TDewPoi_pW(p_w);
  dT = T - TInv;
  assert(abs(dT) < 10E-12, "Error in function implementation.");
end pW_TDewPoi;

Buildings.Utilities.Psychrometrics.Functions.Examples.pW_TDewPoi_comparison

Model to test the approximation for pW_TDewPoi and its inverse function

Modelica definition

model pW_TDewPoi_comparison 
  "Model to test the approximation for pW_TDewPoi and its inverse function"

  Modelica.SIunits.Temperature T "Dew point temperature";
  Modelica.SIunits.Temperature TInv "Dew point temperature";
  Modelica.SIunits.TemperatureDifference dT "Difference between temperatures";
  Modelica.SIunits.Pressure p_w_ashrae 
    "Water vapor partial pressure according to the ASHRAE handbook";
  Modelica.SIunits.Pressure p_w "Water vapor partial pressure";

  constant Real conv(unit="K/s") = 30 "Conversion factor";
  Real r_p "Ratio of the two approximations";
equation 
  T = conv*time + 273.15;
  p_w_ashrae = Buildings.Utilities.Psychrometrics.Functions.pW_TDewPoi(T);
  p_w = Buildings.Utilities.Psychrometrics.Functions.pW_TDewPoi_amb(T);
  r_p = p_w_ashrae/p_w;
  p_w = Buildings.Utilities.Psychrometrics.Functions.pW_TDewPoi_amb(TInv);
  dT = T - TInv;
  assert(abs(dT) < 10E-12, "Error in function implementation.");
end pW_TDewPoi_comparison;

HTML-documentation generated by Dymola Thu Mar 17 10:17:21 2011.