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:
- The refrigerant package that shall be tested.
- 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.
- The refrigerant's fluid limits that are determined by the fitting procedure.
The following refrigerant's thermophysical properties are calculated and checked:
- Calculation of basic properties like the specific enthalpy or density using pressure and temperature.
- Calculation of saturation properties using both pressure and temperature. The results of both calculations are compared to each other.
- Calculation of the "setState"-functions and comparing the results to the "setState_pT"-results.
- 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
| Type | Name | Default | Description |
|---|---|---|---|
| General | |||
| Boolean | wayOfCalc | true | true = Slowly raise pressure and change temperature | false = Slowly raise temperature and change pressure |
| Fluid limits | |||
| Modelica.Units.SI.SpecificEnthalpy | h_min | 145e3 | Fluid limit: Minimum specific enthalpy |
| Modelica.Units.SI.SpecificEnthalpy | h_max | 480e3 | Fluid limit: Maximum specific enthalpy |
| Modelica.Units.SI.Density | d_min | 2 | Fluid limit: Minimum density |
| Modelica.Units.SI.Density | d_max | 1325 | Fluid limit: Maximum density |
| Modelica.Units.SI.AbsolutePressure | p_min | 1e5 | Fluid limit: Minimum absolute pressure |
| Modelica.Units.SI.AbsolutePressure | p_max | 39e5 | Fluid limit: Maximum absolute pressure |
| Modelica.Units.SI.Temperature | T_min | 233.15 | Fluid limit: Minimum temperature |
| Modelica.Units.SI.Temperature | T_max | 455.15 | Fluid limit: Maximum temperature |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | convT | Conversion factor in K/s for temperature to satisfy unit check | |
| Real | convP | Conversion factor in Pa/s for pressure to satisfy unit check | |
| Modelica.Units.SI.Temperature | T | Actual temperature | |
| Modelica.Units.SI.AbsolutePressure | p | Actual absolute presure | |
| Modelica.Units.SI.Density | d | Actual density | |
| Modelica.Units.SI.SpecificEnthalpy | h | Actual specific enthalpy | |
| Modelica.Units.SI.SpecificEntropy | s | Actual specific entropy | |
| Modelica.Units.SI.SpecificInternalEnergy | u | Actual specific internal energy | |
| Modelica.Units.SI.SpecificEnergy | g | Actual specific Gibbs energy | |
| Modelica.Units.SI.SpecificEnergy | f | Actual specific Helmholtz energy | |
| Medium.SaturationProperties | satT | Actual saturation properties calculated with temperature | |
| Medium.SaturationProperties | satP | Actual saturation properties calculated with pressure | |
| Medium.ThermodynamicState | bubbleState | Actual bubble state | |
| Medium.ThermodynamicState | dewState | Actual dew state | |
| Medium.ThermodynamicState | state_pT | Actual state calculated by p and T | |
| Medium.ThermodynamicState | state_dT | Actual state calculated by d and T | |
| Medium.ThermodynamicState | state_ph | Actual state calculated by p and h | |
| Medium.ThermodynamicState | state_ps | Actual state calculated by p and s | |
| ThermodynamicProperties | thermodynamicProperties | Record that contains further thermodynamic properties calculated during the test | |
| StateErrors | stateErros | Record that contains errors occuring using the different setState functions |
Contents
| Name | Description |
|---|---|
| Internal medium model | |
| ThermodynamicProperties | Records that contains furhter thermodynamic properties |
| Record that contains errors occuring using the different setState functions |
Revisions
- June 13, 2017, by Mirko Engelpracht, Christian Vering:
First implementation (see issue 408).