Skip to content
Snippets Groups Projects
Commit e63fe68d authored by Ian Bell's avatar Ian Bell
Browse files

Added new models to the variant

parent 3eec89ec
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,9 @@ namespace teqp { ...@@ -36,6 +36,9 @@ namespace teqp {
if (kind == "vdW1") { if (kind == "vdW1") {
return vdWEOS1(spec.at("a"), spec.at("b")); return vdWEOS1(spec.at("a"), spec.at("b"));
} }
else if (kind == "vdW") {
return vdWEOS<double>(spec.at("Tcrit / K"), spec.at("pcrit / Pa"));
}
else if (kind == "PR") { else if (kind == "PR") {
std::valarray<double> Tc_K = spec.at("Tcrit / K"), pc_Pa = spec.at("pcrit / Pa"), acentric = spec.at("acentric"); std::valarray<double> Tc_K = spec.at("Tcrit / K"), pc_Pa = spec.at("pcrit / Pa"), acentric = spec.at("acentric");
Eigen::ArrayXXd kmat(0, 0); Eigen::ArrayXXd kmat(0, 0);
...@@ -61,6 +64,12 @@ namespace teqp { ...@@ -61,6 +64,12 @@ namespace teqp {
else if (kind == "multifluid") { else if (kind == "multifluid") {
return multifluidfactory(spec); return multifluidfactory(spec);
} }
else if (kind == "SW_EspindolaHeredia2009"){
return squarewell::EspindolaHeredia2009(spec.at("lambda"));
}
else if (kind == "EXP6_Kataoka1992"){
return exp6::Kataoka1992(spec.at("alpha"));
}
else { else {
throw teqpcException(30, "Unknown kind:" + kind); throw teqpcException(30, "Unknown kind:" + kind);
} }
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include "teqp/models/multifluid_mutant.hpp" #include "teqp/models/multifluid_mutant.hpp"
#include "teqp/ideal_eosterms.hpp" #include "teqp/ideal_eosterms.hpp"
#include "teqp/models/ammonia_water.hpp" #include "teqp/models/ammonia_water.hpp"
#include "teqp/models/model_potentials/squarewell.hpp"
#include "teqp/models/model_potentials/exp6.hpp"
namespace teqp { namespace teqp {
...@@ -31,18 +33,24 @@ namespace teqp { ...@@ -31,18 +33,24 @@ namespace teqp {
using multifluid_t = decltype(multifluidfactory(nlohmann::json{})); using multifluid_t = decltype(multifluidfactory(nlohmann::json{}));
//using multifluidmutant_t = decltype(build_multifluid_mutant(multifluid_t{}, nlohmann::json{})); // need to figure out how to get this to work //using multifluidmutant_t = decltype(build_multifluid_mutant(multifluid_t{}, nlohmann::json{})); // need to figure out how to get this to work
using ammonia_water_TillnerRoth_t = AmmoniaWaterTillnerRoth; using ammonia_water_TillnerRoth_t = AmmoniaWaterTillnerRoth;
using SW_EspindolaHeredia2009_t = squarewell::EspindolaHeredia2009;
using EXP6_Kataoka1992_t = exp6::Kataoka1992;
using vdWEOS_t = vdWEOS<double>;
using idealgas_t = IdealHelmholtz; using idealgas_t = IdealHelmholtz;
// The set of these models is exposed in the variant // The set of these models is exposed in the variant
using AllowedModels = std::variant< using AllowedModels = std::variant<
vdWEOS1, vdWEOS1,
vdWEOS_t,
canonical_cubic_t, canonical_cubic_t,
PCSAFT_t, PCSAFT_t,
CPA_t, CPA_t,
multifluid_t, multifluid_t,
idealgas_t, idealgas_t,
ammonia_water_TillnerRoth_t ammonia_water_TillnerRoth_t,
SW_EspindolaHeredia2009_t,
EXP6_Kataoka1992_t
//multifluidmutant_t //multifluidmutant_t
>; >;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment