packagePartialMediumReaction

Partial medium properties (base package of all media packages)

Extends from ThermalSeparation.Media.BaseMediumLiquidReaction (base class for liquid medium with reacting substances), 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
IntegernR (from BaseMediumLiquidReaction)1number of reactions
Real[nR,nSubstance]nu (from BaseMediumLiquidReaction)fill(1, nR, nSubstance)stocheometric coefficients for the reaction
Integer[nR]reacComp (from BaseMediumLiquidReaction)fill(1, nR)index of component in the component vector for which the reaction rate equation is written, to which the molar reaction enthalpy refers ...
IntegernS_reac (from BaseMediumLiquidReaction)1number of reaction components
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_defaultspecificEnthalpy_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
AbsolutePressureType for absolute pressure with medium specific attributes
DensityType for density with medium specific attributes
DynamicViscosityType for dynamic viscosity with medium specific attributes
EnthalpyFlowRateType for enthalpy flow rate with medium specific attributes
MassFlowRateType for mass flow rate with medium specific attributes
MassFractionType for mass fraction with medium specific attributes
MoleFractionType for mole fraction with medium specific attributes
MolarMassType for molar mass with medium specific attributes
MolarVolumeType for molar volume with medium specific attributes
IsentropicExponentType for isentropic exponent with medium specific attributes
SpecificEnergyType for specific energy with medium specific attributes
SpecificInternalEnergyType for specific internal energy with medium specific attributes
SpecificEnthalpyType for specific enthalpy with medium specific attributes
SpecificEntropyType for specific entropy with medium specific attributes
SpecificHeatCapacityType for specific heat capacity with medium specific attributes
SurfaceTensionType for surface tension with medium specific attributes
TemperatureType for temperature with medium specific attributes
ThermalConductivityType for thermal conductivity with medium specific attributes
PrandtlNumberType for Prandtl number with medium specific attributes
VelocityOfSoundType for velocity of sound with medium specific attributes
ExtraPropertyType for unspecified, mass-specific property transported by flow
CumulativeExtraPropertyType for conserved integral of unspecified, mass specific property
ExtraPropertyFlowRateType for flow rate of unspecified, mass-specific property
IsobaricExpansionCoefficientType for isobaric expansion coefficient with medium specific attributes
DipoleMomentType for dipole moment with medium specific attributes
DerDensityByPressureType for partial derivative of density with resect to pressure with medium specific attributes
DerDensityByEnthalpyType for partial derivative of density with resect to enthalpy with medium specific attributes
DerEnthalpyByPressureType for partial derivative of enthalpy with resect to pressure with medium specific attributes
DerDensityByTemperatureType for partial derivative of density with resect to temperature with medium specific attributes
ChoicesTypes, constants to define menu choices

Revisions