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:
- The refrigerant package that shall be tested.
- The independent variables i.e. independents variables' alteration with time.
The following refrigerant's partial derivatives are calculated and checked:
- Thermodynamic properties calculated by partial derivatives of the Helmholtz equation of state (e.g. specific heat capacity at constant pressure).
- Partial derivatives that only depend on partial derivatives of the Helmholtz equation of state (i.e. derivatives wrt. density and temperature).
- Partial derivatives that do not directly depend on partial derivatives of the Helmholtz equation of state (i.e. derivatives not wrt. density and temperature).
- 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
| Type | Name | Default | Description |
|---|---|---|---|
| MediumInt.AbsolutePressure | p0 | 20e5 | Fixed pressure for calculations at initialization |
| MediumInt.Density | d0 | 75 | Fixed density for calculations at initialization |
| Real | convT | 125 | Conversion factor to satisfy derivative check |
| Real | convH | 300e3 | Conversion factor to satisfy derivative check |
| Real | convS | 750 | Conversion factor to satisfy derivative check |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| MediumInt.AbsolutePressure | p | p0 + 10e5*time^3 | Pressure used for calculations |
| MediumInt.Temperature | T | 273.15 + convT*time^3 | Temperature used for calculations |
| MediumInt.Density | d | d0 + 125*time^3 | Density used for calculations |
| MediumInt.SpecificEnthalpy | h | 200e3 + convH*time^3 | Specific enthalpy used for calculations |
| MediumInt.SpecificEntropy | s | 1e3 + convS*time^3 | Specific entropy used for calculations |
| Modelica.Blocks.Sources.CombiTimeTable | extProp | Table that contains the results of the external media library | |
| States | states | Record that contains thermodynamic states calculated by independent state variables | |
| DerProp | derProp | Record that contains thermodynamic properties derived by partial derivatives | |
| ExplDer | explDer | Record that contains partial derivatives wrt. density and temperature | |
| FurDer | furDer | Record that contains further derivatives not wrt. density and temperature | |
| SatDer | satDer | Record that contains derivates at bubble and dew state |
Contents
| Name | Description |
|---|---|
| MediumInt | Internal medium model |
| TheStaExt | Record that contains thermodynamic state properties for external medium |
| States | Record that contains calculated states for further calculations |
| DerProp | Record that containts properties derived by partial derivatives of the EoS |
| ExplDer | Record that contains derivatives depending on derivatives of the EoS only |
| FurDer | Record that contains further derivatives |
| SatDer | Record that contains derivatives at bubble and dew state |
Revisions
- August 13, 2017, by Mirko Engelpracht, Christian Vering:
First implementation (see issue 408).