mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-23 03:00:17 -04:00
Calculate triple point temperatures for mixtures with REFPROP as a mole-fraction weighting
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
@@ -48,20 +48,18 @@ AbstractState * AbstractState::factory(const std::string &backend, const std::ve
|
||||
return new IncompressibleBackend(fluid_names[0]);
|
||||
}
|
||||
#if !defined(NO_TABULAR_BACKENDS)
|
||||
else if (backend.find("TTSE&") == 0)
|
||||
{
|
||||
if (fluid_names.size() != 1){throw ValueError(format("For backend [%s], name vector must be one element long", backend.c_str()));}
|
||||
// Will throw if there is a problem with this backend
|
||||
shared_ptr<AbstractState> AS(factory(backend.substr(5), fluid_names[0]));
|
||||
return new TTSEBackend(AS);
|
||||
}
|
||||
else if (backend.find("BICUBIC&") == 0)
|
||||
{
|
||||
if (fluid_names.size() != 1){throw ValueError(format("For backend [%s], name vector must be one element long", backend.c_str()));}
|
||||
// Will throw if there is a problem with this backend
|
||||
shared_ptr<AbstractState> AS(factory(backend.substr(8), fluid_names[0]));
|
||||
return new BicubicBackend(AS);
|
||||
}
|
||||
else if (backend.find("TTSE&") == 0)
|
||||
{
|
||||
// Will throw if there is a problem with this backend
|
||||
shared_ptr<AbstractState> AS(factory(backend.substr(5), fluid_names));
|
||||
return new TTSEBackend(AS);
|
||||
}
|
||||
else if (backend.find("BICUBIC&") == 0)
|
||||
{
|
||||
// Will throw if there is a problem with this backend
|
||||
shared_ptr<AbstractState> AS(factory(backend.substr(8), fluid_names));
|
||||
return new BicubicBackend(AS);
|
||||
}
|
||||
#endif
|
||||
else if (!backend.compare("TREND"))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user