H2O-HCl (Pitzer)¶
DWSIM Plus
Available with a DWSIM Plus (Patreon) subscription.
H₂O–HCl electrolyte property package using the Extended Pitzer model. Valid range: 0–16 mol/kg HCl, 273–473 K (0–200 °C). The model accounts for: Complete dissociation of HCl in water (H⁺ + Cl⁻).Activity coefficients via extended Pitzer (β⁰, β¹, β², C^φ).Water activity via osmotic coefficient.VLE: water vapour pressure depression + HCl partial pressure. Inherits from BaseElectrolytePropertyPackage so the package participates in the DWSIMPlus electrolyte machinery: stream classification of cations/anions/salts, LastEquilibriumResult caching consumed by CorrosionAndScaling models, and the standard CalculateChemicalEquilibria abstract contract used by external speciation consumers.
DWSIM.Extensions.PropertyPackages.Electrolytes.PropertyPackages.HClPropertyPackage
Assembly DWSIM.Extensions.PropertyPackages.Electrolytes.dll · Object ← PropertyPackage ← ElectrolyteBasePropertyPackage ← BaseElectrolytePropertyPackage ← HClPropertyPackage
Name in the flowsheet H2O-HCl (Pitzer) · FluentAPI PropertyPackages.Plus.HCl
Scope¶
The package describes hydrochloric acid: water and hydrogen chloride (Hydrogen chloride), with HCl fully
dissociated into H+ and Cl- in the liquid. It is meant for refinery overhead
condensates, HCl absorbers and strippers, acid concentration, and acidified chlor-alkali brines. Other ions
in the stream (Na+, K+, SO42-, ...) act as spectators that
raise the ionic strength. Water takes its vapor pressure times the water activity, HCl its partial
pressure over the solution, and other molecular compounds Henry's law or their vapor pressure.
Flash. Both partial pressures depend on the HCl molality of the liquid alone, so the K-values change steeply with the liquid composition. The package has its own flash: the unknown is the HCl fraction of the water plus HCl in the liquid, the vapor fraction follows from the water and HCl balances, and the other compounds split by their own K-values. Bubble and dew points are roots of their sums in temperature or in ln P; vapor fraction, enthalpy and entropy specifications are solved inside the region they fall in. Streams without water or without HCl use the default flash.
The mean activity coefficient is the binary Pitzer equation for a 1-1 electrolyte, ln γ± = fγ + m Bγ + m2 Cγ, with b = 1.2, α1 = 2.0 and the Debye-Hückel slope Aφ(298.15 K) = 0.3915. β0(T) and β1(T) follow the high-temperature fit of Ruaya and Seward (1987); Cφ is zero in that fit. The water activity comes from the osmotic coefficient, and the pH is -log10(m γ±). The HCl partial pressure is pHCl = KH(T) m2 γ±2, times a Poynting factor (partial molar volume of HCl 17.8 cm3/mol) above the saturation pressure of water (below 0.01 % at 1 atm, about 7 % at 100 bar). KH is the inverse of the equilibrium constant of HCl(g) = H+ + Cl-, from the NBS tables (Wagman et al., 1982: ΔrG° = -35.93 kJ/mol, ΔrH° = -74.85 kJ/mol) with a constant ΔrCp = -165.5 J/(mol·K); it is 0.0508 Pa·kg2/mol2 at 25 °C. The liquid density gives HCl its apparent molar volume in water, φV(m, T), fitted to the densities of Perry's Table 2-57 (1 to 30 wt%, 0 to 100 °C, within 0.3 %).
Enthalpy. Dissolved HCl takes its apparent molar enthalpy on the ideal-gas reference of the vapor, H = ΔsolH∞ + φL(m) + φCp(m)(T - 298.15 K), with ΔsolH∞ = -74.85 kJ/mol and φL from the NBS tables and φCp from Parker (1965) at 25 °C; the liquid heat capacity carries the same φCp. The integral heat of solution matches the NBS values within 0.001 kJ/mol from 0.01 to 18.5 mol/kg.
Options (package editor, saved in HClPP_Options):
| Option | Default | Effect |
|---|---|---|
UsePoyntingCorrection |
on | Poynting factor on pHCl |
UseHMWMixingRules |
on | Harvie-Møller-Weare θ and ψ terms for HCl in NaCl, KCl and Na2SO4 brines; pairs without data fall back to the binary Pitzer value at the total ionic strength |
TrackHClMonohydrate, TrackHClDihydrate, TrackHClTrihydrate |
off | Solid HCl·nH2O below the peritectics at -15.4, -17.7 and -24.4 °C, from a Ksp = (γ±m)2awn anchored at the peritectic |
Accuracy. Mean activity coefficient at 25 °C against Robinson and Stokes:
| m (mol/kg) | 0.1 | 0.5 | 1.0 | 3.0 | 6.0 | 10.0 |
|---|---|---|---|---|---|---|
| γ±, model | 0.794 | 0.755 | 0.804 | 1.280 | 3.040 | 10.65 |
| γ±, Robinson and Stokes | 0.796 | 0.757 | 0.809 | 1.316 | 3.22 | 10.4 |
The maximum-boiling azeotrope at 1 atm comes out at 18.9 wt% HCl and 107.75 °C, against 20.22 wt% and 108.58 °C measured. Bubble points at 1 atm against Perry's Tables 2-9 and 2-10:
| wt% HCl | 6 | 10 | 14 | 18 | 22 | 26 | 30 |
|---|---|---|---|---|---|---|---|
| Tbubble, model (°C) | 101.9 | 103.7 | 105.9 | 107.7 | 105.7 | 94.1 | 71.7 |
| Tbubble, Perry (°C) | 101.7 | 103.1 | 105.0 | 107.5 | 108.1 | 103.3 | 90.3 |
Limitations¶
- Well validated up to 6 mol/kg; 6 to 16 mol/kg is an extrapolation (about 5 %), and above 16 mol/kg the molality is clamped with a warning. Above 3 mol/kg keep the temperature below 100 °C.
- The Ruaya-Seward fit is validated for the binary to 350 °C; the package writes a warning outside 0 to 200 °C.
- Above about 22 wt% the bubble points fall below the measured ones (26 wt%: 94.1 against 103.3 °C).
- φCp is held at its 25 °C value, so heats of solution far from 25 °C are extrapolated.
- A spectator salt lowers the water activity through the ionic strength only; with salt in the acid the vapor fraction jumps near the point where the liquid dries out, and specifications inside that jump stop with an error.
- The compound must be named
Hydrogen chloride(orHydrochloric acid,HCl); the hydrates are the compoundsHydrogen Chloride Monohydrate,Hydrogen Chloride DihydrateandHydrogen Chloride Trihydrate.
Example¶
This code runs on every build of this site, and the output below is what it printed.
fs = (Flowsheet.Create("HClExample")
.WithCompounds("Water", "Hydrogen chloride")
.WithPropertyPackage(PropertyPackages.Plus.HCl))
kg_water = 1.0 / 0.018015 # mol of water in 1 kg
acids = {}
for m in (1.0, 6.0): # mol of HCl per kg of water
acids[m] = (fs.AddMaterialStream(f"HCl {m:g} mol/kg").At(Q.Celsius(25.0), Q.Bar(1.01325))
.SetCompoundMolarFlow("Water", kg_water)
.SetCompoundMolarFlow("Hydrogen chloride", m))
fs.Solve()
for m, acid in acids.items():
liq = acid.Object.Phases[3]
pH = liq.Properties.pH
gamma_pm = 10.0 ** (-pH) / m # pH = -log10(m gamma+-), HCl fully dissociated
print(f"{m:g} mol/kg: pH = {pH:6.3f}, mean activity coefficient = {gamma_pm:.3f}")
# water partial pressure over the 1 mol/kg acid, from the liquid fugacity of water
liq = acids[1.0].Object.Phases[3]
w = liq.Compounds["Water"]
p_w = w.MoleFraction * w.FugacityCoeff * acids[1.0].Object.Phases[0].Properties.pressure
print(f"Water partial pressure over 1 mol/kg HCl = {p_w / 1000.0:.3f} kPa")
Output
1 mol/kg: pH = 0.095, mean activity coefficient = 0.804
6 mol/kg: pH = -1.261, mean activity coefficient = 3.040
Water partial pressure over 1 mol/kg HCl = 3.054 kPa
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 / Peng-Robinson EOS |
| Liquid fugacity | Pitzer Activity Coefficient + Vapor Pressure / Henry's Law |
| Vapor enthalpy, entropy, Cp/Cv | Ideal Gas / Lee-Kesler |
| Liquid enthalpy, entropy, Cp/Cv | Ideal Gas - Vaporization Enthalpy (no Pitzer excess term) |
| Vapor density | Ideal Gas / Peng-Robinson EOS |
| 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 (HCl is a molecular solute here) |
| 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: Nested_Loops_VLE.
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 flashes with its own K-values 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 |
IncludeExcessEnthalpy |
false |
Option of the electrolyte base class (off by default); this package supplies no excess enthalpy, so it has no effect |
GenerateSolubilityReactions |
false |
Option of the electrolyte base class, not used by this package (its flash takes no reactions) |
UseReactiveKvalues |
false |
Option of the electrolyte base class for the rigorous column, not used by this package (it always gives its own K-values) |
HClPP_Options |
5 UsePoyntingCorrection entries |
The model options, UsePoyntingCorrection (default true), UseHMWMixingRules (true) and TrackHClMonohydrate, TrackHClDihydrate, TrackHClTrihydrate (false) |
First UsePoyntingCorrection of HClPP_Options in the example
Settings common to every property package, as saved for the example
| Element | Value |
|---|---|
Type |
82 characters |
ComponentName |
H2O-HCl (Pitzer) |
ComponentDescription |
76 characters |
Tag |
H2O-HCl (Pitzer) |
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¶
API members¶
Public members declared by this class. Inherited members are documented on the base classes.
Constructors¶
HClPropertyPackage(bool)
| Parameter | Type | Description |
|---|---|---|
comode |
Boolean |
Properties¶
FlashBase: The package's own flash, HClFlash: it solves the water-HCl tie line directly, which the steep composition dependence...
The package's own flash, HClFlash: it solves the water-HCl tie line directly, which the steep composition dependence of the K-values requires.
ImplementsCrossPlatformEditor
ShouldUseKvalueMethod3
TrackHClDihydrate: Track HCl·2H₂O dihydrate saturation.
Track HCl·2H₂O dihydrate saturation. Default false; meaningful below 255 K.
TrackHClMonohydrate: Track HCl·H₂O hydrate saturation.
Track HCl·H₂O hydrate saturation. Default false. When enabled, the stream's solid-phase fugacity for HCl·H₂O is computed from HydrateKsp; only meaningful below 258 K where the monohydrate is the equilibrium phase.
TrackHClTrihydrate: Track HCl·3H₂O trihydrate saturation.
Track HCl·3H₂O trihydrate saturation. Default false; meaningful below 249 K.
UseHMWMixingRules: Apply the Harvie–Møller–Weare 1984 mixing rules (cation–cation θ and triplet ψ) when spectator electrolytes are...
Apply the Harvie–Møller–Weare 1984 mixing rules (cation–cation θ and triplet ψ) when spectator electrolytes are present in the stream. Default true. Disable to fall back to the binary-Pitzer- with-I_total approximation (faster, marginally less accurate for HCl in NaCl/Na₂SO₄/etc. brines).
UsePoyntingCorrection: Apply the Poynting correction p_HCl(P) = p* · exp(V̄·(P-P_sat)/RT) to the HCl partial pressure when the system...
Apply the Poynting correction p_HCl(P) = p* · exp(V̄·(P-P_sat)/RT) to the HCl partial pressure when the system pressure exceeds water saturation. Default true. Disable to recover the bare Henry-law prediction (slightly faster, only relevant near 1 atm).
Methods¶
AUX_LIQDENS(double, double, double, int, bool): Liquid density [kg/m3].
Liquid density [kg/m3]. The electrolyte base adds a molecular solute's volume as a pure liquid, which for HCl (a gas above 188 K) is its liquid volume at the normal boiling point, about 30 cm3/mol against an apparent molar volume of 18-20 cm3/mol in water: 1 mol/kg acid at 25 C came out at 1002 kg/m3. Here HCl takes its apparent molar volume (ApparentMolarVolume) and the rest of the liquid keeps the base's volume.
| Parameter | Type | Description |
|---|---|---|
T |
Double |
|
P |
Double |
|
Pvp |
Double |
|
phaseid |
Int32 |
|
FORCE_EOS |
Boolean |
CalculateChemicalEquilibria(double, double)
| Parameter | Type | Description |
|---|---|---|
T |
Double |
|
P |
Double |
CalculateChemicalEquilibria(double, double, double[])
| Parameter | Type | Description |
|---|---|---|
T |
Double |
|
P |
Double |
|
x |
Double[] |
Clone()
DisplayEditingForm()
DW_CalcEnthalpy(Array, double, double, State): Liquid enthalpy [kJ/kg].
Liquid enthalpy [kJ/kg]. The base puts every compound on its ideal gas enthalpy less its heat of vaporisation, which for HCl is the 9 kJ/mol of the pure liquid. Here dissolved HCl takes its apparent molar enthalpy (ApparentMolarEnthalpy): the integral heat of solution of HCl(g) in water, -74.85 kJ/mol at infinite dilution and less exothermic as the acid gets stronger, on the same ideal gas reference as the vapour. Water and the other compounds keep the base enthalpy.
| Parameter | Type | Description |
|---|---|---|
Vx0 |
Array |
|
T |
Double |
|
P |
Double |
|
st |
State |
DW_CalcEntropy(Array, double, double, State): Liquid entropy [kJ/(kg K)].
Liquid entropy [kJ/(kg K)]. The base liquid entropy of a compound is its ideal gas entropy less its heat of vaporisation over T; dissolved HCl takes its heat of solution over T in place of that, the same term the enthalpy changes divided by T.
| Parameter | Type | Description |
|---|---|---|
Vx0 |
Array |
|
T |
Double |
|
P |
Double |
|
st |
State |
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_CalcKvalue3(double[], double[], double, double): Calculates K-values of components in a mixture.
Calculates K-values of components in a mixture.
| Parameter | Type | Description |
|---|---|---|
Vnx |
Double[] |
Vector of doubles containing the molar flows of the liquid phase. |
Vny |
Double[] |
Vector of doubles containing the molar flows of the vapor phase. |
T |
Double |
Temperature of the system. |
P |
Double |
Pressure of the system. |
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. |
GetEditingForm(): Returns the binary interaction parameter editor of this package.
Returns the binary interaction parameter editor of this package.
LoadData(List<XElement>): Reads the three calculation options back.
Reads the three calculation options back. A file saved before they were persisted has no such elements, and the options then keep their defaults (off).
| Parameter | Type | Description |
|---|---|---|
data |
List<XElement> |
PopulateCrossPlatformEditor(object): The Avalonia editor; see AvaloniaPackageEditors.
The Avalonia editor; see AvaloniaPackageEditors.
| Parameter | Type | Description |
|---|---|---|
container |
Object |
ReturnInstance(string)
| Parameter | Type | Description |
|---|---|---|
typename |
String |
RunPostMaterialStreamSetRoutine()
SaveData(): Writes IncludeExcessEnthalpy, GenerateSolubilityReactions and UseReactiveKvalues after the data the base package...
Writes IncludeExcessEnthalpy, GenerateSolubilityReactions and UseReactiveKvalues after the data the base package saves, so the three options travel with the flowsheet file and with Clone.