mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
setState_DP is now also tested in the PengRobinson test suite (CoolPropValidateDP)
This commit is contained in:
parent
134bb71401
commit
d4600c41ce
@ -179,6 +179,36 @@ TEST_F(PengRobinson_Test, CoolPropValidate)
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(PengRobinson_Test, CoolPropValidateDP)
|
||||
{
|
||||
// Validate the P-R EoS in Cantera with P-R EoS from CoolProp
|
||||
|
||||
const double rhoCoolProp[10] = {
|
||||
9.067928191884574,
|
||||
8.318322900591179,
|
||||
7.6883521740498155,
|
||||
7.150504298001246,
|
||||
6.685330199667018,
|
||||
6.278630757480957,
|
||||
5.919763108091383,
|
||||
5.600572727499541,
|
||||
5.314694056926007,
|
||||
5.057077678380463
|
||||
};
|
||||
|
||||
double p = 5e5;
|
||||
|
||||
// Calculate Temperature using Peng-Robinson EoS from Cantera
|
||||
for(int i=0; i<10; i++)
|
||||
{
|
||||
const double tempReference = 300 + i*25;
|
||||
set_r(1.0);
|
||||
test_phase->setState_DP(rhoCoolProp[i], p,300);
|
||||
|
||||
EXPECT_NEAR(test_phase->temperature(),tempReference,1.e-3);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(PengRobinson, lookupSpeciesProperties)
|
||||
{
|
||||
AnyMap phase_def = AnyMap::fromYamlString(
|
||||
|
Loading…
Reference in New Issue
Block a user