phases is now an enum, added (non-working) critical region VLE solver

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-15 17:13:00 +02:00
parent 3e0864e620
commit 61bc24e7b1
9 changed files with 194 additions and 29 deletions

View File

@@ -12,6 +12,7 @@
#include "Backends/Helmholtz/HelmholtzEOSBackend.h"
#include "Backends/Incompressible/IncompressibleBackend.h"
#include "Backends/Helmholtz/Fluids/FluidLibrary.h"
#include "Backends/Tabular/TabularBackends.h"
namespace CoolProp {
@@ -46,9 +47,11 @@ AbstractState * AbstractState::factory(const std::string &backend, const std::st
{
return new IncompressibleBackend(fluid_string);
}
else if (!backend.compare("BRINE"))
else if (backend.find("TTSE&") == 0)
{
throw ValueError("BRINE backend not yet implemented");
// Will throw if there is a problem with this backend
shared_ptr<AbstractState> AS(factory(backend.substr(5), fluid_string));
return new TTSEBackend(*AS.get());
}
else if (!backend.compare("TREND"))
{