@@ -208,6 +208,32 @@ TEST(ct, thermo)
208
208
double T = thermo_temperature (thermo);
209
209
ASSERT_GT (T, 2200 );
210
210
ASSERT_LT (T, 2300 );
211
+
212
+ size_t ns = thermo_nSpecies (thermo);
213
+ vector<double > work (ns);
214
+ vector<double > X (ns);
215
+ thermo_getMoleFractions (thermo, ns, X.data ());
216
+ double prod;
217
+
218
+ thermo_getPartialMolarEnthalpies (thermo, ns, work.data ());
219
+ prod = std::inner_product (X.begin (), X.end (), work.begin (), 0.0 );
220
+ ASSERT_NEAR (prod, thermo_enthalpy_mole (thermo), 1e-6 );
221
+
222
+ thermo_getPartialMolarEntropies (thermo, ns, work.data ());
223
+ prod = std::inner_product (X.begin (), X.end (), work.begin (), 0.0 );
224
+ ASSERT_NEAR (prod, thermo_entropy_mole (thermo), 1e-6 );
225
+
226
+ thermo_getPartialMolarIntEnergies (thermo, ns, work.data ());
227
+ prod = std::inner_product (X.begin (), X.end (), work.begin (), 0.0 );
228
+ ASSERT_NEAR (prod, thermo_intEnergy_mole (thermo), 1e-6 );
229
+
230
+ thermo_getPartialMolarCp (thermo, ns, work.data ());
231
+ prod = std::inner_product (X.begin (), X.end (), work.begin (), 0.0 );
232
+ ASSERT_NEAR (prod, thermo_cp_mole (thermo), 1e-6 );
233
+
234
+ thermo_getPartialMolarVolumes (thermo, ns, work.data ());
235
+ prod = std::inner_product (X.begin (), X.end (), work.begin (), 0.0 );
236
+ ASSERT_NEAR (prod, 1 ./thermo_molarDensity (thermo), 1e-6 );
211
237
}
212
238
213
239
TEST (ct, kinetics)
0 commit comments