From 89497de36975d078d11a922182ec4b3a14e0b07e Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 3 Jan 2012 16:59:02 +0000 Subject: [PATCH] Moved the getActivityConcentration() function and related functions up to the parent level, GibbsExcessVPSSTP --- Cantera/src/thermo/GibbsExcessVPSSTP.cpp | 13 +-- Cantera/src/thermo/GibbsExcessVPSSTP.h | 44 ++++++++- Cantera/src/thermo/IonsFromNeutralVPSSTP.cpp | 97 +------------------ Cantera/src/thermo/IonsFromNeutralVPSSTP.h | 83 ---------------- Cantera/src/thermo/MargulesVPSSTP.cpp | 42 +------- Cantera/src/thermo/MargulesVPSSTP.h | 42 -------- .../src/thermo/MixedSolventElectrolyte.cpp | 44 +-------- Cantera/src/thermo/MixedSolventElectrolyte.h | 43 -------- Cantera/src/thermo/MolarityIonicVPSSTP.cpp | 34 +------ Cantera/src/thermo/MolarityIonicVPSSTP.h | 48 --------- Cantera/src/thermo/PhaseCombo_Interaction.cpp | 40 +------- Cantera/src/thermo/RedlichKisterVPSSTP.cpp | 42 +------- Cantera/src/thermo/RedlichKisterVPSSTP.h | 43 -------- 13 files changed, 62 insertions(+), 553 deletions(-) diff --git a/Cantera/src/thermo/GibbsExcessVPSSTP.cpp b/Cantera/src/thermo/GibbsExcessVPSSTP.cpp index 8f357a9e5..feba2c49e 100644 --- a/Cantera/src/thermo/GibbsExcessVPSSTP.cpp +++ b/Cantera/src/thermo/GibbsExcessVPSSTP.cpp @@ -213,16 +213,17 @@ namespace Cantera { /* * - Activities, Standard States, Activity Concentrations ----------- */ + void GibbsExcessVPSSTP::getActivityConcentrations(doublereal* c) const { + getActivities(c); + } doublereal GibbsExcessVPSSTP::standardConcentration(int k) const { - err("standardConcentration"); - return -1.0; + return 1.0; } doublereal GibbsExcessVPSSTP::logStandardConc(int k) const { - err("logStandardConc"); - return -1.0; + return 0.0; } void GibbsExcessVPSSTP::getActivities(doublereal* ac) const { @@ -328,8 +329,8 @@ namespace Cantera { */ void GibbsExcessVPSSTP::getUnitsStandardConc(double *uA, int k, int sizeUA) const { for (int i = 0; i < sizeUA; i++) { - if (i == 0) uA[0] = 1.0; - if (i == 1) uA[1] = -nDim(); + if (i == 0) uA[0] = 0.0; + if (i == 1) uA[1] = 0.0; if (i == 2) uA[2] = 0.0; if (i == 3) uA[3] = 0.0; if (i == 4) uA[4] = 0.0; diff --git a/Cantera/src/thermo/GibbsExcessVPSSTP.h b/Cantera/src/thermo/GibbsExcessVPSSTP.h index 8de94d8ff..46c7a4369 100644 --- a/Cantera/src/thermo/GibbsExcessVPSSTP.h +++ b/Cantera/src/thermo/GibbsExcessVPSSTP.h @@ -74,7 +74,27 @@ namespace Cantera { * fraction vector. That's one of its primary usages. In order to keep the mole fraction * vector constant, all of the setState functions are redesigned at this layer. * - *

SetState Strategy

+ * + *

+ * Activity Concentrations: Relationship of %ThermoPhase to %Kinetics Expressions + *

+ * + * As explained in a similar discussion in the ThermoPhase class, the actual units used + * in kinetics expressions must be specified in the ThermoPhase class for the corresponding + * species. These units vary with the field of study. %Cantera uses the concept of + * activity concentrations to represent this. Activity concentrations are used directly + * in the expressions for kinetics. Standard concentrations are used as the multiplicative + * constant that takes the activity of a species and turns it into an activity concentration. + * Standard concentrations must not depend on the concentration of the species in the phase. + * + * Here we set a standard for the specification of the standard concentrations for this class + * and all child classes underneath it. We specify here that the standard concentration is + * equal to 1 for all species. Therefore, the activities appear directly in kinetics expressions + * involving species in underlying %GibbsExcessVPSSTP phases. + * + *

+ * SetState Strategy + *

* * All setState functions that set the internal state of the ThermoPhase object are * overloaded at this level, so that a current mole fraction vector is maintained within @@ -223,7 +243,24 @@ namespace Cantera { * @{ */ - + //! This method returns an array of generalized concentrations + /*! + * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / + * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration + * defined below and \f$ a_k \f$ are activities used in the + * thermodynamic functions. These activity (or generalized) + * concentrations are used by kinetics manager classes to compute the forward and + * reverse rates of elementary reactions. Note that they may + * or may not have units of concentration --- they might be + * partial pressures, mole fractions, or surface coverages, + * for example. + * + * @param c Output array of generalized concentrations. The + * units depend upon the implementation of the + * reaction rate expressions within the phase. + */ + virtual void getActivityConcentrations(doublereal* c) const; + /** @@ -237,6 +274,9 @@ namespace Cantera { * different sizes), this method may be called with an * optional parameter indicating the species. * + * The standard concentration for defaulted to 1. In other words + * the activity concentration is assumed to be 1. + * * @param k species index. Defaults to zero. */ virtual doublereal standardConcentration(int k=0) const; diff --git a/Cantera/src/thermo/IonsFromNeutralVPSSTP.cpp b/Cantera/src/thermo/IonsFromNeutralVPSSTP.cpp index f7c9a79f6..029fd29cd 100644 --- a/Cantera/src/thermo/IonsFromNeutralVPSSTP.cpp +++ b/Cantera/src/thermo/IonsFromNeutralVPSSTP.cpp @@ -323,109 +323,18 @@ namespace Cantera { //err("not implemented"); //return 0.0; } - + //=========================================================================================================== /* * - Activities, Standard States, Activity Concentrations ----------- */ - - // This method returns an array of generalized concentrations - /* - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * Here we define the activity concentrations as equal - * to the activities, because the standard concentration is 1. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - void IonsFromNeutralVPSSTP::getActivityConcentrations(doublereal* c) const { - getActivities(c); - } - + //=========================================================================================================== void IonsFromNeutralVPSSTP::getDissociationCoeffs(vector_fp& coeffs, vector_fp& charges, std::vector& neutMolIndex) const { coeffs = fm_neutralMolec_ions_; charges = m_speciesCharge; neutMolIndex = fm_invert_ionForNeutral; } - - // Return the standard concentration for the kth species - /* - * The standard concentration \f$ C^0_k \f$ used to normalize - * the activity (i.e., generalized) concentration. In many cases, this quantity - * will be the same for all species in a phase - for example, - * for an ideal gas \f$ C^0_k = P/\hat R T \f$. For this - * reason, this method returns a single value, instead of an - * array. However, for phases in which the standard - * concentration is species-specific (e.g. surface species of - * different sizes), this method may be called with an - * optional parameter indicating the species. - * - * @param k Optional parameter indicating the species. The default - * is to assume this refers to species 0. - * @return - * Returns the standard concentration. The units are by definition - * dependent on the ThermoPhase and kinetics manager representation. - */ - doublereal IonsFromNeutralVPSSTP::standardConcentration(int k) const { - return 1.0; - } - - // Natural logarithm of the standard concentration of the kth species. - /* - * @param k index of the species (defaults to zero) - */ - doublereal IonsFromNeutralVPSSTP::logStandardConc(int k) const { - return 0.0; - } - - // Returns the units of the standard and generalized concentrations. - /* - * Note they have the same units, as their - * ratio is defined to be equal to the activity of the kth - * species in the solution, which is unitless. - * - * This routine is used in print out applications where the - * units are needed. Usually, MKS units are assumed throughout - * the program and in the XML input files. - * - * The base %ThermoPhase class assigns the default quantities - * of (kmol/m3) for all species. - * Inherited classes are responsible for overriding the default - * values if necessary. - * - * @param uA Output vector containing the units - * uA[0] = kmol units - default = 1 - * uA[1] = m units - default = -nDim(), the number of spatial - * dimensions in the Phase class. - * uA[2] = kg units - default = 0; - * uA[3] = Pa(pressure) units - default = 0; - * uA[4] = Temperature units - default = 0; - * uA[5] = time units - default = 0 - * @param k species index. Defaults to 0. - * @param sizeUA output int containing the size of the vector. - * Currently, this is equal to 6. - */ - void IonsFromNeutralVPSSTP::getUnitsStandardConc(double *uA, int k, - int sizeUA) const { - uA[0] = 0; - uA[1] = 0; - uA[2] = 0; - uA[3] = 0; - uA[4] = 0; - uA[5] = 0; - } - + //=========================================================================================================== // Get the array of non-dimensional molar-based activity coefficients at // the current solution temperature, pressure, and solution concentration. /* diff --git a/Cantera/src/thermo/IonsFromNeutralVPSSTP.h b/Cantera/src/thermo/IonsFromNeutralVPSSTP.h index d0c62c20a..33b6d5d8c 100644 --- a/Cantera/src/thermo/IonsFromNeutralVPSSTP.h +++ b/Cantera/src/thermo/IonsFromNeutralVPSSTP.h @@ -264,88 +264,6 @@ namespace Cantera { * @{ */ - //! This method returns an array of generalized concentrations - /*! - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - virtual void getActivityConcentrations(doublereal* c) const; - - //! Return the standard concentration for the kth species - /*! - * The standard concentration \f$ C^0_k \f$ used to normalize - * the activity (i.e., generalized) concentration. In many cases, this quantity - * will be the same for all species in a phase - for example, - * for an ideal gas \f$ C^0_k = P/\hat R T \f$. For this - * reason, this method returns a single value, instead of an - * array. However, for phases in which the standard - * concentration is species-specific (e.g. surface species of - * different sizes), this method may be called with an - * optional parameter indicating the species. - * - * Here we define the standard concentration as being equal to 1.0. - * Therefore, the kinetics operators will be dealing in unitless - * activities for all kinetics expressions involving the molten - * salts. This assignment is subject to further assessment. - * - * @param k Optional parameter indicating the species. The default - * is to assume this refers to species 0. - * @return - * Returns the standard concentration. The units are by definition - * dependent on the ThermoPhase and kinetics manager representation. - */ - virtual doublereal standardConcentration(int k=0) const; - - - //! Natural logarithm of the standard concentration of the kth species. - /*! - * @param k index of the species (defaults to zero) - */ - virtual doublereal logStandardConc(int k=0) const; - - //! Returns the units of the standard and generalized concentrations. - /*! - * Note they have the same units, as their - * ratio is defined to be equal to the activity of the kth - * species in the solution, which is unitless. - * - * This routine is used in print out applications where the - * units are needed. Usually, MKS units are assumed throughout - * the program and in the XML input files. - * - * The base %ThermoPhase class assigns the default quantities - * of (kmol/m3) for all species. - * Inherited classes are responsible for overriding the default - * values if necessary. - * - * @param uA Output vector containing the units - * uA[0] = kmol units - default = 1 - * uA[1] = m units - default = -nDim(), the number of spatial - * dimensions in the Phase class. - * uA[2] = kg units - default = 0; - * uA[3] = Pa(pressure) units - default = 0; - * uA[4] = Temperature units - default = 0; - * uA[5] = time units - default = 0 - * @param k species index. Defaults to 0. - * @param sizeUA output int containing the size of the vector. - * Currently, this is equal to 6. - */ - virtual void getUnitsStandardConc(double *uA, int k = 0, - int sizeUA = 6) const; - - //! Get the array of non-dimensional molar-based activity coefficients at //! the current solution temperature, pressure, and solution concentration. /*! @@ -353,7 +271,6 @@ namespace Cantera { */ virtual void getActivityCoefficients(doublereal* ac) const; - //@} /// @name Partial Molar Properties of the Solution diff --git a/Cantera/src/thermo/MargulesVPSSTP.cpp b/Cantera/src/thermo/MargulesVPSSTP.cpp index ebe7c89aa..2af8706cb 100644 --- a/Cantera/src/thermo/MargulesVPSSTP.cpp +++ b/Cantera/src/thermo/MargulesVPSSTP.cpp @@ -340,41 +340,7 @@ namespace Cantera { * - Activities, Standard States, Activity Concentrations ----------- */ - // This method returns an array of generalized concentrations - /* - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * Here we define the activity concentrations as equal - * to the activities, because the standard concentration is 1. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - void MargulesVPSSTP::getActivityConcentrations(doublereal* c) const { - getActivities(c); - } - doublereal MargulesVPSSTP::standardConcentration(int k) const { - //err("standardConcentration"); - //return -1.0; - return 1.0; - } - - doublereal MargulesVPSSTP::logStandardConc(int k) const { - //err("logStandardConc"); - //return -1.0; - return 0.0; - } //==================================================================================================================== // Get the array of non-dimensional molar-based ln activity coefficients at // the current solution temperature, pressure, and solution concentration. @@ -1151,7 +1117,7 @@ namespace Cantera { if (nParamsFound != 2) { throw CanteraError("MargulesVPSSTP::readXMLBinarySpecies::excessEnthalpy for " + ispName + "::" + jspName, - "wrong number of params found"); + "wrong number of params found. Need 2"); } m_HE_b_ij[iSpot] = vParams[0]; m_HE_c_ij[iSpot] = vParams[1]; @@ -1167,7 +1133,7 @@ namespace Cantera { if (nParamsFound != 2) { throw CanteraError("MargulesVPSSTP::readXMLBinarySpecies::excessEntropy for " + ispName + "::" + jspName, - "wrong number of params found"); + "wrong number of params found. Need 2"); } m_SE_b_ij[iSpot] = vParams[0]; m_SE_c_ij[iSpot] = vParams[1]; @@ -1183,7 +1149,7 @@ namespace Cantera { if (nParamsFound != 2) { throw CanteraError("MargulesVPSSTP::readXMLBinarySpecies::excessVolume_Enthalpy for " + ispName + "::" + jspName, - "wrong number of params found"); + "wrong number of params found. Need 2"); } m_VHE_b_ij[iSpot] = vParams[0]; m_VHE_c_ij[iSpot] = vParams[1]; @@ -1199,7 +1165,7 @@ namespace Cantera { if (nParamsFound != 2) { throw CanteraError("MargulesVPSSTP::readXMLBinarySpecies::excessVolume_Entropy for " + ispName + "::" + jspName, - "wrong number of params found"); + "wrong number of params found. Need 2"); } m_VSE_b_ij[iSpot] = vParams[0]; m_VSE_c_ij[iSpot] = vParams[1]; diff --git a/Cantera/src/thermo/MargulesVPSSTP.h b/Cantera/src/thermo/MargulesVPSSTP.h index 5d675fb14..6b38baa33 100644 --- a/Cantera/src/thermo/MargulesVPSSTP.h +++ b/Cantera/src/thermo/MargulesVPSSTP.h @@ -493,48 +493,6 @@ namespace Cantera { * @{ */ - //! This method returns an array of generalized concentrations - /*! - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - virtual void getActivityConcentrations(doublereal* c) const; - - - /** - * The standard concentration \f$ C^0_k \f$ used to normalize - * the generalized concentration. In many cases, this quantity - * will be the same for all species in a phase - for example, - * for an ideal gas \f$ C^0_k = P/\hat R T \f$. For this - * reason, this method returns a single value, instead of an - * array. However, for phases in which the standard - * concentration is species-specific (e.g. surface species of - * different sizes), this method may be called with an - * optional parameter indicating the species. - * - * @param k species index. Defaults to zero. - */ - virtual doublereal standardConcentration(int k=0) const; - - /** - * Returns the natural logarithm of the standard - * concentration of the kth species - * - * @param k species index - */ - virtual doublereal logStandardConc(int k=0) const; //! Get the array of non-dimensional molar-based ln activity coefficients at //! the current solution temperature, pressure, and solution concentration. diff --git a/Cantera/src/thermo/MixedSolventElectrolyte.cpp b/Cantera/src/thermo/MixedSolventElectrolyte.cpp index fc6edbfa4..922a40bfa 100644 --- a/Cantera/src/thermo/MixedSolventElectrolyte.cpp +++ b/Cantera/src/thermo/MixedSolventElectrolyte.cpp @@ -329,52 +329,14 @@ namespace Cantera { } } - - + //==================================================================================================================== /* * ------------ Molar Thermodynamic Properties ---------------------- */ - - + //==================================================================================================================== /* * - Activities, Standard States, Activity Concentrations ----------- */ - - // This method returns an array of generalized concentrations - /* - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * Here we define the activity concentrations as equal - * to the activities, because the standard concentration is 1. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - void MixedSolventElectrolyte::getActivityConcentrations(doublereal* c) const { - getActivities(c); - } - - doublereal MixedSolventElectrolyte::standardConcentration(int k) const { - //err("standardConcentration"); - //return -1.0; - return 1.0; - } - - doublereal MixedSolventElectrolyte::logStandardConc(int k) const { - //err("logStandardConc"); - //return -1.0; - return 0.0; - } //==================================================================================================================== // Get the array of non-dimensional molar-based activity coefficients at // the current solution temperature, pressure, and solution concentration. @@ -394,7 +356,7 @@ namespace Cantera { ac[k] = exp(lnActCoeff_Scaled_[k]); } } - + //==================================================================================================================== /* * ------------ Partial Molar Properties of the Solution ------------ */ diff --git a/Cantera/src/thermo/MixedSolventElectrolyte.h b/Cantera/src/thermo/MixedSolventElectrolyte.h index 7ffad1f05..21a33cde8 100644 --- a/Cantera/src/thermo/MixedSolventElectrolyte.h +++ b/Cantera/src/thermo/MixedSolventElectrolyte.h @@ -493,49 +493,6 @@ namespace Cantera { * @{ */ - //! This method returns an array of generalized concentrations - /*! - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - virtual void getActivityConcentrations(doublereal* c) const; - - - /** - * The standard concentration \f$ C^0_k \f$ used to normalize - * the generalized concentration. In many cases, this quantity - * will be the same for all species in a phase - for example, - * for an ideal gas \f$ C^0_k = P/\hat R T \f$. For this - * reason, this method returns a single value, instead of an - * array. However, for phases in which the standard - * concentration is species-specific (e.g. surface species of - * different sizes), this method may be called with an - * optional parameter indicating the species. - * - * @param k species index. Defaults to zero. - */ - virtual doublereal standardConcentration(int k=0) const; - - /** - * Returns the natural logarithm of the standard - * concentration of the kth species - * - * @param k species index - */ - virtual doublereal logStandardConc(int k=0) const; - //! Get the array of non-dimensional molar-based activity coefficients at //! the current solution temperature, pressure, and solution concentration. /*! diff --git a/Cantera/src/thermo/MolarityIonicVPSSTP.cpp b/Cantera/src/thermo/MolarityIonicVPSSTP.cpp index 99f715427..6f02b9ce1 100644 --- a/Cantera/src/thermo/MolarityIonicVPSSTP.cpp +++ b/Cantera/src/thermo/MolarityIonicVPSSTP.cpp @@ -281,42 +281,10 @@ namespace Cantera { /* * ------------ Molar Thermodynamic Properties ---------------------- */ - - + //==================================================================================================================== /* * - Activities, Standard States, Activity Concentrations ----------- */ - // This method returns an array of generalized concentrations - /* - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * Here we define the activity concentrations as equal - * to the activities, because the standard concentration is 1. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - void MolarityIonicVPSSTP::getActivityConcentrations(doublereal* c) const { - getActivities(c); - } - //==================================================================================================================== - doublereal MolarityIonicVPSSTP::standardConcentration(int k) const { - return -1.0; - } - //==================================================================================================================== - doublereal MolarityIonicVPSSTP::logStandardConc(int k) const { - return 0.0; - } //==================================================================================================================== // Get the array of non-dimensional molar-based activity coefficients at // the current solution temperature, pressure, and solution concentration. diff --git a/Cantera/src/thermo/MolarityIonicVPSSTP.h b/Cantera/src/thermo/MolarityIonicVPSSTP.h index e75531a8e..1ab7cd25f 100644 --- a/Cantera/src/thermo/MolarityIonicVPSSTP.h +++ b/Cantera/src/thermo/MolarityIonicVPSSTP.h @@ -228,49 +228,6 @@ namespace Cantera { * @{ */ - //! This method returns an array of generalized concentrations - /*! - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - virtual void getActivityConcentrations(doublereal* c) const; - - - /** - * The standard concentration \f$ C^0_k \f$ used to normalize - * the generalized concentration. In many cases, this quantity - * will be the same for all species in a phase - for example, - * for an ideal gas \f$ C^0_k = P/\hat R T \f$. For this - * reason, this method returns a single value, instead of an - * array. However, for phases in which the standard - * concentration is species-specific (e.g. surface species of - * different sizes), this method may be called with an - * optional parameter indicating the species. - * - * @param k species index. Defaults to zero. - */ - virtual doublereal standardConcentration(int k=0) const; - - /** - * Returns the natural logarithm of the standard - * concentration of the kth species - * - * @param k species index - */ - virtual doublereal logStandardConc(int k=0) const; - //! Get the array of non-dimensional molar-based ln activity coefficients at //! the current solution temperature, pressure, and solution concentration. /*! @@ -278,11 +235,6 @@ namespace Cantera { */ virtual void getLnActivityCoefficients(doublereal* ac) const; - - - - - //@} /// @name Partial Molar Properties of the Solution //@{ diff --git a/Cantera/src/thermo/PhaseCombo_Interaction.cpp b/Cantera/src/thermo/PhaseCombo_Interaction.cpp index 574d3477e..ef01eb6d7 100644 --- a/Cantera/src/thermo/PhaseCombo_Interaction.cpp +++ b/Cantera/src/thermo/PhaseCombo_Interaction.cpp @@ -342,51 +342,13 @@ namespace Cantera { } } //==================================================================================================================== - /* * ------------ Molar Thermodynamic Properties ---------------------- */ - - + //==================================================================================================================== /* * - Activities, Standard States, Activity Concentrations ----------- */ - - // This method returns an array of generalized concentrations - /* - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * Here we define the activity concentrations as equal - * to the activities, because the standard concentration is 1. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - void PhaseCombo_Interaction::getActivityConcentrations(doublereal* c) const { - getActivities(c); - } - //==================================================================================================================== - doublereal PhaseCombo_Interaction::standardConcentration(int k) const { - //err("standardConcentration"); - //return -1.0; - return 1.0; - } - //==================================================================================================================== - doublereal PhaseCombo_Interaction::logStandardConc(int k) const { - //err("logStandardConc"); - //return -1.0; - return 0.0; - } //==================================================================================================================== // Get the array of non-dimensional molar-based activity coefficients at // the current solution temperature, pressure, and solution concentration. diff --git a/Cantera/src/thermo/RedlichKisterVPSSTP.cpp b/Cantera/src/thermo/RedlichKisterVPSSTP.cpp index b6dc57f3d..1f3944cd3 100644 --- a/Cantera/src/thermo/RedlichKisterVPSSTP.cpp +++ b/Cantera/src/thermo/RedlichKisterVPSSTP.cpp @@ -334,53 +334,13 @@ namespace Cantera { } //==================================================================================================================== - - - /* * ------------ Molar Thermodynamic Properties ---------------------- */ - - + //==================================================================================================================== /* * - Activities, Standard States, Activity Concentrations ----------- */ - - // This method returns an array of generalized concentrations - /* - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * Here we define the activity concentrations as equal - * to the activities, because the standard concentration is 1. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - void RedlichKisterVPSSTP::getActivityConcentrations(doublereal* c) const { - getActivities(c); - } - //==================================================================================================================== - doublereal RedlichKisterVPSSTP::standardConcentration(int k) const { - //err("standardConcentration"); - //return -1.0; - return 1.0; - } - //==================================================================================================================== - doublereal RedlichKisterVPSSTP::logStandardConc(int k) const { - //err("logStandardConc"); - //return -1.0; - return 0.0; - } //==================================================================================================================== // Get the array of non-dimensional molar-based activity coefficients at // the current solution temperature, pressure, and solution concentration. diff --git a/Cantera/src/thermo/RedlichKisterVPSSTP.h b/Cantera/src/thermo/RedlichKisterVPSSTP.h index d4d927d62..87d11f306 100644 --- a/Cantera/src/thermo/RedlichKisterVPSSTP.h +++ b/Cantera/src/thermo/RedlichKisterVPSSTP.h @@ -490,49 +490,6 @@ namespace Cantera { * @{ */ - //! This method returns an array of generalized concentrations - /*! - * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / - * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration - * defined below and \f$ a_k \f$ are activities used in the - * thermodynamic functions. These activity (or generalized) - * concentrations are used - * by kinetics manager classes to compute the forward and - * reverse rates of elementary reactions. Note that they may - * or may not have units of concentration --- they might be - * partial pressures, mole fractions, or surface coverages, - * for example. - * - * @param c Output array of generalized concentrations. The - * units depend upon the implementation of the - * reaction rate expressions within the phase. - */ - virtual void getActivityConcentrations(doublereal* c) const; - - - /** - * The standard concentration \f$ C^0_k \f$ used to normalize - * the generalized concentration. In many cases, this quantity - * will be the same for all species in a phase - for example, - * for an ideal gas \f$ C^0_k = P/\hat R T \f$. For this - * reason, this method returns a single value, instead of an - * array. However, for phases in which the standard - * concentration is species-specific (e.g. surface species of - * different sizes), this method may be called with an - * optional parameter indicating the species. - * - * @param k species index. Defaults to zero. - */ - virtual doublereal standardConcentration(int k=0) const; - - /** - * Returns the natural logarithm of the standard - * concentration of the kth species - * - * @param k species index - */ - virtual doublereal logStandardConc(int k=0) const; - //! Get the array of non-dimensional molar-based ln activity coefficients at //! the current solution temperature, pressure, and solution concentration. /*!