Buildings.Utilities.Psychrometrics

Library with psychrometric functions

Package Content

NameDescription
Buildings.Utilities.Psychrometrics.BaseClasses BaseClasses Library with base classes for psychrometric classes
Buildings.Utilities.Psychrometrics.DewPointTemperature_pWat DewPointTemperature_pWat Model to compute the dew point temperature of moist air
Buildings.Utilities.Psychrometrics.Examples Examples Collection of models that illustrate model use and test models
Buildings.Utilities.Psychrometrics.HumidityRatio_pWat HumidityRatio_pWat Humidity ratio for given water vapor pressure
Buildings.Utilities.Psychrometrics.VaporPressure_TDP VaporPressure_TDP Model to compute the water vapor pressure for a given dew point temperature of moist air
Buildings.Utilities.Psychrometrics.VaporPressure_X VaporPressure_X Water vapor pressure for given humidity ratio
Buildings.Utilities.Psychrometrics.WetBulbTemperature WetBulbTemperature Model to compute the wet bulb temperature


Buildings.Utilities.Psychrometrics.DewPointTemperature_pWat Buildings.Utilities.Psychrometrics.DewPointTemperature_pWat

Model to compute the dew point temperature of moist air

Buildings.Utilities.Psychrometrics.DewPointTemperature_pWat

Information


Dew point temperature calculation for moist air above freezing temperature.

The correlation used in this model is valid for dew point temperatures between 0 degC and 200 degC. It is the correlation from 2005 ASHRAE Handbook, p. 6.2. In an earlier version of this model, the equation from Peppers has been used, but this equation yielded about 15 Kelvin lower dew point temperatures.


Extends from Modelica.Blocks.Interfaces.BlockIcon (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
output RealOutputp_wWater vapor partial pressure
input RealInputTDew point temperature [K]

Modelica definition

block DewPointTemperature_pWat 
  "Model to compute the dew point temperature of moist air"
  extends Modelica.Blocks.Interfaces.BlockIcon;
  Modelica.Blocks.Interfaces.RealOutput p_w "Water vapor partial pressure";
  Modelica.Blocks.Interfaces.RealInput T(final quantity="ThermodynamicTemperature",
                                         final unit="K",
                                         min = 0,
                                         displayUnit="degC") 
    "Dew point temperature";

equation 
 p_w = Buildings.Utilities.Psychrometrics.BaseClasses.dewPointTemperature(T=T);
end DewPointTemperature_pWat;

Buildings.Utilities.Psychrometrics.HumidityRatio_pWat Buildings.Utilities.Psychrometrics.HumidityRatio_pWat

Humidity ratio for given water vapor pressure

Buildings.Utilities.Psychrometrics.HumidityRatio_pWat

Information


Block to compute the humidity ratio for a given water vapor partial pressure. of moist air.

If use_p_in is false (default option), the p parameter is used as atmospheric pressure, and the p_in input connector is disabled; if use_p_in is true, then the p parameter is ignored, and the value provided by the input connector is used instead.


Extends from Buildings.Utilities.Psychrometrics.BaseClasses.HumidityRatioVaporPressure (Humidity ratio for given water vapor pressure).

Parameters

TypeNameDefaultDescription
Booleanuse_p_intrueGet the pressure from the input connector
Pressurep101325Fixed value of pressure [Pa]
Initialization
MassFractionX_dryAir.start0.001Water mass fraction per mass of dry air [1]

Connectors

TypeNameDescription
input RealInputp_inAtmospheric Pressure [Pa]
output RealOutputXWatSpecies concentration at dry bulb temperature
input RealInputp_wWater vapor pressure [Pa]

Modelica definition

block HumidityRatio_pWat 
  "Humidity ratio for given water vapor pressure"
  extends Buildings.Utilities.Psychrometrics.BaseClasses.HumidityRatioVaporPressure;
  Modelica.Blocks.Interfaces.RealOutput XWat(min=0, max=1, nominal=0.01) 
    "Species concentration at dry bulb temperature";
  Modelica.Blocks.Interfaces.RealInput p_w(final quantity="Pressure",
                                           final unit="Pa",
                                           displayUnit="Pa",
                                           min = 0) "Water vapor pressure";
equation 
  X_dryAir * (1-XWat) = XWat;
 ( p_in_internal - p_w)   * X_dryAir = 0.62198 * p_w;
end HumidityRatio_pWat;

Buildings.Utilities.Psychrometrics.VaporPressure_TDP Buildings.Utilities.Psychrometrics.VaporPressure_TDP

Model to compute the water vapor pressure for a given dew point temperature of moist air

Buildings.Utilities.Psychrometrics.VaporPressure_TDP

Information


Dew point temperature calculation for moist air above freezing temperature.

The correlation used in this model is valid for dew point temperatures between 0 degC and 200 degC. It is the correlation from 2005 ASHRAE Handbook, p. 6.2. In an earlier version of this model, the equation from Peppers has been used, but this equation yielded about 15 Kelvin lower dew point temperatures.


Extends from Modelica.Blocks.Interfaces.BlockIcon (Basic graphical layout of input/output block).

Connectors

TypeNameDescription
input RealInputp_wWater vapor partial pressure
output RealOutputTDew point temperature [K]

Modelica definition

block VaporPressure_TDP 
  "Model to compute the water vapor pressure for a given dew point temperature of moist air"
  extends Modelica.Blocks.Interfaces.BlockIcon;
  Modelica.Blocks.Interfaces.RealInput p_w "Water vapor partial pressure";
  Modelica.Blocks.Interfaces.RealOutput T(start=278.15,
                                         final quantity="ThermodynamicTemperature",
                                         final unit="K",
                                         min = 0,
                                         displayUnit="degC") 
    "Dew point temperature";

equation 
 p_w = Buildings.Utilities.Psychrometrics.BaseClasses.dewPointTemperature(T=T);
end VaporPressure_TDP;

Buildings.Utilities.Psychrometrics.VaporPressure_X Buildings.Utilities.Psychrometrics.VaporPressure_X

Water vapor pressure for given humidity ratio

Buildings.Utilities.Psychrometrics.VaporPressure_X

Information


Block to compute the water vapor partial pressure for a given humidity ratio.

If use_p_in is false (default option), the p parameter is used as atmospheric pressure, and the p_in input connector is disabled; if use_p_in is true, then the p parameter is ignored, and the value provided by the input connector is used instead.


Extends from Buildings.Utilities.Psychrometrics.BaseClasses.HumidityRatioVaporPressure (Humidity ratio for given water vapor pressure).

Parameters

TypeNameDefaultDescription
Booleanuse_p_intrueGet the pressure from the input connector
Pressurep101325Fixed value of pressure [Pa]
Initialization
MassFractionX_dryAir.start0.001Water mass fraction per mass of dry air [1]

Connectors

TypeNameDescription
input RealInputp_inAtmospheric Pressure [Pa]
input RealInputXWatSpecies concentration at dry bulb temperature
output RealOutputp_wWater vapor pressure [Pa]

Modelica definition

block VaporPressure_X "Water vapor pressure for given humidity ratio"
  extends Buildings.Utilities.Psychrometrics.BaseClasses.HumidityRatioVaporPressure;
  Modelica.Blocks.Interfaces.RealInput XWat(min=0, max=1, nominal=0.01) 
    "Species concentration at dry bulb temperature";
  Modelica.Blocks.Interfaces.RealOutput p_w(final quantity="Pressure",
                                           final unit="Pa",
                                           displayUnit="Pa",
                                           min = 0) "Water vapor pressure";

equation 
  X_dryAir * (1-XWat) = XWat;
 ( p_in_internal - p_w)   * X_dryAir = 0.62198 * p_w;
end VaporPressure_X;

Buildings.Utilities.Psychrometrics.WetBulbTemperature Buildings.Utilities.Psychrometrics.WetBulbTemperature

Model to compute the wet bulb temperature

Buildings.Utilities.Psychrometrics.WetBulbTemperature

Information


Given a moist are medium model, this component computes the states of the medium at its wet bulb temperature.

For a use of this model, see for example Buildings.Fluids.Sensors.WetBulbTemperature


Extends from Buildings.BaseClasses.BaseIcon (Base icon).

Connectors

TypeNameDescription
RealSignalTDryBulDry bulb temperature [K]
RealSignalpPressure [Pa]
RealSignalTWetBulWet bulb temperature [K]
RealSignalXi[Medium.nXi]Species concentration at dry bulb temperature
RealSignalphiRelative humidity (at dry-bulb state) in [0, 1]

Modelica definition

model WetBulbTemperature "Model to compute the wet bulb temperature"
  extends Buildings.BaseClasses.BaseIcon;
  replaceable package Medium = 
    Modelica.Media.Interfaces.PartialCondensingGases "Medium model";
  Medium.BaseProperties dryBul "Medium state at dry bulb temperature";
  Medium.BaseProperties wetBul(Xi(nominal=0.01*ones(Medium.nXi))) 
    "Medium state at wet bulb temperature";
  ObsoleteModelica3.Blocks.Interfaces.RealSignal TDryBul(
                                           start=303,
                                           final quantity="ThermodynamicTemperature",
                                           final unit="K",
                                           min = 0) "Dry bulb temperature";
  ObsoleteModelica3.Blocks.Interfaces.RealSignal p(
                                           final quantity="Pressure",
                                           final unit="Pa",
                                           min = 0) "Pressure";
  ObsoleteModelica3.Blocks.Interfaces.RealSignal TWetBul(
                                           start=293,
                                           final quantity="ThermodynamicTemperature",
                                           final unit="K",
                                           min = 0) "Wet bulb temperature";
  ObsoleteModelica3.Blocks.Interfaces.RealSignal Xi[
                                          Medium.nXi] 
    "Species concentration at dry bulb temperature";
  ObsoleteModelica3.Blocks.Interfaces.RealSignal phi 
    "Relative humidity (at dry-bulb state) in [0, 1]";
protected 
  parameter Integer iWat(min=1, fixed=false) 
    "Index for water vapor concentration";
initial algorithm 
  iWat :=1;
  for i in 1:Medium.nC loop
    if ( Modelica.Utilities.Strings.isEqual(Medium.extraPropertiesNames[i], "Water")) then
      iWat := i;
    end if;
  end for;
equation 
  dryBul.p = p;
  dryBul.T = TDryBul;
  dryBul.Xi = Xi;
  wetBul.phi = 1;
  wetBul.p = dryBul.p;
  wetBul.h = dryBul.h + (wetBul.X[iWat] - dryBul.X[iWat])
         * Medium.enthalpyOfLiquid(dryBul.T);
  TWetBul = wetBul.T;
  phi     = dryBul.phi;
end WetBulbTemperature;

HTML-documentation generated by Dymola Fri May 15 10:15:42 2009.