LBL logo

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

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.DewPointTemperatureDerivativeCheck DewPointTemperatureDerivativeCheck Model to test correct implementation of derivative
Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.DewPointTemperatureDerivativeCheck_amb DewPointTemperatureDerivativeCheck_amb Model to test correct implementation of derivative
Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.InverseDewPointTemperatureDerivativeCheck_amb InverseDewPointTemperatureDerivativeCheck_amb Model to test correct implementation of derivative
Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.SaturationPressureDerivativeCheck SaturationPressureDerivativeCheck Model to test correct implementation of derivative
Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.WaterVaporPressureDerivativeCheck WaterVaporPressureDerivativeCheck Model to test correct implementation of derivative

Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.DewPointTemperatureDerivativeCheck Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.DewPointTemperatureDerivativeCheck

Model to test correct implementation of derivative

Information

This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
RealuniCon1Constant to convert units [K/s]

Modelica definition

model DewPointTemperatureDerivativeCheck "Model to test correct implementation of derivative" extends Modelica.Icons.Example; Real x; Real y; parameter Real uniCon(unit="K/s") = 1 "Constant to convert units"; initial equation y=x; equation x=Buildings.Utilities.Psychrometrics.Functions.pW_TDewPoi( T=time*uniCon); der(y)=der(x); assert(abs(x-y) < 1E-2, "Model has an error"); end DewPointTemperatureDerivativeCheck;

Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.DewPointTemperatureDerivativeCheck_amb Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.DewPointTemperatureDerivativeCheck_amb

Model to test correct implementation of derivative

Information

This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
RealuniCon1Constant to convert units [K/s]

Modelica definition

model DewPointTemperatureDerivativeCheck_amb "Model to test correct implementation of derivative" extends Modelica.Icons.Example; Real x; Real y; parameter Real uniCon(unit="K/s") = 1 "Constant to convert units"; initial equation y = x; equation x = Buildings.Utilities.Psychrometrics.Functions.pW_TDewPoi_amb(T=time*uniCon); der(y) = der(x); assert(abs(x - y) < 1E-2, "Model has an error"); end DewPointTemperatureDerivativeCheck_amb;

Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.InverseDewPointTemperatureDerivativeCheck_amb Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.InverseDewPointTemperatureDerivativeCheck_amb

Model to test correct implementation of derivative

Information

This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
RealuniCon1Constant to convert units [Pa/s]

Modelica definition

model InverseDewPointTemperatureDerivativeCheck_amb "Model to test correct implementation of derivative" extends Modelica.Icons.Example; Real x; Real y; parameter Real uniCon(unit="Pa/s") = 1 "Constant to convert units"; initial equation y = x; equation x = Buildings.Utilities.Psychrometrics.Functions.TDewPoi_pW_amb(p_w=time*uniCon); der(y) = der(x); assert(abs(x - y) < 1E-2, "Model has an error"); end InverseDewPointTemperatureDerivativeCheck_amb;

Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.SaturationPressureDerivativeCheck Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.SaturationPressureDerivativeCheck

Model to test correct implementation of derivative

Information

This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureTMin190Temperature [K]
TemperatureTMax373.16Temperature [K]

Modelica definition

model SaturationPressureDerivativeCheck "Model to test correct implementation of derivative" extends Modelica.Icons.Example; parameter Modelica.SIunits.Temperature TMin = 190 "Temperature"; parameter Modelica.SIunits.Temperature TMax = 373.16 "Temperature"; Modelica.SIunits.Temperature T "Temperature"; Modelica.SIunits.AbsolutePressure pSat "Saturation pressure"; Modelica.SIunits.AbsolutePressure pSatDer "Saturation pressure"; constant Real conv(unit="1/s") = 1 "Conversion factor"; equation T = TMin + conv*time * (TMax-TMin); initial equation pSat=pSatDer; equation pSat=Buildings.Utilities.Psychrometrics.Functions.saturationPressure(T); der(pSat)=der(pSatDer); assert(abs(pSat-pSatDer) < 1E-2, "Model has an error"); end SaturationPressureDerivativeCheck;

Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.WaterVaporPressureDerivativeCheck Buildings.Utilities.Psychrometrics.Functions.BaseClasses.Examples.WaterVaporPressureDerivativeCheck

Model to test correct implementation of derivative

Information

This example checks whether the function derivative is implemented correctly. If the derivative implementation is not correct, the model will stop with an assert statement.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
RealuniCon0.99Constant to convert units [1/s]

Modelica definition

model WaterVaporPressureDerivativeCheck "Model to test correct implementation of derivative" extends Modelica.Icons.Example; Real x; Real y; parameter Real uniCon(unit="1/s") = 0.99 "Constant to convert units"; initial equation y=x; equation x=Buildings.Utilities.Psychrometrics.Functions.pW_X(X_w=time*uniCon,p=101525); der(y)=der(x); assert(abs(x-y) < 1E-2, "Model has an error"); end WaterVaporPressureDerivativeCheck;

Automatically generated Mon Jul 13 14:30:48 2015.