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:
Ian Bell
2015-03-26 23:36:13 -06:00
parent 4fd0868e7f
commit 4cbd76ee75
2 changed files with 18 additions and 19 deletions

View File

@@ -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"))
{