Doxygen update
- beat down the warning messages from this directory. - no code changed other than reformatting.
This commit is contained in:
parent
180fbef55d
commit
36e4040750
5 changed files with 536 additions and 521 deletions
|
|
@ -39,136 +39,135 @@ using namespace std;
|
|||
namespace Cantera {
|
||||
|
||||
|
||||
/* awData structure */
|
||||
/**
|
||||
* Database for atomic molecular weights
|
||||
*
|
||||
* Values are taken from the 1989 Standard Atomic Weights, CRC
|
||||
*
|
||||
* awTable[] is a static function with scope limited to this file.
|
||||
* It can only be referenced via the static Elements class function,
|
||||
* LookupWtElements().
|
||||
*
|
||||
* units = kg / kg-mol (or equivalently gm / gm-mol)
|
||||
*
|
||||
* (note: this structure was picked because it's simple, compact,
|
||||
* and extensible).
|
||||
*
|
||||
*/
|
||||
struct awData {
|
||||
char name[4]; ///< Null Terminated name, First letter capitalized
|
||||
double atomicWeight; ///< atomic weight in kg / kg-mol
|
||||
};
|
||||
/* awData structure */
|
||||
/**
|
||||
* Database for atomic molecular weights
|
||||
*
|
||||
* Values are taken from the 1989 Standard Atomic Weights, CRC
|
||||
*
|
||||
* awTable[] is a static function with scope limited to this file.
|
||||
* It can only be referenced via the static Elements class function,
|
||||
* LookupWtElements().
|
||||
*
|
||||
* units = kg / kg-mol (or equivalently gm / gm-mol)
|
||||
*
|
||||
* (note: this structure was picked because it's simple, compact,
|
||||
* and extensible).
|
||||
*
|
||||
*/
|
||||
struct awData {
|
||||
char name[4]; ///< Null Terminated name, First letter capitalized
|
||||
double atomicWeight; ///< atomic weight in kg / kg-mol
|
||||
};
|
||||
|
||||
/*!
|
||||
* @var static struct awData aWTable[]
|
||||
* \brief aWTable is a vector containing the atomic weights database.
|
||||
*
|
||||
* The size of the table is given by the initial instantiation.
|
||||
*/
|
||||
static struct awData aWTable[] = {
|
||||
{"H", 1.00794},
|
||||
{"D", 2.0 },
|
||||
{"Tr", 3.0 },
|
||||
{"He", 4.002602},
|
||||
{"Li", 6.941 },
|
||||
{"Be", 9.012182},
|
||||
{"B", 10.811 },
|
||||
{"C", 12.011 },
|
||||
{"N", 14.00674},
|
||||
{"O", 15.9994 },
|
||||
{"F", 18.9984032},
|
||||
{"Ne", 20.1797 },
|
||||
{"Na", 22.98977},
|
||||
{"Mg", 24.3050 },
|
||||
{"Al", 26.98154},
|
||||
{"Si", 28.0855 },
|
||||
{"P", 30.97376},
|
||||
{"S", 32.066 },
|
||||
{"Cl", 35.4527 },
|
||||
{"Ar", 39.948 },
|
||||
{"K", 39.0983 },
|
||||
{"Ca", 40.078 },
|
||||
{"Sc", 44.95591},
|
||||
{"Ti", 47.88 },
|
||||
{"V", 50.9415 },
|
||||
{"Cr", 51.9961 },
|
||||
{"Mn", 54.9381 },
|
||||
{"Fe", 55.847 },
|
||||
{"Co", 58.9332 },
|
||||
{"Ni", 58.69 },
|
||||
{"Cu", 63.546 },
|
||||
{"Zn", 65.39 },
|
||||
{"Ga", 69.723 },
|
||||
{"Ge", 72.61 },
|
||||
{"As", 74.92159},
|
||||
{"Se", 78.96 },
|
||||
{"Br", 79.904 },
|
||||
{"Kr", 83.80 },
|
||||
{"Rb", 85.4678 },
|
||||
{"Sr", 87.62 },
|
||||
{"Y", 88.90585},
|
||||
{"Zr", 91.224 },
|
||||
{"Nb", 92.90638},
|
||||
{"Mo", 95.94 },
|
||||
{"Tc", 97.9072 },
|
||||
{"Ru", 101.07 },
|
||||
{"Rh", 102.9055 },
|
||||
{"Pd", 106.42 },
|
||||
{"Ag", 107.8682 },
|
||||
{"Cd", 112.411 },
|
||||
{"In", 114.82 },
|
||||
{"Sn", 118.710 },
|
||||
{"Sb", 121.75 },
|
||||
{"Te", 127.6 },
|
||||
{"I", 126.90447},
|
||||
{"Xe", 131.29 },
|
||||
{"Cs", 132.90543},
|
||||
{"Ba", 137.327 },
|
||||
{"La", 138.9055 },
|
||||
{"Ce", 140.115 },
|
||||
{"Pr", 140.90765},
|
||||
{"Nd", 144.24 },
|
||||
{"Pm", 144.9127 },
|
||||
{"Sm", 150.36 },
|
||||
{"Eu", 151.965 },
|
||||
{"Gd", 157.25 },
|
||||
{"Tb", 158.92534},
|
||||
{"Dy", 162.50 },
|
||||
{"Ho", 164.93032},
|
||||
{"Er", 167.26 },
|
||||
{"Tm", 168.93421},
|
||||
{"Yb", 173.04 },
|
||||
{"Lu", 174.967 },
|
||||
{"Hf", 178.49 },
|
||||
{"Ta", 180.9479 },
|
||||
{"W", 183.85 },
|
||||
{"Re", 186.207 },
|
||||
{"Os", 190.2 },
|
||||
{"Ir", 192.22 },
|
||||
{"Pt", 195.08 },
|
||||
{"Au", 196.96654},
|
||||
{"Hg", 200.59 },
|
||||
{"Ti", 204.3833 },
|
||||
{"Pb", 207.2 },
|
||||
{"Bi", 208.98037},
|
||||
{"Po", 208.9824 },
|
||||
{"At", 209.9871 },
|
||||
{"Rn", 222.0176 },
|
||||
{"Fr", 223.0197 },
|
||||
{"Ra", 226.0254 },
|
||||
{"Ac", 227.0279 },
|
||||
{"Th", 232.0381 },
|
||||
{"Pa", 231.03588},
|
||||
{"U", 238.0508 },
|
||||
{"Np", 237.0482 },
|
||||
{"Pu", 244.0482 }
|
||||
};
|
||||
/*!
|
||||
* @var static struct awData aWTable[]
|
||||
* \brief aWTable is a vector containing the atomic weights database.
|
||||
*
|
||||
* The size of the table is given by the initial instantiation.
|
||||
*/
|
||||
static struct awData aWTable[] = {
|
||||
{"H", 1.00794},
|
||||
{"D", 2.0 },
|
||||
{"Tr", 3.0 },
|
||||
{"He", 4.002602},
|
||||
{"Li", 6.941 },
|
||||
{"Be", 9.012182},
|
||||
{"B", 10.811 },
|
||||
{"C", 12.011 },
|
||||
{"N", 14.00674},
|
||||
{"O", 15.9994 },
|
||||
{"F", 18.9984032},
|
||||
{"Ne", 20.1797 },
|
||||
{"Na", 22.98977},
|
||||
{"Mg", 24.3050 },
|
||||
{"Al", 26.98154},
|
||||
{"Si", 28.0855 },
|
||||
{"P", 30.97376},
|
||||
{"S", 32.066 },
|
||||
{"Cl", 35.4527 },
|
||||
{"Ar", 39.948 },
|
||||
{"K", 39.0983 },
|
||||
{"Ca", 40.078 },
|
||||
{"Sc", 44.95591},
|
||||
{"Ti", 47.88 },
|
||||
{"V", 50.9415 },
|
||||
{"Cr", 51.9961 },
|
||||
{"Mn", 54.9381 },
|
||||
{"Fe", 55.847 },
|
||||
{"Co", 58.9332 },
|
||||
{"Ni", 58.69 },
|
||||
{"Cu", 63.546 },
|
||||
{"Zn", 65.39 },
|
||||
{"Ga", 69.723 },
|
||||
{"Ge", 72.61 },
|
||||
{"As", 74.92159},
|
||||
{"Se", 78.96 },
|
||||
{"Br", 79.904 },
|
||||
{"Kr", 83.80 },
|
||||
{"Rb", 85.4678 },
|
||||
{"Sr", 87.62 },
|
||||
{"Y", 88.90585},
|
||||
{"Zr", 91.224 },
|
||||
{"Nb", 92.90638},
|
||||
{"Mo", 95.94 },
|
||||
{"Tc", 97.9072 },
|
||||
{"Ru", 101.07 },
|
||||
{"Rh", 102.9055 },
|
||||
{"Pd", 106.42 },
|
||||
{"Ag", 107.8682 },
|
||||
{"Cd", 112.411 },
|
||||
{"In", 114.82 },
|
||||
{"Sn", 118.710 },
|
||||
{"Sb", 121.75 },
|
||||
{"Te", 127.6 },
|
||||
{"I", 126.90447},
|
||||
{"Xe", 131.29 },
|
||||
{"Cs", 132.90543},
|
||||
{"Ba", 137.327 },
|
||||
{"La", 138.9055 },
|
||||
{"Ce", 140.115 },
|
||||
{"Pr", 140.90765},
|
||||
{"Nd", 144.24 },
|
||||
{"Pm", 144.9127 },
|
||||
{"Sm", 150.36 },
|
||||
{"Eu", 151.965 },
|
||||
{"Gd", 157.25 },
|
||||
{"Tb", 158.92534},
|
||||
{"Dy", 162.50 },
|
||||
{"Ho", 164.93032},
|
||||
{"Er", 167.26 },
|
||||
{"Tm", 168.93421},
|
||||
{"Yb", 173.04 },
|
||||
{"Lu", 174.967 },
|
||||
{"Hf", 178.49 },
|
||||
{"Ta", 180.9479 },
|
||||
{"W", 183.85 },
|
||||
{"Re", 186.207 },
|
||||
{"Os", 190.2 },
|
||||
{"Ir", 192.22 },
|
||||
{"Pt", 195.08 },
|
||||
{"Au", 196.96654},
|
||||
{"Hg", 200.59 },
|
||||
{"Ti", 204.3833 },
|
||||
{"Pb", 207.2 },
|
||||
{"Bi", 208.98037},
|
||||
{"Po", 208.9824 },
|
||||
{"At", 209.9871 },
|
||||
{"Rn", 222.0176 },
|
||||
{"Fr", 223.0197 },
|
||||
{"Ra", 226.0254 },
|
||||
{"Ac", 227.0279 },
|
||||
{"Th", 232.0381 },
|
||||
{"Pa", 231.03588},
|
||||
{"U", 238.0508 },
|
||||
{"Np", 237.0482 },
|
||||
{"Pu", 244.0482 }
|
||||
};
|
||||
|
||||
|
||||
//! Static function to look up an atomic weight
|
||||
/*!
|
||||
*
|
||||
// Static function to look up an atomic weight
|
||||
/*
|
||||
* This static function looks up the argument string in the
|
||||
* database above and returns the associated molecular weight.
|
||||
* The data are from the periodic table.
|
||||
|
|
@ -177,8 +176,7 @@ namespace Cantera {
|
|||
* source for the element atomic weights. This helps to
|
||||
* ensure that mass is conserved.
|
||||
*
|
||||
* @param
|
||||
* ElemName String. Only the first 3 characters are significant
|
||||
* @param s String, Only the first 3 characters are significant
|
||||
*
|
||||
* @return
|
||||
* Return value contains the atomic weight of the element
|
||||
|
|
@ -188,11 +186,10 @@ namespace Cantera {
|
|||
* @exception CanteraError
|
||||
* If a match is not found, a CanteraError is thrown as well
|
||||
*/
|
||||
doublereal Elements::LookupWtElements(const std::string& s) {
|
||||
doublereal Elements::LookupWtElements(const std::string& ename) {
|
||||
int num = sizeof(aWTable) / sizeof(struct awData);
|
||||
string s3 = s.substr(0,3);
|
||||
string s3 = ename.substr(0,3);
|
||||
for (int i = 0; i < num; i++) {
|
||||
//if (!std::strncmp(s.c_str(), aWTable[i].name, 3)) {
|
||||
if (s3 == aWTable[i].name) {
|
||||
return (aWTable[i].atomicWeight);
|
||||
}
|
||||
|
|
@ -267,68 +264,68 @@ namespace Cantera {
|
|||
|
||||
|
||||
|
||||
/*
|
||||
* freezeElements():
|
||||
*
|
||||
* Set the freeze flag. This is a prerequesite to other
|
||||
* activivities, i.e., this is done before species are defined.
|
||||
*/
|
||||
void Elements::freezeElements() {
|
||||
m_elementsFrozen = true;
|
||||
}
|
||||
/*
|
||||
* freezeElements():
|
||||
*
|
||||
* Set the freeze flag. This is a prerequesite to other
|
||||
* activivities, i.e., this is done before species are defined.
|
||||
*/
|
||||
void Elements::freezeElements() {
|
||||
m_elementsFrozen = true;
|
||||
}
|
||||
|
||||
#ifdef INCL_DEPRECATED_METHODS
|
||||
/*
|
||||
*
|
||||
* Returns an ElementData struct that contains the parameters
|
||||
* for element index m.
|
||||
*/
|
||||
ElementData Elements::element(int m) const {
|
||||
ElementData e;
|
||||
e.name = m_elementNames[m];
|
||||
e.atomicWeight = m_atomicWeights[m];
|
||||
return e;
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Returns an ElementData struct that contains the parameters
|
||||
* for element index m.
|
||||
*/
|
||||
ElementData Elements::element(int m) const {
|
||||
ElementData e;
|
||||
e.name = m_elementNames[m];
|
||||
e.atomicWeight = m_atomicWeights[m];
|
||||
return e;
|
||||
}
|
||||
#endif
|
||||
/*
|
||||
* elementIndex():
|
||||
*
|
||||
* Index of element named \c name. The index is an integer
|
||||
* assigned to each element in the order it was added,
|
||||
* beginning with 0 for the first element. If \c name is not
|
||||
* the name of an element in the set, then the value -1 is
|
||||
* returned.
|
||||
*
|
||||
*/
|
||||
/*
|
||||
* elementIndex():
|
||||
*
|
||||
* Index of element named \c name. The index is an integer
|
||||
* assigned to each element in the order it was added,
|
||||
* beginning with 0 for the first element. If \c name is not
|
||||
* the name of an element in the set, then the value -1 is
|
||||
* returned.
|
||||
*
|
||||
*/
|
||||
#ifdef USE_DGG_CODE
|
||||
int Elements::elementIndex(std::string name) const{
|
||||
map<string, int>::const_iterator it;
|
||||
it = m_definedElements.find(name);
|
||||
if (it != m_definedElements.end()) {
|
||||
return it->second;
|
||||
}
|
||||
return -1;
|
||||
int Elements::elementIndex(std::string name) const{
|
||||
map<string, int>::const_iterator it;
|
||||
it = m_definedElements.find(name);
|
||||
if (it != m_definedElements.end()) {
|
||||
return it->second;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
int Elements::elementIndex(std::string name) const {
|
||||
for (int i = 0; i < m_mm; i++) {
|
||||
if (m_elementNames[i] == name) return i;
|
||||
}
|
||||
return -1;
|
||||
int Elements::elementIndex(std::string name) const {
|
||||
for (int i = 0; i < m_mm; i++) {
|
||||
if (m_elementNames[i] == name) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
*
|
||||
* Name of the element with index \c m. @param m Element
|
||||
* index. If m < 0 or m >= nElements() an exception is thrown.
|
||||
*/
|
||||
string Elements::elementName(int m) const {
|
||||
if (m >= 0 && m < nElements())
|
||||
return m_elementNames[m];
|
||||
else
|
||||
throw ElementRangeError("Elements::elementName", m, nElements());
|
||||
}
|
||||
/*
|
||||
*
|
||||
* Name of the element with index \c m. @param m Element
|
||||
* index. If m < 0 or m >= nElements() an exception is thrown.
|
||||
*/
|
||||
string Elements::elementName(int m) const {
|
||||
if (m >= 0 && m < nElements())
|
||||
return m_elementNames[m];
|
||||
else
|
||||
throw ElementRangeError("Elements::elementName", m, nElements());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -340,46 +337,46 @@ namespace Cantera {
|
|||
return (m_entropy298[m]);
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* Add an element to the current set of elements in the current object.
|
||||
* @param symbol symbol string
|
||||
* @param weight atomic weight in kg/kmol.
|
||||
*
|
||||
* The default weight is a special value, which will cause the
|
||||
* routine to look up the actual weight via a string lookup.
|
||||
*
|
||||
* There are two interfaces to this routine. The XML interface
|
||||
* looks up the required parameters for the regular interface
|
||||
* and then calls the base routine.
|
||||
*/
|
||||
void Elements::
|
||||
addElement(const std::string& symbol, doublereal weight)
|
||||
{
|
||||
if (weight == -12345.0) {
|
||||
weight = LookupWtElements(symbol);
|
||||
if (weight < 0.0) {
|
||||
throw ElementsFrozen("addElement");
|
||||
}
|
||||
}
|
||||
if (m_elementsFrozen) {
|
||||
throw ElementsFrozen("addElement");
|
||||
return;
|
||||
}
|
||||
m_atomicWeights.push_back(weight);
|
||||
m_elementNames.push_back(symbol);
|
||||
/*
|
||||
*
|
||||
* Add an element to the current set of elements in the current object.
|
||||
* @param symbol symbol string
|
||||
* @param weight atomic weight in kg/kmol.
|
||||
*
|
||||
* The default weight is a special value, which will cause the
|
||||
* routine to look up the actual weight via a string lookup.
|
||||
*
|
||||
* There are two interfaces to this routine. The XML interface
|
||||
* looks up the required parameters for the regular interface
|
||||
* and then calls the base routine.
|
||||
*/
|
||||
void Elements::
|
||||
addElement(const std::string& symbol, doublereal weight)
|
||||
{
|
||||
if (weight == -12345.0) {
|
||||
weight = LookupWtElements(symbol);
|
||||
if (weight < 0.0) {
|
||||
throw ElementsFrozen("addElement");
|
||||
}
|
||||
}
|
||||
if (m_elementsFrozen) {
|
||||
throw ElementsFrozen("addElement");
|
||||
return;
|
||||
}
|
||||
m_atomicWeights.push_back(weight);
|
||||
m_elementNames.push_back(symbol);
|
||||
#ifdef USE_DGG_CODE
|
||||
m_definedElements[symbol] = nElements() + 1;
|
||||
m_definedElements[symbol] = nElements() + 1;
|
||||
#endif
|
||||
m_mm++;
|
||||
}
|
||||
m_mm++;
|
||||
}
|
||||
|
||||
void Elements::
|
||||
addElement(const XML_Node& e) {
|
||||
doublereal weight = atof(e["atomicWt"].c_str());
|
||||
string symbol = e["name"];
|
||||
addElement(symbol, weight);
|
||||
}
|
||||
void Elements::
|
||||
addElement(const XML_Node& e) {
|
||||
doublereal weight = atof(e["atomicWt"].c_str());
|
||||
string symbol = e["name"];
|
||||
addElement(symbol, weight);
|
||||
}
|
||||
|
||||
/*
|
||||
* addUniqueElement():
|
||||
|
|
@ -572,31 +569,31 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* subscribe(), unsubscribe(), and reportSubscriptions():
|
||||
*
|
||||
* Handles setting and reporting the number of subscriptions to this
|
||||
* object.
|
||||
*/
|
||||
void Elements::subscribe() {
|
||||
++numSubscribers;
|
||||
}
|
||||
int Elements::unsubscribe() {
|
||||
--numSubscribers;
|
||||
return numSubscribers;
|
||||
}
|
||||
int Elements::reportSubscriptions() const {
|
||||
return numSubscribers;
|
||||
}
|
||||
/*
|
||||
* subscribe(), unsubscribe(), and reportSubscriptions():
|
||||
*
|
||||
* Handles setting and reporting the number of subscriptions to this
|
||||
* object.
|
||||
*/
|
||||
void Elements::subscribe() {
|
||||
++numSubscribers;
|
||||
}
|
||||
int Elements::unsubscribe() {
|
||||
--numSubscribers;
|
||||
return numSubscribers;
|
||||
}
|
||||
int Elements::reportSubscriptions() const {
|
||||
return numSubscribers;
|
||||
}
|
||||
|
||||
/********************* GLOBAL STATIC SECTION **************************/
|
||||
/*
|
||||
* We keep track of a vector of pointers to element objects.
|
||||
* Initially there are no Elements objects. Whenever one is created,
|
||||
* the pointer to that object is added onto this list.
|
||||
*/
|
||||
vector<Elements *> Elements::Global_Elements_List;
|
||||
/***********************************************************************/
|
||||
/********************* GLOBAL STATIC SECTION **************************/
|
||||
/*
|
||||
* We keep track of a vector of pointers to element objects.
|
||||
* Initially there are no Elements objects. Whenever one is created,
|
||||
* the pointer to that object is added onto this list.
|
||||
*/
|
||||
vector<Elements *> Elements::Global_Elements_List;
|
||||
/***********************************************************************/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
namespace Cantera {
|
||||
|
||||
class XML_Node;
|
||||
class ElementRangeError;
|
||||
class XML_Node;
|
||||
class ElementRangeError;
|
||||
|
||||
//! Positive number indicating we don't know the gibbs free energy
|
||||
//! of the element in its most stable state at 298.15 K and 1 bar.
|
||||
|
|
@ -45,249 +45,266 @@ namespace Cantera {
|
|||
*
|
||||
* @ingroup phases
|
||||
*/
|
||||
class Elements {
|
||||
class Elements {
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
/// Default constructor for the elements class
|
||||
Elements();
|
||||
//! Default constructor for the elements class
|
||||
Elements();
|
||||
|
||||
//! Default destructor for the elements class
|
||||
~Elements();
|
||||
//! Default destructor for the elements class
|
||||
~Elements();
|
||||
|
||||
|
||||
//! copy constructor
|
||||
/*!
|
||||
* This copy constructor just calls the assignment operator for this
|
||||
* class. It sets the number of subscribers to zer0.
|
||||
*
|
||||
* @param right Reference to the object to be copied.
|
||||
*/
|
||||
Elements(const Elements& right);
|
||||
//! copy constructor
|
||||
/*!
|
||||
* This copy constructor just calls the assignment operator for this
|
||||
* class. It sets the number of subscribers to zer0.
|
||||
*
|
||||
* @param right Reference to the object to be copied.
|
||||
*/
|
||||
Elements(const Elements& right);
|
||||
|
||||
//! Assigntment operator
|
||||
/*!
|
||||
* This is the assignment operator for the Elements class.
|
||||
* Right now we pretty much do a straight uncomplicated
|
||||
* assignment. However, subscribers are not mucked with, as they
|
||||
* have to do with the address of the object to be subscribed to
|
||||
*
|
||||
* @param right Reference to the object to be copied.
|
||||
*/
|
||||
Elements& operator=(const Elements& right);
|
||||
//! Assigntment operator
|
||||
/*!
|
||||
* This is the assignment operator for the Elements class.
|
||||
* Right now we pretty much do a straight uncomplicated
|
||||
* assignment. However, subscribers are not mucked with, as they
|
||||
* have to do with the address of the object to be subscribed to
|
||||
*
|
||||
* @param right Reference to the object to be copied.
|
||||
*/
|
||||
Elements& operator=(const Elements& right);
|
||||
|
||||
//! Function to lookup the atomic weight of an element
|
||||
/*!
|
||||
* @param ename Element symbol name.
|
||||
*/
|
||||
static double LookupWtElements(const std::string &ename);
|
||||
|
||||
/// Atomic weight of element m.
|
||||
/*!
|
||||
* @param m element index
|
||||
*/
|
||||
doublereal atomicWeight(int m) const { return m_atomicWeights[m]; }
|
||||
//! Static function to look up an atomic weight
|
||||
/*!
|
||||
* This static function looks up the argument string in the
|
||||
* database above and returns the associated molecular weight.
|
||||
* The data are from the periodic table.
|
||||
*
|
||||
* Note: The idea behind this function is to provide a unified
|
||||
* source for the element atomic weights. This helps to
|
||||
* ensure that mass is conserved.
|
||||
*
|
||||
* @param ename String, Only the first 3 characters are significant
|
||||
*
|
||||
* @return
|
||||
* Return value contains the atomic weight of the element
|
||||
* If a match for the string is not found, a value of -1.0 is
|
||||
* returned.
|
||||
*
|
||||
* @exception CanteraError
|
||||
* If a match is not found, a CanteraError is thrown as well
|
||||
*/
|
||||
static double LookupWtElements(const std::string &ename);
|
||||
|
||||
/// Atomic number of element m.
|
||||
/*!
|
||||
* @param m element index
|
||||
*/
|
||||
int atomicNumber(int m) const { return m_atomicNumbers[m]; }
|
||||
/// Atomic weight of element m.
|
||||
/*!
|
||||
* @param m element index
|
||||
*/
|
||||
doublereal atomicWeight(int m) const { return m_atomicWeights[m]; }
|
||||
|
||||
//! Entropy at 298.15 K and 1 bar of stable state
|
||||
//! of the element
|
||||
/*!
|
||||
* units J kmol-1 K-1
|
||||
*
|
||||
* @param m Element index
|
||||
*/
|
||||
doublereal entropyElement298(int m) const;
|
||||
/// Atomic number of element m.
|
||||
/*!
|
||||
* @param m element index
|
||||
*/
|
||||
int atomicNumber(int m) const { return m_atomicNumbers[m]; }
|
||||
|
||||
/// vector of element atomic weights
|
||||
const vector_fp& atomicWeights() const { return m_atomicWeights; }
|
||||
//! Entropy at 298.15 K and 1 bar of stable state
|
||||
//! of the element
|
||||
/*!
|
||||
* units J kmol-1 K-1
|
||||
*
|
||||
* @param m Element index
|
||||
*/
|
||||
doublereal entropyElement298(int m) const;
|
||||
|
||||
/**
|
||||
* Inline function that returns the number of elements in the object.
|
||||
*
|
||||
* @return
|
||||
* \c int: The number of elements in the object.
|
||||
*/
|
||||
int nElements() const { return m_mm; }
|
||||
/// vector of element atomic weights
|
||||
const vector_fp& atomicWeights() const { return m_atomicWeights; }
|
||||
|
||||
//! Function that returns the index of an element.
|
||||
/*!
|
||||
* Index of element named \c name. The index is an integer
|
||||
* assigned to each element in the order it was added,
|
||||
* beginning with 0 for the first element. If \c name is not
|
||||
* the name of an element in the set, then the value -1 is
|
||||
* returned.
|
||||
*
|
||||
* @param name String containing the index.
|
||||
*/
|
||||
int elementIndex(std::string name) const;
|
||||
/**
|
||||
* Inline function that returns the number of elements in the object.
|
||||
*
|
||||
* @return
|
||||
* \c int: The number of elements in the object.
|
||||
*/
|
||||
int nElements() const { return m_mm; }
|
||||
|
||||
//! Function that returns the index of an element.
|
||||
/*!
|
||||
* Index of element named \c name. The index is an integer
|
||||
* assigned to each element in the order it was added,
|
||||
* beginning with 0 for the first element. If \c name is not
|
||||
* the name of an element in the set, then the value -1 is
|
||||
* returned.
|
||||
*
|
||||
* @param name String containing the index.
|
||||
*/
|
||||
int elementIndex(std::string name) const;
|
||||
|
||||
//! Name of the element with index \c m.
|
||||
/*!
|
||||
* @param m Element index. If m < 0 or m >= nElements() an exception is thrown.
|
||||
*/
|
||||
std::string elementName(int m) const;
|
||||
//! Name of the element with index \c m.
|
||||
/*!
|
||||
* @param m Element index. If m < 0 or m >= nElements() an exception is thrown.
|
||||
*/
|
||||
std::string elementName(int m) const;
|
||||
|
||||
//! Returns a string vector containing the element names
|
||||
/*!
|
||||
* Returns a read-only reference to the vector of element names.
|
||||
* @return <tt> const vector<string>& </tt>: The vector contains
|
||||
* the element names in their indexed order.
|
||||
*/
|
||||
const std::vector<std::string>& elementNames() const {
|
||||
return m_elementNames;
|
||||
}
|
||||
//! Returns a string vector containing the element names
|
||||
/*!
|
||||
* Returns a read-only reference to the vector of element names.
|
||||
* @return <tt> const vector<string>& </tt>: The vector contains
|
||||
* the element names in their indexed order.
|
||||
*/
|
||||
const std::vector<std::string>& elementNames() const {
|
||||
return m_elementNames;
|
||||
}
|
||||
|
||||
//! Add an element to the current set of elements in the current object.
|
||||
/*!
|
||||
* The default weight is a special value, which will cause the
|
||||
* routine to look up the actual weight via a string lookup.
|
||||
*
|
||||
* There are two interfaces to this routine. The XML interface
|
||||
* looks up the required parameters for the regular interface
|
||||
* and then calls the base routine.
|
||||
*
|
||||
* @param symbol string symbol for the element.
|
||||
* @param weight Atomic weight of the element. If no argument
|
||||
* is provided, a lookup is attempted.
|
||||
*/
|
||||
void addElement(const std::string& symbol,
|
||||
doublereal weight = -12345.0);
|
||||
//! Add an element to the current set of elements in the current object.
|
||||
/*!
|
||||
* The default weight is a special value, which will cause the
|
||||
* routine to look up the actual weight via a string lookup.
|
||||
*
|
||||
* There are two interfaces to this routine. The XML interface
|
||||
* looks up the required parameters for the regular interface
|
||||
* and then calls the base routine.
|
||||
*
|
||||
* @param symbol string symbol for the element.
|
||||
* @param weight Atomic weight of the element. If no argument
|
||||
* is provided, a lookup is attempted.
|
||||
*/
|
||||
void addElement(const std::string& symbol,
|
||||
doublereal weight = -12345.0);
|
||||
|
||||
//! Add an element to the current set of elements in the current object.
|
||||
/*!
|
||||
* @param e Reference to the XML_Node containing the element information
|
||||
* The node name is the element symbol and the atomWt attribute
|
||||
* is used as the atomic weight.
|
||||
*/
|
||||
void addElement(const XML_Node& e);
|
||||
//! Add an element to the current set of elements in the current object.
|
||||
/*!
|
||||
* @param e Reference to the XML_Node containing the element information
|
||||
* The node name is the element symbol and the atomWt attribute
|
||||
* is used as the atomic weight.
|
||||
*/
|
||||
void addElement(const XML_Node& e);
|
||||
|
||||
//! Add an element only if the element hasn't been added before.
|
||||
/*!
|
||||
* This is accomplished via a string match on symbol.
|
||||
*
|
||||
* @param symbol string symbol for the element.
|
||||
* @param weight Atomic weight of the element. If no argument
|
||||
* is provided, a lookup is attempted.
|
||||
* @param atomicNumber defaults to 0
|
||||
* @param entropy298 Value of the entropy at 298 and 1 bar of the
|
||||
* element in its most stable form.
|
||||
* The default is to specify an ENTROPY298_UNKNOWN value,
|
||||
* which will cause a throw error if its ever
|
||||
* needed.
|
||||
*/
|
||||
void addUniqueElement(const std::string& symbol,
|
||||
doublereal weight = -12345.0, int atomicNumber = 0,
|
||||
doublereal entropy298 = ENTROPY298_UNKNOWN);
|
||||
//! Add an element only if the element hasn't been added before.
|
||||
/*!
|
||||
* This is accomplished via a string match on symbol.
|
||||
*
|
||||
* @param symbol string symbol for the element.
|
||||
* @param weight Atomic weight of the element. If no argument
|
||||
* is provided, a lookup is attempted.
|
||||
* @param atomicNumber defaults to 0
|
||||
* @param entropy298 Value of the entropy at 298 and 1 bar of the
|
||||
* element in its most stable form.
|
||||
* The default is to specify an ENTROPY298_UNKNOWN value,
|
||||
* which will cause a throw error if its ever
|
||||
* needed.
|
||||
*/
|
||||
void addUniqueElement(const std::string& symbol,
|
||||
doublereal weight = -12345.0, int atomicNumber = 0,
|
||||
doublereal entropy298 = ENTROPY298_UNKNOWN);
|
||||
|
||||
//! Add an element to the current set of elements in the current object.
|
||||
/*!
|
||||
* @param e Reference to the XML_Node containing the element information
|
||||
* The node name is the element symbol and the atomWt attribute
|
||||
* is used as the atomic weight.
|
||||
*/
|
||||
void addUniqueElement(const XML_Node& e);
|
||||
//! Add an element to the current set of elements in the current object.
|
||||
/*!
|
||||
* @param e Reference to the XML_Node containing the element information
|
||||
* The node name is the element symbol and the atomWt attribute
|
||||
* is used as the atomic weight.
|
||||
*/
|
||||
void addUniqueElement(const XML_Node& e);
|
||||
|
||||
//! Add multiple elements from a XML_Node phase description
|
||||
/*!
|
||||
* @param phase XML_Node reference to a phase
|
||||
*/
|
||||
void addElementsFromXML(const XML_Node& phase);
|
||||
//! Add multiple elements from a XML_Node phase description
|
||||
/*!
|
||||
* @param phase XML_Node reference to a phase
|
||||
*/
|
||||
void addElementsFromXML(const XML_Node& phase);
|
||||
|
||||
//! Prohibit addition of more elements, and prepare to add species.
|
||||
void freezeElements();
|
||||
//! Prohibit addition of more elements, and prepare to add species.
|
||||
void freezeElements();
|
||||
|
||||
/// True if freezeElements has been called.
|
||||
bool elementsFrozen() { return m_elementsFrozen; }
|
||||
/// True if freezeElements has been called.
|
||||
bool elementsFrozen() { return m_elementsFrozen; }
|
||||
|
||||
/// Remove all elements
|
||||
void clear();
|
||||
/// Remove all elements
|
||||
void clear();
|
||||
|
||||
/// True if both elements and species have been frozen
|
||||
bool ready() const;
|
||||
/// True if both elements and species have been frozen
|
||||
bool ready() const;
|
||||
|
||||
|
||||
//! subscribe to this object
|
||||
/*!
|
||||
* Increment by one the number of subscriptions to this object.
|
||||
*/
|
||||
void subscribe();
|
||||
//! subscribe to this object
|
||||
/*!
|
||||
* Increment by one the number of subscriptions to this object.
|
||||
*/
|
||||
void subscribe();
|
||||
|
||||
//! unsubscribe to this object
|
||||
/*!
|
||||
* decrement by one the number of subscriptions to this object.
|
||||
*/
|
||||
int unsubscribe();
|
||||
//! unsubscribe to this object
|
||||
/*!
|
||||
* decrement by one the number of subscriptions to this object.
|
||||
*/
|
||||
int unsubscribe();
|
||||
|
||||
//! report the number of subscriptions
|
||||
int reportSubscriptions() const;
|
||||
//! report the number of subscriptions
|
||||
int reportSubscriptions() const;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
/******************************************************************/
|
||||
/* Description of DATA in the Object */
|
||||
/******************************************************************/
|
||||
/******************************************************************/
|
||||
/* Description of DATA in the Object */
|
||||
/******************************************************************/
|
||||
|
||||
//! Number of elements.
|
||||
int m_mm;
|
||||
//! Number of elements.
|
||||
int m_mm;
|
||||
|
||||
/* m_elementsFrozen: */
|
||||
/** boolean indicating completion of object
|
||||
*
|
||||
* If this is true, then no elements may be added to the
|
||||
* object.
|
||||
*/
|
||||
bool m_elementsFrozen;
|
||||
/* m_elementsFrozen: */
|
||||
/** boolean indicating completion of object
|
||||
*
|
||||
* If this is true, then no elements may be added to the
|
||||
* object.
|
||||
*/
|
||||
bool m_elementsFrozen;
|
||||
|
||||
/**
|
||||
* Vector of element atomic weights:
|
||||
*
|
||||
* units = kg / kmol
|
||||
*/
|
||||
vector_fp m_atomicWeights;
|
||||
/**
|
||||
* Vector of element atomic weights:
|
||||
*
|
||||
* units = kg / kmol
|
||||
*/
|
||||
vector_fp m_atomicWeights;
|
||||
|
||||
/**
|
||||
* Vector of element atomic numbers:
|
||||
*
|
||||
*/
|
||||
vector_int m_atomicNumbers;
|
||||
/**
|
||||
* Vector of element atomic numbers:
|
||||
*
|
||||
*/
|
||||
vector_int m_atomicNumbers;
|
||||
|
||||
/** Vector of strings containing the names of the elements
|
||||
*
|
||||
* Note, a string search is the primary way to identify elements.
|
||||
*/
|
||||
std::vector<std::string> m_elementNames;
|
||||
/** Vector of strings containing the names of the elements
|
||||
*
|
||||
* Note, a string search is the primary way to identify elements.
|
||||
*/
|
||||
std::vector<std::string> m_elementNames;
|
||||
|
||||
//! Entropy at 298.15 K and 1 bar of stable state
|
||||
/*!
|
||||
* units J kmol-1
|
||||
*/
|
||||
vector_fp m_entropy298;
|
||||
//! Entropy at 298.15 K and 1 bar of stable state
|
||||
/*!
|
||||
* units J kmol-1
|
||||
*/
|
||||
vector_fp m_entropy298;
|
||||
|
||||
/**
|
||||
* Number of Constituents Objects that use this object
|
||||
*
|
||||
* Number of Constituents Objects that require this Elements object
|
||||
* to complete its definition.
|
||||
* The destructor checks to see that this is equal to zero.
|
||||
* when the element object is released.
|
||||
*/
|
||||
int numSubscribers;
|
||||
/**
|
||||
* Number of Constituents Objects that use this object
|
||||
*
|
||||
* Number of Constituents Objects that require this Elements object
|
||||
* to complete its definition.
|
||||
* The destructor checks to see that this is equal to zero.
|
||||
* when the element object is released.
|
||||
*/
|
||||
int numSubscribers;
|
||||
|
||||
/********* GLOBAL STATIC SECTION *************/
|
||||
/********* GLOBAL STATIC SECTION *************/
|
||||
|
||||
public:
|
||||
/** Vector of pointers to Elements Objects
|
||||
*
|
||||
*/
|
||||
static std::vector<Elements *> Global_Elements_List;
|
||||
public:
|
||||
/** Vector of pointers to Elements Objects
|
||||
*
|
||||
*/
|
||||
static std::vector<Elements *> Global_Elements_List;
|
||||
|
||||
friend class Constituents;
|
||||
};
|
||||
friend class Constituents;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ namespace Cantera {
|
|||
constructPhaseXML(phaseRoot, id);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Copy Constructor:
|
||||
*
|
||||
* Note this stuff will not work until the underlying phase
|
||||
|
|
@ -254,7 +254,7 @@ namespace Cantera {
|
|||
*this = b;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* operator=()
|
||||
*
|
||||
* Note this stuff will not work until the underlying phase
|
||||
|
|
@ -578,7 +578,7 @@ namespace Cantera {
|
|||
printCoeffs();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* ~HMWSoln(): (virtual)
|
||||
*
|
||||
* Destructor: does nothing:
|
||||
|
|
@ -589,7 +589,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* duplMyselfAsThermoPhase():
|
||||
*
|
||||
* This routine operates at the ThermoPhase level to
|
||||
|
|
@ -601,7 +601,7 @@ namespace Cantera {
|
|||
return (ThermoPhase *) mtp;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Equation of state type flag. The base class returns
|
||||
* zero. Subclasses should define this to return a unique
|
||||
* non-zero value. Constants defined for this purpose are
|
||||
|
|
@ -628,7 +628,7 @@ namespace Cantera {
|
|||
//
|
||||
// -------- Molar Thermodynamic Properties of the Solution ---------------
|
||||
//
|
||||
/**
|
||||
/*
|
||||
* Molar enthalpy of the solution. Units: J/kmol.
|
||||
*/
|
||||
doublereal HMWSoln::enthalpy_mole() const {
|
||||
|
|
@ -695,7 +695,7 @@ namespace Cantera {
|
|||
return L;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Molar internal energy of the solution. Units: J/kmol.
|
||||
*
|
||||
* This is calculated from the soln enthalpy and then
|
||||
|
|
@ -709,7 +709,7 @@ namespace Cantera {
|
|||
return uu;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Molar soln entropy at constant pressure. Units: J/kmol/K.
|
||||
*
|
||||
* This is calculated from the partial molar entropies.
|
||||
|
|
@ -725,7 +725,7 @@ namespace Cantera {
|
|||
return mean_X(DATA_PTR(m_tmpV));
|
||||
}
|
||||
|
||||
/** Molar heat capacity at constant pressure. Units: J/kmol/K.
|
||||
/* Molar heat capacity at constant pressure. Units: J/kmol/K.
|
||||
*
|
||||
* Returns the solution heat capacition at constant pressure.
|
||||
* This is calculated from the partial molar heat capacities.
|
||||
|
|
@ -736,7 +736,7 @@ namespace Cantera {
|
|||
return val;
|
||||
}
|
||||
|
||||
/// Molar heat capacity at constant volume. Units: J/kmol/K.
|
||||
// Molar heat capacity at constant volume. Units: J/kmol/K.
|
||||
doublereal HMWSoln::cv_mole() const {
|
||||
//getPartialMolarCv(m_tmpV.begin());
|
||||
//return mean_X(m_tmpV.begin());
|
||||
|
|
@ -757,7 +757,7 @@ namespace Cantera {
|
|||
return m_Pcurrent;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set the pressure at constant temperature. Units: Pa.
|
||||
* This method sets a constant within the object.
|
||||
* The mass density is not a function of pressure.
|
||||
|
|
@ -779,7 +779,7 @@ namespace Cantera {
|
|||
State::setDensity(dd);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* The isothermal compressibility. Units: 1/Pa.
|
||||
* The isothermal compressibility is defined as
|
||||
* \f[
|
||||
|
|
@ -795,7 +795,7 @@ namespace Cantera {
|
|||
//return 0.0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* The thermal expansion coefficient. Units: 1/K.
|
||||
* The thermal expansion coefficient is defined as
|
||||
*
|
||||
|
|
@ -817,7 +817,7 @@ namespace Cantera {
|
|||
return State::density();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Overwritten setDensity() function is necessary because the
|
||||
* density is not an indendent variable.
|
||||
*
|
||||
|
|
@ -846,7 +846,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Overwritten setMolarDensity() function is necessary because the
|
||||
* density is not an indendent variable.
|
||||
*
|
||||
|
|
@ -1057,7 +1057,7 @@ namespace Cantera {
|
|||
//
|
||||
// ------ Partial Molar Properties of the Solution -----------------
|
||||
//
|
||||
/**
|
||||
/*
|
||||
* Get the species chemical potentials. Units: J/kmol.
|
||||
*
|
||||
* This function returns a vector of chemical potentials of the
|
||||
|
|
@ -1333,12 +1333,12 @@ namespace Cantera {
|
|||
* -------------- Utilities -------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
/*
|
||||
* @internal
|
||||
* Set equation of state parameters. The number and meaning of
|
||||
* these depends on the subclass.
|
||||
* @param n number of parameters
|
||||
* @param c array of \i n coefficients
|
||||
* @param c array of <I>n</I> coefficients
|
||||
*
|
||||
*/
|
||||
void HMWSoln::setParameters(int n, doublereal* const c) {
|
||||
|
|
@ -1346,7 +1346,7 @@ namespace Cantera {
|
|||
|
||||
void HMWSoln::getParameters(int &n, doublereal * const c) const {
|
||||
}
|
||||
/**
|
||||
/*
|
||||
* Set equation of state parameter values from XML
|
||||
* entries. This method is called by function importPhase in
|
||||
* file importCTML.cpp when processing a phase definition in
|
||||
|
|
@ -1382,7 +1382,7 @@ namespace Cantera {
|
|||
return pres;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Report the molar volume of species k
|
||||
*
|
||||
* units - \f$ m^3 kmol^-1 \f$
|
||||
|
|
@ -1442,7 +1442,7 @@ namespace Cantera {
|
|||
return A;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* dA_DebyedT_TP() (virtual)
|
||||
*
|
||||
* Returns the derivative of the A_Debye parameter with
|
||||
|
|
@ -1477,7 +1477,7 @@ namespace Cantera {
|
|||
return dAdT;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* dA_DebyedP_TP() (virtual)
|
||||
*
|
||||
* Returns the derivative of the A_Debye parameter with
|
||||
|
|
@ -1512,7 +1512,7 @@ namespace Cantera {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Calculate the DH Parameter used for the Enthalpy calcalations
|
||||
*
|
||||
* ADebye_L = 4 R T**2 d(Aphi) / dT
|
||||
|
|
@ -1533,7 +1533,7 @@ namespace Cantera {
|
|||
return retn;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Calculate the DH Parameter used for the Volume calcalations
|
||||
*
|
||||
* ADebye_V = - 4 R T d(Aphi) / dP
|
||||
|
|
@ -1554,7 +1554,7 @@ namespace Cantera {
|
|||
return retn;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Return Pitzer's definition of A_J. This is basically the
|
||||
* temperature derivative of A_L, and the second derivative
|
||||
* of Aphi
|
||||
|
|
@ -1584,7 +1584,7 @@ namespace Cantera {
|
|||
return retn;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* d2A_DebyedT2_TP() (virtual)
|
||||
*
|
||||
* Returns the 2nd derivative of the A_Debye parameter with
|
||||
|
|
@ -1645,7 +1645,7 @@ namespace Cantera {
|
|||
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* initLengths():
|
||||
*
|
||||
* This internal function adjusts the lengths of arrays based on
|
||||
|
|
@ -1922,8 +1922,8 @@ namespace Cantera {
|
|||
/*
|
||||
* Find the counterIJ for the symmetric binary interaction
|
||||
*/
|
||||
//n = m_kk*i + j;
|
||||
//counterIJ = m_CounterIJ[n];
|
||||
// n = m_kk*i + j;
|
||||
// counterIJ = m_CounterIJ[n];
|
||||
/*
|
||||
* Only loop over oppositely charge species
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ namespace Cantera {
|
|||
* @code
|
||||
<binarySaltParameters cation="Na+" anion="OH-">
|
||||
<beta0> q0, q1, q2, q3, q4 </beta0>
|
||||
<\binarySaltParameters>
|
||||
</binarySaltParameters>
|
||||
@endcode
|
||||
*
|
||||
* The parameters for \f$ \beta^{(0)}\f$ fit the following equation:
|
||||
|
|
@ -686,9 +686,9 @@ namespace Cantera {
|
|||
*
|
||||
* This same COMPLEX1 </TT> temperature
|
||||
* dependence given above is used for the following parameters:
|
||||
* \f$\beta^{(0)}_{MX} \f$, \f$\beta^{(1)}_{MX} \f$,
|
||||
* \f$\beta^{(2)}_{MX} \f$, \f$ \Theta_{cc'} \f$, \f$\Theta_{aa'} \f$,
|
||||
* \f$ \Psi_{c{c'}a}\f$ and \f$ \Psi_{ca{a'}} \f$.
|
||||
* \f$ \beta^{(0)}_{MX} \f$, \f$ \beta^{(1)}_{MX} \f$,
|
||||
* \f$ \beta^{(2)}_{MX} \f$, \f$ \Theta_{cc'} \f$, \f$\Theta_{aa'} \f$,
|
||||
* \f$ \Psi_{c{c'}a} \f$ and \f$ \Psi_{ca{a'}} \f$.
|
||||
*
|
||||
*
|
||||
* <H3> Like-Charged Binary Ion Parameters and the Mixing Parameters </H3>
|
||||
|
|
@ -813,8 +813,7 @@ namespace Cantera {
|
|||
<lambdaNeutral species1="CO2" species2="CH4">
|
||||
<lambda> 0.05 </lambda>
|
||||
</lambdaNeutral>
|
||||
@endcode
|
||||
|
||||
@endcode
|
||||
*
|
||||
* <H3> Example of the Specification of Parameters for the Activity
|
||||
* Coefficients </H3>
|
||||
|
|
@ -824,7 +823,7 @@ namespace Cantera {
|
|||
* An example <TT> activityCoefficients </TT> XML block for this
|
||||
* formulation is supplied below
|
||||
*
|
||||
* @code
|
||||
* @verbatim
|
||||
<activityCoefficients model="Pitzer" TempModel="complex1">
|
||||
<!-- Pitzer Coefficients
|
||||
These coefficients are from Pitzer's main
|
||||
|
|
@ -880,7 +879,7 @@ namespace Cantera {
|
|||
</psiCommonAnion>
|
||||
|
||||
</activityCoefficients>
|
||||
* @endcode
|
||||
@endverbatim
|
||||
*
|
||||
*
|
||||
* <H3> Specification of the Debye-Huckel Constant </H3>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ using namespace std;
|
|||
|
||||
namespace Cantera {
|
||||
|
||||
/**
|
||||
/*
|
||||
* Constructor for IdealSolidSolnPhase class:
|
||||
* The default form for the generalized concentrations is 0
|
||||
* i.e., unity.
|
||||
|
|
@ -313,7 +313,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* setPressure(double) (virtual from ThermoPhase)
|
||||
*
|
||||
* Set the pressure at constant temperature. Units: Pa.
|
||||
|
|
@ -331,7 +331,7 @@ namespace Cantera {
|
|||
calcDensity();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* setMolarDensity() (virtual from State)
|
||||
* Overwritten setMolarDensity() function is necessary because the
|
||||
* density is not an indendent variable.
|
||||
|
|
@ -346,7 +346,7 @@ namespace Cantera {
|
|||
"Density is not an independent variable");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* setMoleFractions() (virtual from State)
|
||||
*
|
||||
* Sets the mole fractions and adjusts the internal density.
|
||||
|
|
@ -366,7 +366,7 @@ namespace Cantera {
|
|||
calcDensity();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* setMassFractions() (virtual from State)
|
||||
*
|
||||
* Sets the mass fractions and adjusts the internal density.
|
||||
|
|
@ -376,7 +376,7 @@ namespace Cantera {
|
|||
calcDensity();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* setMassFractions_NoNorm() (virtual from State)
|
||||
*
|
||||
* Sets the mass fractions and adjusts the internal density.
|
||||
|
|
@ -386,7 +386,7 @@ namespace Cantera {
|
|||
calcDensity();
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* setConcentrations (virtual from State)
|
||||
*
|
||||
* Sets the concentrations and adjusts the internal density
|
||||
|
|
@ -596,7 +596,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
/*
|
||||
* getActivityCoefficients():
|
||||
*
|
||||
*/
|
||||
|
|
@ -606,8 +606,8 @@ namespace Cantera {
|
|||
ac[k] = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
//================================================================================================
|
||||
/*
|
||||
*
|
||||
* getChemPotentials():
|
||||
*
|
||||
|
|
@ -635,8 +635,8 @@ namespace Cantera {
|
|||
+ delta_p * m_speciesMolarVolume[k];
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
//================================================================================================
|
||||
/*
|
||||
*
|
||||
* getChemPotentials_RT()
|
||||
*
|
||||
|
|
@ -920,7 +920,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the vector of non-dimensional Gibbs function
|
||||
* of the reference state at the current temperature
|
||||
* of the solution and the reference pressure for the species.
|
||||
|
|
@ -933,7 +933,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the vector of Gibbs function
|
||||
* of the reference state at the current temperature
|
||||
* of the solution and the reference pressure for the species.
|
||||
|
|
@ -947,7 +947,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the vector of nondimensional
|
||||
* internal Energies of the standard state at the current temperature
|
||||
* of the solution and current pressure for each species.
|
||||
|
|
@ -961,7 +961,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the vector of non-dimensional Entropy function
|
||||
* of the reference state at the current temperature
|
||||
* of the solution and the reference pressure for the species.
|
||||
|
|
@ -974,7 +974,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns the vector of non-dimensional Entropy function
|
||||
* of the reference state at the current temperature
|
||||
* of the solution and the reference pressure for the species.
|
||||
|
|
@ -987,7 +987,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns a reference to the vector of nondimensional
|
||||
* enthalpies of the reference state at the current temperature.
|
||||
* Real reason for its existence is that it also checks
|
||||
|
|
@ -999,7 +999,7 @@ namespace Cantera {
|
|||
return m_h0_RT;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns a reference to the vector of nondimensional
|
||||
* enthalpies of the reference state at the current temperature.
|
||||
* Real reason for its existence is that it also checks
|
||||
|
|
@ -1013,7 +1013,7 @@ namespace Cantera {
|
|||
return m_expg0_RT;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Returns a reference to the vector of nondimensional
|
||||
* enthalpies of the reference state at the current temperature.
|
||||
* Real reason for its existence is that it also checks
|
||||
|
|
@ -1028,7 +1028,7 @@ namespace Cantera {
|
|||
/*********************************************************************
|
||||
* Utility Functions
|
||||
*********************************************************************/
|
||||
/**
|
||||
/*
|
||||
* initThermo() function initializes the object for use.
|
||||
*
|
||||
* Before its invokation, the class isn't ready for calculation.
|
||||
|
|
@ -1036,7 +1036,7 @@ namespace Cantera {
|
|||
void IdealSolidSolnPhase::initThermo() {
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Import and initialize an IdealSolidSolnPhase phase
|
||||
* specification in an XML tree into the current object.
|
||||
* Here we read an XML description of the phase.
|
||||
|
|
@ -1121,7 +1121,7 @@ namespace Cantera {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Initialization of an IdealSolidSolnPhase phase using an
|
||||
* xml file
|
||||
*
|
||||
|
|
@ -1166,7 +1166,7 @@ namespace Cantera {
|
|||
delete fxml;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @internal
|
||||
* Import and initialize a ThermoPhase object
|
||||
* using an XML tree.
|
||||
|
|
@ -1263,7 +1263,7 @@ namespace Cantera {
|
|||
ThermoPhase::initThermoXML(phaseNode, id);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This internal function adjusts the lengths of arrays
|
||||
*/
|
||||
void IdealSolidSolnPhase::
|
||||
|
|
@ -1299,7 +1299,7 @@ namespace Cantera {
|
|||
m_speciesMolarVolume.resize(leng);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Set mixture to an equilibrium state consistent with specified
|
||||
* element potentials and temperature.
|
||||
*
|
||||
|
|
@ -1326,8 +1326,8 @@ namespace Cantera {
|
|||
doublereal *dptr = DATA_PTR(m_pp);
|
||||
setState_PX(pres, dptr);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
//================================================================================================
|
||||
/*
|
||||
*
|
||||
* speciesMolarVolume()
|
||||
*
|
||||
|
|
@ -1341,7 +1341,7 @@ namespace Cantera {
|
|||
return m_speciesMolarVolume[k];
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
*
|
||||
* getSpeciesMolarVolumes():
|
||||
*
|
||||
|
|
@ -1353,8 +1353,8 @@ namespace Cantera {
|
|||
{
|
||||
copy(m_speciesMolarVolume.begin(), m_speciesMolarVolume.end(), smv);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
//================================================================================================
|
||||
/*
|
||||
*
|
||||
* _updateThermo()
|
||||
*
|
||||
|
|
@ -1386,4 +1386,6 @@ namespace Cantera {
|
|||
m_tlast = tnow;
|
||||
}
|
||||
}
|
||||
}
|
||||
//================================================================================================
|
||||
} // end namespace Cantera
|
||||
//==================================================================================================
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue