Water properties

ChemistryLab.HKFGStateType
HKFGState{T<:Real}

Shock et al. (1992) g-function and its first- and second-order partial derivatives w.r.t. T and P.

source
ChemistryLab.SpeciesElectroPropsHKFType
SpeciesElectroPropsHKF{T<:Real}

Born coefficient ω for an aqueous species and its partial derivatives, from the HKF model of Helgeson et al. (1981) extended by Shock et al. (1992).

source
ChemistryLab.WaterThermoPropsType
WaterThermoProps{T<:Real}

Density D (kg/m³) of liquid water and its partial derivatives w.r.t. T (K) and P (Pa), computed from the HGK (1984) equation of state.

source
ChemistryLab.hkf_g_functionMethod
hkf_g_function(T_K, P_Pa, wtp::WaterThermoProps) -> HKFGState

Compute the Shock et al. (1992) g-function and its derivatives for the HKF model. Returns zero state if water density is outside [350, 1000] kg/m³.

AD-compatible (ForwardDiff-safe).

source
ChemistryLab.species_electro_props_hkfMethod
species_electro_props_hkf(gstate::HKFGState, z, wref) -> SpeciesElectroPropsHKF

Compute the Born coefficient ω and its derivatives for an aqueous species with charge z and reference Born coefficient wref (J/mol).

Uses the model of Helgeson, Kirkham & Flowers (1981), extended by Shock et al. (1992). AD-compatible (ForwardDiff-safe).

source
ChemistryLab.water_density_hgkMethod
water_density_hgk(T_K, P_Pa; D0=1000.0) -> density (kg/m³)

Find liquid-water density at temperature T_K (K) and pressure P_Pa (Pa) via Newton-Raphson iteration on the HGK equation of state.

AD-compatible: convergence test uses abs(ForwardDiff.value(F)) so Dual values propagate correctly through the iterations.

source
ChemistryLab.water_electro_props_jnMethod
water_electro_props_jn(T_K, P_Pa, wtp::WaterThermoProps) -> WaterElectroProps

Compute dielectric constant and Born functions Z, Y, Q, X, U, N for water using the Johnson-Norton (1991) model.

AD-compatible (ForwardDiff-safe).

source
ChemistryLab.water_helmholtz_hgkMethod
water_helmholtz_hgk(T_K, D_kgm3) -> _HGKHelm

Compute the specific Helmholtz free energy of water and its derivatives at temperature T_K (K) and density D_kgm3 (kg/m³) using the HGK (1984) equation of state.

All outputs are in SI units (J/kg per derivative w.r.t. appropriate variables). AD-compatible (ForwardDiff-safe).

source
ChemistryLab.water_thermo_propsMethod
water_thermo_props(T_K, P_Pa) -> WaterThermoProps

Compute density and its partial derivatives for liquid water at T_K (K), P_Pa (Pa), using the HGK (1984) equation of state.

AD-compatible (ForwardDiff-safe).

source