From 96c748a522499c7fe5706ddb6dd6ef445f590655 Mon Sep 17 00:00:00 2001 From: Ian Bell <ian.bell@nist.gov> Date: Tue, 2 Nov 2021 13:00:54 -0400 Subject: [PATCH] Require estimation scheme to be specified Previously you always got Lorentz-Berthelot no matter what --- include/teqp/models/multifluid.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/include/teqp/models/multifluid.hpp b/include/teqp/models/multifluid.hpp index 20fb233..968cd08 100644 --- a/include/teqp/models/multifluid.hpp +++ b/include/teqp/models/multifluid.hpp @@ -194,9 +194,15 @@ public: static auto get_BIPdep(const nlohmann::json& collection, const std::vector<std::string>& components, const nlohmann::json& flags) { if (flags.contains("estimate")) { - return nlohmann::json({ - {"betaT", 1.0}, {"gammaT", 1.0}, {"betaV", 1.0}, {"gammaV", 1.0}, {"F", 0.0} - }); + std::string scheme = flags["estimate"]; + if (scheme == "Lorentz-Berthelot") { + return nlohmann::json({ + {"betaT", 1.0}, {"gammaT", 1.0}, {"betaV", 1.0}, {"gammaV", 1.0}, {"F", 0.0} + }); + } + else { + throw std::invalid_argument("estimation scheme is not understood:" + scheme); + } } // convert string to upper case -- GitLab