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_Tdp Model to test pW_Tdp and its inverse function
pW_X Model to test pW_X and its inverse function
pW_Tdp_comparison Model to test the approximation for pW_Tdp and its inverse function


Buildings.Utilities.Psychrometrics.Functions.Examples.pW_Tdp

Model to test pW_Tdp and its inverse function

Modelica definition

model pW_Tdp "Model to test pW_Tdp 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_Tdp(T);
  TInv = Buildings.Utilities.Psychrometrics.Functions.Tdp_pW(p_w);
  dT = T - TInv;
  assert(abs(dT) < 10E-12, "Error in function implementation.");
end pW_Tdp;

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_Tdp_comparison

Model to test the approximation for pW_Tdp and its inverse function

Modelica definition

model pW_Tdp_comparison 
  "Model to test the approximation for pW_Tdp 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_Tdp(T);
  p_w = Buildings.Utilities.Psychrometrics.Functions.pW_Tdp_amb(T);
  r_p = p_w_ashrae/p_w;
  p_w = Buildings.Utilities.Psychrometrics.Functions.pW_Tdp_amb(TInv);
  dT = T - TInv;
  assert(abs(dT) < 10E-12, "Error in function implementation.");
end pW_Tdp_comparison;

HTML-documentation generated by Dymola Mon Jun 14 14:29:06 2010.