.AixLib.Media.Refrigerants.Interfaces.PartialHybridTwoPhaseMediumFormula

Information

This package provides the implementation of a refrigerant modelling approach using a hybrid approach. The hybrid approach is developed by Sangi et al. and consists of both the Helmholtz equation of state and fitted formula for thermodynamic state properties at bubble or dew line (e.g. psat or hl,sat) and thermodynamic state properties depending on two independent state properties (e.g. T_ph or T_ps). In the following, the basic formulas of the hybrid approach are given.

The Helmholtz equation of state

The Helmholtz equation of state (EoS) allows the accurate description of fluids' thermodynamic behaviour and uses the Helmholtz energy as fundamental thermodynamic relation with temperature and density as independent variables. Furthermore, the EoS allows determining all thermodynamic state properties from its partial derivatives and its general formula is given below:

Calculation procedure of dimensionless Helmholtz energy

As it can be seen, the general formula of the EoS can be divided in two part: The ideal gas part (left summand) and the residual part (right summand). Both parts' formulas are given below:

Calculation procedure of dimensionless ideal gas Helmholtz energy

Calculation procedure of dimensionless residual Helmholtz energy

Both, the ideal gas part and the residual part can be divided in three subparts (i.e. the summations) that contain different coefficients (e.g. nL, li, pi or ei). These coefficients are fitting coefficients and must be obtained during a fitting procedure. While the fitting procedure, the general formula of the EoS is fitted to external data (e.g. obtained from measurements or external media libraries) and the fitting coefficients are determined. Finally, the formulas obtained during the fitting procedure are implemented in an explicit form.

For further information of the EoS and its partial derivatives, please read the paper " HelmholtzMedia - A fluid properties library" by Thorade and Saadat as well as the paper " Partial derivatives of thermodynamic state properties for dynamic simulation" by Thorade and Saadat.

Fitted formulas

Fitted formulas allow to reduce the overall computing time of the refrigerant model. Therefore, both thermodynamic state properties at bubble and dew line and thermodynamic state properties depending on two independent state properties are expresses as fitted formulas. The fitted formulas' approaches implemented in this package are developed by Sangi et al. within their "Fast_Propane" model and given below:

"Formulas for calculating saturation properties" cellspacing="0" cellpadding="2" border="1" width="80%" style= "border-collapse:collapse;">

Saturation pressure

Formula to calculate saturation pressure

Saturation temperature

Formula to calculate saturation temperature

Bubble density

Formula to calculate bubble density

Dew density

Formula to calculate dew density

Bubble Enthalpy

Formula to calculate bubble enthalpy

Dew Enthalpy

Formula to calculate dew enthalpy

Bubble Entropy

Formula to calculate bubble entropy

Dew Entropy

Formula to calculate dew entropy

"Formulas for calculating thermodynamic properties at superheated and supercooled regime" cellspacing="0" cellpadding="3" border="1" width="80%" style= "border-collapse:collapse;">

Temperature_ph

First Input

First input required to calculate temperature by pressure and specific enthalpy

Second Input

Second input required to calculate temperature by pressure and specific enthalpy

Temperature_ps

First Input

First input required to calculate temperature by pressure and specific entropy

Second Input

Second input required to calculate temperature by pressure and specific entropy

Density_pT

First Input

First input required to calculate density by pressure and temperature

Second Input

Second input required to calculate density by pressure and temperature

Functional approach

Calculation procedure for supercooled and superheated region

As it can be seen, the fitted formulas consist basically of the coefficients ei, ci as well as of the parameters Meani and Stdi. These coefficients are the fitting coefficients and must be obtained during a fitting procedure. While the fitting procedure, the formulas presented above are fitted to external data (e.g. obtained from measurements or external media libraries) and the fitting coefficients are determined. Finally, the formulas obtained during the fitting procedure are implemented in an explicit form.

For further information of the hybrid approach, please read the paper "A Medium Model for the Refrigerant Propane for Fast and Accurate Dynamic Simulations" by Sangi et al..

Smooth transition

To ensure a smooth transition between different regions (e.g. from supercooled region to two-phase region) and, therefore, to avoid discontinuities as far as possible, Sangi et al. implemented functions for a smooth transition between the regions. An example (i.e. specificEnthalpy_ps) of these functions is given below:

"Calculation procedures to avoid numerical instability at phase change" cellspacing="0" cellpadding="2" border="1" width="80%" style= "border-collapse:collapse;">

From supercooled region to bubble line and vice versa

Calculation procedure for change from supercooled to two-phase

From dew line to superheated region and vice versa

Calculation procedure for change from superheated to two-phase

From bubble or dew line to two-phase region and vice versa

Calculation procedure for change from saturation to two-phase

Assumptions and limitations

Two limitations are known for this package:

  1. The modelling approach implemented in this package is a hybrid approach and, therefore, is based on the Helmholtz equation of state as well as on fitted formula. Hence, the refrigerant model is just valid within the valid range of the fitted formula.
  2. It may be possible to have discontinuities when moving from one region to another (e.g. from supercooled region to two-phase region). However, functions are implemented to reach a smooth transition between the regions and to avoid these discontinuities as far as possible. (Sangi et al., 2014)

Typical use and important parameters

The refrigerant models provided in this package are typically used for heat pumps and refrigerating machines. However, it is just a partial package and, hence, it must be completed before usage. In order to allow an easy completion of the package, a template is provided in AixLib.Media.Refrigerants.Interfaces.TemplateHybridTwoPhaseMediumFormula.

References

Thorade, Matthis; Saadat, Ali (2012): HelmholtzMedia - A fluid properties library. In: Proceedings of the 9th International Modelica Conference; September 3-5; 2012; Munich; Germany. Linköping University Electronic Press, S. 63–70.

Thorade, Matthis; Saadat, Ali (2013): Partial derivatives of thermodynamic state properties for dynamic simulation. In: Environmental earth sciences 70 (8), S. 3497–3503.

Sangi, Roozbeh; Jahangiri, Pooyan; Klasing, Freerk; Streblow, Rita; Müller, Dirk (2014): A Medium Model for the Refrigerant Propane for Fast and Accurate Dynamic Simulations. In: The 10th International Modelica Conference. Lund, Sweden, March 10-12, 2014: Linköping University Electronic Press (Linköping Electronic Conference Proceedings), S. 1271–1275

Klasing,Freerk: A New Design for Direct Exchange Geothermal Heat Pumps - Modeling, Simulation and Exergy Analysis. Master thesis

Contents

NameDescription
BasePropertiesBase properties of refrigerant
ThermodynamicStateThermodynamic state
SmoothTransitionRecord that contains ranges to calculate a smooth transition between different regions
f_IdgDimensionless Helmholtz energy (Ideal gas contribution alpha_0)
f_ResDimensionless Helmholtz energy (Residual part alpha_r)
t_fIdg_tShort form for tau*(dalpha_0/dtau)_delta=const
tt_fIdg_ttShort form for tau*tau*(ddalpha_0/(dtau*dtau))_delta=const
t_fRes_tShort form for tau*(dalpha_r/dtau)_delta=const
tt_fRes_ttShort form for tau*tau*(ddalpha_r/(dtau*dtau))_delta=const
d_fRes_dShort form for delta*(dalpha_r/(ddelta))_tau=const
dd_fRes_ddShort form for delta*delta(ddalpha_r/(ddelta*delta))_tau=const
td_fRes_tdShort form for tau*delta*(ddalpha_r/(dtau*ddelta))
ttt_fIdg_tttShort form for tau*tau*tau*(dddalpha_0/(dtau*dtau*dtau))_delta=const
ttt_fRes_tttShort form for tau*tau*tau*(dddalpha_r/(dtau*dtau*dtau))_delta=const
ddd_fRes_dddShort form for delta*delta*delta* (dddalpha_r/(ddelta*ddelta*ddelta))_tau=const
tdd_fRes_tddShort form for tau*delta*delta*(dddalpha_r/(dtau*ddelta*ddelta))
ttd_fRes_ttdShort form for tau*tau*delta*(dddalpha_r/(dtau*dtau*ddelta))
setSmoothStateReturn thermodynamic state so that it smoothly approximates: if x > 0 then state_a else state_b
setDewStateReturn thermodynamic state of refrigerant on the dew line
setBubbleStateReturn thermodynamic state of refrigerant on the bubble line
setState_dTXReturn thermodynamic state of refrigerant as function of d and T
setState_pTXReturn thermodynamic state of refrigerant as function of p and T
setState_phXReturn thermodynamic state of refrigerant as function of p and h
setState_psXReturn thermodynamic state of refrigerant as function of p and s
pressurePressure of refrigerant
temperatureTemperature of refrigerant
densityDensity of refrigerant
specificEnthalpySpecific enthalpy of refrigerant
specificInternalEnergySpecific internal energy of refrigerant
specificGibbsEnergySpecific Gibbs energy of refrigerant
specificHelmholtzEnergySpecific Helmholtz energy of refrigerant
specificEntropySpecific entropy of refrigerant
specificHeatCapacityCpSpecific heat capacity at constant pressure of refrigerant
specificHeatCapacityCvSpecific heat capacity at constant volume of refrigerant
velocityOfSoundVelocity of sound of refrigerant
isobaricExpansionCoefficientIsobaric expansion coefficient beta of refrigerant
isentropicExponentIsentropic exponent defined as -v/p*(dp/dv)_s=const
isentropicEnthalpyIsentropic enthalpy calculated by downstream pressure and reference state
isothermalCompressibilityIsothermal compressibility factor of refrigerant
isothermalThrottlingCoefficientIsothermal throttling coefficient of refrigerant
jouleThomsonCoefficientJoule-Thomson coefficient of refrigerant
pressure_dTComputes pressure as a function of density and temperature
density_phComputes density as a function of pressure and enthalpy
density_psComputes density as a function of pressure and entropy
specificEnthalpy_pTComputes specific enthalpy as a function of pressure and temperature
specificEnthalpy_dTComputes specific enthalpy as a function of density and temperature
specificEnthalpy_psComputes specific enthalpy as a function of pressure and entropy
pressure_derd_TCalculates pressure derivative (dp/dd)_T=const
pressure_derT_dCalculates pressure derivative (dp/dT)_d=const
specificEnthalpy_derT_dCalculates enthalpy derivative (dh/dT)_d=const
specificEnthalpy_derd_TCalculates enthalpy derivative (dh/dd)_T=const
specificEntropy_derd_TCalculates derivative (ds/dd)_T=const.
specificEntropy_derT_dCalculates derivative (ds/dT)_d=const.
specificInternalEnergy_derT_dCalculated derivative (du/dT)_d=const.
specificInternalEnergy_derd_TCalculated derivative (du/dd)_T=const.
density_derp_TCalculates the derivative (dd/dp)_T=const.
density_derT_pCalculates the derivative (dd/dT)_p=const.
temperature_derp_hCalculates temperature derivative (dT/dp)_h=const.
temperature_derp_sCalculates temperature derivative (dT/dp)_s=const.
temperature_ders_pCalculates temperature derivative (dT/ds)@p=const.
temperature_derh_pCalculates temperature derivative (dT/dh)_p=const.
density_derp_hCalculates density derivative (dd/dp)_h=const.
density_derh_pCalculates density derivative (dd/dh)_p=const.
density_derp_sCalculates density derivative (dd/dp)_s=const.
density_ders_pCalculates density derivative (dd/ds)_p=const.
specificEnthalpy_derp_TCalculates derivative (dh/dp)_T=const.
specificEnthalpy_derT_pCalculates derivative (dh/dT)_p=const.
specificEnthalpy_ders_pCalculates derivative (dh/ds)_p=const.
specificEnthalpy_derp_sCalculates derivative (dh/dp)_s=const.
saturationPressure_derTCalculates derivative (dp/dT)_saturation
saturationTemperature_derpCalculates derivative (dT/dp)_saturation
dBubbleDensity_dPressureCalculates bubble point density derivative
dDewDensity_dPressureCalculates dew point density derivative
dBubbleEnthalpy_dPressureCalculates bubble point enthalpy derivative
dDewEnthalpy_dPressureCalculates dew point enthalpy derivative
dBubbleEntropy_dPressureCalculates bubble point entropy derivative
dDewEntropy_dPressureCalculates dew point entropy derivative
dBubbleDensity_dTemperatureCalculates bubble point density derivative
dDewDensity_dTemperatureCalculates dew point debsity derivative
dBubbleEnthalpy_dTemperatureCalculates bubble point enthalpy derivative
dDewEnthalpy_dTemperatureCalculates dew point enthalpy derivative
dBubbleInternalEnergy_dTemperatureCalculates bubble point internal energy derivative
dDewInternalEnergy_dTemperatureCalculates dew point internal energy derivative
f_Idg_derCalculates time derivative of f_Idg
f_Res_derCalculates time derivative of f_Res
t_fIdg_t_derCalculates time derivative of t_fIdg_t
tt_fIdg_tt_derCalculates time derivative of tt_fIdg_tt
t_fRes_t_derCalculates time derivative of t_fRes_t
tt_fRes_tt_derCalculates time derivative of tt_fRes_tt
d_fRes_d_derCalculates time derivative of d_fRes_d
dd_fRes_dd_derCalculates time derivative of dd_fRes_dd
td_fRes_td_derCalculates time derivative of td_fRes_td
setState_dTX_derCalculates time derivative of the thermodynamic state record calculated by d and T
setState_pTX_derCalculates time derivative of the thermodynamic state record calculated by p and T
setState_phX_derCalculates time derivative of the thermodynamic state record calculated by p and h
setState_psX_derCalculates time derivative of the thermodynamic state record calculated by p and s
pressure_derCalculates time derivative of pressure calculated by thermodynamic state record
temperature_derCalculates time derivative of temperature calculated by thermodynamic state record
density_derCalculates time derivative of density calculated by thermodynamic state record
specificEnthalpy_derCalculates time derivative of specific enthalpy calculated by thermodynamic state record
pressure_dT_derCalculates time derivative of pressure_dT
temperature_ph_derCalculates time derivative of temperature_ph
temperature_ps_derCalculates time derivative of temperature_ps
density_ph_derCalculates time derivative of density_ph
density_pT_derCalculates time derivative of density_pT
density_ps_derCalculates time derivative of density_ps
specificEnthalpy_pT_derCalculates time derivative of specificEnthalpy_pT
specificEnthalpy_dT_derCalculates time derivative of specificEnthalpy_dT
specificEnthalpy_ps_derCalculates time derivative of specificEnthalpy_ps

Revisions


Generated at 2024-05-17T18:15:58Z by OpenModelicaOpenModelica 1.22.4 using GenerateDoc.mos