Constants

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Every medium model provides the following constants. For example, if a medium is declared as:

```   replaceable package Medium = Modelica.Media.Interfaces.PartialMedium;
```

then constants "Medium.mediumName", "Medium.nX", etc. are defined:

 Type Name Description String mediumName Unique name of the medium (is usually used to check whether the media in different components connected together are the same, by providing Medium.mediumName as quantity attribute of the mass flow rate in the connector) String substanceNames[nS] Names of the substances that make up the medium. If only one substance is present, substanceNames = {mediumName}. String extraPropertiesNames[nC] Names of the extra transported substances, outside of mass and energy balances. Boolean singleState = true, if u and d are not a function of pressure, and thus only a function of a single thermal variable (temperature or enthalpy) and of Xi for a multiple substance medium. Usually, this flag is true for incompressible media. It is used in a model to determine whether 1+nXi (singleState=true) or 2+nXi (singleState=false) initial conditions have to be provided for a volume element that contains mass and energy balance. AbsolutePressure reference_p Reference pressure for the medium MassFraction reference_X[nX] Reference composition for the medium AbsolutePressure p_default Default value for pressure of medium (for initialization) Temperature T_default Default value for temperature of medium (for initialization) SpecificEnthalpy h_default Default value for specific enthalpy of medium (for initialization) MassFraction X_default[nX] Default value for mass fractions of medium (for initialization) Integer nS number of substances contained in the medium. Integer nX Size of the full mass fraction vector X nX=nS. Integer nXi Number of independent mass fractions. If there is a single substance, then nXi = 0. Boolean reducedX = true, if the medium has a single substance, or if the medium model has multiple substances and contains the equation sum(X) = 1. In both cases, nXi = nS - 1 (unless fixedX = true). = false, if the medium has multiple substances and does not contain the equation sum(X)=1, i.e., nXi = nX = nS (unless fixedX = true). Boolean fixedX = false: the composition of the medium can vary, and is determined by nXi independent mass fractions (see reducedX above). = true: the composition of the medium is always reference_X, and nXi = 0. FluidConstants fluidConstants[nS] Critical, triple, molecular and other standard data that are provided for every substance of a medium.

The record FluidConstants that is defined in PartialMedium contains the following elements

 Type Name Description String iupacName complete IUPAC name String casRegistryNumber chemical abstracts sequencing number String chemicalFormula Chemical formula, (brutto, nomenclature according to Hill) String structureFormula Chemical structure formula MolarMass molarMass molar mass

This record is extended in the partial packages further down the hierarchy (such as PartialTwoPhaseMedium or PartialMixtureMedium) and may contain some or all of the following elements

 Temperature criticalTemperature critical temperature AbsolutePressure criticalPressure critical pressure MolarVolume criticalMolarVolume critical molar Volume Real acentricFactor Pitzer acentric factor Temperature triplePointTemperature triple point temperature AbsolutePressure triplePointPressure triple point pressure Temperature meltingPoint melting point at 101325 Pa Temperature normalBoilingPoint normal boiling point (at 101325 Pa) DipoleMoment dipoleMoment dipole moment of molecule in Debye (1 debye = 3.33564e10-30 C.m) Boolean hasIdealGasHeatCapacity true if ideal gas heat capacity is available Boolean hasCriticalData true if critical data are known Boolean hasDipoleMoment true if a dipole moment known Boolean hasFundamentalEquation true if a fundamental equation Boolean hasLiquidHeatCapacity true if liquid heat capacity is available Boolean hasSolidHeatCapacity true if solid heat capacity is available Boolean hasAccurateViscosityData true if accurate data for a viscosity function is available Boolean hasAccurateConductivityData true if accurate data for thermal conductivity is available Boolean hasVapourPressureCurve true if vapour pressure data, e.g., Antoine coefficients are known Boolean hasAcentricFactor true if Pitzer acentric factor is known SpecificEnthalpy HCRIT0 Critical specific enthalpy of the fundamental equation SpecificEntropy SCRIT0 Critical specific entropy of the fundamental equation SpecificEnthalpy deltah Difference between specific enthalpy model (h_m) and f.eq. (h_f) (h_m - h_f) SpecificEntropy deltas Difference between specific enthalpy model (s_m) and f.eq. (s_f) (s_m - s_f)