modelRefrigerantProperties

Model that tests the implementation of the refrigerant properties

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

Information

This example models checks the implementation of the refrigerant's thermophysical properties depending on the independent variables pressure and temperature. Therefore, the user has first to introduce some information about the refrigerant and afterwards the thermophysical properties are calculated. The following refrigerant's information is required:

  1. The refrigerant package that shall be tested.
  2. The way of calculating the thermophysical properties. Therefore, the user can choose between either (wayOfCalc = true) a slowly raising pressure from pmin to pmax and a fast pulsating temperature from Tmin to Tmax or (wayOfCalc = false) a fast pulsating pressure from pmin to pmax and a slowly raising temperature from Tmin to Tmax. In both modes, the overall simulating time is set to 6400 s and, hence, the slowly raising property will reach its maximum value after 6400 s. The fast pulsating property will reach its maximum value after 80 s.
  3. The refrigerant's fluid limits that are determined by the fitting procedure.

The following refrigerant's thermophysical properties are calculated and checked:

  1. Calculation of basic properties like the specific enthalpy or density using pressure and temperature.
  2. Calculation of saturation properties using both pressure and temperature. The results of both calculations are compared to each other.
  3. Calculation of the "setState"-functions and comparing the results to the "setState_pT"-results.
  4. Calculation of furhter properties like the thermal conductivity or isothermal compressbility.

Additionally, the "setState"-functions' absolute and relative errors compared to the "setState_pT"-results are calculated.

Parameters

TypeNameDefaultDescription
General
BooleanwayOfCalctruetrue = Slowly raise pressure and change temperature | false = Slowly raise temperature and change pressure
Fluid limits
Modelica.Units.SI.SpecificEnthalpyh_min145e3Fluid limit: Minimum specific enthalpy
Modelica.Units.SI.SpecificEnthalpyh_max480e3Fluid limit: Maximum specific enthalpy
Modelica.Units.SI.Densityd_min2Fluid limit: Minimum density
Modelica.Units.SI.Densityd_max1325Fluid limit: Maximum density
Modelica.Units.SI.AbsolutePressurep_min1e5Fluid limit: Minimum absolute pressure
Modelica.Units.SI.AbsolutePressurep_max39e5Fluid limit: Maximum absolute pressure
Modelica.Units.SI.TemperatureT_min233.15Fluid limit: Minimum temperature
Modelica.Units.SI.TemperatureT_max455.15Fluid limit: Maximum temperature

Components

TypeNameDefaultDescription
RealconvTConversion factor in K/s for temperature to satisfy unit check
RealconvPConversion factor in Pa/s for pressure to satisfy unit check
Modelica.Units.SI.TemperatureTActual temperature
Modelica.Units.SI.AbsolutePressurepActual absolute presure
Modelica.Units.SI.DensitydActual density
Modelica.Units.SI.SpecificEnthalpyhActual specific enthalpy
Modelica.Units.SI.SpecificEntropysActual specific entropy
Modelica.Units.SI.SpecificInternalEnergyuActual specific internal energy
Modelica.Units.SI.SpecificEnergygActual specific Gibbs energy
Modelica.Units.SI.SpecificEnergyfActual specific Helmholtz energy
Medium.SaturationPropertiessatTActual saturation properties calculated with temperature
Medium.SaturationPropertiessatPActual saturation properties calculated with pressure
Medium.ThermodynamicStatebubbleStateActual bubble state
Medium.ThermodynamicStatedewStateActual dew state
Medium.ThermodynamicStatestate_pTActual state calculated by p and T
Medium.ThermodynamicStatestate_dTActual state calculated by d and T
Medium.ThermodynamicStatestate_phActual state calculated by p and h
Medium.ThermodynamicStatestate_psActual state calculated by p and s
ThermodynamicPropertiesthermodynamicPropertiesRecord that contains further thermodynamic properties calculated during the test
StateErrorsstateErrosRecord that contains errors occuring using the different setState functions

Contents

NameDescription
MediumInternal medium model
ThermodynamicPropertiesRecords that contains furhter thermodynamic properties
StateErrorsRecord that contains errors occuring using the different setState functions

Revisions

  • June 13, 2017, by Mirko Engelpracht, Christian Vering:
    First implementation (see issue 408).