From d4299fc6da0216c9ae40039e38a017d4178941e9 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 15 Jul 2015 11:34:39 -0400 Subject: [PATCH] [Test] Fix VCS-LiSi test to not use deprecated "testProb" constructor --- include/cantera/thermo/MargulesVPSSTP.h | 9 --- src/thermo/MargulesVPSSTP.cpp | 60 ------------------- .../LatticeSolid_LiSi/LiKCl_liquid.xml | 6 +- .../VCSnonideal/LatticeSolid_LiSi/latsol.cpp | 3 +- 4 files changed, 3 insertions(+), 75 deletions(-) diff --git a/include/cantera/thermo/MargulesVPSSTP.h b/include/cantera/thermo/MargulesVPSSTP.h index 522e983ca..81568f4c8 100644 --- a/include/cantera/thermo/MargulesVPSSTP.h +++ b/include/cantera/thermo/MargulesVPSSTP.h @@ -295,15 +295,6 @@ public: */ MargulesVPSSTP(XML_Node& phaseRef, const std::string& id = ""); - //! Special constructor for a hard-coded problem - /*! - * @param testProb Hard-coded value. Only the value of 1 is used. It's - * for a LiKCl system test to predict the eutectic and - * liquidus correctly. - * @deprecated To be removed after Cantera 2.2. - */ - MargulesVPSSTP(int testProb); - //! Copy constructor /*! * Note this stuff will not work until the underlying phase diff --git a/src/thermo/MargulesVPSSTP.cpp b/src/thermo/MargulesVPSSTP.cpp index c6f5274ae..b801d8d50 100644 --- a/src/thermo/MargulesVPSSTP.cpp +++ b/src/thermo/MargulesVPSSTP.cpp @@ -82,66 +82,6 @@ MargulesVPSSTP::duplMyselfAsThermoPhase() const return new MargulesVPSSTP(*this); } -MargulesVPSSTP::MargulesVPSSTP(int testProb) : - GibbsExcessVPSSTP(), - numBinaryInteractions_(0), - formMargules_(0), - formTempModel_(0) -{ - warn_deprecated("MargulesVPSSTP::MargulesVPSSTP(int testProb)", - "To be removed after Cantera 2.2"); - - initThermoFile("LiKCl_liquid.xml", ""); - - - numBinaryInteractions_ = 1; - - m_HE_b_ij.resize(1); - m_HE_c_ij.resize(1); - m_HE_d_ij.resize(1); - - m_SE_b_ij.resize(1); - m_SE_c_ij.resize(1); - m_SE_d_ij.resize(1); - - m_VHE_b_ij.resize(1); - m_VHE_c_ij.resize(1); - m_VHE_d_ij.resize(1); - - m_VSE_b_ij.resize(1); - m_VSE_c_ij.resize(1); - m_VSE_d_ij.resize(1); - - m_pSpecies_A_ij.resize(1); - m_pSpecies_B_ij.resize(1); - - - - m_HE_b_ij[0] = -17570E3; - m_HE_c_ij[0] = -377.0E3; - m_HE_d_ij[0] = 0.0; - - m_SE_b_ij[0] = -7.627E3; - m_SE_c_ij[0] = 4.958E3; - m_SE_d_ij[0] = 0.0; - - - size_t iLiCl = speciesIndex("LiCl(L)"); - if (iLiCl == npos) { - throw CanteraError("MargulesVPSSTP test1 constructor", - "Unable to find LiCl(L)"); - } - m_pSpecies_B_ij[0] = iLiCl; - - - size_t iKCl = speciesIndex("KCl(L)"); - if (iKCl == npos) { - throw CanteraError("MargulesVPSSTP test1 constructor", - "Unable to find KCl(L)"); - } - m_pSpecies_A_ij[0] = iKCl; -} - /* * - Activities, Standard States, Activity Concentrations ----------- */ diff --git a/test_problems/VCSnonideal/LatticeSolid_LiSi/LiKCl_liquid.xml b/test_problems/VCSnonideal/LatticeSolid_LiSi/LiKCl_liquid.xml index 03b31188f..768f8ba75 100644 --- a/test_problems/VCSnonideal/LatticeSolid_LiSi/LiKCl_liquid.xml +++ b/test_problems/VCSnonideal/LatticeSolid_LiSi/LiKCl_liquid.xml @@ -22,16 +22,14 @@ - - + -17570., -377 -7.627, 4.958 - - + diff --git a/test_problems/VCSnonideal/LatticeSolid_LiSi/latsol.cpp b/test_problems/VCSnonideal/LatticeSolid_LiSi/latsol.cpp index 94796c30e..d69f639dd 100644 --- a/test_problems/VCSnonideal/LatticeSolid_LiSi/latsol.cpp +++ b/test_problems/VCSnonideal/LatticeSolid_LiSi/latsol.cpp @@ -12,7 +12,6 @@ using namespace Cantera; void testProblem() { - suppress_deprecation_warnings(); double T = 273.15 + 352.0; vcs_timing_print_lvl = 0; @@ -21,7 +20,7 @@ void testProblem() "Li7Si3_and_Interstitials(S)")); std::auto_ptr Li_liq(newPhase("Li_Liquid.xml", "Li(L)")); FixedChemPotSSTP LiFixed("Li", -2.3E7); - MargulesVPSSTP salt(1); + MargulesVPSSTP salt("LiKCl_liquid.xml", "MoltenSalt_electrolyte"); // set states vector_fp x(salt.nSpecies(), 0);