Buildings.Controls.OBC.CDL.Psychrometrics.Validation

Collection of models that validate the psychrometrics blocks of the CDL

Information

This package contains models that validate the blocks in Buildings.Controls.OBC.CDL.Psychrometrics.

The examples plot various outputs, which have been verified against analytical solutions. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.

Package Content

Name Description
Buildings.Controls.OBC.CDL.Psychrometrics.Validation.TDewPoi_TDryBulPhi TDewPoi_TDryBulPhi Model to test the dew point temperature computation
Buildings.Controls.OBC.CDL.Psychrometrics.Validation.TWetBul_TDryBulPhi TWetBul_TDryBulPhi Model to test the wet bulb temperature computation
Buildings.Controls.OBC.CDL.Psychrometrics.Validation.h_TDryBulPhi h_TDryBulPhi Model to test the specific enthalpy computation

Buildings.Controls.OBC.CDL.Psychrometrics.Validation.TDewPoi_TDryBulPhi Buildings.Controls.OBC.CDL.Psychrometrics.Validation.TDewPoi_TDryBulPhi

Model to test the dew point temperature computation

Buildings.Controls.OBC.CDL.Psychrometrics.Validation.TDewPoi_TDryBulPhi

Information

This examples is a unit test for the dew point temperature computation Buildings.Controls.OBC.CDL.Psychrometrics.TDewPoi_TDryBulPhi.

Modelica definition

model TDewPoi_TDryBulPhi "Model to test the dew point temperature computation" Buildings.Controls.OBC.CDL.Psychrometrics.TDewPoi_TDryBulPhi dewBulPhi "Model for dew point temperature"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant p(k=101325) "Pressure"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp phi( duration=1, height=1, offset=0.001) "Relative humidity"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TDryBul(k=273.15 + 29.4) "Dry bulb temperature"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant p2(k=101325) "Pressure"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TDryBul2( duration=1, height=35, offset=273.15+2.0) "Dry bulb temperature"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant phi2(k=0.4) "Relative humidity"; // ============ Below blocks are from Buildings Library ============ 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.Controls.OBC.CDL.Psychrometrics.TDewPoi_TDryBulPhi dewBulPhi1 "Model for dew point temperature"; Buildings.Utilities.Psychrometrics.TDewPoi_pW TDewPoi1; Buildings.Utilities.Psychrometrics.pW_X humRat1(use_p_in=false); Buildings.Utilities.Psychrometrics.X_pTphi X_pTphi1; 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;

Buildings.Controls.OBC.CDL.Psychrometrics.Validation.TWetBul_TDryBulPhi Buildings.Controls.OBC.CDL.Psychrometrics.Validation.TWetBul_TDryBulPhi

Model to test the wet bulb temperature computation

Buildings.Controls.OBC.CDL.Psychrometrics.Validation.TWetBul_TDryBulPhi

Information

This examples is a unit test for the dew point temperature computation Buildings.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 "Model to test the wet bulb temperature computation" package Medium = Buildings.Media.Air "Medium model"; Buildings.Controls.OBC.CDL.Psychrometrics.TWetBul_TDryBulPhi wetBulPhi "Model for wet bulb temperature"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant p(k=101325) "Pressure"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp phi( duration=1, height=0.95, offset=0.05) "Relative humidity"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TDryBul(k=273.15 + 29.4) "Dry bulb temperature"; // ============ Below blocks are from Buildings Library ============ Buildings.Utilities.Psychrometrics.TWetBul_TDryBulPhi wetBulPhi_BuiLib( redeclare package Medium = Medium, approximateWetBulb=true) "Model for wet bulb temperature"; Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi wetBulXi( redeclare package Medium = Medium, approximateWetBulb=true) "Model for wet bulb temperature using Xi as an input, used to verify consistency with wetBulPhi"; Buildings.Utilities.Psychrometrics.X_pTphi x_pTphi "Computes mass fraction"; // =================================================================== 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;

Buildings.Controls.OBC.CDL.Psychrometrics.Validation.h_TDryBulPhi Buildings.Controls.OBC.CDL.Psychrometrics.Validation.h_TDryBulPhi

Model to test the specific enthalpy computation

Buildings.Controls.OBC.CDL.Psychrometrics.Validation.h_TDryBulPhi

Information

This examples is a unit test for the specific enthalpy computation Buildings.Controls.OBC.CDL.Psychrometrics.h_TDryBulPhi.

Modelica definition

model h_TDryBulPhi "Model to test the specific enthalpy computation" Buildings.Controls.OBC.CDL.Psychrometrics.h_TDryBulPhi hBulPhi "Model for specific enthalpy computation"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant p(k=101325) "Pressure"; Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp phi( duration=1, height=1, offset=0.001) "Relative humidity"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TDryBul(k=273.15 + 29.4) "Dry bulb temperature"; // ============ Below blocks are from Buildings Library ============ // =================================================================== equation connect(TDryBul.y, hBulPhi.TDryBul); connect(phi.y, hBulPhi.phi); connect(p.y, hBulPhi.p); end h_TDryBulPhi;