From 17bb09a2da095b138f802cf8b1c585809f8d1c30 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Fri, 20 Feb 2015 23:42:54 +0000 Subject: [PATCH] [Equil] Remove unused member variables from VCS_SPECIES_THERMO --- include/cantera/equil/vcs_VolPhase.h | 7 ----- include/cantera/equil/vcs_species_thermo.h | 19 ------------- src/equil/vcs_MultiPhaseEquil.cpp | 3 -- src/equil/vcs_species_thermo.cpp | 32 +--------------------- 4 files changed, 1 insertion(+), 60 deletions(-) diff --git a/include/cantera/equil/vcs_VolPhase.h b/include/cantera/equil/vcs_VolPhase.h index 4681afa61..9b9ddd6d3 100644 --- a/include/cantera/equil/vcs_VolPhase.h +++ b/include/cantera/equil/vcs_VolPhase.h @@ -22,13 +22,6 @@ class ThermoPhase; namespace VCSnonideal { -// Models for the species activity coefficients -#define VCS_AC_CONSTANT 0 -//#define VCS_AC_DEBYE_HUCKEL 23 -//#define VCS_AC_REGULAR_SOLN 25 -//#define VCS_AC_MARGULES 300 -#define VCS_AC_UNK_CANTERA -1 -#define VCS_AC_UNK -2 //! Models for the standard state volume of each species #define VCS_SSVOL_IDEALGAS 0 diff --git a/include/cantera/equil/vcs_species_thermo.h b/include/cantera/equil/vcs_species_thermo.h index bfdc81f4c..5253f3560 100644 --- a/include/cantera/equil/vcs_species_thermo.h +++ b/include/cantera/equil/vcs_species_thermo.h @@ -77,31 +77,12 @@ public: //! defaults to 1.01325E5 = 1 atm double SS0_Pref; - //! Pointer to a list of parameters that is malloced for complicated - //! reference state calculation. - void* SS0_Params; - //! Integer value representing the star state model. int SSStar_Model; - //! Pointer to a list of parameters that is malloced for complicated - //! reference star state calculation. - void* SSStar_Params; - - //! Integer value representing the activity coefficient model These are - //! defined in vcs_VolPhase.h and start with VCS_AC_... - int Activity_Coeff_Model; - - //! Pointer to a list of parameters that is malloced for activity - //! coefficient models. - void* Activity_Coeff_Params; - //! Models for the standard state volume of each species int SSStar_Vol_Model; - //! Pointer to a list of parameters that is malloced for volume models - void* SSStar_Vol_Params; - //! parameter that is used in the VCS_SSVOL_CONSTANT model. double SSStar_Vol0; diff --git a/src/equil/vcs_MultiPhaseEquil.cpp b/src/equil/vcs_MultiPhaseEquil.cpp index af1d22175..17333aceb 100644 --- a/src/equil/vcs_MultiPhaseEquil.cpp +++ b/src/equil/vcs_MultiPhaseEquil.cpp @@ -1013,8 +1013,6 @@ int vcs_Cantera_to_vprob(Cantera::MultiPhase* mphase, ts_ptr->SSStar_Model = VCS_SSSTAR_CONSTANT; ts_ptr->SSStar_Vol_Model = VCS_SSVOL_CONSTANT; } - ts_ptr->Activity_Coeff_Model = VCS_AC_CONSTANT; - ts_ptr->Activity_Coeff_Params = NULL; } else { if (vprob->m_printLvl > 2) { plogf("vcs_Cantera_convert: Species Type %d not known \n", @@ -1033,7 +1031,6 @@ int vcs_Cantera_to_vprob(Cantera::MultiPhase* mphase, */ if (gasPhase) { ts_ptr->SSStar_Vol_Model = VCS_SSVOL_IDEALGAS; - ts_ptr->SSStar_Vol_Params = NULL; ts_ptr->SSStar_Vol0 = 82.05 * 273.15 / 1.0; } else { diff --git a/src/equil/vcs_species_thermo.cpp b/src/equil/vcs_species_thermo.cpp index 737e69f3d..7ec0a944f 100644 --- a/src/equil/vcs_species_thermo.cpp +++ b/src/equil/vcs_species_thermo.cpp @@ -34,13 +34,8 @@ VCS_SPECIES_THERMO::VCS_SPECIES_THERMO(size_t indexPhase, SS0_S0(0.0), SS0_Cp0(0.0), SS0_Pref(1.01325E5), - SS0_Params(0), SSStar_Model(VCS_SSSTAR_CONSTANT), - SSStar_Params(0), - Activity_Coeff_Model(VCS_AC_CONSTANT), - Activity_Coeff_Params(0), SSStar_Vol_Model(VCS_SSVOL_IDEALGAS), - SSStar_Vol_Params(0), SSStar_Vol0(-1.0), UseCanteraCalls(false), m_VCS_UnitsFormat(VCS_UNITS_UNITLESS) @@ -64,18 +59,12 @@ VCS_SPECIES_THERMO::VCS_SPECIES_THERMO(const VCS_SPECIES_THERMO& b) : SS0_S0(b.SS0_S0), SS0_Cp0(b.SS0_Cp0), SS0_Pref(b.SS0_Pref), - SS0_Params(0), SSStar_Model(b.SSStar_Model), - SSStar_Params(0), - Activity_Coeff_Model(b.Activity_Coeff_Model), - Activity_Coeff_Params(0), SSStar_Vol_Model(b.SSStar_Vol_Model), - SSStar_Vol_Params(0), SSStar_Vol0(b.SSStar_Vol0), UseCanteraCalls(b.UseCanteraCalls), m_VCS_UnitsFormat(b.m_VCS_UnitsFormat) { - SS0_Params = 0; } VCS_SPECIES_THERMO& @@ -94,20 +83,7 @@ VCS_SPECIES_THERMO::operator=(const VCS_SPECIES_THERMO& b) SS0_Cp0 = b.SS0_Cp0; SS0_Pref = b.SS0_Pref; SSStar_Model = b.SSStar_Model; - /* - * shallow copy because function is undeveloped. - */ - SSStar_Params = b.SSStar_Params; - Activity_Coeff_Model = b.Activity_Coeff_Model; - /* - * shallow copy because function is undeveloped. - */ - Activity_Coeff_Params = b.Activity_Coeff_Params; SSStar_Vol_Model = b.SSStar_Vol_Model; - /* - * shallow copy because function is undeveloped. - */ - SSStar_Vol_Params = b.SSStar_Vol_Params; SSStar_Vol0 = b.SSStar_Vol0; UseCanteraCalls = b.UseCanteraCalls; m_VCS_UnitsFormat = b.m_VCS_UnitsFormat; @@ -233,13 +209,7 @@ double VCS_SPECIES_THERMO::eval_ac(size_t kglob) size_t kspec = IndexSpeciesPhase; ac = OwningPhase->AC_calc_one(kspec); } else { - switch (Activity_Coeff_Model) { - case VCS_AC_CONSTANT: - ac = 1.0; - break; - default: - throw CanteraError("VCS_SPECIES_THERMO::eval_ac" ,"unknown model"); - } + ac = 1.0; } return ac; }