Buildings.Media.Refrigerants.Validation

Collection of models that validate the implementation of the refrigerants

Information

This package contains models that validate the implementation of refrigerant routines for the evaluation of thermodynamic properties.

These model outputs are stored as reference data to allow continuous validation whenever models in the library change.

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

Package Content

Name Description
Buildings.Media.Refrigerants.Validation.R410A_dSpecificVolumeVap_pT R410A_dSpecificVolumeVap_pT Validation of the derivatives of the specific volume with regards to p and T

Buildings.Media.Refrigerants.Validation.R410A_dSpecificVolumeVap_pT Buildings.Media.Refrigerants.Validation.R410A_dSpecificVolumeVap_pT

Validation of the derivatives of the specific volume with regards to p and T

Information

Validation case for evaluation of derivatives of the Martin-Hou equation of state with regards to pressure and temperature.

The analytical implementation of derivatives is compared to a numerical evaluation of the derivatives.

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

Parameters

TypeNameDefaultDescription
AbsolutePressurep400e3Pressure of refrigerant vapor [Pa]
TemperatureT273.15Temperature of refrigerant [K]
Realdp1.0Delta of pressure of refrigerant vapor [Pa]
RealdT0.01Delta of temperature of refrigerant [K]

Modelica definition

model R410A_dSpecificVolumeVap_pT "Validation of the derivatives of the specific volume with regards to p and T" extends Modelica.Icons.Example; parameter Modelica.SIunits.AbsolutePressure p=400e3 "Pressure of refrigerant vapor"; parameter Modelica.SIunits.Temperature T=273.15 "Temperature of refrigerant"; parameter Real dp(final unit="Pa") = 1.0 "Delta of pressure of refrigerant vapor"; parameter Real dT(final unit="K") = 0.01 "Delta of temperature of refrigerant"; Real dvdp(final unit="m3/(kg.Pa)") "Derivative of specific volume with regards to pressure"; Real dvdT(final unit="m3/(kg.K)") "Derivative of specific volume with regards to temperature"; Real dvdp_num(final unit="m3/(kg.Pa)") "Numerical derivative ofspecific volume with regards to pressure"; Real dvdT_num(final unit="m3/(kg.K)") "Numerical derivative of specific volume with regards to temperature"; protected Real dv_p(final unit="m3/(kg)") "Delta of specific volume of refrigerant with regards to pressure"; Real dv_T(final unit="m3/(kg)") "Delta of specific volume of refrigerant with regards to temperature"; Real dv_p_num(final unit="m3/(kg)") "Numerical delta of specific volume of refrigerant with regards to pressure"; Real dv_T_num(final unit="m3/(kg)") "Numerical delta of specific volume of refrigerant with regards to temperature"; constant Modelica.SIunits.Time oneSec=1.0 "Unit time variable for unit conversion of time derivatives"; equation // Analytical derivatives dv_p = Buildings.Media.Refrigerants.R410A.dSpecificVolumeVap_pT( p, T, dp/oneSec, 0.0)*oneSec; dv_T = Buildings.Media.Refrigerants.R410A.dSpecificVolumeVap_pT( p, T, 0.0, dT/oneSec)*oneSec; dvdp = dv_p/dp; dvdT = dv_T/dT; // Numerical derivatives dv_p_num = Buildings.Media.Refrigerants.R410A.specificVolumeVap_pT(p + 0.5*dp, T) - Buildings.Media.Refrigerants.R410A.specificVolumeVap_pT(p - 0.5*dp, T); dv_T_num = Buildings.Media.Refrigerants.R410A.specificVolumeVap_pT(p, T + 0.5* dT) - Buildings.Media.Refrigerants.R410A.specificVolumeVap_pT(p, T - 0.5*dT); dvdp_num = dv_p/dp; dvdT_num = dv_T/dT; end R410A_dSpecificVolumeVap_pT;