[clib] Enable access to critical properties of non-pure phases

Previously, only the critical properties of PureFluidPhase objects could be
accessed, but there are other ThermoPhase classes (specifically,
RedlichKwongMFTP) which overload the critTemperature, critPressure, and
critDensity functions.
This commit is contained in:
Ray Speth 2013-06-19 15:26:54 +00:00
parent 67240c4947
commit 0945a6de9b

View file

@ -697,7 +697,7 @@ extern "C" {
double th_critTemperature(int n)
{
try {
return ThermoCabinet::get<PureFluidPhase>(n).critTemperature();
return ThermoCabinet::item(n).critTemperature();
} catch (...) {
return handleAllExceptions(DERR, DERR);
}
@ -706,7 +706,7 @@ extern "C" {
double th_critPressure(int n)
{
try {
return ThermoCabinet::get<PureFluidPhase>(n).critPressure();
return ThermoCabinet::item(n).critPressure();
} catch (...) {
return handleAllExceptions(DERR, DERR);
}
@ -715,7 +715,7 @@ extern "C" {
double th_critDensity(int n)
{
try {
return ThermoCabinet::get<PureFluidPhase>(n).critDensity();
return ThermoCabinet::item(n).critDensity();
} catch (...) {
return handleAllExceptions(DERR, DERR);
}