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_surface_tensionChemistryLab.water_thermo_props
ChemistryLab.HKFGState Type
HKFGState{T<:Real}The g-function of Shock et al. (1992) 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 equation of state of Haar et al. (1984).
ChemistryLab.hkf_g_function Method
hkf_g_function(T_K, P_Pa, wtp::WaterThermoProps) -> HKFGStateCompute the g-function of Shock et al. (1992) 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 et al. (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³)The density of water at the temperature T_K (K) and the pressure P_Pa (Pa) by the HGK equation of state: the liquid where a liquid root exists, otherwise the only root, that of the vapor or of the supercritical fluid.
The root of D0, and, when that does not land on the liquid, from a density no liquid reaches, where the pressure of the equation is increasing and convex in the density so that the iteration descends onto the largest root without overshooting it; failing a liquid root, from the side of the dilute gas. It is then lifted into the dual numbers of T_K and P_Pa by two Newton steps: the value does not move, and the derivatives are exact to second order, as the implicit-function theorem gives them.
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 model of Johnson and Norton (1991).
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 equation of state of Haar et al. (1984).
All outputs are in SI units (J/kg per derivative w.r.t. appropriate variables). AD-compatible (ForwardDiff-safe).
ChemistryLab.water_surface_tension Method
water_surface_tension(T_K) -> surface tension (N/m)Surface tension of liquid water against its vapor at the absolute temperature T_K (K), from the interpolating equation of the International Association for the Properties of Water and Steam (IAPWS, 2014):
with
AD-compatible in T_K.
Examples
julia> round(1000 * water_surface_tension(298.15); digits = 2) # mN/m at 25 °C
71.97ChemistryLab.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 equation of state of Haar et al. (1984).
AD-compatible (ForwardDiff-safe).