From bec0c88e32c0e3fc75bbeae25fdd94ffc4bca518 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sun, 27 Mar 2016 23:18:26 -0400 Subject: [PATCH] [Thermo] Remove unnecessary overloads of getElectrochemPotentials --- include/cantera/thermo/GibbsExcessVPSSTP.h | 2 -- include/cantera/thermo/MargulesVPSSTP.h | 1 - include/cantera/thermo/MixedSolventElectrolyte.h | 1 - include/cantera/thermo/MolalityVPSSTP.h | 6 ------ include/cantera/thermo/MolarityIonicVPSSTP.h | 1 - include/cantera/thermo/PhaseCombo_Interaction.h | 2 -- include/cantera/thermo/RedlichKisterVPSSTP.h | 2 -- include/cantera/thermo/SingleSpeciesTP.h | 12 ------------ src/thermo/GibbsExcessVPSSTP.cpp | 9 --------- src/thermo/MargulesVPSSTP.cpp | 9 --------- src/thermo/MixedSolventElectrolyte.cpp | 9 --------- src/thermo/MolalityVPSSTP.cpp | 9 --------- src/thermo/MolarityIonicVPSSTP.cpp | 9 --------- src/thermo/PhaseCombo_Interaction.cpp | 9 --------- src/thermo/RedlichKisterVPSSTP.cpp | 9 --------- src/thermo/SingleSpeciesTP.cpp | 5 ----- 16 files changed, 95 deletions(-) diff --git a/include/cantera/thermo/GibbsExcessVPSSTP.h b/include/cantera/thermo/GibbsExcessVPSSTP.h index 62a50e078..4bf61d420 100644 --- a/include/cantera/thermo/GibbsExcessVPSSTP.h +++ b/include/cantera/thermo/GibbsExcessVPSSTP.h @@ -217,8 +217,6 @@ public: /// @name Partial Molar Properties of the Solution //@{ - void getElectrochemPotentials(doublereal* mu) const; - //! Return an array of partial molar volumes for the //! species in the mixture. Units: m^3/kmol. /*! diff --git a/include/cantera/thermo/MargulesVPSSTP.h b/include/cantera/thermo/MargulesVPSSTP.h index d9f97b9d8..2ab749323 100644 --- a/include/cantera/thermo/MargulesVPSSTP.h +++ b/include/cantera/thermo/MargulesVPSSTP.h @@ -341,7 +341,6 @@ public: virtual void getPartialMolarCp(doublereal* cpbar) const; virtual void getPartialMolarVolumes(doublereal* vbar) const; - void getElectrochemPotentials(doublereal* mu) const; //! Get the array of temperature second derivatives of the log activity //! coefficients diff --git a/include/cantera/thermo/MixedSolventElectrolyte.h b/include/cantera/thermo/MixedSolventElectrolyte.h index 9466de006..31ac55886 100644 --- a/include/cantera/thermo/MixedSolventElectrolyte.h +++ b/include/cantera/thermo/MixedSolventElectrolyte.h @@ -276,7 +276,6 @@ public: virtual void getPartialMolarEntropies(doublereal* sbar) const; virtual void getPartialMolarCp(doublereal* cpbar) const; virtual void getPartialMolarVolumes(doublereal* vbar) const; - void getElectrochemPotentials(doublereal* mu) const; //! Get the array of temperature second derivatives of the log activity //! coefficients diff --git a/include/cantera/thermo/MolalityVPSSTP.h b/include/cantera/thermo/MolalityVPSSTP.h index 0554df5e2..c97b8c8d8 100644 --- a/include/cantera/thermo/MolalityVPSSTP.h +++ b/include/cantera/thermo/MolalityVPSSTP.h @@ -451,12 +451,6 @@ public: */ virtual double osmoticCoefficient() const; - //@} - /// @name Partial Molar Properties of the Solution - //@{ - - void getElectrochemPotentials(doublereal* mu) const; - //@} //! Set equation of state parameter values from XML entries. diff --git a/include/cantera/thermo/MolarityIonicVPSSTP.h b/include/cantera/thermo/MolarityIonicVPSSTP.h index e57a0a129..ffd7ffb44 100644 --- a/include/cantera/thermo/MolarityIonicVPSSTP.h +++ b/include/cantera/thermo/MolarityIonicVPSSTP.h @@ -92,7 +92,6 @@ public: //@{ virtual void getChemPotentials(doublereal* mu) const; - void getElectrochemPotentials(doublereal* mu) const; //! Returns an array of partial molar enthalpies for the species //! in the mixture. diff --git a/include/cantera/thermo/PhaseCombo_Interaction.h b/include/cantera/thermo/PhaseCombo_Interaction.h index ae98f8a94..aa9842933 100644 --- a/include/cantera/thermo/PhaseCombo_Interaction.h +++ b/include/cantera/thermo/PhaseCombo_Interaction.h @@ -448,8 +448,6 @@ public: */ virtual void getPartialMolarVolumes(doublereal* vbar) const; - void getElectrochemPotentials(doublereal* mu) const; - //! Get the array of temperature second derivatives of the log activity //! coefficients /*! diff --git a/include/cantera/thermo/RedlichKisterVPSSTP.h b/include/cantera/thermo/RedlichKisterVPSSTP.h index 79fb8035d..f7741a92e 100644 --- a/include/cantera/thermo/RedlichKisterVPSSTP.h +++ b/include/cantera/thermo/RedlichKisterVPSSTP.h @@ -346,8 +346,6 @@ public: virtual void getPartialMolarVolumes(doublereal* vbar) const; - void getElectrochemPotentials(doublereal* mu) const; - //! Get the array of temperature second derivatives of the log activity //! coefficients /*! diff --git a/include/cantera/thermo/SingleSpeciesTP.h b/include/cantera/thermo/SingleSpeciesTP.h index 27e6b57fd..e168811a6 100644 --- a/include/cantera/thermo/SingleSpeciesTP.h +++ b/include/cantera/thermo/SingleSpeciesTP.h @@ -147,18 +147,6 @@ public: */ void getChemPotentials(doublereal* mu) const; - //! Get the species electrochemical potentials. Units: J/kmol. - /*! - * This method adds a term \f$ Fz_k \phi_k \f$ to each chemical potential. - * - * This is resolved here. A single species phase is not allowed to have - * anything other than a zero charge. - * - * @param mu On return, Contains the electrochemical potential of the - * single species and the phase. Units J/kmol . Length = 1 - */ - void getElectrochemPotentials(doublereal* mu) const; - //! Get the species partial molar enthalpies. Units: J/kmol. /*! * These are the phase enthalpies. \f$ h_k \f$. diff --git a/src/thermo/GibbsExcessVPSSTP.cpp b/src/thermo/GibbsExcessVPSSTP.cpp index 00fb20458..1543a612d 100644 --- a/src/thermo/GibbsExcessVPSSTP.cpp +++ b/src/thermo/GibbsExcessVPSSTP.cpp @@ -134,15 +134,6 @@ void GibbsExcessVPSSTP::getActivityCoefficients(doublereal* const ac) const } } -void GibbsExcessVPSSTP::getElectrochemPotentials(doublereal* mu) const -{ - getChemPotentials(mu); - double ve = Faraday * electricPotential(); - for (size_t k = 0; k < m_kk; k++) { - mu[k] += ve*charge(k); - } -} - // ------------ Partial Molar Properties of the Solution ------------ void GibbsExcessVPSSTP::getPartialMolarVolumes(doublereal* vbar) const diff --git a/src/thermo/MargulesVPSSTP.cpp b/src/thermo/MargulesVPSSTP.cpp index b26011fbf..9ddf839de 100644 --- a/src/thermo/MargulesVPSSTP.cpp +++ b/src/thermo/MargulesVPSSTP.cpp @@ -96,15 +96,6 @@ void MargulesVPSSTP::getLnActivityCoefficients(doublereal* lnac) const // ------------ Partial Molar Properties of the Solution ------------ -void MargulesVPSSTP::getElectrochemPotentials(doublereal* mu) const -{ - getChemPotentials(mu); - double ve = Faraday * electricPotential(); - for (size_t k = 0; k < m_kk; k++) { - mu[k] += ve*charge(k); - } -} - void MargulesVPSSTP::getChemPotentials(doublereal* mu) const { // First get the standard chemical potentials in molar form. This requires diff --git a/src/thermo/MixedSolventElectrolyte.cpp b/src/thermo/MixedSolventElectrolyte.cpp index acea2b6eb..5ea7f8867 100644 --- a/src/thermo/MixedSolventElectrolyte.cpp +++ b/src/thermo/MixedSolventElectrolyte.cpp @@ -97,15 +97,6 @@ void MixedSolventElectrolyte::getActivityCoefficients(doublereal* ac) const // ------------ Partial Molar Properties of the Solution ------------ -void MixedSolventElectrolyte::getElectrochemPotentials(doublereal* mu) const -{ - getChemPotentials(mu); - double ve = Faraday * electricPotential(); - for (size_t k = 0; k < m_kk; k++) { - mu[k] += ve*charge(k); - } -} - void MixedSolventElectrolyte::getChemPotentials(doublereal* mu) const { // First get the standard chemical potentials in molar form. This requires diff --git a/src/thermo/MolalityVPSSTP.cpp b/src/thermo/MolalityVPSSTP.cpp index 95ab24b67..166fdb0c6 100644 --- a/src/thermo/MolalityVPSSTP.cpp +++ b/src/thermo/MolalityVPSSTP.cpp @@ -291,15 +291,6 @@ doublereal MolalityVPSSTP::osmoticCoefficient() const return oc; } -void MolalityVPSSTP::getElectrochemPotentials(doublereal* mu) const -{ - getChemPotentials(mu); - double ve = Faraday * electricPotential(); - for (size_t k = 0; k < m_kk; k++) { - mu[k] += ve*charge(k); - } -} - void MolalityVPSSTP::setStateFromXML(const XML_Node& state) { VPStandardStateTP::setStateFromXML(state); diff --git a/src/thermo/MolarityIonicVPSSTP.cpp b/src/thermo/MolarityIonicVPSSTP.cpp index fcea65e04..3f1c7ecff 100644 --- a/src/thermo/MolarityIonicVPSSTP.cpp +++ b/src/thermo/MolarityIonicVPSSTP.cpp @@ -114,15 +114,6 @@ void MolarityIonicVPSSTP::getChemPotentials(doublereal* mu) const } } -void MolarityIonicVPSSTP::getElectrochemPotentials(doublereal* mu) const -{ - getChemPotentials(mu); - double ve = Faraday * electricPotential(); - for (size_t k = 0; k < m_kk; k++) { - mu[k] += ve*charge(k); - } -} - void MolarityIonicVPSSTP::getPartialMolarEnthalpies(doublereal* hbar) const { // Get the nondimensional standard state enthalpies diff --git a/src/thermo/PhaseCombo_Interaction.cpp b/src/thermo/PhaseCombo_Interaction.cpp index f168f0c30..41db6fe52 100644 --- a/src/thermo/PhaseCombo_Interaction.cpp +++ b/src/thermo/PhaseCombo_Interaction.cpp @@ -102,15 +102,6 @@ void PhaseCombo_Interaction::getActivityCoefficients(doublereal* ac) const // ------------ Partial Molar Properties of the Solution ------------ -void PhaseCombo_Interaction::getElectrochemPotentials(doublereal* mu) const -{ - getChemPotentials(mu); - double ve = Faraday * electricPotential(); - for (size_t k = 0; k < m_kk; k++) { - mu[k] += ve*charge(k); - } -} - void PhaseCombo_Interaction::getChemPotentials(doublereal* mu) const { // First get the standard chemical potentials in molar form. This requires diff --git a/src/thermo/RedlichKisterVPSSTP.cpp b/src/thermo/RedlichKisterVPSSTP.cpp index b9b8a0dc1..36da84c97 100644 --- a/src/thermo/RedlichKisterVPSSTP.cpp +++ b/src/thermo/RedlichKisterVPSSTP.cpp @@ -93,15 +93,6 @@ void RedlichKisterVPSSTP::getLnActivityCoefficients(doublereal* lnac) const // ------------ Partial Molar Properties of the Solution ------------ -void RedlichKisterVPSSTP::getElectrochemPotentials(doublereal* mu) const -{ - getChemPotentials(mu); - double ve = Faraday * electricPotential(); - for (size_t k = 0; k < m_kk; k++) { - mu[k] += ve*charge(k); - } -} - void RedlichKisterVPSSTP::getChemPotentials(doublereal* mu) const { // First get the standard chemical potentials in molar form. This requires diff --git a/src/thermo/SingleSpeciesTP.cpp b/src/thermo/SingleSpeciesTP.cpp index 880c6c0b2..ccb7ebfe7 100644 --- a/src/thermo/SingleSpeciesTP.cpp +++ b/src/thermo/SingleSpeciesTP.cpp @@ -131,11 +131,6 @@ void SingleSpeciesTP::getChemPotentials_RT(doublereal* murt) const murt[0] /= RT(); } -void SingleSpeciesTP::getElectrochemPotentials(doublereal* mu) const -{ - getChemPotentials(mu); -} - void SingleSpeciesTP::getPartialMolarEnthalpies(doublereal* hbar) const { getEnthalpy_RT(hbar);