16 using EArray6 = Eigen::Array<double, 6, 1>;
17 using EArray4 = Eigen::Array<double, 4, 1>;
19 const EArray6 c1_pol = (EArray6() << -0.0192944,1.38,-2.2653,1.6291,-1.974,0.40412 ).finished();
20 const EArray6 c1_exp = (EArray6() << 0.1845,-0.3227,1.1351,2.232,-2.344,-0.4238 ).finished();
21 const EArray4 c1_gbs = (EArray4() << -4.367,0.0371,1.3895,2.835 ).finished();
22 const EArray6 c2_pol = (EArray6() << 0.26021,-5.525,8.329,-19.492,25.8,-3.8133 ).finished();
23 const EArray6 c2_exp = (EArray6() << -5.05,2.7842,-9.523,-30.383,17.902,2.2264 ).finished();
24 const EArray4 c2_gbs = (EArray4() << 48.445,-5.506,-11.643,-24.36 ).finished();
25 const EArray6 t_pol = (EArray6() << 1,0.236,0.872,0.313,0.407,0.703 ).finished();
26 const EArray6 t_exp = (EArray6() << 1.78,2.99,2.866,1.2,3.06,1.073 ).finished();
27 const EArray4 t_gbs = (EArray4() << 1.50,1.03,4.02,1.57 ).finished();
28 const EArray6 d_pol = (EArray6() << 4,1,1,2,2,3 ).finished();
29 const EArray6 d_exp = (EArray6() << 1,1,3,2,2,5 ).finished();
30 const EArray4 d_gbs = (EArray4() << 2,3,2,2 ).finished();
31 const EArray6 p = (EArray6() << 1,2,2,1,2,1 ).finished();
32 const EArray4 eta = (EArray4() << 0.362,0.313,1.17,0.957 ).finished();
33 const EArray4 beta = (EArray4() << 0.0761,0.143,0.63,1.32 ).finished();
34 const EArray4 gam = (EArray4() << 1.55,-0.0826,1.505,1.07 ).finished();
35 const EArray4 eps = (EArray4() << -1,-1,-0.195,-0.287 ).finished();
37 const double m_lambda_r;
38 const EArray6 n_pol, n_exp;
40 const double Tc, rhoc;
44 n_pol(c1_pol + c2_pol / m_lambda_r),
45 n_exp(c1_exp + c2_exp / m_lambda_r),
46 n_gbs(c1_gbs + c2_gbs / m_lambda_r),
47 Tc(0.668 + 6.84 / m_lambda_r + 145 /
pow(m_lambda_r, 3)),
48 rhoc(0.2516 + 0.049 * log10(m_lambda_r))
55 template<
typename MoleFracType>
56 double R(
const MoleFracType &)
const {
return 1.0; }
58 template<
typename TTYPE,
typename RHOTYPE,
typename MoleFracType>
59 auto alphar(
const TTYPE& Tstar,
const RHOTYPE& rhostar,
const MoleFracType& )
const {
61 using _t = std::decay_t<std::common_type_t<TTYPE, RHOTYPE>>;
62 _t s1 = 0;
for (
auto i = 0; i < n_pol.size(); ++i){ s1 += n_pol[i] *
pow(tau, t_pol[i]) *
powi(delta,
static_cast<int>(d_pol[i])); }
63 _t s2 = 0;
for (
auto i = 0; i < n_exp.size(); ++i){ s2 += n_exp[i] *
pow(tau, t_exp[i]) *
powi(delta,
static_cast<int>(d_exp[i])) * exp(-
powi(delta,
static_cast<int>(p[i]))); }
64 _t s3 = 0;
for (
auto i = 0; i < n_gbs.size(); ++i){ s3 += n_gbs[i] *
pow(tau, t_gbs[i]) *
powi(delta,
static_cast<int>(d_gbs[i])) * exp(-eta[i] *
powi(
forceeval(delta - eps[i]), 2) - beta[i] *
powi(
forceeval(tau - gam[i]), 2)); }