diff --git a/include/teqp/models/vdW.hpp b/include/teqp/models/vdW.hpp index 214444bbda9d04f92c91e73453eb136f819305a8..0096bf1cd2250bcd559dfc1ecdd9317aec329d6d 100644 --- a/include/teqp/models/vdW.hpp +++ b/include/teqp/models/vdW.hpp @@ -65,6 +65,9 @@ public: /// \note All interaction parameters are set to default value of zero and cannot currently be tuned vdWEOS(const std::valarray<NumType>& Tc_K, const std::valarray<NumType>& pc_Pa) { + if (Tc_K.size() != pc_Pa.size()){ + throw teqp::InvalidArgument("Sizes of Tc_K " + std::to_string(Tc_K.size()) + " and pc_Pa" + std::to_string(pc_Pa.size()) + " do not agree") + } ai.resize(Tc_K.size()); bi.resize(Tc_K.size()); for (auto i = 0; i < Tc_K.size(); ++i) {