Water properties
ChemistryLab.HKFGStateChemistryLab.SpeciesElectroPropsHKFChemistryLab.WaterElectroPropsChemistryLab.WaterThermoPropsChemistryLab.hkf_g_functionChemistryLab.species_electro_props_hkfChemistryLab.water_density_hgkChemistryLab.water_electro_props_jnChemistryLab.water_helmholtz_hgkChemistryLab.water_thermo_props
ChemistryLab.HKFGState — Type
HKFGState{T<:Real}Shock et al. (1992) g-function and its first- and second-order partial derivatives w.r.t. T and P.
ChemistryLab.SpeciesElectroPropsHKF — Type
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).
ChemistryLab.WaterElectroProps — Type
WaterElectroProps{T<:Real}Dielectric constant ε of water and Born functions Z, Y, Q, X, U, N, from Johnson and Norton (1991).
ChemistryLab.WaterThermoProps — Type
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.
ChemistryLab.hkf_g_function — Method
hkf_g_function(T_K, P_Pa, wtp::WaterThermoProps) -> HKFGStateCompute 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).
ChemistryLab.species_electro_props_hkf — Method
species_electro_props_hkf(gstate::HKFGState, z, wref) -> SpeciesElectroPropsHKFCompute 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).
ChemistryLab.water_density_hgk — Method
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.
ChemistryLab.water_electro_props_jn — Method
water_electro_props_jn(T_K, P_Pa, wtp::WaterThermoProps) -> WaterElectroPropsCompute dielectric constant and Born functions Z, Y, Q, X, U, N for water using the Johnson-Norton (1991) model.
AD-compatible (ForwardDiff-safe).
ChemistryLab.water_helmholtz_hgk — Method
water_helmholtz_hgk(T_K, D_kgm3) -> _HGKHelmCompute 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).
ChemistryLab.water_thermo_props — Method
water_thermo_props(T_K, P_Pa) -> WaterThermoPropsCompute 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).