Collection of validation models
Information
This package contains validation models for the classes in
Buildings.Obsolete.Controls.OBC.CDL.Psychrometrics.
Note that most validation models contain simple input data
which may not be realistic, but for which the correct
output can be obtained through an analytic solution.
The examples plot various outputs, which have been verified against these
solutions. These model outputs are stored as reference data and
used for continuous validation whenever models in the library change.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
TDewPoi_TDryBulPhi
|
Model to test the dew point temperature computation |
TWetBul_TDryBulPhi
|
Model to test the wet bulb temperature computation |
h_TDryBulPhi
|
Model to test the specific enthalpy computation |
Model to test the dew point temperature computation
Information
This examples is a unit test for the dew point temperature computation
Buildings.Obsolete.Controls.OBC.CDL.Psychrometrics.TDewPoi_TDryBulPhi.
Modelica definition
model TDewPoi_TDryBulPhi
Buildings.Obsolete.Controls.OBC.CDL.Psychrometrics.TDewPoi_TDryBulPhi dewBulPhi
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant p(k=101325) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp phi(
duration=1,
height=1,
offset=0.001) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TDryBul(k=273.15 + 29.4)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant p2(k=101325) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TDryBul2(
duration=1,
height=35,
offset=273.15+2.0) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant phi2(k=0.4)
;
Buildings.Utilities.Psychrometrics.TDewPoi_pW TDewPoi ;
Buildings.Utilities.Psychrometrics.X_pTphi X_pTphi ;
Buildings.Utilities.Psychrometrics.pW_X humRat(use_p_in=false)
;
Buildings.Controls.OBC.CDL.Continuous.Add add(k2=-1)
;
Buildings.Obsolete.Controls.OBC.CDL.Psychrometrics.TDewPoi_TDryBulPhi dewBulPhi1
;
Buildings.Utilities.Psychrometrics.TDewPoi_pW TDewPoi1
;
Buildings.Utilities.Psychrometrics.pW_X humRat1(use_p_in=false)
;
Buildings.Utilities.Psychrometrics.X_pTphi X_pTphi1 ;
Buildings.Controls.OBC.CDL.Continuous.Add add1(k2=-1)
;
equation
connect(humRat.p_w, TDewPoi.p_w);
connect(X_pTphi.X[1], humRat.X_w);
connect(TDryBul.y, dewBulPhi.TDryBul);
connect(phi.y, dewBulPhi.phi);
connect(p.y, dewBulPhi.p);
connect(p.y, X_pTphi.p_in);
connect(TDryBul.y, X_pTphi.T);
connect(phi.y, X_pTphi.phi);
connect(TDewPoi.T, add.u2);
connect(dewBulPhi.TDewPoi, add.u1);
connect(TDryBul2.y, dewBulPhi1.TDryBul);
connect(TDryBul2.y, X_pTphi1.T);
connect(p2.y, X_pTphi1.p_in);
connect(p2.y, dewBulPhi1.p);
connect(phi2.y, dewBulPhi1.phi);
connect(phi2.y, X_pTphi1.phi);
connect(X_pTphi1.X[1], humRat1.X_w);
connect(humRat1.p_w, TDewPoi1.p_w);
connect(dewBulPhi1.TDewPoi, add1.u1);
connect(TDewPoi1.T, add1.u2);
end TDewPoi_TDryBulPhi;
Model to test the wet bulb temperature computation
Information
This examples is a unit test for the dew point temperature computation
Buildings.Obsolete.Controls.OBC.CDL.Psychrometrics.TWetBul_TDryBulPhi.
The model contains an assert that validates the model based on a single operating point from Example 17.1 in
Ananthanarayanan (2013).
References
Ananthanarayanan, P. N. Basic refrigeration and air conditioning. Tata McGraw-Hill Education, 2013.
Modelica definition
model TWetBul_TDryBulPhi
package Medium =
Buildings.Media.Air ;
Buildings.Obsolete.Controls.OBC.CDL.Psychrometrics.TWetBul_TDryBulPhi wetBulPhi
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant p(k=101325) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp phi(
duration=1,
height=0.95,
offset=0.05) ;
Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TDryBul(k=273.15 + 29.4)
;
Buildings.Utilities.Psychrometrics.TWetBul_TDryBulPhi wetBulPhi_BuiLib(
redeclare package Medium = Medium, approximateWetBulb=true)
;
Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi wetBulXi(
redeclare package Medium = Medium, approximateWetBulb=true)
;
Buildings.Utilities.Psychrometrics.X_pTphi x_pTphi ;
Buildings.Controls.OBC.CDL.Continuous.Add add(k2=-1)
;
Buildings.Controls.OBC.CDL.Continuous.Add add1(k2=-1)
;
equation
connect(x_pTphi.X[1], wetBulXi.Xi[1]);
connect(TDryBul.y, wetBulPhi.TDryBul);
connect(TDryBul.y, wetBulPhi_BuiLib.TDryBul);
connect(TDryBul.y, wetBulXi.TDryBul);
connect(p.y, x_pTphi.p_in);
connect(phi.y, x_pTphi.phi);
connect(p.y, wetBulXi.p);
connect(phi.y, wetBulPhi_BuiLib.phi);
connect(phi.y, wetBulPhi.phi);
connect(p.y, wetBulPhi.p);
connect(p.y, wetBulPhi_BuiLib.p);
connect(TDryBul.y, x_pTphi.T);
connect(wetBulPhi.TWetBul, add.u1);
connect(wetBulPhi_BuiLib.TWetBul, add.u2);
connect(add1.u1, add.u1);
connect(wetBulXi.TWetBul, add1.u2);
end TWetBul_TDryBulPhi;
Model to test the specific enthalpy computation
Information
This examples is a unit test for the specific enthalpy computation
Buildings.Obsolete.Controls.OBC.CDL.Psychrometrics.h_TDryBulPhi.
Modelica definition