49 auto alphar(
const TType& T,
const RhoType& rhomolar,
const MoleFracType& molefracs)
const{
50 using resulttype = std::decay_t<std::common_type_t<TType,RhoType,
decltype(molefracs[0])>>;
52 std::size_t N = molefracs.size();
53 auto get_sigma3 = [
this](std::size_t i, std::size_t j){
57 auto get_epsilon_over_k = [
this](std::size_t i, std::size_t j){
62 std::decay_t<
decltype(molefracs[0])> num1 = 0.0, num2 = 0.0, den = 0.0, m_mix = 0.0;
63 for (
auto i = 0U; i < N; ++i){
64 m_mix +=
m[i]*molefracs[i];
65 for (
auto j = 0U; j < N; ++j){
66 auto denentry =
m[i]*
m[j]*molefracs[i]*molefracs[j];
67 auto num1entry = denentry*get_sigma3(i, j);
68 auto num2entry = num1entry*get_epsilon_over_k(i, j);
74 auto sigmamix3 = num1/den;
75 auto epskmix = num2/den/sigmamix3;
77 auto rhoN_monomer = rhomolar*m_mix*N_A;
80 auto rhostar_monomer_eff =
forceeval(rhoN_monomer*sigmamix3);
84 resulttype alphar_ref = m_mix*
Johnson.
alphar(Tstar_eff, rhostar_monomer_eff, Eigen::ArrayXd{0});
87 resulttype alphar_chain = 0.0;
96 alphar_chain = (1.0-m_mix)*log(
detail::g_LJ(Tstar_eff, rhostar_monomer_eff));
98 return forceeval(alphar_ref + alphar_chain);