From e63fe68d91f572943029deb603aa1b6ff911831a Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Thu, 3 Nov 2022 20:42:59 -0400
Subject: [PATCH] Added new models to the variant

---
 include/teqp/json_builder.hpp |  9 +++++++++
 include/teqp/models/fwd.hpp   | 10 +++++++++-
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/include/teqp/json_builder.hpp b/include/teqp/json_builder.hpp
index afc6959..c002210 100644
--- a/include/teqp/json_builder.hpp
+++ b/include/teqp/json_builder.hpp
@@ -36,6 +36,9 @@ namespace teqp {
         if (kind == "vdW1") {
             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") {
             std::valarray<double> Tc_K = spec.at("Tcrit / K"), pc_Pa = spec.at("pcrit / Pa"), acentric = spec.at("acentric");
             Eigen::ArrayXXd kmat(0, 0);
@@ -61,6 +64,12 @@ namespace teqp {
         else if (kind == "multifluid") {
             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 {
             throw teqpcException(30, "Unknown kind:" + kind);
         }
diff --git a/include/teqp/models/fwd.hpp b/include/teqp/models/fwd.hpp
index f025416..664ff51 100644
--- a/include/teqp/models/fwd.hpp
+++ b/include/teqp/models/fwd.hpp
@@ -19,6 +19,8 @@
 #include "teqp/models/multifluid_mutant.hpp"
 #include "teqp/ideal_eosterms.hpp"
 #include "teqp/models/ammonia_water.hpp"
+#include "teqp/models/model_potentials/squarewell.hpp"
+#include "teqp/models/model_potentials/exp6.hpp"
 
 namespace teqp {
 
@@ -31,18 +33,24 @@ namespace teqp {
     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 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;
 
 	// The set of these models is exposed in the variant
 	using AllowedModels = std::variant<
 		vdWEOS1,
+        vdWEOS_t,
         canonical_cubic_t,
         PCSAFT_t,
         CPA_t,
         multifluid_t,
         idealgas_t,
-        ammonia_water_TillnerRoth_t
+        ammonia_water_TillnerRoth_t,
+        SW_EspindolaHeredia2009_t,
+        EXP6_Kataoka1992_t
         //multifluidmutant_t
 	>;
 }
-- 
GitLab