Reaktoro (Aqueous Electrolytes)¶
DWSIM Plus
Available with a DWSIM Plus (Patreon) subscription.
Aqueous electrolyte package that hands the phase and chemical equilibrium of each flash to Reaktoro (SUPCRT07 database), with the species of the flowsheet compounds in an aqueous and an ideal-gas phase.
DWSIM.Thermodynamics.ReaktoroPropertyPackage.ReaktoroPropertyPackage
Assembly DWSIM.Thermodynamics.ReaktoroPropertyPackage.dll · Object ← PropertyPackage ← ElectrolyteBasePropertyPackage ← ReaktoroPropertyPackage
Name in the flowsheet Reaktoro (Aqueous Electrolytes) · FluentAPI PropertyPackages.Plus.ReaktoroAqueous
Scope¶
The package hands the phase and chemical equilibrium of every flash to Reaktoro 2, called through its C
interface. Each flowsheet compound maps to a species of the SUPCRT07 database (supcrt07-organics): an
aqueous species, a gaseous species or both. Reaktoro then minimizes the Gibbs energy of an aqueous phase
and an ideal-gas phase built from those species, so the speciation follows from the standard-state data of
the database and needs no reactions in the flowsheet. Typical uses are gas solubility in water and brines
(CO2, H2S, NH3, O2, N2), acid-base speciation and the
pH of simple aqueous systems. The same library drives the
Gibbs Reactor (Reaktoro).
Compounds. Only compounds of the package's map can be used; any other stops the flash with a message.
| Kind | Compounds |
|---|---|
| Ions | Hydron, Hydroxide, Sodium (ion), Potassium Ion, Lithium (ion), Cesium (ion), Ammonium (ion), Chloride (ion), Bromine (ion), Iodine Ion, Nitrate (ion), Sulfate (ion), Hydrogen sulfate (ion), Bicarbonate (ion), Carbonate (ion), Bisulfide (ion), Sulfide (ion), Perchlorate (ion) |
| Dissolved salts (aqueous ion pairs) | NaCl, KCl, LiCl, CsCl, NaBr, KBr, CsBr, NaI, KI, CsI, MgSO4, NaOH |
| Gases, aqueous and gaseous | Water, Carbon dioxide, Carbon monoxide, Hydrogen, Hydrogen sulfide, Ammonia, Oxygen, Nitrogen, Sulfur dioxide, Helium, Xenon |
| Gaseous only | Methane, Ethylene, Argon |
| Aqueous acids | Hydrogen chloride, Nitric acid |
Properties. The aqueous activity coefficients come from Reaktoro. Ions enter the liquid fugacity by
molality times activity coefficient; water and the dissolved gases by activity coefficient times vapor
pressure, or by a Henry constant above their critical temperature. The vapor is an ideal gas. The liquid
enthalpy is the ideal-gas value less the heat of vaporization, plus the electrolyte term computed with the
Reaktoro activity coefficients; the liquid density is the electrolyte model of DWSIM (water plus the molar
volumes of the ions). The stream pH is -log10 of the activity of Hydron, which must be in the
compound list.
Limitations¶
- There is no mineral phase: salts do not precipitate.
- The gaseous phase is ideal, which limits the package to low and moderate pressures.
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("ReaktoroExample")
.WithCompounds("Water", "Carbon dioxide", "Hydron", "Hydroxide",
"Bicarbonate (ion)", "Carbonate (ion)")
.WithPropertyPackage(PropertyPackages.Plus.ReaktoroAqueous))
# 1 kg of water with 0.1 mol of CO2, more than dissolves at 1 atm: the rest stays as gas
kg_water = 1.0 / 0.018015
s = (fs.AddMaterialStream("CO2 + water").At(Q.Celsius(25.0), Q.Bar(1.01325))
.SetCompoundMolarFlow("Water", kg_water)
.SetCompoundMolarFlow("Carbon dioxide", 0.1))
fs.Solve()
liq, gas = s.Object.Phases[3], s.Object.Phases[2]
m = lambda name: liq.Compounds[name].MolarFlow / (liq.Compounds["Water"].MolarFlow * 0.018015)
P = s.Object.Phases[0].Properties.pressure
print(f"CO2 partial pressure = {gas.Compounds['Carbon dioxide'].MoleFraction * P / 1e5:.3f} bar")
print(f"Dissolved CO2 = {m('Carbon dioxide'):.4f} mol/kg")
print(f"Bicarbonate = {m('Bicarbonate (ion)'):.2e} mol/kg")
print(f"pH = {liq.Properties.pH:.2f}")
print(f"Liquid density = {liq.Properties.density:.1f} kg/m3")
Output
CO2 partial pressure = 0.982 bar
Dissolved CO2 = 0.0334 mol/kg
Bicarbonate = 1.25e-04 mol/kg
pH = 3.91
Liquid density = 996.6 kg/m3
DWSIM 10.2.11.0, generated 2026-10-08.
Property methods¶
How the package calculates each property, as it reports it in PropertyMethodsInfo (the property package editor shows the same list).
| Property | Method |
|---|---|
| Vapor fugacity | Ideal Gas |
| Liquid fugacity | Reaktoro Activity Coefficient + Vapor Pressure / Henry's Law (ions by molality) |
| Vapor enthalpy, entropy, Cp/Cv | Ideal Gas |
| Liquid enthalpy, entropy, Cp/Cv | Ideal Gas - Vaporization Enthalpy + electrolyte term with the Reaktoro activity coefficients |
| Vapor density | Ideal Gas |
| Liquid density | Water density correlation plus the molar volumes of the ions (with an ionic-strength term), from the electrolyte database; molecular solutes as pure liquids |
| Vapor viscosity | Experimental / Lucas / Jossi-Stiel-Thodos |
| Liquid viscosity | Experimental / Letsou-Stiel |
| Vapor thermal conductivity | Experimental / Ely-Hanley |
| Liquid thermal conductivity | Experimental / Latini |
| Surface tension | Experimental / Brock-Bird |
| Solid density | Experimental Data / User-Defined |
| Solid enthalpy, entropy, Cp/Cv | Experimental Solid Cp / From Liquid Phase Enthalpy + Enthalpy of Fusion |
Default flash algorithm: Electrolyte.
Configuration saved with the flowsheet¶
The package writes its settings to the simulation file (SaveData) and reads them back on load (LoadData). The elements below are the ones this package adds to those of every property package, as written for the example.
| Element | Content in the example | What it holds |
|---|---|---|
ElectrolyteFlash_ReactionSetID |
DefaultSet |
Reaction set of the electrolyte flash of the base package; this package equilibrates with Reaktoro and does not read it |
ElectrolyteFlash_Tolerance |
1E-07 |
Tolerance of the same base flash, not used by this package |
ElectrolyteFlash_MaximumIterations |
200 |
Iteration limit of the same base flash, not used by this package |
Settings common to every property package, as saved for the example
| Element | Value |
|---|---|
Type |
68 characters |
ComponentName |
Reaktoro (Aqueous Electrolytes) |
ComponentDescription |
120 characters |
Tag |
Reaktoro (Aqueous Electrolytes) |
UseHenryConstants |
true |
AutoEstimateMissingNRTLUNIQUACParameters |
true |
UseImmiscibleListForLiquid2InitialEstimates |
true |
SingleCompoundCheckThreshold |
0.99999 |
OverrideKvalFugCoeff |
false |
OverrideEnthalpyCalculation |
false |
OverrideEntropyCalculation |
false |
LiquidDensityCalculationMode_Subcritical |
Rackett_and_ExpData |
LiquidDensityCalculationMode_Supercritical |
Rackett_and_ExpData |
LiquidDensity_CorrectExpDataForPressure |
true |
LiquidDensity_UsePenelouxVolumeTranslation |
true |
LiquidViscosityCalculationMode_Subcritical |
ExpData |
LiquidViscosityCalculationMode_Supercritical |
Letsou_Stiel |
LiquidViscosity_CorrectExpDataForPressure |
true |
LiquidViscosity_MixingRule |
MoleAverage |
VaporPhaseFugacityCalculationMode |
Ideal |
SolidPhaseFugacityCalculationMethod |
FromLiquidFugacity |
SolidPhaseFugacity_UseIdealLiquidPhaseFugacity |
false |
SolidPhaseEnthalpy_UsesCp |
false |
EnthalpyEntropyCpCvCalculationMode |
LeeKesler |
LiquidEnthalpyEntropyCpCvCalculationMode_EOS |
EOS |
LiquidFugacity_UsePoyntingCorrectionFactor |
true |
ActivityCoefficientModels_IgnoreMissingInteractionParameters |
false |
IgnoreVaporFractionLimit |
false |
IgnoreSalinityLimit |
false |
CalculateAdditionalMaterialStreamProperties |
true |
FlashCalculationApproach |
NestedLoops |
DisplayMissingCompoundPropertiesWarning |
false |
ForcedSolids |
[] |
PropertyOverrides |
{} |
FlashSettings |
36 Setting entries |
Learn more¶
-
User guide
-
Used with
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
ReaktoroPropertyPackage(bool)
| Parameter | Type | Description |
|---|---|---|
comode |
Boolean |
Properties¶
FlashBase: Returns the FlashAlgorithm object instance for this property package.
Returns the FlashAlgorithm object instance for this property package.
MobileCompatible
Methods¶
AUX_PVAPi(string, double)
| Parameter | Type | Description |
|---|---|---|
sub1 |
String |
|
T |
Double |
AUX_Z(double[], double, double, PhaseName)
| Parameter | Type | Description |
|---|---|---|
Vx |
Double[] |
|
T |
Double |
|
P |
Double |
|
state |
PhaseName |
DisplayEditingForm()
DW_CalcEnthalpy(Array, double, double, State): Calculates the enthalpy of a mixture.
Calculates the enthalpy of a mixture.
| Parameter | Type | Description |
|---|---|---|
Vx |
Array |
Vector of doubles containing the molar composition of the mixture. |
T |
Double |
Temperature (K) |
P |
Double |
Pressure (Pa) |
st |
State |
State enum indicating the state of the mixture (liquid or vapor). |
DW_CalcEnthalpyDeparture(Array, double, double, State): Calculates the enthalpy departure of a mixture.
Calculates the enthalpy departure of a mixture.
| Parameter | Type | Description |
|---|---|---|
Vx |
Array |
Vector of doubles containing the molar composition of the mixture. |
T |
Double |
Temperature (K) |
P |
Double |
Pressure (Pa) |
st |
State |
State enum indicating the state of the mixture (liquid or vapor). |
DW_CalcEntropy(Array, double, double, State): Calculates the entropy of a mixture.
Calculates the entropy of a mixture.
| Parameter | Type | Description |
|---|---|---|
Vx |
Array |
Vector of doubles containing the molar composition of the mixture. |
T |
Double |
Temperature (K) |
P |
Double |
Pressure (Pa) |
st |
State |
State enum indicating the state of the mixture (liquid or vapor). |
DW_CalcEntropyDeparture(Array, double, double, State): Calculates the entropy departure of a mixture.
Calculates the entropy departure of a mixture.
| Parameter | Type | Description |
|---|---|---|
Vx |
Array |
Vector of doubles containing the molar composition of the mixture. |
T |
Double |
Temperature (K) |
P |
Double |
Pressure (Pa) |
st |
State |
State enum indicating the state of the mixture (liquid or vapor). |
DW_CalcEquilibrium(FlashSpec, FlashSpec)
| Parameter | Type | Description |
|---|---|---|
spec1 |
FlashSpec |
|
spec2 |
FlashSpec |
DW_CalcFugCoeff(Array, double, double, State): Calculates fugacity coefficients for the specified composition at the specified conditions.
Calculates fugacity coefficients for the specified composition at the specified conditions.
| Parameter | Type | Description |
|---|---|---|
Vx |
Array |
Vector of doubles containing the molar composition of the mixture. |
T |
Double |
Temperature in K |
P |
Double |
Pressure in Pa |
st |
State |
Mixture state (Liquid or Vapor) |
DW_CalcKvalue(double[], double[], double, double, string): Calculates K-values of components in a mixture.
Calculates K-values of components in a mixture.
| Parameter | Type | Description |
|---|---|---|
Vx |
Double[] |
Vector of doubles containing the molar composition of the liquid phase. |
Vy |
Double[] |
Vector of doubles containing the molar composition of the vapor phase. |
T |
Double |
Temperature of the system. |
P |
Double |
Pressure of the system. |
type |
String |
DW_CalcPhaseProps(Phase)
| Parameter | Type | Description |
|---|---|---|
Phase |
Phase |
DW_CalcProp(string, Phase): Provides a wrapper function for CAPE-OPEN CalcProp/CalcSingleProp functions.
Provides a wrapper function for CAPE-OPEN CalcProp/CalcSingleProp functions.
| Parameter | Type | Description |
|---|---|---|
property |
String |
The property to be calculated. |
phase |
Phase |
The phase where the property must be calculated for. |
DW_CalcSolidPhaseProps(): Provides a default implementation for solid phase property calculations in CAPE-OPEN mode.
Provides a default implementation for solid phase property calculations in CAPE-OPEN mode. Should be used by all derived propety packages.
GetEditingForm(): Returns the binary interaction parameter editor of this package.
Returns the binary interaction parameter editor of this package.
ReturnInstance(string)
| Parameter | Type | Description |
|---|---|---|
typename |
String |
Fields¶