17 double acentric_reference, Z_crit_reference, T_crit_reference, rhomolar_crit_reference;
19 double acentric_fluid, Z_crit_fluid, T_crit_fluid, rhomolar_crit_fluid;
24 const auto& ref = j.at(
"reference_fluid");
25 acentric_reference = ref.at(
"acentric");
26 Z_crit_reference = ref.at(
"Z_crit");
27 T_crit_reference = ref.at(
"T_crit / K");
28 rhomolar_crit_reference = ref.at(
"rhomolar_crit / mol/m^3");
30 const auto& fl = j.at(
"fluid");
31 acentric_fluid = fl.at(
"acentric");
32 Z_crit_fluid = fl.at(
"Z_crit");
33 T_crit_fluid = fl.at(
"T_crit / K");
34 rhomolar_crit_fluid = fl.at(
"rhomolar_crit / mol/m^3");
35 f_T_coeffs = fl.at(
"f_T_coeffs").get<std::vector<double>>();
36 h_T_coeffs = fl.at(
"h_T_coeffs").get<std::vector<double>>();
45 auto alphar(
const TTYPE& T,
const RhoType& rhomolar,
const VecType& mole_fractions)
const {
47 auto Tri = T/T_crit_fluid;
50 auto theta = 1.0 + (acentric_fluid-acentric_reference)*(f_T_coeffs[0] + f_T_coeffs[1]*log(Tri));
51 auto phi = Z_crit_reference/Z_crit_fluid*(1.0 + (acentric_fluid - acentric_reference)*(h_T_coeffs[0] + h_T_coeffs[1]*log(Tri)));
53 auto f = T_crit_fluid/T_crit_reference*theta;
54 auto h = rhomolar_crit_reference/rhomolar_crit_fluid*phi;
57 auto T_effective = T/f;
58 auto rho_effective = rhomolar*h;
60 return reference_model.alphar(T_effective, rho_effective, mole_fractions);