packagePartialMedium

Partial medium properties (base package of all media packages)

Extends from ThermalSeparation.Media.BaseMediumLiquid (base class for liquid medium package), Modelica.Icons.Package (Icon for standard packages).

Information

PartialMedium is a package and contains all declarations for a medium. This means that constants, models, and functions are defined that every medium is supposed to support (some of them are optional). A medium package inherits from PartialMedium and provides the equations for the medium. The details of this package are described in Modelica.Media.UsersGuide.

Parameters

TypeNameDefaultDescription
IntegernSubstance (from BaseMediumLiquid)2number of components
SI.Temperature[nSubstance]Tcrit (from BaseMediumLiquid)
SI.Pressure[nSubstance]pcrit (from BaseMediumLiquid)
SI.MolarVolume[nSubstance]Vcrit (from BaseMediumLiquid)
Real[nSubstance]omega (from BaseMediumLiquid)acentric factor
SI.ElectricDipoleMomentOfMolecule[nSubstance]mu (from BaseMediumLiquid)
SI.MolarMass[nSubstance]MMX (from BaseMediumLiquid)
Integer[nSubstance]eq_Tsonopoulos (from BaseMediumLiquid)no. of equation for equation a and b in Table 4-5 in Properties of Gases and Liquids, 5th ed.
Boolean[nSubstance]henry (from BaseMediumLiquid)true if liquid fugacity of substance is to be calculated with Henry's law
Boolean[nSubstance]has_etaSubstance (from BaseMediumLiquid)true if substance i provides a value for the pure dynamic viscosity at system pressure and temperature
Integer[nSubstance]ic (from BaseMediumLiquid)zeros(nSubstance)ionic charge of the components, i.e. H+ = 1, OH- = -1, H2O=0
StringmediumName"unusablePartialMedium"Name of the medium
String[:]substanceNames{mediumName}Names of the mixture substances. Set substanceNames={mediumName} if only one substance.
String[:]extraPropertiesNamesfill("", 0)Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused
BooleansingleState= true, if u and d are not a function of pressure
BooleanreducedXtrue= true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance (see docu for details)
BooleanfixedXfalse= true if medium contains the equation X = reference_X
AbsolutePressurereference_p101325Reference pressure of Medium: default 1 atmosphere
Temperaturereference_T298.15Reference temperature of Medium: default 25 deg Celsius
MassFraction[nX]reference_Xif nX == 0 then fill(0, nX) else fill(1/nX, nX)Default mass fractions of medium
AbsolutePressurep_default101325Default value for pressure of medium (for initialization)
TemperatureT_defaultModelica.Units.Conversions.from_degC(20)Default value for temperature of medium (for initialization)
SpecificEnthalpyh_defaultThermalSeparation.Media.WaterBasedLiquid.BaseClasses.PartialMedium.specificEnthalpy_pTX(p_default, T_default, X_default)Default value for specific enthalpy of medium (for initialization)
MassFraction[nX]X_defaultreference_XDefault value for mass fractions of medium (for initialization)
IntegernSsize(substanceNames, 1)Number of substances
IntegernXif nS == 1 then 0 else nSNumber of mass fractions (= 0, if only one substance)
IntegernXiif fixedX then 0 else if reducedX then nS - 1 else nXNumber of structurally independent mass fractions (see docu for details)
IntegernCsize(extraPropertiesNames, 1)Number of extra (outside of standard mass-balance) transported properties
Booleanph_explicitfalsetrue if explicit in pressure and specific enthalpy
BooleandT_explicitfalsetrue if explicit in density and temperature
BooleanpT_explicittruetrue if explicit in pressure and temperature
FluidConstantsfluidConstantsconstant data for the fluid

Contents

NameDescription
FluidConstantscritical, triple, molecular and other standard data of fluid
SaturationPropertiesSaturation properties of two phase medium
BasePropertiesBase properties (p, d, T, h, u, R, MM and, if applicable, X) of a medium
setState_pTReturn thermodynamic state from p and T
setState_phReturn thermodynamic state from p and h
setState_psReturn thermodynamic state from p and s
setState_dTReturn thermodynamic state from d and T
density_phReturn density from p and h
temperature_phReturn temperature from p and h
pressure_dTReturn pressure from d and T
specificEnthalpy_dTReturn specific enthalpy from d and T
specificEnthalpy_psReturn specific enthalpy from p and s
temperature_psReturn temperature from p and s
density_psReturn density from p and s
specificEnthalpy_pTReturn specific enthalpy from p and T
density_pTReturn density from p and T
setState_pTXReturn thermodynamic state as function of p, T and composition X or Xi
setState_phXReturn thermodynamic state as function of p, h and composition X or Xi
setState_psXReturn thermodynamic state as function of p, s and composition X or Xi
setState_dTXReturn thermodynamic state as function of d, T and composition X or Xi
dynamicViscosityReturn dynamic viscosity
thermalConductivityReturn thermal conductivity
prandtlNumberReturn the Prandtl number
pressureReturn pressure
temperatureReturn temperature
densityReturn density
specificEnthalpyReturn specific enthalpy
specificInternalEnergyReturn specific internal energy
specificEntropyReturn specific entropy
specificGibbsEnergyReturn specific Gibbs energy
specificHelmholtzEnergyReturn specific Helmholtz energy
specificHeatCapacityCpReturn specific heat capacity at constant pressure
heatCapacity_cpalias for deprecated name
specificHeatCapacityCvReturn specific heat capacity at constant volume
heatCapacity_cvalias for deprecated name
isentropicExponentReturn isentropic exponent
isentropicEnthalpyReturn isentropic enthalpy
velocityOfSoundReturn velocity of sound
isobaricExpansionCoefficientReturn overall the isobaric expansion coefficient beta
betaalias for isobaricExpansionCoefficient for user convenience
isothermalCompressibilityReturn overall the isothermal compressibility factor
kappaalias of isothermalCompressibility for user convenience
density_derp_hReturn density derivative wrt pressure at const specific enthalpy
density_derh_pReturn density derivative wrt specific enthalpy at constant pressure
density_derp_TReturn density derivative wrt pressure at const temperature
density_derT_pReturn density derivative wrt temperature at constant pressure
density_derXReturn density derivative wrt mass fraction
molarMassReturn the molar mass of the medium
specificEnthalpy_pTXReturn specific enthalpy from p, T, and X or Xi
density_pTXReturn density from p, T, and X or Xi
temperature_phXReturn temperature from p, h, and X or Xi
density_phXReturn density from p, h, and X or Xi
temperature_psXReturn temperature from p,s, and X or Xi
density_psXReturn density from p, s, and X or Xi
specificEnthalpy_psXReturn specific enthalpy from p, s, and X or Xi
bubbleEnthalpyReturn bubble point specific enthalpy
dewEnthalpyReturn dew point specific enthalpy
bubbleEntropyReturn bubble point specific entropy
dewEntropyReturn dew point specific entropy
bubbleDensityReturn bubble point density
dewDensityReturn dew point density
saturationPressureReturn saturation pressure
saturationTemperatureReturn saturation temperature
saturationPressure_satReturn saturation temperature
saturationTemperature_satReturn saturation temperature
saturationTemperature_derpReturn derivative of saturation temperature w.r.t. pressure
saturationTemperature_derp_satReturn derivative of saturation temperature w.r.t. pressure
setState_pxReturn thermodynamic state from pressure and vapour quality
setState_TxReturn thermodynamic state from temperature and vapour quality
vapourQualityReturn vapour quality
setDewStateReturn the thermodynamic state on the dew line
setBubbleStateReturn the thermodynamic state on the bubble line
setSat_TReturn saturation property record from temperature
setSat_pReturn saturation property record from pressure
surfaceTensionReturn surface tension sigma in the two phase region
dBubbleDensity_dPressureReturn bubble point density derivative
dDewDensity_dPressureReturn dew point density derivative
dBubbleEnthalpy_dPressureReturn bubble point specific enthalpy derivative
dDewEnthalpy_dPressureReturn dew point specific enthalpy derivative
rho_boiling
ChoicesTypes, constants to define menu choices

Revisions