packageN2_O2_CO2_SO2_HCl_HF_H2O_H_HSO3

water: N2, O2, CO2, SO2, HCl, HF, H2O, H+, HSO3-

Extends from ThermalSeparation.Media.WaterBasedLiquid.BaseClasses.PartialWaterBasedReaction.

Information

This model calculates medium properties for water in the liquid, gas and two phase regions according to the IAPWS/IF97 standard, i.e., the accepted industrial standard and best compromise between accuracy and computation time. For more details see Modelica.Media.Water.IF97_Utilities. Three variable pairs can be the independent variables of the model:

  1. Pressure p and specific enthalpy h are the most natural choice for general applications. This is the recommended choice for most general purpose applications, in particular for power plants.
  2. Pressure p and temperature T are the most natural choice for applications where water is always in the same phase, both for liquid water and steam.
  3. Density d and temperature T are explicit variables of the Helmholtz function in the near-critical region and can be the best choice for applications with super-critical or near-critial states.
The following quantities are always computed:

Variable Unit Description
T K temperature
u J/kg specific internal energy
d kg/m^3 density
p Pa pressure
h J/kg specific enthalpy

In some cases additional medium properties are needed. A component that needs these optional properties has to call one of the functions listed in Modelica.Media.UsersGuide.MediumUsage.OptionalProperties and in Modelica.Media.UsersGuide.MediumUsage.TwoPhase.

Many further properties can be computed. Using the well-known Bridgman's Tables, all first partial derivatives of the standard thermodynamic variables can be computed easily.

Parameters

TypeNameDefaultDescription
Real[nSubstance]lambda0{0, 0, 0, 0, 0, 0, 0, 349.8, 40}limiting equivalent conductivities of ions with respect to the solvent in (cm^2 / ohm), zeros is taken for molecules
Real[nSubstance]phi{1, 1, 1, 1, 1, 1, 2.26, 1, 1}association factor of each substance, if this substance is to be the solvent - used for calculation of diffusion coeffcients
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 (from PartialMediumReaction)"unusablePartialMedium"Name of the medium
String[:]substanceNames (from PartialMediumReaction){mediumName}Names of the mixture substances. Set substanceNames={mediumName} if only one substance.
String[:]extraPropertiesNames (from PartialMediumReaction)fill("", 0)Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused
BooleansingleState (from PartialMediumReaction)= true, if u and d are not a function of pressure
BooleanreducedX (from PartialMediumReaction)true= true if medium contains the equation sum(X) = 1.0; set reducedX=true if only one substance (see docu for details)
BooleanfixedX (from PartialMediumReaction)false= true if medium contains the equation X = reference_X
AbsolutePressurereference_p (from PartialMediumReaction)101325Reference pressure of Medium: default 1 atmosphere
Temperaturereference_T (from PartialMediumReaction)298.15Reference temperature of Medium: default 25 deg Celsius
MassFraction[nX]reference_X (from PartialMediumReaction)if nX == 0 then fill(0, nX) else fill(1/nX, nX)Default mass fractions of medium
AbsolutePressurep_default (from PartialMediumReaction)101325Default value for pressure of medium (for initialization)
TemperatureT_default (from PartialMediumReaction)Modelica.Units.Conversions.from_degC(20)Default value for temperature of medium (for initialization)
SpecificEnthalpyh_default (from PartialMediumReaction)specificEnthalpy_pTX(p_default, T_default, X_default)Default value for specific enthalpy of medium (for initialization)
MassFraction[nX]X_default (from PartialMediumReaction)reference_XDefault value for mass fractions of medium (for initialization)
IntegernS (from PartialMediumReaction)size(substanceNames, 1)Number of substances
IntegernX (from PartialMediumReaction)if nS == 1 then 0 else nSNumber of mass fractions (= 0, if only one substance)
IntegernXi (from PartialMediumReaction)if fixedX then 0 else if reducedX then nS - 1 else nXNumber of structurally independent mass fractions (see docu for details)
IntegernC (from PartialMediumReaction)size(extraPropertiesNames, 1)Number of extra (outside of standard mass-balance) transported properties
Booleanph_explicit (from PartialMediumReaction)falsetrue if explicit in pressure and specific enthalpy
BooleandT_explicit (from PartialMediumReaction)falsetrue if explicit in density and temperature
BooleanpT_explicit (from PartialMediumReaction)truetrue if explicit in pressure and temperature
FluidConstantsfluidConstants (from PartialMediumReaction)constant data for the fluid
BooleansmoothModel (from PartialWaterBasedReaction)true if the (derived) model should not generate state events
BooleanonePhase (from PartialWaterBasedReaction)true if the (derived) model should never be called with two-phase inputs
IntegernnSubstancenumber of components
SI.MolarMass[n]MM_substancesMMX

Contents

NameDescription
BasePropertiesBase properties of water
CalcSpecificEnthalpy
EvaporationEnthalpy
HenryCoefficient
DiffusionCoefficient
EquilibriumConstant
ReactionRates