22 const std::vector<std::valarray<double>> c = {
23 {1,0.0,-0.50,-0.6850148},
24 {1,0.25,-0.50,0.4524021},
25 {1,1.00,-0.50,-0.9978102},
26 {1,2.00,-0.50,-1.7569237},
27 {1,3.00,-0.50,0.5178725},
28 {1,0.0,0.0,0.9798958},
29 {1,0.25,0.0,2.0371027},
30 {1,1.00,0.0,-5.3831902},
31 {1,2.00,0.0,2.5157204},
32 {1,3.00,0.0,-1.3160448},
33 {1,0.0,1.50,0.1106332},
34 {1,0.25,1.50,0.0221654},
35 {1,1.00,1.50,-0.0927995},
36 {1,2.00,1.50,0.0685976},
37 {1,3.00,1.50,0.0455256},
38 {2,0.0,-0.50,3.2473965},
39 {2,0.25,-0.50,-7.1216450},
40 {2,1.00,-0.50,6.3146334},
41 {2,2.00,-0.50,3.9169369},
42 {2,3.00,-0.50,-5.7430820},
43 {2,0.0,0.0,-2.6474066},
44 {2,0.25,0.0,6.5439167},
45 {2,1.00,0.0,-4.2844410},
46 {2,2.00,0.0,-0.1870927},
47 {2,3.00,0.0,-0.6190643},
48 {2,0.0,1.50,1.1307259},
49 {2,0.25,1.50,-2.2454348},
50 {2,1.00,1.50,0.9304036},
51 {2,2.00,1.50,0.8111790},
52 {2,3.00,1.50,-0.6701541},
53 {3,0.0,-0.50,-5.2004805},
54 {3,0.25,-0.50,9.9220171},
55 {3,1.00,-0.50,-8.3147421},
56 {3,2.00,-0.50,-10.7043695},
57 {3,3.00,-0.50,16.3647919},
58 {3,0.0,0.0,0.4470198},
59 {3,0.25,0.0,1.8149662},
60 {3,1.00,0.0,-6.1030884},
61 {3,2.00,0.0,-6.6081009},
62 {3,3.00,0.0,12.0017595},
63 {3,0.0,1.50,-2.4980745},
64 {3,0.25,1.50,6.4317245},
65 {3,1.00,1.50,-0.2996140},
66 {3,2.00,1.50,-4.2253304},
67 {3,3.00,1.50,1.9814978},
68 {4,0.0,-0.50,1.3786678},
69 {4,0.25,-0.50,-3.8790855},
70 {4,1.00,-0.50,1.2802448},
71 {4,2.00,-0.50,15.9196701},
72 {4,3.00,-0.50,-17.1450195},
73 {4,0.0,0.0,1.8664589},
74 {4,0.25,0.0,-2.6899223},
75 {4,1.00,0.0,10.8094797},
76 {4,2.00,0.0,6.9019051},
77 {4,3.00,0.0,-18.3938751},
78 {4,0.0,1.50,3.4184790},
79 {4,0.25,1.50,-8.8453131},
80 {4,1.00,1.50,-2.0526648},
81 {4,2.00,1.50,6.2798786},
82 {4,3.00,1.50,-2.0717278},
83 {5,0.0,-0.50,1.0566063},
84 {5,0.25,-0.50,-1.1453161},
85 {5,1.00,-0.50,1.9671011},
86 {5,2.00,-0.50,-7.9601946},
87 {5,3.00,-0.50,6.1615953},
88 {5,0.0,0.0,-1.5089417},
89 {5,0.25,0.0,1.0174732},
90 {5,1.00,0.0,-2.4891043},
91 {5,2.00,0.0,-2.3425989},
92 {5,3.00,0.0,8.2107668},
93 {5,0.0,1.50,-1.7408895},
94 {5,0.25,1.50,5.0178003},
95 {5,1.00,1.50,1.4885798},
96 {5,2.00,1.50,-3.0418901},
97 {5,3.00,1.50,0.7206789},
99 const double alphastar;
107 template<
typename MoleFracType>
108 double R(
const MoleFracType &)
const {
return 1.0; }
112 return alphastar*10+8;
120 template<
typename TType,
typename RhoType,
typename MoleFracType>
122 const RhoType& rhostar,
123 const MoleFracType& )
const
125 std::common_type_t<TType, RhoType> o = 0.0;
127 int p =
static_cast<int>(el[0]);
128 auto q = el[1], r = el[2], Apqr = el[3];
129 o = o + Apqr *
powi(rhostar, p) *
pow(Tstar, -q) *
pow(alphastar, r);