TEST(Nasa9Test, Nasa9Thermo) { IdealGasMix g("../data/gasNASA9.xml", "nasa9"); size_t nsp = g.nSpecies(); double pres = 1.0E5; vector_fp Xset(nsp, 0.0); Xset[0] = 0.5; Xset[1] = 0.5; vector_fp cp_R(nsp, 0.0); vector_fp H_RT(nsp, 0.0); vector_fp S_R(nsp, 0.0); double T0 = 300.0; double dT = 199.0; double abstol = 1e-7; for (size_t i = 0; i < 15; i++) { g.setState_TPX(T0 + i*dT, pres, &Xset[0]); g.getEntropy_R(&S_R[0]); g.getCp_R(&cp_R[0]); g.getEnthalpy_RT(&H_RT[0]); EXPECT_NEAR(cp_R[0], cp_R[1], abstol); EXPECT_NEAR(cp_R[0], cp_R[2], abstol); EXPECT_NEAR(H_RT[0], H_RT[1], abstol); EXPECT_NEAR(H_RT[0], H_RT[2], abstol); EXPECT_NEAR(S_R[0], S_R[1], abstol); EXPECT_NEAR(S_R[0], S_R[2], abstol); } }
doublereal PDSS_IdealGas::cp_R_ref() const { return (cp_R()); }
/** * Calculate the constant pressure heat capacity * in mks units of J kmol-1 K-1 */ doublereal PDSS_IdealGas::cp_mole() const { doublereal val = cp_R(); return (val * GasConstant); }
doublereal ConstDensityThermo::cp_mole() const { return GasConstant * mean_X(&cp_R()[0]); }
/** * Calculate the constant pressure heat capacity * in mks units of J kmol-1 K-1 */ doublereal PDSS_IonsFromNeutral::cp_mole() const { doublereal val = cp_R(); return (val * GasConstant); }