diff --git a/include/cantera/thermo/HMWSoln.h b/include/cantera/thermo/HMWSoln.h index 2a2001d09..b4cc904f2 100644 --- a/include/cantera/thermo/HMWSoln.h +++ b/include/cantera/thermo/HMWSoln.h @@ -1273,37 +1273,6 @@ public: */ HMWSoln& operator=(const HMWSoln& right); - //! This is a special constructor, used to replicate test problems - //! during the initial verification of the object - /*! - * test problems: - * 1 = NaCl problem - 5 species - the thermo is read in from an XML file - * - * speci molality charge - * Cl- 6.0954 6.0997E+00 -1 - * H+ 1.0000E-08 2.1628E-09 1 - * Na+ 6.0954E+00 6.0997E+00 1 - * OH- 7.5982E-07 1.3977E-06 -1 - * - * HMW_params____beta0MX__beta1MX__beta2MX__CphiMX_____alphaMX__thetaij - * 10 - * 1 2 0.1775 0.2945 0.0 0.00080 2.0 0.0 - * 1 3 0.0765 0.2664 0.0 0.00127 2.0 0.0 - * 1 4 0.0 0.0 0.0 0.0 0.0 -0.050 - * 2 3 0.0 0.0 0.0 0.0 0.0 0.036 - * 2 4 0.0 0.0 0.0 0.0 0.0 0.0 - * 3 4 0.0864 0.253 0.0 0.0044 2.0 0.0 - * - * Triplet_interaction_parameters_psiaa'_or_psicc' - * 2 - * 1 2 3 -0.004 - * 1 3 4 -0.006 - * - * @param testProb Hard -coded test problem to instantiate. - * Current valid values are 1. - */ - HMWSoln(int testProb); - //! Destructor. virtual ~HMWSoln(); diff --git a/src/thermo/HMWSoln.cpp b/src/thermo/HMWSoln.cpp index c0ea299ed..d9966b56a 100644 --- a/src/thermo/HMWSoln.cpp +++ b/src/thermo/HMWSoln.cpp @@ -393,147 +393,6 @@ HMWSoln& HMWSoln::operator=(const HMWSoln& b) return *this; } -HMWSoln::HMWSoln(int testProb) : - MolalityVPSSTP(), - m_formPitzer(PITZERFORM_BASE), - m_formPitzerTemp(PITZER_TEMP_CONSTANT), - m_formGC(2), - m_IionicMolality(0.0), - m_maxIionicStrength(100.0), - m_TempPitzerRef(298.15), - m_IionicMolalityStoich(0.0), - m_form_A_Debye(A_DEBYE_WATER), - m_A_Debye(1.172576), // units = sqrt(kg/gmol) - m_waterSS(0), - m_densWaterSS(1000.), - m_waterProps(0), - m_molalitiesAreCropped(false), - IMS_typeCutoff_(0), - IMS_X_o_cutoff_(0.2), - IMS_gamma_o_min_(1.0E-5), - IMS_gamma_k_min_(10.0), - IMS_cCut_(0.05), - IMS_slopefCut_(0.6), - IMS_slopegCut_(0.0), - IMS_dfCut_(0.0), - IMS_efCut_(0.0), - IMS_afCut_(0.0), - IMS_bfCut_(0.0), - IMS_dgCut_(0.0), - IMS_egCut_(0.0), - IMS_agCut_(0.0), - IMS_bgCut_(0.0), - MC_X_o_cutoff_(0.0), - MC_X_o_min_(0.0), - MC_slopepCut_(0.0), - MC_dpCut_(0.0), - MC_epCut_(0.0), - MC_apCut_(0.0), - MC_bpCut_(0.0), - MC_cpCut_(0.0), - CROP_ln_gamma_o_min(-6.0), - CROP_ln_gamma_o_max(3.0), - CROP_ln_gamma_k_min(-5.0), - CROP_ln_gamma_k_max(15.0), - m_last_is(-1.0), - m_debugCalc(0) -{ - if (testProb != 1) { - throw CanteraError("HMWSoln::HMWSoln", "unknown test problem"); - } - - initThermoFile("HMW_NaCl.xml", ""); - - size_t i = speciesIndex("Cl-"); - size_t j = speciesIndex("H+"); - size_t n = i * m_kk + j; - size_t ct = m_CounterIJ[n]; - m_Beta0MX_ij[ct] = 0.1775; - m_Beta1MX_ij[ct] = 0.2945; - m_CphiMX_ij[ct] = 0.0008; - m_Alpha1MX_ij[ct]= 2.000; - - - i = speciesIndex("Cl-"); - j = speciesIndex("Na+"); - n = i * m_kk + j; - ct = m_CounterIJ[n]; - m_Beta0MX_ij[ct] = 0.0765; - m_Beta1MX_ij[ct] = 0.2664; - m_CphiMX_ij[ct] = 0.00127; - m_Alpha1MX_ij[ct]= 2.000; - - - i = speciesIndex("Cl-"); - j = speciesIndex("OH-"); - n = i * m_kk + j; - ct = m_CounterIJ[n]; - m_Theta_ij[ct] = -0.05; - - i = speciesIndex("H+"); - j = speciesIndex("Na+"); - n = i * m_kk + j; - ct = m_CounterIJ[n]; - m_Theta_ij[ct] = 0.036; - - i = speciesIndex("Na+"); - j = speciesIndex("OH-"); - n = i * m_kk + j; - ct = m_CounterIJ[n]; - m_Beta0MX_ij[ct] = 0.0864; - m_Beta1MX_ij[ct] = 0.253; - m_CphiMX_ij[ct] = 0.0044; - m_Alpha1MX_ij[ct]= 2.000; - - i = speciesIndex("Cl-"); - j = speciesIndex("H+"); - size_t k = speciesIndex("Na+"); - double param = -0.004; - n = i * m_kk *m_kk + j * m_kk + k ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = i * m_kk *m_kk + k * m_kk + j ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = j * m_kk *m_kk + i * m_kk + k ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = j * m_kk *m_kk + k * m_kk + i ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = k * m_kk *m_kk + j * m_kk + i ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = k * m_kk *m_kk + i * m_kk + j ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - - i = speciesIndex("Cl-"); - j = speciesIndex("Na+"); - k = speciesIndex("OH-"); - param = -0.006; - n = i * m_kk *m_kk + j * m_kk + k ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = i * m_kk *m_kk + k * m_kk + j ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = j * m_kk *m_kk + i * m_kk + k ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = j * m_kk *m_kk + k * m_kk + i ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = k * m_kk *m_kk + j * m_kk + i ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - n = k * m_kk *m_kk + i * m_kk + j ; - m_Psi_ijk[n] = param; - m_Psi_ijk_coeff(0,n) = param; - - printCoeffs(); -} - HMWSoln::~HMWSoln() { delete m_waterProps; diff --git a/test_problems/cathermo/HMW_test_1/HMW_test_1.cpp b/test_problems/cathermo/HMW_test_1/HMW_test_1.cpp index 863672234..b8a0c79ce 100644 --- a/test_problems/cathermo/HMW_test_1/HMW_test_1.cpp +++ b/test_problems/cathermo/HMW_test_1/HMW_test_1.cpp @@ -37,7 +37,8 @@ int main(int argc, char** argv) try { - HMWSoln* HMW = new HMWSoln(1); + HMWSoln* HMW = new HMWSoln("HMW_NaCl.xml"); + HMW->printCoeffs(); size_t nsp = HMW->nSpecies();