modelRefrigerantsDerivativesR134a

Model that checks the implementation of derivatives for R134a

Extends from Modelica.Icons.Example.

Information

This example model checks the implementation of the refrigerant's partial derivatives. Therefore, the user has first to introduce some information about the refrigerant and afterwards the partial derivatives are calculated. The following refrigerant's information is required:

  1. The refrigerant package that shall be tested.
  2. The independent variables i.e. independents variables' alteration with time.

The following refrigerant's partial derivatives are calculated and checked:

  1. Thermodynamic properties calculated by partial derivatives of the Helmholtz equation of state (e.g. specific heat capacity at constant pressure).
  2. Partial derivatives that only depend on partial derivatives of the Helmholtz equation of state (i.e. derivatives wrt. density and temperature).
  3. Partial derivatives that do not directly depend on partial derivatives of the Helmholtz equation of state (i.e. derivatives not wrt. density and temperature).
  4. Partial derivatives at bubble and dew line.

Furthermore, the derivatives are compared with the associated derivatives calculated by an external medium model (i.e. HelmholtzMedia) Therefore, the parameters are not allowed to change (except for the medium package).

Parameters

TypeNameDefaultDescription
MediumInt.AbsolutePressurep020e5Fixed pressure for calculations at initialization
MediumInt.Densityd075Fixed density for calculations at initialization
RealconvT125Conversion factor to satisfy derivative check
RealconvH300e3Conversion factor to satisfy derivative check
RealconvS750Conversion factor to satisfy derivative check

Components

TypeNameDefaultDescription
MediumInt.AbsolutePressurepp0 + 10e5*time^3Pressure used for calculations
MediumInt.TemperatureT273.15 + convT*time^3Temperature used for calculations
MediumInt.Densitydd0 + 125*time^3Density used for calculations
MediumInt.SpecificEnthalpyh200e3 + convH*time^3Specific enthalpy used for calculations
MediumInt.SpecificEntropys1e3 + convS*time^3Specific entropy used for calculations
Modelica.Blocks.Sources.CombiTimeTableextPropTable that contains the results of the external media library
StatesstatesRecord that contains thermodynamic states calculated by independent state variables
DerPropderPropRecord that contains thermodynamic properties derived by partial derivatives
ExplDerexplDerRecord that contains partial derivatives wrt. density and temperature
FurDerfurDerRecord that contains further derivatives not wrt. density and temperature
SatDersatDerRecord that contains derivates at bubble and dew state

Contents

NameDescription
MediumIntInternal medium model
TheStaExtRecord that contains thermodynamic state properties for external medium
StatesRecord that contains calculated states for further calculations
DerPropRecord that containts properties derived by partial derivatives of the EoS
ExplDerRecord that contains derivatives depending on derivatives of the EoS only
FurDerRecord that contains further derivatives
SatDerRecord that contains derivatives at bubble and dew state

Revisions

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