packageR134a_ph

Medium model for R134a and p,h as states

Extends from Modelica.Media.Interfaces.PartialTwoPhaseMedium (Base class for two phase medium of one substance).

Information

Calculation of fluid properties for Tetrafluoroethane (R134a) in the fluid region of 0.0039 bar (Triple pressure) to 700 bar and 169.85 Kelvin (Triple temperature) to 455 Kelvin.

Restriction

The functions provided by this package shall be used inside of the restricted limits according to the referenced literature.

  • 0.0039 bar ≤ p ≤ 700 bar
  • 169.85 Kelvin ≤ T ≤ 455 Kelvin
  • explicit for pressure and specific enthalpy

References

Baehr, H.D. and Tillner-Roth, R.:
Thermodynamic Properties of Environmentally Acceptable Refrigerants - Equations of State and Tables for Ammonia, R22, R134a, R152a, and R123. Springer-Verlag, Berlin (Germany), 1994.
Klein, McLinden and Laesecke:
An improved extended corresponding states method for estimation of viscosity of pure refrigerants and mixtures. Int. J. Refrig., Vol. 20, No.3, pp. 208-217, 1997.
McLinden, Klein. and Perkins:
An extended corresponding states model for the thermal conductivity of refrigerants and refrigerant mixtures. Int. J. Refrig., 23 (2000) 43-63.
Okada and Higashi:
Surface tension correlation of HFC-134a and HCFC-123. Proceedings of the Joint Meeting of IIR Commissions B1, B2, E1, and E2, Padua, Italy, pp. 541-548, 1994.

Parameters

TypeNameDefaultDescription
Modelica.Media.Interfaces.Choices.IndependentVariablesThermoStates (from PartialMedium)Enumeration type for independent variables
StringmediumName (from PartialMedium)"unusablePartialMedium"Name of the medium
String[:]substanceNames (from PartialMedium){mediumName}Names of the mixture substances. Set substanceNames={mediumName} if only one substance.
String[:]extraPropertiesNames (from PartialMedium)fill("", 0)Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused
BooleansingleState (from PartialMedium)= true, if u and d are not a function of pressure
BooleanreducedX (from PartialMedium)true= true, if medium contains the equation sum(X) = 1.0; set reducedX=true, if only one substance (see docu for details)
BooleanfixedX (from PartialMedium)false= true, if medium contains the equation X = reference_X
AbsolutePressurereference_p (from PartialMedium)101325Reference pressure of Medium: default 1 atmosphere
Temperaturereference_T (from PartialMedium)298.15Reference temperature of Medium: default 25 deg Celsius
MassFraction[nX]reference_X (from PartialMedium)fill(1/nX, nX)Default mass fractions of medium
AbsolutePressurep_default (from PartialMedium)101325Default value for pressure of medium (for initialization)
TemperatureT_default (from PartialMedium)Modelica.Units.Conversions.from_degC(20)Default value for temperature of medium (for initialization)
SpecificEnthalpyh_default (from PartialMedium)specificEnthalpy_pTX(p_default, T_default, X_default)Default value for specific enthalpy of medium (for initialization)
MassFraction[nX]X_default (from PartialMedium)reference_XDefault value for mass fractions of medium (for initialization)
ExtraProperty[nC]C_default (from PartialMedium)fill(0, nC)Default value for trace substances of medium (for initialization)
IntegernS (from PartialMedium)size(substanceNames, 1)Number of substances
IntegernX (from PartialMedium)nSNumber of mass fractions
IntegernXi (from PartialMedium)if fixedX then 0 else if reducedX then nS - 1 else nSNumber of structurally independent mass fractions (see docu for details)
IntegernC (from PartialMedium)size(extraPropertiesNames, 1)Number of extra (outside of standard mass-balance) transported properties
Real[nC]C_nominal (from PartialMedium)1.0e-6*ones(nC)Default for the nominal values for the extra properties
BooleansmoothModel (from PartialTwoPhaseMedium)false= true, if the (derived) model should not generate state events
BooleanonePhase (from PartialTwoPhaseMedium)false= true, if the (derived) model should never be called with two-phase inputs
FluidConstantsfluidConstants (from PartialTwoPhaseMedium)Constant data for the fluid
Booleanph_explicittrue
BooleandT_explicitfalse
Modelica.Media.Interfaces.Types.FluidLimitsr134aLimits
Modelica.Media.Interfaces.Types.TwoPhase.FluidConstantsr134aConstants

Contents

NameDescription
SaturationProperties
ThermodynamicStateThermodynamic state
BasePropertiesBase properties of R134a
setState_phXSet state for pressure and specific enthalpy (X not used since single substance)
setState_dTXSet state for density and temperature (X not used since single substance)
setState_psXSet state for pressure and specific entropy (X not used since single substance)
setState_pTXSet state for pressure and temperature (X not used since single substance)
setBubbleStateReturn the thermodynamic state on the bubble line
setDewStateReturn the thermodynamic state on the dew line
density_phDensity as function of pressure and specific enthalpy
densityDensity as function of pressure and specific enthalpy | use setState_phX function for input
temperature_phTemperature as function of pressure and specific enthalpy
temperatureTemperature as function of pressure and specific enthalpy | use setState_phX function for input
pressurePressure w.r.t. thermodynamic state
specificInternalEnergySpecific internal energy w.r.t. thermodynamic state
specificEnthalpySpecific enthalpy w.r.t. thermodynamic state | use setState_phX function for input
specificEntropySpecific entropy w.r.t. thermodynamic state | use setState_phX function for input if necessary
saturationTemperatureSaturation temperature in two-phase region
saturationTemperature_derpDerivative of saturation temperature in two-phase region
saturationTemperature_der_pTime derivative of saturation temperature in two-phase region
bubbleDensityDensity of liquid phase w.r.t. saturation pressure | use setSat_p function for input
dBubbleDensity_dPressureDerivative of liquid density in two-phase region w.r.t. pressure
dBubbleDensity_dPressure_der_satTime derivative of liquid density in two-phase region w.r.t. pressure
dewDensityDensity of vapor phase w.r.t. saturation pressure | use setSat_p function for input
dDewDensity_dPressureDerivative of vapor density in two-phase region w.r.t. pressure
dDewDensity_dPressure_der_satTime derivative of vapor density in two-phase region w.r.t. pressure
bubbleEnthalpySpecific enthalpy of liquid phase w.r.t. saturation pressure | use setSat_p function for input
dBubbleEnthalpy_dPressureDerivative of liquid specific enthalpy in two-phase region w.r.t. pressure
dBubbleEnthalpy_dPressure_der_satTime derivative of liquid specific enthalpy in two-phase region w.r.t. pressure
dewEnthalpySpecific enthalpy of vapor phase w.r.t. saturation pressure | use setSat_p function for input
dDewEnthalpy_dPressureDerivative of vapor specific enthalpy in two-phase region w.r.t. pressure
dDewEnthalpy_dPressure_der_satTime derivative of vapor specific enthalpy in two-phase region w.r.t. pressure
dewEntropySpecific entropy of vapor phase w.r.t. saturation pressure | use setSat_p function for input
dDewEntropy_dPressureDerivative of vapor specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input
dDewEntropy_dPressure_der_satTime derivative of vapor specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input
bubbleEntropySpecific entropy of liquid phase w.r.t. saturation pressure | use setSat_p function for input
dBubbleEntropy_dPressureDerivative of liquid specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input
dBubbleEntropy_dPressure_der_satTime derivative of liquid specific entropy in two-phase region w.r.t. pressure | use setState_phX function for input
saturationPressureSaturation pressure w.r.t. temperature
specificHeatCapacityCpSpecific heat capacity at constant pressure | turns infinite in two-phase region! | use setState_phX function for input
specificHeatCapacityCvSpecific heat capacity at constant volume | use setState_phX function for input
dynamicViscosityDynamic viscosity w.r.t. temperature and density | use setState_phX function for input
thermalConductivityThermal conductivity w.r.t. thermodynamic state | use setState_phX function for input
surfaceTensionSurface tension as a function of temperature (below critical point)
velocityOfSoundVelocity of sound w.r.t. thermodynamic state (only valid for one-phase)
isothermalCompressibilityIsothermal compressibility w.r.t. thermodynamic state (only valid for one-phase)
isobaricExpansionCoefficientIsobaric expansion coefficient w.r.t. thermodynamic state (only valid for one-phase)
isentropicExponentIsentropic exponent gamma w.r.t. thermodynamic state | not defined in two-phase region | use setState_phX function for input
specificGibbsEnergySpecific gibbs energy w.r.t. thermodynamic state
specificHelmholtzEnergyHelmholtz energy w.r.t. thermodynamic state
density_derh_pDensity derivative by specific enthalpy | use setState_phX function for input
density_derp_hDensity derivative by pressure | use setState_phX function for input
isentropicEnthalpyIsentropic enthalpy of downstream pressure and upstream thermodynamic state (specific entropy)
derivsOf_phDerivatives required for inversion of temperature and density functions
dt_phDensity and temperature w.r.t. pressure and specific enthalpy
dtofphOnePhaseDensity and temperature w.r.t. pressure and specific enthalpy in one-phase region
dtofpsOnePhaseInverse iteration in one phase region (d,T) = f(p,s)
f_R134aCalculation of helmholtz derivatives by density and temperature
fid_R134aHelmholtz coefficients of ideal part
fres_R134aCalculation of helmholtz derivatives
getPhase_phNumber of phases by pressure and specific enthalpy
getPhase_psNumber of phases by pressure and entropy
hofpsTwoPhaseIsentropic specific enthalpy in two phase region h(p,s)
R134a_liqofdTProperties on liquid boundary phase
R134a_vapofdTProperties on vapor boundary phase
rho_ph_derTime derivative function of density_ph
rho_props_phDensity as function of pressure and specific enthalpy
T_ph_derTime derivative function of T_ph
T_props_phTemperature as function of pressure and specific enthalpy
setSmoothStateSmooth transition function between state_a and state_b
dofpTCompute d for given p and T
hofpTCompute h for given p and T
phaseBoundaryAssertAssert function for checking threshold to phase boundary