diff --git a/Cantera/src/thermo/IdealSolidSolnPhase.cpp b/Cantera/src/thermo/IdealSolidSolnPhase.cpp index ccc8aa17b..db8cbdd65 100644 --- a/Cantera/src/thermo/IdealSolidSolnPhase.cpp +++ b/Cantera/src/thermo/IdealSolidSolnPhase.cpp @@ -789,9 +789,9 @@ namespace Cantera { * \f[ * \mu^0_k(T,P) = \mu^{ref}_k(T) + (P - P_{ref}) * V_k * \f] - * where \f$V_k\f$ is the molar volume of pure species k<\I>. + * where \f$V_k\f$ is the molar volume of pure species k. * \f$ \mu^{ref}_k(T)\f$ is the chemical potential of pure - * species k<\I> at the reference pressure, \f$P_{ref}\f$. + * species k at the reference pressure, \f$P_{ref}\f$. * * @param grt Vector of length m_kk, which on return sr[k] * will contain the nondimensional diff --git a/Cantera/src/thermo/LatticePhase.h b/Cantera/src/thermo/LatticePhase.h index 7c160560c..111848b09 100644 --- a/Cantera/src/thermo/LatticePhase.h +++ b/Cantera/src/thermo/LatticePhase.h @@ -634,6 +634,14 @@ namespace Cantera { #ifdef H298MODIFY_CAPABILITY + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298SS(const int k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; diff --git a/Cantera/src/thermo/LatticeSolidPhase.h b/Cantera/src/thermo/LatticeSolidPhase.h index d97116f3b..16f1bc4a7 100644 --- a/Cantera/src/thermo/LatticeSolidPhase.h +++ b/Cantera/src/thermo/LatticeSolidPhase.h @@ -131,6 +131,14 @@ namespace Cantera { #ifdef H298MODIFY_CAPABILITY + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param HF298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298SS(const int k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; diff --git a/Cantera/src/thermo/ShomatePoly.h b/Cantera/src/thermo/ShomatePoly.h index 2937d8f0b..f1a65db63 100644 --- a/Cantera/src/thermo/ShomatePoly.h +++ b/Cantera/src/thermo/ShomatePoly.h @@ -290,8 +290,17 @@ namespace Cantera { } #ifdef H298MODIFY_CAPABILITY - + //! Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) + /*! + * The 298K Heat of Formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param h298 If this is nonnull, the current value of the Heat of Formation at 298K and 1 bar for + * species m_index is returned in h298[m_index]. + * @return Returns the current value of the Heat of Formation at 298K and 1 bar for + * species m_index. + */ virtual doublereal reportHf298(doublereal* const h298 = 0) const { double tPoly[4]; @@ -317,7 +326,14 @@ namespace Cantera { return hh; } - + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298(const int k, const doublereal Hf298New) { doublereal hnow = reportHf298(); doublereal delH = Hf298New - hnow; diff --git a/Cantera/src/thermo/SingleSpeciesTP.h b/Cantera/src/thermo/SingleSpeciesTP.h index 8375b1eae..8fae1c760 100644 --- a/Cantera/src/thermo/SingleSpeciesTP.h +++ b/Cantera/src/thermo/SingleSpeciesTP.h @@ -401,6 +401,14 @@ namespace Cantera { #ifdef H298MODIFY_CAPABILITY + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298SS(const int k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; diff --git a/Cantera/src/thermo/SpeciesThermoInterpType.h b/Cantera/src/thermo/SpeciesThermoInterpType.h index 6e8f83b04..74db43a3c 100644 --- a/Cantera/src/thermo/SpeciesThermoInterpType.h +++ b/Cantera/src/thermo/SpeciesThermoInterpType.h @@ -266,8 +266,26 @@ namespace Cantera { #ifdef H298MODIFY_CAPABILITY + //! Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) + /*! + * The 298K Heat of Formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param h298 If this is nonnull, the current value of the Heat of Formation at 298K and 1 bar for + * species m_speciesIndex is returned in h298[m_speciesIndex]. + * @return Returns the current value of the Heat of Formation at 298K and 1 bar for + * species m_speciesIndex. + */ virtual doublereal reportHf298(doublereal* const h298 = 0) const; + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298(const int k, const doublereal Hf298New); #endif diff --git a/Cantera/src/thermo/SpeciesThermoMgr.h b/Cantera/src/thermo/SpeciesThermoMgr.h index 14d5347c3..48704a9ba 100644 --- a/Cantera/src/thermo/SpeciesThermoMgr.h +++ b/Cantera/src/thermo/SpeciesThermoMgr.h @@ -480,10 +480,26 @@ namespace Cantera { #ifdef H298MODIFY_CAPABILITY + //! Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) + /*! + * The 298K Heat of Formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k species index + * @return Returns the current value of the Heat of Formation at 298K and 1 bar + */ virtual doublereal reportOneHf298(int k) const { throw CanteraError("reportHF298", "unimplemented"); } + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298(const int k, const doublereal Hf298New) { throw CanteraError("reportHF298", "unimplemented"); } diff --git a/Cantera/src/thermo/SurfPhase.h b/Cantera/src/thermo/SurfPhase.h index 2872c9db4..b7a5a3c3e 100644 --- a/Cantera/src/thermo/SurfPhase.h +++ b/Cantera/src/thermo/SurfPhase.h @@ -545,6 +545,14 @@ namespace Cantera { #ifdef H298MODIFY_CAPABILITY + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298SS(const int k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_tlast += 0.0001234; diff --git a/Cantera/src/thermo/ThermoPhase.h b/Cantera/src/thermo/ThermoPhase.h index a4ef04d99..3d5ddb577 100644 --- a/Cantera/src/thermo/ThermoPhase.h +++ b/Cantera/src/thermo/ThermoPhase.h @@ -778,18 +778,53 @@ namespace Cantera { } #ifdef H298MODIFY_CAPABILITY + + //! Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) + /*! + * The 298K Heat of Formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k species index + * @return Returns the current value of the Heat of Formation at 298K and 1 bar + */ doublereal Hf298SS(const int k) const { - return (m_spthermo->reportOneHf298(k)); + return (m_spthermo->reportOneHf298(k)); } + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298SS(const int k, const doublereal Hf298New) { - m_spthermo->modifyOneHf298(k, Hf298New); + m_spthermo->modifyOneHf298(k, Hf298New); } + #else + + //! Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) + /*! + * The 298K Heat of Formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k species index + * @return Returns the current value of the Heat of Formation at 298K and 1 bar + */ doublereal Hf298SS(const int k) const { return err("Hf298SS - H298MODIFY_CAPABILITY not compiled in"); } + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ virtual void modifyOneHf298SS(const int k, const doublereal Hf298New) { (void) err("Hf298SS - H298MODIFY_CAPABILITY not compiled in"); } diff --git a/Cantera/src/thermo/VPStandardStateTP.h b/Cantera/src/thermo/VPStandardStateTP.h index 988ac937a..610b29092 100644 --- a/Cantera/src/thermo/VPStandardStateTP.h +++ b/Cantera/src/thermo/VPStandardStateTP.h @@ -422,6 +422,14 @@ protected: #ifdef H298MODIFY_CAPABILITY + //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) + /*! + * The 298K heat of formation is defined as the enthalpy change to create the standard state + * of the species from its constituent elements in their standard states at 298 K and 1 bar. + * + * @param k Species k + * @param HF298New Specify the new value of the Heat of Formation at 298K and 1 bar + */ void modifyOneHf298SS(const int k, const doublereal Hf298New) { m_spthermo->modifyOneHf298(k, Hf298New); m_Tlast_ss += 0.0001234; diff --git a/Cantera/src/thermo/WaterSSTP.cpp b/Cantera/src/thermo/WaterSSTP.cpp index 863d96803..0d3f0ac93 100644 --- a/Cantera/src/thermo/WaterSSTP.cpp +++ b/Cantera/src/thermo/WaterSSTP.cpp @@ -34,7 +34,6 @@ namespace Cantera { m_mw(0.0), EW_Offset(0.0), SW_Offset(0.0), - m_verbose(0), m_ready(false), m_allowGasPhase(false) { @@ -49,7 +48,6 @@ namespace Cantera { m_mw(0.0), EW_Offset(0.0), SW_Offset(0.0), - m_verbose(0), m_ready(false), m_allowGasPhase(false) { @@ -64,7 +62,6 @@ namespace Cantera { m_mw(0.0), EW_Offset(0.0), SW_Offset(0.0), - m_verbose(0), m_ready(false), m_allowGasPhase(false) { @@ -80,7 +77,6 @@ namespace Cantera { m_mw(b.m_mw), EW_Offset(b.EW_Offset), SW_Offset(b.SW_Offset), - m_verbose(b.m_verbose), m_ready(false), m_allowGasPhase(b.m_allowGasPhase) { @@ -108,7 +104,6 @@ namespace Cantera { m_mw = b.m_mw; - m_verbose = b.m_verbose; m_ready = b.m_ready; m_allowGasPhase = b.m_allowGasPhase; return *this; diff --git a/Cantera/src/thermo/WaterSSTP.h b/Cantera/src/thermo/WaterSSTP.h index b4add6b2f..5231f8655 100644 --- a/Cantera/src/thermo/WaterSSTP.h +++ b/Cantera/src/thermo/WaterSSTP.h @@ -551,22 +551,21 @@ namespace Cantera { //! Molecular weight of Water -> Cantera assumption doublereal m_mw; - /** - * Offset constants used to obtain consistency with the NIST database. - * This is added to all internal energy and enthalpy results. + //! Offset constants used to obtain consistency with the NIST database. + /*! + * This is added to all internal energy and enthalpy results. * units = J kmol-1. */ - double EW_Offset; + doublereal EW_Offset; - /* - * Offset constant used to obtain consistency with NIST convention. - * This is added to all internal entropy results. + //! Offset constant used to obtain consistency with NIST convention. + /*! + * This is added to all internal entropy results. * units = J kmol-1 K-1. */ - double SW_Offset; - - bool m_verbose; + doublereal SW_Offset; + //! Boolean is true if object has been properly initialized for calculation bool m_ready; /**