From ba8acd41e0da00f62376dd03d109a20416e70b14 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 29 May 2012 18:03:35 +0000 Subject: [PATCH] Updated documentation for Phase/ThermoPhase class heirarchy Removed some redundant documentation and fixed references to the no longer existent Constituent and State classes. --- doc/doxygen/phases.dox | 87 -------------------------- doc/doxygen/thermoprops.dox | 6 +- include/cantera/thermo/DebyeHuckel.h | 2 +- include/cantera/thermo/HMWSoln.h | 2 +- include/cantera/thermo/IdealGasPhase.h | 4 +- include/cantera/thermo/Phase.h | 13 ++++ 6 files changed, 20 insertions(+), 94 deletions(-) delete mode 100644 doc/doxygen/phases.dox diff --git a/doc/doxygen/phases.dox b/doc/doxygen/phases.dox deleted file mode 100644 index 3967c6df2..000000000 --- a/doc/doxygen/phases.dox +++ /dev/null @@ -1,87 +0,0 @@ -/** - * @defgroup phases Models of Phases of Matter - * - * These classes are used to represent the composition and state of a - * single phase of matter. - * Together these classes form the basis for describing the species and - * element compositions of a phase as well as the stoichiometry - * of each species, and for describing the current state of the - * phase. They do not in themselves contain Thermodynamic equation of - * state information. However, they do comprise all of the necessary - * background functionality to support thermodynamic calculations, and the - * class ThermoPhase inherits from the class Phase (see \ref thermoprops). - * - * Class Elements manages the elements that are part of a - * chemistry specification for a phase. This class may support calculations - * employing Multiple phases. In this case, a single Elements object may - * be shared by more than one Constituents class. Reactions between - * the phases may then be described using stoichiometry base on the - * same Elements class object. - * - * The member functions of class %Elements return information about - * the elements described in a particular instantiation of the - * class. - * - * Class %Constituents is designed to provide information - * about the elements and species in a phase - names, index - * numbers (location in arrays), atomic or molecular weights, - * etc. No computations are performed by the methods of this - * class. The set of elements must include all those that compose - * the species, but may include additional elements. - * - * %Constituents contains a pointer to the Elements object, and - * it contains wrapper functions for all of the functionality - * of the %Elements object, i.e., atomic weights, number and identity - * of the elements. %Elements may be added to a phase by using - * the function Constituents::addUniqueElement(). The %Elements - * object may be shared amongst different Phases. - * - * %Constituents also contains utilities retrieving the index of - * a species in the phase given its name, Constituents::speciesIndex(). - * - * Class State manages the independent variables of temperature, - * mass density, and species mass/mole fraction that define the - * thermodynamic state. - * - * Class %State stores just enough information about a - * multicomponent solution to specify its intensive thermodynamic - * state. It stores values for the temperature, mass density, and - * an array of species mass fractions. It also stores an array of - * species molecular weights, which are used to convert between - * mole and mass representations of the composition. These are the - * \e only properties of the species that class %State knows about. - * - * Class %State is not usually used directly in application - * programs. Its primary use is as a base class for class - * Phase. Class %State has no virtual methods, and none of its - * methods are meant to be overloaded. However, this is one - * exception. If the phase is incompressible, then the density - * must be replaced by the pressure as the independent variable. In - * this case, functions such as State::setMassFractions() within - * the class %State must actually now calculate the density (at - * constant T and P) instead of leaving it alone as - * befits an independent variable. Therefore, these types of - * functions are virtual functions and need to be overloaded for - * incompressible phases. Note, for nearly incompressible phases - * (or phases which utilize standard states based on a T and - * P) this change in independent variables may be - * advantageous as well, and these functions in %State need to - * overload as well so that the stored density within State - * doesn't become out of date. - * - * Class Phase derives from both clases - * Constituents and State. In addition to the methods of those two - * classes, it implements methods that allow referencing a species - * by name. And, it contains a lot of utility functions that will - * set the %State of the phase in its entirety, by first setting - * the composition, then the temperature and then the density. - * An example of this is the function, - * Phase::setState_TRY(doublereal t, doublereal dens, const doublereal* y). - * - * Class Phase contains method for saving and restoring the - * full internal states of each phase. These are called Phase::saveState() - * and Phase::restoreState(). These functions operate on a state - * vector, which is in general of length (2 + nSpecies()). The first - * two entries of the state vector is temperature and density. - * - */ diff --git a/doc/doxygen/thermoprops.dox b/doc/doxygen/thermoprops.dox index e24f6e05d..ad03bca38 100644 --- a/doc/doxygen/thermoprops.dox +++ b/doc/doxygen/thermoprops.dox @@ -243,21 +243,21 @@ * * * - * \link State::setConcentrations() setConcentrations()\endlink + * \link Phase::setConcentrations() setConcentrations()\endlink * Set the concentrations of all the species in the * phase. Note this implicitly specifies the pressure and * density of the phase. The temperature is assumed fixed. * * * - * \link State::setDensity() setDensity()\endlink + * \link Phase::setDensity() setDensity()\endlink * Set the total density of the phase. The temperature and * mole fractions are assumed fixed. Note this implicitly * sets the pressure of the phase. * * * - * \link State::setTemperature() setTemperature()\endlink + * \link Phase::setTemperature() setTemperature()\endlink * Set the temperature of the phase. The density and * the mole fractions of the phase are fixed. * diff --git a/include/cantera/thermo/DebyeHuckel.h b/include/cantera/thermo/DebyeHuckel.h index 553c66106..8504c1026 100644 --- a/include/cantera/thermo/DebyeHuckel.h +++ b/include/cantera/thermo/DebyeHuckel.h @@ -100,7 +100,7 @@ class PDSS_Water; * of pressure. The standard state gibbs free energy is obtained * from the enthalpy and entropy functions. * - * The vector Constituents::m_speciesSize[] is used to hold the + * The vector Phase::m_speciesSize[] is used to hold the * base values of species sizes. These are defined as the * molar volumes of species at infinite dilution at 300 K and 1 atm * of water. m_speciesSize are calculated during the initialization of the diff --git a/include/cantera/thermo/HMWSoln.h b/include/cantera/thermo/HMWSoln.h index 3b2c73f4e..a00c54b46 100644 --- a/include/cantera/thermo/HMWSoln.h +++ b/include/cantera/thermo/HMWSoln.h @@ -151,7 +151,7 @@ class PDSS_Water; * of pressure. The solute standard state gibbs free energy is obtained * from the enthalpy and entropy functions. * - * The vector Constituents::m_speciesSize[] is used to hold the + * The vector Phase::m_speciesSize[] is used to hold the * base values of species sizes. These are defined as the * molar volumes of species at infinite dilution at 300 K and 1 atm * of water. m_speciesSize are calculated during the initialization of the diff --git a/include/cantera/thermo/IdealGasPhase.h b/include/cantera/thermo/IdealGasPhase.h index 55960d01b..1f38b8b37 100644 --- a/include/cantera/thermo/IdealGasPhase.h +++ b/include/cantera/thermo/IdealGasPhase.h @@ -31,10 +31,10 @@ namespace Cantera * The independent unknowns are density, mass fraction, and temperature. * the #setPressure() function will calculate the density consistent with * the current mass fraction vector and temperature and the desired pressure, - * and then set the density in the derived State object. + * and then set the density. * *
- *

Specification of Species Standard %State Properties

+ *

Specification of Species Standard State Properties

*
* * It is assumed that the reference state thermodynamics may be diff --git a/include/cantera/thermo/Phase.h b/include/cantera/thermo/Phase.h index d4cbc50c0..5208c9cb1 100644 --- a/include/cantera/thermo/Phase.h +++ b/include/cantera/thermo/Phase.h @@ -15,6 +15,18 @@ namespace Cantera { class SpeciesThermo; +/** + * @defgroup phases Models of Phases of Matter + * + * These classes are used to represent the composition and state of a single + * phase of matter. Together these classes form the basis for describing the + * species and element compositions of a phase as well as the stoichiometry + * of each species, and for describing the current state of the phase. They do + * not in themselves contain Thermodynamic equation of state information. + * However, they do comprise all of the necessary background functionality to + * support thermodynamic calculations (see \ref thermoprops). + */ + //! Exception class to indicate a fixed set of elements. /*! * This class is used to warn the user when the number of elements @@ -31,6 +43,7 @@ public: //! Base class for phases of matter /*! + * * Class Phase manages the species and elements in a phase, as well as the * independent variables of temperature, mass density, and species mass/mole * fraction that define the thermodynamic state.