packageExternalMixMedium

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

Information


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
StringsubsNames"None"
IntegersubsNumModelica.Utilities.Strings.count(subsNames, ",") + 1
StringresDirModelica.Utilities.Files.loadResource("modelica://FreeFluids/Resources")resources directory
StringeosType"PR"alternatives are SRK and PCSAFT
StringmixRule"LCVM"alternatives are VdW, VdWnoInt, Reid, MKP, HV, MHV1, MHV2, UMR, PSRK, BL, IndAssoc
StringactivityModel"UNIFACdort"alternatives are: None, UNIFACstd, UNIFACpsrk, UNIQUAC, NRTL
StringviscMixRule"Teja"alternatives are: Grunberg, Andrade, McAllister3, McAllister4

Contents

NameDescription
ThermodynamicState
molarMassesreturn molar masses in kg/mol of the medium substances
pressureEOS_dTXReturn pressure given temperature and density, by EOS
density_pTXReturn density at give temperature and pressure, by EOS
thermo_dTXReturn thermodynamic properties at given temperature, density and composition, by EOS
activityCoefficients_TXReturn activity coefficients and excess Gibbs energy at given temperature and composition
fugacityCoefficients_pTXReturn fugacity coefficients, calculated from liquid and gas extremes, and Wilson k value, at given pressure, temperature and composition
bubble_TXReturn bubble pressure and gas composition at equilibrium
bubble_pXReturn bubble pressure and gas composition at equilibrium
dew_TXReturn dew pressure and liquid composition at equilibrium
dew_pXReturn dew temperature and liquid composition at equilibrium
twoPhasesFlash_pTXReturn liquid and gas composition at equilibrium, plus the gas fraction
twoPhasesFlash_phsXReturn liquid and gas composition at equilibrium, plus temperature and gas fraction
twoPhasesFlash_pThetaXReturn liquid and gas composition at equilibrium, plus temperature and gas fraction
liquidDynamicViscosityAuxReturn liquid dynamic viscosity from p,T,X
gasDynamicViscosityAuxReturn gas dynamic viscosity from a p,T,X
liquidThermalConductivityAuxReturn liquid thermal conductivity from a p,T,X
gasThermalConductivityAuxReturn liquid thermal conductivity from a p,T,X
surfaceTensionAuxReturn liquid thermal conductivity from a p,T,X
massToMoleFractionsReturn mole fractions from mass fractions X
moleToMassFractionsReturn mole fractions from mass fractions X
setLiquidState_pTXReturn ThermodynamicState record as function of p,T and composition X with only liquid
setGasState_pTXReturn ThermodynamicState record as function of p,T and composition X with only liquid
setBubbleState_TXReturn bubble state ThermodynamicState record as function of T and composition X
setBubbleState_pXReturn bubble state ThermodynamicState record as function of T and composition X
setDewState_TXReturn dew state ThermodynamicState record as function of T and composition X
setDewState_pXReturn dew state ThermodynamicState record as function of p and composition X
setState_pTXReturn ThermodynamicState record as function of p,T and composition X
setState_phXReturn ThermodynamicState record as function of p,h and composition X
setState_psXReturn ThermodynamicState record as function of p,s and composition X
setState_pThetaXReturn saturated ThermodynamicState record as function of p,gas fraction and composition X
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
specificHeatCapacityCvReturn specific heat capacity at constant pressure
velocityOfSoundReturn velocity of sound
isobaricExpansionCoefficientReturns the isobaric expansion coefficient beta
isothermalCompressibilityReturns overall the isothermal compressibility factor
specificVaporizationHeatReturn bubble state ThermodynamicState record as function of T and composition X
molarMassReturn the molar mass of the medium
dynamicViscosityReturn dynamic viscosity from a ThermodynamicState record
liquidDynamicViscosityReturn liquid dynamic viscosity from a ThermodynamicState record
gasDynamicViscosityReturn gas dynamic viscosity from a ThermodynamicState record
thermalConductivityReturn thermal conductivity from a ThermodynamicState record
liquidThermalConductivityReturn liquid thermal conductivity from a ThermodynamicState record
gasThermalConductivityReturn liquid thermal conductivity from a ThermodynamicState record
surfaceTensionReturn liquid surface tension from a ThermodynamicState record