Adds the calculation of Henry's law constants from an equation of state. Here, $H{i,s}$ is defined in the way it would be observed, as
$H{i,s}=\lim_{x_i\to 0}\frac{y_ip}{x_i}=p_s^\mathrm{sat}\frac{\varphi_i^{\infty,\mathrm{L}}}{\varphi_i^{\infty,\mathrm{V}}}$
The function treats all components with $x_i=0$ as solutes and returns only the Henry's law constants of those components.
In some sense, this would be an effective Henry's law constant that already contains the corrections for the non-ideality of the vapor phase and the pressure dependence of the liquid phase. Because this mainly serves as a tool to compare to experimental results or simplified modelling approaches, I don't see an issue.
params = PcSaftParameters.from_json(["water", "nitrogen", "methanol", "carbon dioxide"], "esper2023.json", "rehner2023_binary.json")
eos = EquationOfState.pcsaft(params)
H = State.henrys_law_constant(eos, 300*KELVIN, np.array([0.6, 0.0, 0.4, 0.0]))
H
[2681433846.773456, 41766375.30479376] Pa
For the simple case of a binary system, a helper function can be used:
Adds the calculation of Henry's law constants from an equation of state. Here, $H{i,s}$ is defined in the way it would be observed, as $H{i,s}=\lim_{x_i\to 0}\frac{y_ip}{x_i}=p_s^\mathrm{sat}\frac{\varphi_i^{\infty,\mathrm{L}}}{\varphi_i^{\infty,\mathrm{V}}}$
The function treats all components with $x_i=0$ as solutes and returns only the Henry's law constants of those components.
In some sense, this would be an effective Henry's law constant that already contains the corrections for the non-ideality of the vapor phase and the pressure dependence of the liquid phase. Because this mainly serves as a tool to compare to experimental results or simplified modelling approaches, I don't see an issue.
For the simple case of a binary system, a helper function can be used:
$47.744~\mathrm{GPa}$